Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new driver/coupler for GEOS-ESM #959

Draft
wants to merge 89 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
4666242
added customized machine files for discover
zhaobin74 Mar 3, 2022
d2410e8
added discover machine in batch and launch
zhaobin74 Mar 4, 2022
7fd4046
tweak include and lib options for discover
zhaobin74 Mar 4, 2022
b85f95a
fix the input data directory
zhaobin74 Mar 7, 2022
e7f3995
fix mpirun command
zhaobin74 Mar 7, 2022
1e95998
added mapl geos driver
zhaobin74 Mar 10, 2022
50701db
added mpi comm to init arguments
zhaobin74 Mar 11, 2022
9a9d512
added run module
zhaobin74 Mar 21, 2022
0a19d70
added a new module
zhaobin74 Mar 25, 2022
b0ccb02
added import_export module
zhaobin74 Apr 2, 2022
28acfe0
work on importing
zhaobin74 Apr 21, 2022
477fffc
finishing import_thermo1 and related moddule changes
zhaobin74 Apr 25, 2022
1af7127
continue importing/exporting stuff
zhaobin74 Jul 21, 2022
1525271
finishing export_thermo1
zhaobin74 Aug 16, 2022
98e3f4b
added ifdef to protect additional arguments
zhaobin74 Oct 25, 2022
0f4e7ea
remove icepack from submodule
zhaobin74 Oct 25, 2022
aa3a6b0
add additional exchange fields
zhaobin74 Nov 8, 2022
5da104d
fixed compilation errors
zhaobin74 Dec 1, 2022
807c7dc
change init/init_calendar interface to take in coupled model's date/time
zhaobin74 Dec 13, 2022
dc16b5f
receive layout information from coupler
zhaobin74 Dec 15, 2022
eaeebd8
add radiation call in fast_physics
zhaobin74 Dec 20, 2022
ec0923f
prevent cice from stopping or dumping restart when coupled to geos
zhaobin74 Dec 20, 2022
bc05d19
allow a new type of grid which resets tmask
zhaobin74 Dec 22, 2022
25b92fc
allow albedo and thermo done on non-ocean points (tmask == 0); to be …
zhaobin74 Dec 23, 2022
52cbbf7
export albedos to geos
zhaobin74 Jan 5, 2023
7c736ee
import sst and sss from surfstate
zhaobin74 Jan 12, 2023
ff6180f
fixed a bug; feed frzmlt from coupler
zhaobin74 Jan 12, 2023
9ad8624
resolved inconsistent value of MAPL_TICE and Tffresh
zhaobin74 Jan 12, 2023
f1d6fea
reset some icepack parameters using MAPL values
zhaobin74 Jan 12, 2023
03656df
disable some ice_debug calls to focus on thermo only
zhaobin74 Jan 13, 2023
415cc3d
pass task, i, j, and iblk to icepack for aiding debugging
zhaobin74 Jan 13, 2023
9d4758e
refactor paasing addtional arguments to icepack
zhaobin74 Jan 17, 2023
d2c7110
added import, export and routines used by prep_albedo callback
zhaobin74 Jan 24, 2023
df5613c
add a step_radiation like subroutine without side effect
zhaobin74 Jan 27, 2023
d91baab
add a mechanism to change CICE time step regardless of its value in i…
zhaobin74 Jan 27, 2023
4cc3d5e
allow extra penetrative sw flux to be computed by CICE
zhaobin74 Jan 27, 2023
9ae2594
refactored code for obtaining addtional penetrative sw flux through i…
zhaobin74 Jan 30, 2023
eb323d1
add back init_shortwave call
zhaobin74 Jan 31, 2023
4d2c147
switch back to using step_radiation by ignoring side effect
zhaobin74 Feb 1, 2023
aac9b8c
fix flux coupling to atmosphere; not finished
zhaobin74 Feb 2, 2023
660166c
finished coupling_atm subroutin; replace all aice with aice_init
zhaobin74 Feb 4, 2023
fec184a
added missing arguments of fswthru_*dr/df and opmask in scale_flux
zhaobin74 Feb 6, 2023
1bc0b53
init fswthru_*dr/df to zero; allow scale_flux to run over orphan points
zhaobin74 Feb 6, 2023
4971c5b
add exporting after the CICE complete one full time step
zhaobin74 Feb 7, 2023
22dae37
scale atm and ocn flux separately
zhaobin74 Feb 8, 2023
7eb2ccd
add a checkpoint routine to dump restart during Finalize
zhaobin74 Feb 8, 2023
85b12a5
fixed a string argument bug in restart routines
zhaobin74 Feb 9, 2023
d9a3e9a
fixed a bug of zeroing out tracers over orphan points
zhaobin74 Feb 9, 2023
f4d7d33
no need to scale radiation in GEOS
zhaobin74 Feb 10, 2023
a1eef4f
add halo update for frocean; use puny instead of 0
zhaobin74 Feb 10, 2023
b17cf9c
init some column arrays to zero; add opmask along with tmask in if st…
zhaobin74 Feb 10, 2023
b14b986
rearrange init_flux_atm and init_flux_ocn; fixed the timer_step
zhaobin74 Feb 13, 2023
9062bd1
add two more fluxes in init_flux_atm
zhaobin74 Feb 14, 2023
c71d6be
remove reset_*_flux and call init_flux_*
zhaobin74 Feb 14, 2023
058582b
remove Tsfc assignment in import_thermo1; use new Tsfcn_init to compu…
zhaobin74 Feb 15, 2023
d226c61
created a new Tsfcn_init and save initial Tskin in it
zhaobin74 Feb 15, 2023
998643d
add accum_hist call at the end of init
zhaobin74 Feb 22, 2023
a80f805
fixed a bufg computing dTS; add exporting GHTSKIN
zhaobin74 Feb 25, 2023
44e5bd9
add importing wind stress and rotating them
zhaobin74 Mar 3, 2023
69cdb1d
output more block extent information for debug_block
zhaobin74 Mar 7, 2023
a6d97a4
fixed length of string format
zhaobin74 Mar 8, 2023
252700f
rename cicecore/cicedynB to cicecore/cicedyn; CICE6.4.1 made this ren…
zhaobin74 Mar 9, 2023
0233286
import ssh and compute ss_tlt* terms
zhaobin74 Mar 10, 2023
a2206d2
add importing currents and exporting ice-ocean stress and ice vel
zhaobin74 Mar 14, 2023
201f5ba
fix alncnt computation; do not use netsw condition for ccsm3 type alb…
zhaobin74 Mar 20, 2023
0bbc6a2
fixed a bug of fsurf not getting assigned values
zhaobin74 Mar 22, 2023
7be0e36
merged with CICE6.4.1; conflicts resolved and to be tested
zhaobin74 Apr 19, 2023
f812b40
update comments to 6.4.1
zhaobin74 Apr 20, 2023
53d3bca
revert scale_flux back to original version; geos coupler does not use…
zhaobin74 Apr 25, 2023
21d4f0a
fixed regression issue by adding opmask in conitional if
zhaobin74 Apr 28, 2023
4b083b2
changes to go with refactored icepack code
zhaobin74 May 5, 2023
5348ece
additions/changes to make test(suites) runs on discover
zhaobin74 May 16, 2023
8061be3
add GEOS macro to isolate extra arguments
zhaobin74 May 17, 2023
dabdd6b
correct halo_update for coupling to GEOS
zhaobin74 May 19, 2023
45e3382
enable C-EVP by importing MOM6 C-grid currents (#2)
zhaobin74 Sep 21, 2023
ae59cc0
make cice6 dump intermediate restart (#3)
zhaobin74 Oct 16, 2023
a5e75e6
keep allland blocks when coupling to GEOS-ESM
zhaobin74 Oct 19, 2023
771d550
Merge pull request #4 from GEOS-ESM/feature/zhaobin74/stop-landblock-…
zhaobin74 Oct 19, 2023
b4caf80
add support for rewinding thermo states (#5)
zhaobin74 Nov 14, 2023
e85361e
merged with CICE main post 650; to be built and tested
zhaobin74 Apr 23, 2024
e192827
remove deprecated vars and routines from geos driver
zhaobin74 Apr 24, 2024
1fc530b
more fixes for driver after merging post 650
zhaobin74 Apr 24, 2024
1b3015f
fix halo update of u/vocn and sstlt terms based on B or C ice grid
zhaobin74 Apr 26, 2024
d7b5971
Merge pull request #6 from GEOS-ESM/feature/zhaobin74/merge-main-post650
zhaobin74 May 3, 2024
2af5ee5
remove debugging facility code
zhaobin74 Jun 5, 2024
ebbbd3f
restore .gitmodules file
zhaobin74 Jun 6, 2024
16a6f29
add missing comments on GEOS input fields
zhaobin74 Jun 12, 2024
65abb61
corrected comments on GEOS inputs
zhaobin74 Jun 12, 2024
7eb5e71
fill in fsw from coupler fields
zhaobin74 Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ doc/build
# Ignore testsuite file/directories
testsuite*
caselist*

# icepack on its own repo
icepack/
30 changes: 29 additions & 1 deletion cicecore/cicedyn/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,41 @@ subroutine evp (dt)
!-----------------------------------------------------------------

call stack_fields(tmass, aice_init, cdn_ocn, fld3)
call ice_timer_start(timer_bound)
call ice_HaloUpdate (fld3, halo_info, &
field_loc_center, field_type_scalar)
call ice_timer_stop(timer_bound)
call unstack_fields(fld3, tmass, aice_init, cdn_ocn)
#ifdef GEOSCOUPLED
if (grid_ice == 'CD' .or. grid_ice == 'C') then
call stack_fields(uocn, ss_tltx, fld2)
call ice_timer_start(timer_bound)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_Eface, field_type_vector)
call ice_timer_stop(timer_bound)
call unstack_fields(fld2, uocn, ss_tltx)
call stack_fields(vocn, ss_tlty, fld2)
call ice_timer_start(timer_bound)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_Nface, field_type_vector)
call ice_timer_stop(timer_bound)
call unstack_fields(fld2, vocn, ss_tlty)
else
call stack_fields(uocn, vocn, ss_tltx, ss_tlty, fld4)
call ice_timer_start(timer_bound)
call ice_HaloUpdate (fld4, halo_info, &
field_loc_NEcorner, field_type_vector)
call ice_timer_stop(timer_bound)
call unstack_fields(fld4, uocn, vocn, ss_tltx, ss_tlty)
endif
#else
call stack_fields(uocn, vocn, ss_tltx, ss_tlty, fld4)
call ice_timer_start(timer_bound)
call ice_HaloUpdate (fld4, halo_info, &
field_loc_center, field_type_vector)
call unstack_fields(fld3, tmass, aice_init, cdn_ocn)
call ice_timer_stop(timer_bound)
call unstack_fields(fld4, uocn, vocn, ss_tltx, ss_tlty)
#endif

call grid_average_X2Y('S', tmass , 'T' , umass , 'U')
call grid_average_X2Y('S', aice_init, 'T' , aiU , 'U')
Expand Down
Empty file modified cicecore/cicedyn/dynamics/ice_dyn_shared.F90
100644 → 100755
Empty file.
41 changes: 41 additions & 0 deletions cicecore/cicedyn/general/ice_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,24 @@ module ice_flux
fsensn_f , & ! sensible heat flux (W m-2)
flatn_f ! latent heat flux (W m-2)


#ifdef GEOSCOUPLED
! in from atmosphere when coupling to GEOS
real (kind=dbl_kind), &
dimension (:,:,:,:), allocatable, public :: &
evapn_f, & ! evaporation/sublimation (kg m-2 s-1)
dflatndts_f, & ! derivative of latent flux w.r.t. Ts
dfsurfndts_f ! derivative of surface flux w.r.t. Ts

real (kind=dbl_kind), &
dimension (:,:,:), allocatable, public :: &
druvr , & ! vis uvr flux, direct (W m-2)
dfuvr , & ! vis uvr flux, diffuse (W m-2)
drpar , & ! vis par flux, direct (W m-2)
dfpar ! vis par flux, diffuse (W m-2)
#endif


! in from atmosphere

real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: &
Expand Down Expand Up @@ -255,6 +273,10 @@ module ice_flux
fhocn , & ! net heat flux to ocean (W/m^2)
fsloss , & ! rate of snow loss to leads (kg/m^2/s)
fswthru , & ! shortwave penetrating to ocean (W/m^2)
fswthru_uvrdr , & ! vis dir uvr SW penetrating to ocean (W/m^2)
fswthru_uvrdf , & ! vis dif uvr SW penetrating to ocean (W/m^2)
fswthru_pardr , & ! nir dir par SW penetrating to ocean (W/m^2)
fswthru_pardf , & ! nir dif par SW penetrating to ocean (W/m^2)
fswthru_vdr , & ! vis dir shortwave penetrating to ocean (W/m^2)
fswthru_vdf , & ! vis dif shortwave penetrating to ocean (W/m^2)
fswthru_idr , & ! nir dir shortwave penetrating to ocean (W/m^2)
Expand Down Expand Up @@ -500,6 +522,10 @@ subroutine alloc_flux
fhocn (nx_block,ny_block,max_blocks), & ! net heat flux to ocean (W/m^2)
fsloss (nx_block,ny_block,max_blocks), & ! rate of snow loss to leads (kg/m^2/s)
fswthru (nx_block,ny_block,max_blocks), & ! shortwave penetrating to ocean (W/m^2)
fswthru_uvrdr (nx_block,ny_block,max_blocks), & ! vis dir uvr SW penetrating to ocean (W/m^2)
fswthru_uvrdf (nx_block,ny_block,max_blocks), & ! vis dir uvr SW penetrating to ocean (W/m^2)
fswthru_pardr (nx_block,ny_block,max_blocks), & ! vis dir par SW penetrating to ocean (W/m^2)
fswthru_pardf (nx_block,ny_block,max_blocks), & ! vis dir par SW penetrating to ocean (W/m^2)
fswthru_vdr (nx_block,ny_block,max_blocks), & ! vis dir shortwave penetrating to ocean (W/m^2)
fswthru_vdf (nx_block,ny_block,max_blocks), & ! vis dif shortwave penetrating to ocean (W/m^2)
fswthru_idr (nx_block,ny_block,max_blocks), & ! nir dir shortwave penetrating to ocean (W/m^2)
Expand Down Expand Up @@ -568,6 +594,15 @@ subroutine alloc_flux
fcondtopn_f(nx_block,ny_block,ncat,max_blocks), & ! downward cond flux at top surface (W m-2)
fsensn_f (nx_block,ny_block,ncat,max_blocks), & ! sensible heat flux (W m-2)
flatn_f (nx_block,ny_block,ncat,max_blocks), & ! latent heat flux (W m-2)
#ifdef GEOSCOUPLED
evapn_f (nx_block,ny_block,ncat,max_blocks), & ! evaporative water flux (kg/m^2/s) by atmosphere model
dflatndts_f (nx_block,ny_block,ncat,max_blocks), & ! derivative of flatn with respect to Ts
dfsurfndts_f(nx_block,ny_block,ncat,max_blocks), & ! derivative of fsurfn with respect to Ts
druvr (nx_block,ny_block,max_blocks), & !
dfuvr (nx_block,ny_block,max_blocks), & !
drpar (nx_block,ny_block,max_blocks), & !
dfpar (nx_block,ny_block,max_blocks), & !
#endif
meltsn (nx_block,ny_block,ncat,max_blocks), & ! snow melt in category n (m)
melttn (nx_block,ny_block,ncat,max_blocks), & ! top melt in category n (m)
meltbn (nx_block,ny_block,ncat,max_blocks), & ! bottom melt in category n (m)
Expand Down Expand Up @@ -794,6 +829,10 @@ subroutine init_coupler_flux
fswthru_vdf (:,:,:) = c0
fswthru_idr (:,:,:) = c0
fswthru_idf (:,:,:) = c0
fswthru_uvrdr (:,:,:) = c0
fswthru_uvrdf (:,:,:) = c0
fswthru_pardr (:,:,:) = c0
fswthru_pardf (:,:,:) = c0
fresh_da(:,:,:) = c0 ! data assimilation
fsalt_da(:,:,:) = c0
flux_bio (:,:,:,:) = c0 ! bgc
Expand Down Expand Up @@ -855,6 +894,8 @@ subroutine init_flux_atm
! strairxT(:,:,:) = 0.15_dbl_kind
! strairyT(:,:,:) = 0.15_dbl_kind

fsurf (:,:,:) = c0
fcondtop(:,:,:) = c0
fsens (:,:,:) = c0
flat (:,:,:) = c0
fswabs (:,:,:) = c0
Expand Down
12 changes: 12 additions & 0 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ subroutine input_data
bathymetry_file, use_bathymetry, &
bathymetry_format, kmt_type, &
grid_type, grid_format, &
#ifdef GEOSCOUPLED
grid_subtype, &
#endif
grid_ice, grid_ice_thrm, grid_ice_dynu, grid_ice_dynv, &
grid_ocn, grid_ocn_thrm, grid_ocn_dynu, grid_ocn_dynv, &
grid_atm, grid_atm_thrm, grid_atm_dynu, grid_atm_dynv, &
Expand Down Expand Up @@ -212,6 +215,9 @@ subroutine input_data

namelist /grid_nml/ &
grid_format, grid_type, grid_file, kmt_file, &
#ifdef GEOSCOUPLED
grid_subtype, &
#endif
bathymetry_file, use_bathymetry, nfsd, bathymetry_format, &
ncat, nilyr, nslyr, nblyr, &
kcatbound, gridcpl_file, dxrect, dyrect, &
Expand Down Expand Up @@ -377,6 +383,9 @@ subroutine input_data
ice_ic = 'default' ! latitude and sst-dependent
grid_format = 'bin' ! file format ('bin'=binary or 'nc'=netcdf)
grid_type = 'rectangular'! define rectangular grid internally
#ifdef GEOSCOUPLED
grid_subtype = 'other' ! not belonging to a specific subtype
#endif
grid_file = 'unknown_grid_file'
grid_ice = 'B' ! underlying grid system
grid_atm = 'A' ! underlying atm forcing/coupling grid
Expand Down Expand Up @@ -985,6 +994,9 @@ subroutine input_data
call broadcast_scalar(latrefrect, master_task)
call broadcast_scalar(close_boundaries, master_task)
call broadcast_scalar(grid_type, master_task)
#ifdef GEOSCOUPLED
call broadcast_scalar(grid_subtype, master_task)
#endif
call broadcast_scalar(grid_ice, master_task)
call broadcast_scalar(grid_ocn, master_task)
call broadcast_scalar(grid_atm, master_task)
Expand Down
7 changes: 6 additions & 1 deletion cicecore/cicedyn/general/ice_state.F90
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ module ice_state
vicen_init , & ! initial ice volume (m), for linear ITD
vsnon_init ! initial snow volume (m), for aerosol

real (kind=dbl_kind), &
dimension(:,:,:,:), allocatable, public :: &
Tsfcn_init ! initial ice surface temperature (degC)

!=======================================================================

contains
Expand Down Expand Up @@ -172,7 +176,8 @@ subroutine alloc_state
vsnon (nx_block,ny_block,ncat,max_blocks) , & ! volume per unit area of snow (m)
aicen_init(nx_block,ny_block,ncat,max_blocks) , & ! initial ice concentration, for linear ITD
vicen_init(nx_block,ny_block,ncat,max_blocks) , & ! initial ice volume (m), for linear ITD
vsnon_init(nx_block,ny_block,ncat,max_blocks) , & ! initial snow volume (m), for aerosol
vsnon_init(nx_block,ny_block,ncat,max_blocks) , & ! initial snow volume (m), for aerosol
Tsfcn_init(nx_block,ny_block,ncat,max_blocks) , & ! initial snow/ice surface temperature(degC)
trcr (nx_block,ny_block,ntrcr,max_blocks) , & ! ice tracers: 1: surface temperature of ice/snow (C)
trcrn (nx_block,ny_block,ntrcr,ncat,max_blocks) , & ! tracers: 1: surface temperature of ice/snow (C)
stat=ierr)
Expand Down
58 changes: 55 additions & 3 deletions cicecore/cicedyn/general/ice_step_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ subroutine save_init
! saves initial values for aice, aicen, vicen, vsnon

