From a53922a44e7ea332902471511ba4ac9f0b636db3 Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Thu, 29 Sep 2022 08:21:34 -0400 Subject: [PATCH 1/6] In response to #178 --- src/ice_ridge.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ice_ridge.F90 b/src/ice_ridge.F90 index 59b52c2f..04f4b066 100644 --- a/src/ice_ridge.F90 +++ b/src/ice_ridge.F90 @@ -239,7 +239,11 @@ subroutine ice_ridging(IST, G, IG, mca_ice, mca_snow, mca_pond, TrReg, CS, US, d call icepack_query_tracer_sizes(ncat_out=ncat_out,ntrcr_out=ntrcr_out, nilyr_out=nilyr_out, nslyr_out=nslyr_out) - if (nIlyr .ne. nilyr_out .or. nSlyr .ne. nslyr_out ) call SIS_error(FATAL,'nilyr or nslyr mismatch with Icepack') + if (nIlyr .ne. nilyr_out .or. nSlyr .ne. nslyr_out ) & + call SIS_error(FATAL,"Oops!! It looks like you are trying to use sea-ice ridging "//& + "but did not include the Icepack (https://github.com/CICE-Consortium/Icepack)"//& + "source code repository in your compilation procedure, and are instead using the default "//& + "stub routine contained in config_src/external. Adjust your compilation accordingly." ) ! copy strain calculation code from SIS_C_dynamics; might be a more elegant way ... ! From f37bb77f6cda95635ceb22624cccf6a8f922f68b Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Thu, 29 Sep 2022 08:48:27 -0400 Subject: [PATCH 2/6] New parameter RIDGE_AREA_UNDERFLOW. For ice ridging, the default is zero, which preserves previous behavior which resulted in extremely small negative ice volumes in subsequent calls to ice_continuity, resulting in model failure. This parameter can be set to a reasonable value (e.g. 10^-30) to avoid this scenario. --- src/ice_ridge.F90 | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/ice_ridge.F90 b/src/ice_ridge.F90 index 04f4b066..7528d32f 100644 --- a/src/ice_ridge.F90 +++ b/src/ice_ridge.F90 @@ -11,7 +11,9 @@ module ice_ridging_mod ! 1) implement new snow_to_ocean diagnostic to record this flux. ! ! 2) implement ridging_rate diagnostics: ridging_shear, ridging_conv ! ! 3) implement "do_j" style optimization as in "compress_ice" or ! -! "adjust_ice_categories" (SIS_transport.F90) if deemed necessary ! +! "adjust_ice_categories" (SIS_transport.F90) if deemed necessary +! +! !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! use SIS_diag_mediator, only : post_SIS_data, query_SIS_averaging_enabled, SIS_diag_ctrl @@ -43,9 +45,13 @@ module ice_ridging_mod type, public :: ice_ridging_CS ; private logical :: & - new_rdg_partic = .false., & !< .true. = new participation, .false. = Thorndike et al 75 - new_rdg_redist = .false. !< .true. = new redistribution, .false. = Hibler 80 + new_rdg_partic = .false., & !< .true. = new participation, .false. = Thorndike et al 75 + new_rdg_redist = .false. !< .true. = new redistribution, .false. = Hibler 80 real :: mu_rdg = 3.0 !< e-folding scale of ridged ice, new_rdg_partic (m^0.5) + real :: area_underflow = 0.0 ! a non-dimesional fractional area underflow limit for the sea-ice + ! ridging scheme. This is defaulted to zero, but a reasonable value + ! might be 10^-32 which for a km square grid cell would equate to an Angstrom scale + ! ice patch. end type ice_ridging_CS contains @@ -72,6 +78,10 @@ subroutine ice_ridging_init(G, IG, PF, CS, US) call get_param(PF, mdl, "RIDGE_MU", CS%mu_rdg, & "E-folding scale of ridge ice from Lipscomb et al. 2007", & units="m^0.5", default=3.0) + call get_param(PF, mdl, "RIDGE_AREA_UNDERFLOW", CS%area_underflow, & + "A fractional area limit below which ice fraction is set to zero "//& + "A reasonable default value for a km scale grid cell is 10^-32.",& + units="none", default=0.0) endif ncat=IG%CatIce ! The number of sea-ice thickness categories @@ -479,7 +489,10 @@ subroutine ice_ridging(IST, G, IG, mca_ice, mca_snow, mca_pond, TrReg, CS, US, d ! ! output: snow/ice masses/thicknesses do k=1,nCat - + if (aicen(k) < CS%area_underflow) then + aicek(k)=0.0 + vicen(k)=0.0 + endif if (aicen(k) > 0.0) then IST%part_size(i,j,k) = aicen(k) mca_ice(i,j,k) = vicen(k)*Rho_ice * US%m_to_Z From 8b964b742ace0507d3600091a02771ecd58dac20 Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Thu, 29 Sep 2022 11:43:03 -0400 Subject: [PATCH 3/6] typo fix --- src/ice_ridge.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ice_ridge.F90 b/src/ice_ridge.F90 index 7528d32f..5f35e999 100644 --- a/src/ice_ridge.F90 +++ b/src/ice_ridge.F90 @@ -490,7 +490,7 @@ subroutine ice_ridging(IST, G, IG, mca_ice, mca_snow, mca_pond, TrReg, CS, US, d ! ! output: snow/ice masses/thicknesses do k=1,nCat if (aicen(k) < CS%area_underflow) then - aicek(k)=0.0 + aicen(k)=0.0 vicen(k)=0.0 endif if (aicen(k) > 0.0) then From c3856e61d78325f904acb14ed52058a0ae262f61 Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Thu, 29 Sep 2022 14:40:06 -0400 Subject: [PATCH 4/6] Fix comments --- src/ice_ridge.F90 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ice_ridge.F90 b/src/ice_ridge.F90 index 5f35e999..e8667825 100644 --- a/src/ice_ridge.F90 +++ b/src/ice_ridge.F90 @@ -49,9 +49,8 @@ module ice_ridging_mod new_rdg_redist = .false. !< .true. = new redistribution, .false. = Hibler 80 real :: mu_rdg = 3.0 !< e-folding scale of ridged ice, new_rdg_partic (m^0.5) real :: area_underflow = 0.0 ! a non-dimesional fractional area underflow limit for the sea-ice - ! ridging scheme. This is defaulted to zero, but a reasonable value - ! might be 10^-32 which for a km square grid cell would equate to an Angstrom scale - ! ice patch. + ! ridging scheme. This is defaulted to zero, but a reasonable value might be + ! 10^-24 which for a km square grid cell would equate to an Angstrom scale ice patch. end type ice_ridging_CS contains From 08c176f4fd2dbf3d94cb31cec80f281feab138a0 Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Thu, 29 Sep 2022 14:41:16 -0400 Subject: [PATCH 5/6] Fix comments --- src/ice_ridge.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ice_ridge.F90 b/src/ice_ridge.F90 index e8667825..a7c74145 100644 --- a/src/ice_ridge.F90 +++ b/src/ice_ridge.F90 @@ -50,7 +50,7 @@ module ice_ridging_mod real :: mu_rdg = 3.0 !< e-folding scale of ridged ice, new_rdg_partic (m^0.5) real :: area_underflow = 0.0 ! a non-dimesional fractional area underflow limit for the sea-ice ! ridging scheme. This is defaulted to zero, but a reasonable value might be - ! 10^-24 which for a km square grid cell would equate to an Angstrom scale ice patch. + ! 10^-26 which for a km square grid cell would equate to an Angstrom scale ice patch. end type ice_ridging_CS contains @@ -79,7 +79,7 @@ subroutine ice_ridging_init(G, IG, PF, CS, US) units="m^0.5", default=3.0) call get_param(PF, mdl, "RIDGE_AREA_UNDERFLOW", CS%area_underflow, & "A fractional area limit below which ice fraction is set to zero "//& - "A reasonable default value for a km scale grid cell is 10^-32.",& + "A reasonable default value for a km scale grid cell is 10^-24.",& units="none", default=0.0) endif From dbf23e229dbf9039bd867a97683ef9eac144d872 Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Mon, 3 Oct 2022 16:09:54 -0400 Subject: [PATCH 6/6] fix indentations --- src/ice_ridge.F90 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ice_ridge.F90 b/src/ice_ridge.F90 index a7c74145..e895efd6 100644 --- a/src/ice_ridge.F90 +++ b/src/ice_ridge.F90 @@ -48,9 +48,10 @@ module ice_ridging_mod new_rdg_partic = .false., & !< .true. = new participation, .false. = Thorndike et al 75 new_rdg_redist = .false. !< .true. = new redistribution, .false. = Hibler 80 real :: mu_rdg = 3.0 !< e-folding scale of ridged ice, new_rdg_partic (m^0.5) - real :: area_underflow = 0.0 ! a non-dimesional fractional area underflow limit for the sea-ice - ! ridging scheme. This is defaulted to zero, but a reasonable value might be - ! 10^-26 which for a km square grid cell would equate to an Angstrom scale ice patch. + real :: area_underflow = 0.0 !< a non-dimesional fractional area underflow limit for the sea-ice + !! ridging scheme. This is defaulted to zero, but a reasonable + !! value might be 10^-26 which for a km square grid cell + !! would equate to an Angstrom scale ice patch. end type ice_ridging_CS contains @@ -249,10 +250,10 @@ subroutine ice_ridging(IST, G, IG, mca_ice, mca_snow, mca_pond, TrReg, CS, US, d call icepack_query_tracer_sizes(ncat_out=ncat_out,ntrcr_out=ntrcr_out, nilyr_out=nilyr_out, nslyr_out=nslyr_out) if (nIlyr .ne. nilyr_out .or. nSlyr .ne. nslyr_out ) & - call SIS_error(FATAL,"Oops!! It looks like you are trying to use sea-ice ridging "//& - "but did not include the Icepack (https://github.com/CICE-Consortium/Icepack)"//& - "source code repository in your compilation procedure, and are instead using the default "//& - "stub routine contained in config_src/external. Adjust your compilation accordingly." ) + call SIS_error(FATAL,"Oops!! It looks like you are trying to use sea-ice ridging "//& + "but did not include the Icepack (https://github.com/CICE-Consortium/Icepack)"//& + "source code repository in your compilation procedure, and are instead using the default "//& + "stub routine contained in config_src/external. Adjust your compilation accordingly." ) ! copy strain calculation code from SIS_C_dynamics; might be a more elegant way ... !