From d466031001cf447bcd64220c842dcd2707f61e90 Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Fri, 29 Sep 2023 12:08:53 -0700 Subject: [PATCH 1/2] Add single grid channel capability and test for C-grid (#875) * Added code for transport in one grid cell wide channels * Update remap advection to support transport in single gridcell channels Add single grid east and north channel configurations and tests * Update documentation * Remove temporary code comments --------- Co-authored-by: Jean-Francois Lemieux --- .../cicedyn/dynamics/ice_transport_remap.F90 | 15 ++++- cicecore/cicedyn/general/ice_init.F90 | 4 +- cicecore/cicedyn/infrastructure/ice_grid.F90 | 16 ++++++ .../scripts/options/set_nml.boxchan1e | 55 +++++++++++++++++++ .../scripts/options/set_nml.boxchan1n | 55 +++++++++++++++++++ configuration/scripts/tests/gridsys_suite.ts | 27 ++++++--- doc/source/cice_index.rst | 2 +- doc/source/user_guide/ug_case_settings.rst | 2 + doc/source/user_guide/ug_implementation.rst | 2 +- 9 files changed, 165 insertions(+), 13 deletions(-) create mode 100644 configuration/scripts/options/set_nml.boxchan1e create mode 100644 configuration/scripts/options/set_nml.boxchan1n diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index b397b94b7..5c33fea2b 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -1998,7 +1998,8 @@ subroutine locate_triangles (nx_block, ny_block, & endif !------------------------------------------------------------------- - ! Compute mask for edges with nonzero departure areas + ! Compute mask for edges with nonzero departure areas and for + ! one grid-cell wide channels !------------------------------------------------------------------- icellsd = 0 @@ -2011,6 +2012,12 @@ subroutine locate_triangles (nx_block, ny_block, & icellsd = icellsd + 1 indxid(icellsd) = i indxjd(icellsd) = j + else + if ( abs(edgearea(i,j)) > c0 ) then ! 1 grid-cell wide channel: dpx,y = 0, edgearea /= 0 + icellsd = icellsd + 1 + indxid(icellsd) = i + indxjd(icellsd) = j + endif endif enddo enddo @@ -2023,6 +2030,12 @@ subroutine locate_triangles (nx_block, ny_block, & icellsd = icellsd + 1 indxid(icellsd) = i indxjd(icellsd) = j + else + if ( abs(edgearea(i,j)) > c0 ) then ! 1 grid-cell wide channel: dpx,y = 0, edgearea /= 0 + icellsd = icellsd + 1 + indxid(icellsd) = i + indxjd(icellsd) = j + endif endif enddo enddo diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 47fedf538..7435322bd 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -2446,6 +2446,8 @@ subroutine input_data if (kmt_type /= 'file' .and. & kmt_type /= 'channel' .and. & + kmt_type /= 'channel_oneeast' .and. & + kmt_type /= 'channel_onenorth' .and. & kmt_type /= 'wall' .and. & kmt_type /= 'default' .and. & kmt_type /= 'boxislands') then @@ -3135,7 +3137,7 @@ subroutine set_state_var (nx_block, ny_block, & enddo enddo - elseif (trim(ice_data_type) == 'channel') then + elseif (ice_data_type(1:7) == 'channel') then ! channel ice in center of domain in i direction icells = 0 do j = jlo, jhi diff --git a/cicecore/cicedyn/infrastructure/ice_grid.F90 b/cicecore/cicedyn/infrastructure/ice_grid.F90 index 160e3cc64..16dea4382 100644 --- a/cicecore/cicedyn/infrastructure/ice_grid.F90 +++ b/cicecore/cicedyn/infrastructure/ice_grid.F90 @@ -1489,6 +1489,22 @@ subroutine rectgrid enddo enddo + elseif (trim(kmt_type) == 'channel_oneeast') then + + do j = ny_global/2,ny_global/2 ! one channel wide + do i = 1,nx_global ! open sides + work_g1(i,j) = c1 ! NOTE nx_global > 5 + enddo + enddo + + elseif (trim(kmt_type) == 'channel_onenorth') then + + do j = 1,ny_global ! open sides + do i = nx_global/2,nx_global/2 ! one channel wide + work_g1(i,j) = c1 ! NOTE nx_global > 5 + enddo + enddo + elseif (trim(kmt_type) == 'wall') then do j = 1,ny_global ! open except diff --git a/configuration/scripts/options/set_nml.boxchan1e b/configuration/scripts/options/set_nml.boxchan1e new file mode 100644 index 000000000..9e21cdab7 --- /dev/null +++ b/configuration/scripts/options/set_nml.boxchan1e @@ -0,0 +1,55 @@ +days_per_year = 360 +use_leap_years = .false. +npt_unit = 'd' +npt = 5 +ice_ic = 'internal' +restart_ext = .true. +histfreq = 'd','1','x','x','x' +grid_type = 'rectangular' +kmt_type = 'channel_oneeast' +dxrect = 16.e5 +dyrect = 16.e5 +close_boundaries = .false. +ew_boundary_type = 'cyclic' +ns_boundary_type = 'open' +tr_iage = .false. +tr_FY = .false. +tr_lvl = .false. +tr_pond_lvl = .false. +ktherm = -1 +atmbndy = 'constant' +atm_data_type = 'uniform_east' +ocn_data_type = 'calm' +ice_data_type = 'block' +ice_data_conc = 'p5' +ice_data_dist = 'uniform' +calc_strair = .false. +rotate_wind = .false. +restore_ice = .false. +f_aice = 'd1' +f_hi = 'd1' +f_hs = 'd' +f_Tsfc = 'd' +f_uvel = 'd1' +f_vvel = 'd1' +f_uatm = 'd' +f_vatm = 'd' +f_uocn = 'd' +f_vocn = 'd' +f_strairx = 'd1' +f_strairy = 'd1' +f_strtltx = 'd1' +f_strtlty = 'd1' +f_strcorx = 'd1' +f_strcory = 'd1' +f_strocnx = 'd1' +f_strocny = 'd1' +f_strintx = 'd1' +f_strinty = 'd1' +f_taubx = 'd1' +f_tauby = 'd1' +f_divu = 'd1' +f_sig1 = 'd1' +f_sig2 = 'd1' +f_sigP = 'd1' +f_dvidtd = 'd1' diff --git a/configuration/scripts/options/set_nml.boxchan1n b/configuration/scripts/options/set_nml.boxchan1n new file mode 100644 index 000000000..f24fee5fa --- /dev/null +++ b/configuration/scripts/options/set_nml.boxchan1n @@ -0,0 +1,55 @@ +days_per_year = 360 +use_leap_years = .false. +npt_unit = 'd' +npt = 5 +ice_ic = 'internal' +restart_ext = .true. +histfreq = 'd','1','x','x','x' +grid_type = 'rectangular' +kmt_type = 'channel_onenorth' +dxrect = 16.e5 +dyrect = 16.e5 +close_boundaries = .false. +ew_boundary_type = 'open' +ns_boundary_type = 'cyclic' +tr_iage = .false. +tr_FY = .false. +tr_lvl = .false. +tr_pond_lvl = .false. +ktherm = -1 +atmbndy = 'constant' +atm_data_type = 'uniform_north' +ocn_data_type = 'calm' +ice_data_type = 'block' +ice_data_conc = 'p5' +ice_data_dist = 'uniform' +calc_strair = .false. +rotate_wind = .false. +restore_ice = .false. +f_aice = 'd1' +f_hi = 'd1' +f_hs = 'd' +f_Tsfc = 'd' +f_uvel = 'd1' +f_vvel = 'd1' +f_uatm = 'd' +f_vatm = 'd' +f_uocn = 'd' +f_vocn = 'd' +f_strairx = 'd1' +f_strairy = 'd1' +f_strtltx = 'd1' +f_strtlty = 'd1' +f_strcorx = 'd1' +f_strcory = 'd1' +f_strocnx = 'd1' +f_strocny = 'd1' +f_strintx = 'd1' +f_strinty = 'd1' +f_taubx = 'd1' +f_tauby = 'd1' +f_divu = 'd1' +f_sig1 = 'd1' +f_sig2 = 'd1' +f_sigP = 'd1' +f_dvidtd = 'd1' diff --git a/configuration/scripts/tests/gridsys_suite.ts b/configuration/scripts/tests/gridsys_suite.ts index faf01344a..c10465f4b 100644 --- a/configuration/scripts/tests/gridsys_suite.ts +++ b/configuration/scripts/tests/gridsys_suite.ts @@ -10,14 +10,17 @@ smoke gx3 8x2 diag1,run5day smoke gx3 8x4 diag1,run5day,debug restart gx3 4x2 debug,diag1 restart2 gx1 16x2 debug,diag1 +restart tx1 40x2 diag1 smoke gbox12 1x1x12x12x1 boxchan +smoke gbox80 4x2 boxchan1e +smoke gbox80 8x1 boxchan1n smoke gbox80 1x1 box2001 smoke gbox80 2x2 boxwallblock smoke gbox80 1x1 boxslotcyl smoke gbox80 2x4 boxnodyn -smoke gbox80 4x2 boxclosed,boxforcee,run1day -smoke gbox80 4x1 boxclosed,boxforcene,run1day,kmtislands -smoke gbox80 4x2 boxopen,kmtislands,boxforcee,run1day +smoke gbox80 4x2 boxclosed,boxforcee,run1day +smoke gbox80 4x1 boxclosed,boxforcene,run1day,kmtislands +smoke gbox80 4x2 boxopen,kmtislands,boxforcee,run1day smoke gbox80 2x2 boxclosed,boxforcen,run1day,vargrid smoke gx3 1x1x25x29x16 reprosum,run10day,dwblockall smoke_gx3_1x1x100x116x1_reprosum_run10day smoke gx3 1x1x5x4x580 reprosum,run10day,dwblockall smoke_gx3_1x1x100x116x1_reprosum_run10day @@ -30,14 +33,17 @@ smoke gx3 8x2 diag1,run5day,gridcd smoke gx3 8x4 diag1,run5day,debug,gridcd restart gx3 4x2 debug,diag1,gridcd restart2 gx1 16x2 debug,diag1,gridcd +restart tx1 40x2 diag1,gridcd smoke gbox12 1x1x12x12x1 boxchan,gridcd +smoke gbox80 4x2 boxchan1e,gridcd +smoke gbox80 8x1 boxchan1n,gridcd smoke gbox80 1x1 box2001,gridcd smoke gbox80 2x2 boxwallblock,gridcd smoke gbox80 1x1 boxslotcyl,gridcd smoke gbox80 2x4 boxnodyn,gridcd -smoke gbox80 4x2 boxclosed,boxforcee,run1day,gridcd -smoke gbox80 4x1 boxclosed,boxforcene,run1day,kmtislands,gridcd -smoke gbox80 4x2 boxopen,kmtislands,boxforcee,run1day,gridcd +smoke gbox80 4x2 boxclosed,boxforcee,run1day,gridcd +smoke gbox80 4x1 boxclosed,boxforcene,run1day,kmtislands,gridcd +smoke gbox80 4x2 boxopen,kmtislands,boxforcee,run1day,gridcd smoke gbox80 2x2 boxclosed,boxforcen,run1day,vargrid,gridcd smoke gx3 1x1x25x29x16 reprosum,run10day,dwblockall,gridcd smoke_gx3_1x1x100x116x1_gridcd_reprosum_run10day smoke gx3 1x1x5x4x580 reprosum,run10day,dwblockall,gridcd smoke_gx3_1x1x100x116x1_gridcd_reprosum_run10day @@ -50,14 +56,17 @@ smoke gx3 8x2 diag1,run5day,gridc smoke gx3 8x4 diag1,run5day,debug,gridc restart gx3 4x2 debug,diag1,gridc restart2 gx1 16x2 debug,diag1,gridc +restart tx1 40x2 diag1,gridc smoke gbox12 1x1x12x12x1 boxchan,gridc +smoke gbox80 4x2 boxchan1e,gridc +smoke gbox80 8x1 boxchan1n,gridc smoke gbox80 1x1 box2001,gridc smoke gbox80 2x2 boxwallblock,gridc smoke gbox80 1x1 boxslotcyl,gridc smoke gbox80 2x4 boxnodyn,gridc -smoke gbox80 4x2 boxclosed,boxforcee,run1day,gridc -smoke gbox80 4x1 boxclosed,boxforcene,run1day,kmtislands,gridc -smoke gbox80 4x2 boxopen,kmtislands,boxforcee,run1day,gridc +smoke gbox80 4x2 boxclosed,boxforcee,run1day,gridc +smoke gbox80 4x1 boxclosed,boxforcene,run1day,kmtislands,gridc +smoke gbox80 4x2 boxopen,kmtislands,boxforcee,run1day,gridc smoke gbox80 2x2 boxclosed,boxforcen,run1day,vargrid,gridc smoke gx3 1x1x25x29x16 reprosum,run10day,dwblockall,gridc smoke_gx3_1x1x100x116x1_gridc_reprosum_run10day smoke gx3 1x1x5x4x580 reprosum,run10day,dwblockall,gridc smoke_gx3_1x1x100x116x1_gridc_reprosum_run10day diff --git a/doc/source/cice_index.rst b/doc/source/cice_index.rst index cf01323d8..d4e187510 100644 --- a/doc/source/cice_index.rst +++ b/doc/source/cice_index.rst @@ -384,7 +384,7 @@ either Celsius or Kelvin units). Deprecated parameters are listed at the end. "kice", "thermal conductivity of fresh ice (:cite:`Bitz99`)", "2.03 W/m/deg" "kitd", "type of itd conversions (0 = delta function, 1 = linear remap)", "1" "kmt_file", "input file for land mask info", "" - "kmt_type", "file, default or boxislands", "file" + "kmt_type", "file, default, channel, wall, or boxislands", "file" "krdg_partic", "ridging participation function", "1" "krdg_redist", "ridging redistribution function", "1" "krgdn", "mean ridge thickness per thickness of ridging ice", "" diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index ba596863c..2df45acb0 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -282,6 +282,8 @@ grid_nml "``kmt_file``", "string", "name of land mask file to be read", "``unknown_kmt_file``" "``kmt_type``", "boxislands", "ocean/land mask set internally, complex test geometory", "file" "", "channel", "ocean/land mask set internally as zonal channel", "" + "", "channel_oneeast", "ocean/land mask set internally as single gridcell east-west zonal channel", "" + "", "channel_onenorth", "ocean/land mask set internally as single gridcell north-south zonal channel", "" "", "default", "ocean/land mask set internally, land in upper left and lower right of domain, ", "" "", "file", "ocean/land mask setup read from file, see kmt_file", "" "", "wall", "ocean/land mask set at right edge of domain", "" diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index 8480eb9aa..b24d96909 100644 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -379,7 +379,7 @@ Several predefined rectangular grids are available in CICE with where 12, 80, 128, and 180 are the number of gridcells in each direction. Several predefined options also exist, set with **cice.setup --set**, to establish varied idealized configurations of box tests including ``box2001``, -``boxadv``, ``boxchan``, ``boxnodyn``, ``boxrestore``, ``boxslotcyl``, and +``boxadv``, ``boxchan``, ``boxchan1e``, ``boxchan1n``, ``boxnodyn``, ``boxrestore``, ``boxslotcyl``, and ``boxopen``, ``boxclosed``, and ``boxforcee``. See **cice.setup --help** for a current list of supported settings. From cc880b405a51d986b538088b84160cb9e0cb843f Mon Sep 17 00:00:00 2001 From: apcraig Date: Wed, 4 Oct 2023 13:11:20 -0600 Subject: [PATCH 2/2] Update boxchan1e and boxchan1n tests to tfrz_option = 'mushy_old' to recover Consortium main results Update Icepack to the latest hash on E3SM-Project Icepack cice-consortium/E3SM-icepack-initial-integration, #96f2fc707fc743d7 Prior commit was a merge from CICE Consortium Main, #d466031001cf447bcd64220c842dcd2707f61e9, Sept 29, 2023 --- configuration/scripts/options/set_nml.boxchan1e | 1 + configuration/scripts/options/set_nml.boxchan1n | 1 + icepack | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configuration/scripts/options/set_nml.boxchan1e b/configuration/scripts/options/set_nml.boxchan1e index 9e21cdab7..ebfa5c535 100644 --- a/configuration/scripts/options/set_nml.boxchan1e +++ b/configuration/scripts/options/set_nml.boxchan1e @@ -26,6 +26,7 @@ ice_data_dist = 'uniform' calc_strair = .false. rotate_wind = .false. restore_ice = .false. +tfrz_option = 'mushy_old' f_aice = 'd1' f_hi = 'd1' f_hs = 'd' diff --git a/configuration/scripts/options/set_nml.boxchan1n b/configuration/scripts/options/set_nml.boxchan1n index f24fee5fa..6e3613547 100644 --- a/configuration/scripts/options/set_nml.boxchan1n +++ b/configuration/scripts/options/set_nml.boxchan1n @@ -26,6 +26,7 @@ ice_data_dist = 'uniform' calc_strair = .false. rotate_wind = .false. restore_ice = .false. +tfrz_option = 'mushy_old' f_aice = 'd1' f_hi = 'd1' f_hs = 'd' diff --git a/icepack b/icepack index 78286bfa0..96f2fc707 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 78286bfa0b2f8a9dc446f61a76e7a57499c96715 +Subproject commit 96f2fc707fc743d7ce6eb8f543bd449a35a1a649