use ice_state, only: aice, aicen, aice_init, aicen_init, &
vicen, vicen_init, vsnon, vsnon_init
vicen, vicen_init, vsnon, vsnon_init, trcrn, Tsfcn_init

character(len=*), parameter :: subname = '(save_init)'

Expand All @@ -74,6 +74,7 @@ subroutine save_init
aicen_init = aicen
vicen_init = vicen
vsnon_init = vsnon
Tsfcn_init = trcrn(:,:,1,:,:)

end subroutine save_init

Expand Down Expand Up @@ -222,6 +223,7 @@ subroutine step_therm1 (dt, iblk)
Cdn_atm, Cdn_atm_skin, Cdn_atm_floe, Cdn_atm_rdg, Cdn_atm_pond, &
hfreebd, hdraft, hridge, distrdg, hkeel, dkeel, lfloe, dfloe, &
fswsfcn, fswintn, Sswabsn, Iswabsn, meltsliqn, meltsliq, &
fswthrun_uvrdr, fswthrun_uvrdf, fswthrun_pardr, fswthrun_pardf, &
fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf
use ice_calendar, only: yday
use ice_domain_size, only: ncat, nilyr, nslyr, n_iso, n_aero
Expand All @@ -232,12 +234,20 @@ subroutine step_therm1 (dt, iblk)
frain, Tair, strairxT, strairyT, fsurf, fcondtop, fsens, &
flat, fswabs, flwout, evap, evaps, evapi, Tref, Qref, Uref, fresh, fsalt, fhocn, &
fswthru, fswthru_vdr, fswthru_vdf, fswthru_idr, fswthru_idf, &
fswthru_uvrdr, fswthru_uvrdf, fswthru_pardr, fswthru_pardf, &
meltt, melts, meltb, congel, snoice, &
#ifdef GEOSCOUPLED
dfsurfndts_f, dflatndts_f, &
#endif
flatn_f, fsensn_f, fsurfn_f, fcondtopn_f, &
send_i2x_per_cat, fswthrun_ai, dsnow
use ice_flux_bgc, only: dsnown, faero_atm, faero_ocn, fiso_atm, fiso_ocn, &
Qa_iso, Qref_iso, fiso_evap, HDO_ocn, H2_16O_ocn, H2_18O_ocn
use ice_grid, only: lmask_n, lmask_s, tmask
#ifdef GEOSCOUPLED
use ice_communicate, only: my_task
use ice_grid, only: opmask
#endif
use ice_state, only: aice, aicen, aicen_init, vicen_init, &
vice, vicen, vsno, vsnon, trcrn, vsnon_init
#ifdef CICE_IN_NEMO
Expand Down Expand Up @@ -387,7 +397,11 @@ subroutine step_therm1 (dt, iblk)
enddo
endif ! tr_aero

#ifdef GEOSCOUPLED
if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then
#else
if (tmask(i,j,iblk)) then
#endif

call icepack_step_therm1(dt=dt, ncat=ncat, &
nilyr=nilyr, nslyr=nslyr, &
Expand Down Expand Up @@ -485,6 +499,10 @@ subroutine step_therm1 (dt, iblk)
fswthrun_vdf = fswthrun_vdf (i,j,:,iblk),&
fswthrun_idr = fswthrun_idr (i,j,:,iblk),&
fswthrun_idf = fswthrun_idf (i,j,:,iblk),&
fswthrun_uvrdr = fswthrun_uvrdr (i,j,:,iblk),&
fswthrun_uvrdf = fswthrun_uvrdf (i,j,:,iblk),&
fswthrun_pardr = fswthrun_pardr (i,j,:,iblk),&
fswthrun_pardf = fswthrun_pardf (i,j,:,iblk),&
fswabs = fswabs (i,j, iblk), &
flwout = flwout (i,j, iblk), &
Sswabsn = Sswabsn (i,j,:,:,iblk), &
Expand All @@ -505,6 +523,10 @@ subroutine step_therm1 (dt, iblk)
fswthru_vdf = fswthru_vdf (i,j, iblk), &
fswthru_idr = fswthru_idr (i,j, iblk), &
fswthru_idf = fswthru_idf (i,j, iblk), &
fswthru_uvrdr = fswthru_uvrdr (i,j, iblk), &
fswthru_uvrdf = fswthru_uvrdf (i,j, iblk), &
fswthru_pardr = fswthru_pardr (i,j, iblk), &
fswthru_pardf = fswthru_pardf (i,j, iblk), &
flatn_f = flatn_f (i,j,:,iblk), &
fsensn_f = fsensn_f (i,j,:,iblk), &
fsurfn_f = fsurfn_f (i,j,:,iblk), &
Expand Down Expand Up @@ -537,7 +559,13 @@ subroutine step_therm1 (dt, iblk)
lmask_s = lmask_s (i,j, iblk), &
mlt_onset = mlt_onset (i,j, iblk), &
frz_onset = frz_onset (i,j, iblk), &
yday=yday, prescribed_ice=prescribed_ice)
#ifdef GEOSCOUPLED
dfsurfdt = dfsurfndts_f(i,j,:,iblk), &
dflatdt = dflatndts_f (i,j,:,iblk), &
#endif
yday = yday, &
prescribed_ice=prescribed_ice )


!-----------------------------------------------------------------
! handle per-category i2x fields, no merging
Expand Down Expand Up @@ -622,6 +650,9 @@ subroutine step_therm2 (dt, iblk)
use ice_flux_bgc, only: flux_bio, faero_ocn, &
fiso_ocn, HDO_ocn, H2_16O_ocn, H2_18O_ocn
use ice_grid, only: tmask
#ifdef GEOSCOUPLED
use ice_grid, only: opmask
#endif
use ice_state, only: aice, aicen, aice0, trcr_depend, &
aicen_init, vicen_init, trcrn, vicen, vsnon, &
trcr_base, n_trcr_strata, nt_strata
Expand Down Expand Up @@ -673,7 +704,11 @@ subroutine step_therm2 (dt, iblk)
do j = jlo, jhi
do i = ilo, ihi

#ifdef GEOSCOUPLED
if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then
#else
if (tmask(i,j,iblk)) then
#endif

! significant wave height for FSD
if (tr_fsd) &
Expand Down Expand Up @@ -1273,13 +1308,18 @@ subroutine step_radiation (dt, iblk)
use ice_arrays_column, only: ffracn, dhsn, &
fswsfcn, fswintn, fswpenln, Sswabsn, Iswabsn, &
fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf, &
fswthrun_uvrdr, fswthrun_uvrdf, fswthrun_pardr, fswthrun_pardf, &
albicen, albsnon, albpndn, &
alvdrn, alidrn, alvdfn, alidfn, apeffn, trcrn_sw, snowfracn, &
swgrid, igrid
use ice_calendar, only: calendar_type, days_per_year, nextsw_cday, yday, msec
use ice_domain_size, only: ncat, n_aero, nilyr, nslyr, n_zaero, n_algae, nblyr
use ice_flux, only: swvdr, swvdf, swidr, swidf, coszen, fsnow
use ice_grid, only: TLAT, TLON, tmask
#ifdef GEOSCOUPLED
use ice_grid, only: opmask
use ice_flux, only: druvr, dfuvr, drpar, dfpar
#endif
use ice_state, only: aicen, vicen, vsnon, trcrn
use ice_timers, only: ice_timer_start, ice_timer_stop, timer_sw
use ice_communicate, only: my_task
Expand Down Expand Up @@ -1379,8 +1419,11 @@ subroutine step_radiation (dt, iblk)
enddo
endif
enddo

#ifdef GEOSCOUPLED
if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then
#else
if (tmask(i,j,iblk)) then
#endif

call icepack_step_radiation (dt=dt, &
swgrid=swgrid(:), igrid=igrid(:), &
Expand All @@ -1404,6 +1447,10 @@ subroutine step_radiation (dt, iblk)
sec=msec, &
swvdr =swvdr (i,j ,iblk), swvdf =swvdf (i,j ,iblk), &
swidr =swidr (i,j ,iblk), swidf =swidf (i,j ,iblk), &
#ifdef GEOSCOUPLED
druvr =druvr (i,j ,iblk), dfuvr =dfuvr (i,j ,iblk), &
drpar =drpar (i,j ,iblk), dfpar =dfpar (i,j ,iblk), &
#endif
coszen =coszen (i,j ,iblk), fsnow =fsnow (i,j ,iblk), &
alvdrn =alvdrn (i,j,: ,iblk), alvdfn =alvdfn (i,j,: ,iblk), &
alidrn =alidrn (i,j,: ,iblk), alidfn =alidfn (i,j,: ,iblk), &
Expand All @@ -1413,6 +1460,10 @@ subroutine step_radiation (dt, iblk)
fswthrun_vdf =fswthrun_vdf (i,j,: ,iblk), &
fswthrun_idr =fswthrun_idr (i,j,: ,iblk), &
fswthrun_idf =fswthrun_idf (i,j,: ,iblk), &
fswthrun_uvrdr =fswthrun_uvrdr (i,j,: ,iblk), &
fswthrun_uvrdf =fswthrun_uvrdf (i,j,: ,iblk), &
fswthrun_pardr =fswthrun_pardr (i,j,: ,iblk), &
fswthrun_pardf =fswthrun_pardf (i,j,: ,iblk), &
fswpenln=fswpenln(i,j,:,:,iblk), &
Sswabsn =Sswabsn (i,j,:,:,iblk), Iswabsn =Iswabsn (i,j,:,:,iblk), &
albicen =albicen (i,j,: ,iblk), albsnon =albsnon (i,j,: ,iblk), &
Expand Down Expand Up @@ -1444,6 +1495,7 @@ subroutine step_radiation (dt, iblk)

end subroutine step_radiation


!=======================================================================
! Ocean mixed layer calculation (internal to sea ice model).
! Allows heat storage in ocean for uncoupled runs.
Expand Down
6 changes: 6 additions & 0 deletions cicecore/cicedyn/infrastructure/ice_blocks.F90
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &
all_blocks(n)%jblock, &
all_blocks(n)%tripole
enddo
write(nu_diag,'(*(i3, 1x))') ( i_global(all_blocks(i)%ihi,i) - &
i_global(all_blocks(i)%ilo,i)+1, &
i=1,nblocks_x )
write(nu_diag,'(*(i3, 1x))') ( j_global(all_blocks((j-1)*nblocks_x+1)%jhi,(j-1)*nblocks_x+1) - &
j_global(all_blocks((j-1)*nblocks_x+1)%jlo,(j-1)*nblocks_x+1)+1, &
j=1,nblocks_y )
endif
endif

Expand Down
Loading