From 3e0ee1a0a4150e3cc3daf80549c0cf665001afe3 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Thu, 11 Apr 2024 05:14:22 -0600 Subject: [PATCH 01/26] Add tsoi coldstart, get streams out of waterstate and plumb them back --- src/biogeophys/TemperatureType.F90 | 25 ++++++--- src/biogeophys/WaterStateType.F90 | 90 +++++++++++++----------------- src/main/clm_instMod.F90 | 22 +++++++- 3 files changed, 77 insertions(+), 60 deletions(-) diff --git a/src/biogeophys/TemperatureType.F90 b/src/biogeophys/TemperatureType.F90 index ab310650c8..7906773b26 100644 --- a/src/biogeophys/TemperatureType.F90 +++ b/src/biogeophys/TemperatureType.F90 @@ -8,7 +8,7 @@ module TemperatureType use decompMod , only : bounds_type use abortutils , only : endrun use clm_varctl , only : use_cndv, iulog, use_luna, use_crop, use_biomass_heat_storage - use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevurb, nlevmaxurbgrnd + use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevurb, nlevmaxurbgrnd, nlevsoi use clm_varcon , only : spval, ispval use GridcellType , only : grc use LandunitType , only : lun @@ -141,7 +141,7 @@ module TemperatureType !------------------------------------------------------------------------ subroutine Init(this, bounds, & em_roof_lun, em_wall_lun, em_improad_lun, em_perroad_lun, & - is_simple_buildtemp, is_prog_buildtemp) + is_simple_buildtemp, is_prog_buildtemp, exice_init_stream_col) ! ! !DESCRIPTION: ! @@ -156,6 +156,7 @@ subroutine Init(this, bounds, & real(r8) , intent(in) :: em_perroad_lun(bounds%begl:) logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial excess ice concentration from the stream file call this%InitAllocate ( bounds ) call this%InitHistory ( bounds, is_simple_buildtemp, is_prog_buildtemp ) @@ -164,7 +165,8 @@ subroutine Init(this, bounds, & em_wall_lun(bounds%begl:bounds%endl), & em_improad_lun(bounds%begl:bounds%endl), & em_perroad_lun(bounds%begl:bounds%endl), & - is_simple_buildtemp, is_prog_buildtemp) + is_simple_buildtemp, is_prog_buildtemp, & + exice_init_stream_col(bounds%begc:bounds%endc) ) end subroutine Init @@ -639,7 +641,7 @@ end subroutine InitHistory !----------------------------------------------------------------------- subroutine InitCold(this, bounds, & em_roof_lun, em_wall_lun, em_improad_lun, em_perroad_lun, & - is_simple_buildtemp, is_prog_buildtemp) + is_simple_buildtemp, is_prog_buildtemp, exice_init_stream_col) ! ! !DESCRIPTION: ! Initialize cold start conditions for module variables @@ -647,11 +649,12 @@ subroutine InitCold(this, bounds, & ! !USES: use shr_kind_mod , only : r8 => shr_kind_r8 use shr_const_mod , only : SHR_CONST_TKFRZ - use clm_varcon , only : denice, denh2o + use clm_varcon , only : denice, denh2o, zisoi use landunit_varcon, only : istwet, istsoil, istdlak, istice, istcrop use column_varcon , only : icol_road_imperv, icol_roof, icol_sunwall use column_varcon , only : icol_shadewall, icol_road_perv use clm_varctl , only : iulog, use_vancouver, use_mexicocity, use_excess_ice + use initVerticalMod , only : find_soil_layer_containing_depth ! ! !ARGUMENTS: class(temperature_type) :: this @@ -662,6 +665,7 @@ subroutine InitCold(this, bounds, & real(r8) , intent(in) :: em_perroad_lun(bounds%begl:) logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from the stream file ! ! !LOCAL VARIABLES: integer :: j,l,c,p ! indices @@ -669,6 +673,7 @@ subroutine InitCold(this, bounds, & real(r8) :: snowbd ! temporary calculation of snow bulk density (kg/m3) real(r8) :: fmelt ! snowbd/100 integer :: lev + integer :: n05m ! layer number containing 0.5 meter depth !----------------------------------------------------------------------- SHR_ASSERT_ALL_FL((ubound(em_roof_lun) == (/bounds%endl/)), sourcefile, __LINE__) @@ -742,8 +747,14 @@ subroutine InitCold(this, bounds, & end if else this%t_soisno_col(c,1:nlevgrnd) = 272._r8 - if (use_excess_ice .and. (lun%itype(l) == istsoil .or. lun%itype(l) == istcrop)) then - this%t_soisno_col(c,1:nlevgrnd) = SHR_CONST_TKFRZ - 5.0_r8 !needs to be below freezing to properly initiate excess ice + if (use_excess_ice .and. exice_init_stream_col(c) > 0.0_r8) then + n05m = nlevsoi - 1 + if (zisoi(nlevsoi) >= 0.5_r8) then + call find_soil_layer_containing_depth(0.5_r8,n05m) + else + n05m=nlevsoi-1 + endif + this%t_soisno_col(c,n05m:nlevgrnd) = SHR_CONST_TKFRZ - 12.15_r8 !needs to be below freezing to properly initiate excess ice end if endif endif diff --git a/src/biogeophys/WaterStateType.F90 b/src/biogeophys/WaterStateType.F90 index 390e9e8691..4c82e4efa6 100644 --- a/src/biogeophys/WaterStateType.F90 +++ b/src/biogeophys/WaterStateType.F90 @@ -56,8 +56,6 @@ module WaterStateType real(r8), pointer :: excess_ice_col (:,:) ! col excess ice (kg/m2) (new) (-nlevsno+1:nlevgrnd) real(r8), pointer :: exice_bulk_init (:) ! inital value for excess ice (new) (unitless) - type(excessicestream_type), private :: exicestream ! stream type for excess ice initialization NUOPC only - ! Hillslope stream variables real(r8), pointer :: stream_water_volume_lun(:) ! landunit volume of water in the streams (m3) @@ -82,7 +80,7 @@ module WaterStateType !------------------------------------------------------------------------ subroutine Init(this, bounds, info, tracer_vars, & - h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename) + h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) class(waterstate_type), intent(inout) :: this type(bounds_type) , intent(in) :: bounds @@ -91,8 +89,9 @@ subroutine Init(this, bounds, info, tracer_vars, & real(r8) , intent(in) :: h2osno_input_col(bounds%begc:) real(r8) , intent(in) :: watsat_col(bounds%begc:, 1:) ! volumetric soil water at saturation (porosity) real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) - logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run - character(len=*) , intent(in) :: NLFilename ! Namelist filename + logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run + character(len=*) , intent(in) :: NLFilename ! Namelist filename + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:bounds%endc) ! initial ammount of excess ice from stream this%info => info @@ -104,7 +103,7 @@ subroutine Init(this, bounds, info, tracer_vars, & watsat_col = watsat_col, & t_soisno_col = t_soisno_col, & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename) + NLFilename = NLFilename, exice_init_stream_col = exice_init_stream_col) end subroutine Init @@ -323,7 +322,7 @@ end subroutine InitHistory !----------------------------------------------------------------------- subroutine InitCold(this, bounds, & - h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename) + h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) ! ! !DESCRIPTION: ! Initialize time constant variables and cold start conditions @@ -344,6 +343,7 @@ subroutine InitCold(this, bounds, & real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run character(len=*) , intent(in) :: NLFilename ! Namelist filename + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:bounds%endc) ! initial ammount of excess ice from stream ! ! !LOCAL VARIABLES: integer :: c,j,l,nlevs,g @@ -550,52 +550,40 @@ subroutine InitCold(this, bounds, & this%dynbal_baseline_ice_col(bounds%begc:bounds%endc) = 0._r8 !Initialize excess ice - if (use_excess_ice .and. NLFilename /= '') then - ! enforce initialization with 0 for everything - this%excess_ice_col(bounds%begc:bounds%endc,-nlevsno+1:nlevmaxurbgrnd)=0.0_r8 - this%exice_bulk_init(bounds%begc:bounds%endc)=0.0_r8 - call this%exicestream%Init(bounds, NLFilename) ! get initial fraction of excess ice per column - ! - ! If excess ice is being read from streams, use the streams to - ! initialize - ! - if ( UseExcessIceStreams() )then - call this%exicestream%CalcExcessIce(bounds, this%exice_bulk_init) - do c = bounds%begc,bounds%endc - g = col%gridcell(c) - l = col%landunit(c) - if (.not. lun%lakpoi(l)) then !not lake - if (lun%itype(l) == istsoil .or. lun%itype(l) == istcrop) then - if (zisoi(nlevsoi) >= 0.5_r8) then - call find_soil_layer_containing_depth(0.5_r8,n05m) - else - n05m=nlevsoi-1 - endif - if (use_bedrock .and. col%nbedrock(c) <=nlevsoi) then - nbedrock = col%nbedrock(c) - else - nbedrock = nlevsoi - endif - do j = 2, nlevmaxurbgrnd ! ignore first layer - if (n05m= n05m .and. j= 0.5_r8) then + call find_soil_layer_containing_depth(0.5_r8,n05m) + else + n05m=nlevsoi-1 + endif + if (use_bedrock .and. col%nbedrock(c) <=nlevsoi) then + nbedrock = col%nbedrock(c) + else + nbedrock = nlevsoi endif - else ! just in case zeros for lakes and other columns - this%excess_ice_col(c,-nlevsno+1:nlevmaxurbgrnd) = 0.0_r8 + do j = 2, nlevmaxurbgrnd ! ignore first layer + if (n05m= n05m .and. j Date: Thu, 11 Apr 2024 05:14:52 -0600 Subject: [PATCH 02/26] Add use_streams default for coldstart --- bld/CLMBuildNamelist.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index fd8def8845..4a338201d5 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4564,6 +4564,10 @@ sub setup_logic_exice { my $use_exice = $nl->get_value( 'use_excess_ice' ); my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); # IF excess ice streams is on + if ( (not defined($use_exice_streams) && value_is_true($use_exice)) && ($nl_flags->{'clm_start_type'} == /cold/ || $nl_flags->{'clm_start_type'} == /arb_ic/ ) ) { + $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.'); + $use_exice_streams = '.true.' + } if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { # Can only be true if excess ice is also on, otherwise fail if (defined($use_exice) && not value_is_true($use_exice)) { From a3179995bcd7149edf1de4cc5aa32e23ae71ac9c Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Thu, 11 Apr 2024 05:15:04 -0600 Subject: [PATCH 03/26] plumbing --- src/biogeophys/WaterStateBulkType.F90 | 5 +++-- src/biogeophys/WaterType.F90 | 23 +++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/biogeophys/WaterStateBulkType.F90 b/src/biogeophys/WaterStateBulkType.F90 index ba3f0513c5..4f03ba177e 100644 --- a/src/biogeophys/WaterStateBulkType.F90 +++ b/src/biogeophys/WaterStateBulkType.F90 @@ -47,7 +47,7 @@ module WaterStateBulkType !------------------------------------------------------------------------ subroutine InitBulk(this, bounds, info, vars, & - h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename) + h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) class(waterstatebulk_type), intent(inout) :: this type(bounds_type) , intent(in) :: bounds @@ -58,6 +58,7 @@ subroutine InitBulk(this, bounds, info, vars, & real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run character(len=*) , intent(in) :: NLFilename ! Namelist filename + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from stream call this%Init(bounds = bounds, & info = info, & @@ -66,7 +67,7 @@ subroutine InitBulk(this, bounds, info, vars, & watsat_col = watsat_col, & t_soisno_col = t_soisno_col, & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename) + NLFilename = NLFilename, exice_init_stream_col = exice_init_stream_col(bounds%begc:bounds%endc)) call this%InitBulkAllocate(bounds) diff --git a/src/biogeophys/WaterType.F90 b/src/biogeophys/WaterType.F90 index bc257f27ad..e92dc0c759 100644 --- a/src/biogeophys/WaterType.F90 +++ b/src/biogeophys/WaterType.F90 @@ -213,7 +213,7 @@ end function water_params_constructor !----------------------------------------------------------------------- subroutine Init(this, bounds, NLFilename, & - h2osno_col, snow_depth_col, watsat_col, t_soisno_col, use_aquifer_layer) + h2osno_col, snow_depth_col, watsat_col, t_soisno_col, use_aquifer_layer, exice_init_stream_col) ! ! !DESCRIPTION: ! Initialize all water variables @@ -227,6 +227,7 @@ subroutine Init(this, bounds, NLFilename, & real(r8) , intent(in) :: watsat_col(bounds%begc:, 1:) ! volumetric soil water at saturation (porosity) real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from stream ! ! !LOCAL VARIABLES: @@ -240,14 +241,14 @@ subroutine Init(this, bounds, NLFilename, & watsat_col = watsat_col, & t_soisno_col = t_soisno_col, & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename) + NLFilename = NLFilename, exice_init_stream_col = exice_init_stream_col) end subroutine Init !----------------------------------------------------------------------- subroutine InitForTesting(this, bounds, params, & h2osno_col, snow_depth_col, watsat_col, & - t_soisno_col, use_aquifer_layer, NLFilename) + t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) ! ! !DESCRIPTION: ! Version of Init routine just for unit tests @@ -262,8 +263,9 @@ subroutine InitForTesting(this, bounds, params, & real(r8) , intent(in) :: snow_depth_col(bounds%begc:) real(r8) , intent(in) :: watsat_col(bounds%begc:, 1:) ! volumetric soil water at saturation (porosity) real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) - character(len=*) , intent(in) :: NLFilename ! Namelist filename + character(len=*) , intent(in) :: NLFilename ! Namelist filename logical , intent(in), optional :: use_aquifer_layer ! whether an aquifer layer is used in this run (false by default) + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from stream ! ! !LOCAL VARIABLES: logical :: l_use_aquifer_layer @@ -283,13 +285,14 @@ subroutine InitForTesting(this, bounds, params, & watsat_col = watsat_col, & t_soisno_col = t_soisno_col, & use_aquifer_layer = l_use_aquifer_layer, & - NLFilename = NLFilename) + NLFilename = NLFilename, & + exice_init_stream_col = exice_init_stream_col ) end subroutine InitForTesting !----------------------------------------------------------------------- subroutine DoInit(this, bounds, & - h2osno_col, snow_depth_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename) + h2osno_col, snow_depth_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) ! ! !DESCRIPTION: ! Actually do the initialization (shared between main Init routine and InitForTesting) @@ -305,6 +308,7 @@ subroutine DoInit(this, bounds, & real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run character(len=*) , intent(in) :: NLFilename ! Namelist filename + real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from stream ! ! !LOCAL VARIABLES: integer :: begc, endc @@ -321,6 +325,7 @@ subroutine DoInit(this, bounds, & SHR_ASSERT_ALL_FL((ubound(snow_depth_col) == [endc]), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(watsat_col, 1) == endc), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(t_soisno_col, 1) == endc), sourcefile, __LINE__) + SHR_ASSERT_ALL_FL((ubound(exice_init_stream_col, 1) == endc), sourcefile, __LINE__) call this%SetupTracerInfo() @@ -340,7 +345,8 @@ subroutine DoInit(this, bounds, & watsat_col = watsat_col(begc:endc, 1:), & t_soisno_col = t_soisno_col(begc:endc, -nlevsno+1:), & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename) + NLFilename = NLFilename, & + exice_init_stream_col = exice_init_stream_col) call this%waterdiagnosticbulk_inst%InitBulk(bounds, & bulk_info, & @@ -381,7 +387,8 @@ subroutine DoInit(this, bounds, & watsat_col = watsat_col(begc:endc, 1:), & t_soisno_col = t_soisno_col(begc:endc, -nlevsno+1:), & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename) + NLFilename = NLFilename, & + exice_init_stream_col = exice_init_stream_col) call this%bulk_and_tracers(i)%waterdiagnostic_inst%Init(bounds, & this%bulk_and_tracers(i)%info, & From a8fad1df11260ce6f106a067399b2d008e926a1a Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Thu, 11 Apr 2024 06:50:53 -0600 Subject: [PATCH 04/26] add parameters for coldstart initialization. rename vars. --- bld/CLMBuildNamelist.pm | 4 +++- bld/namelist_files/namelist_defaults_ctsm.xml | 2 ++ bld/namelist_files/namelist_definition_ctsm.xml | 11 +++++++++++ src/biogeophys/TemperatureType.F90 | 15 ++++++++------- src/main/clm_varctl.F90 | 6 +++++- src/main/controlMod.F90 | 11 ++++++++++- 6 files changed, 39 insertions(+), 10 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 4a338201d5..1a69d59d0c 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4575,7 +4575,7 @@ sub setup_logic_exice { } # Otherwise if ice streams are off } else { - my @list = ( "stream_meshfile_exice", "stream_fldfilename_exice" ); + my @list = ( "stream_meshfile_exice", "stream_fldfilename_exice" , "excess_ice_coldstart_temp" , "excess_ice_coldstart_depth"); # fail is excess ice streams files are set foreach my $var ( @list ) { if ( defined($nl->get_value($var)) ) { @@ -4594,6 +4594,8 @@ sub setup_logic_exice { if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_exice'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_mapalgo_exice'); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp'); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth'); # If excess ice streams on, but NOT the NUOPC driver fail if ( not $opts->{'driver'} eq "nuopc" ) { $log->fatal_error("nuopc driver is required when use_excess_ice_streams is set to true" ); diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index a01839836d..380e3f875a 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2891,6 +2891,8 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1 .false. +-12.15 +1.5 lnd/clm2/paramdata/exice_init_0.125x0.125_c20220516.nc lnd/clm2/paramdata/exice_init_0.125x0.125_ESMFmesh_cdf5_c20220802.nc bilinear diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index a2e9fb86da..61c16cd4cb 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -3050,6 +3050,17 @@ use case.) If TRUE turn on the excess ice physics, (Lee et al., 2014; Cai et al., 2020) + +Initial soil temperature to use for gridcells with excess ice present during a run starting with coldstart (deg C) + + + +Soil depth below which initial excess ice concentration will be applied during a run starting with coldstart (m) + + + If TRUE and use_excess_ice is TRUE, use the excess ice stream to determine the initial values of the excess ice field diff --git a/src/biogeophys/TemperatureType.F90 b/src/biogeophys/TemperatureType.F90 index 7906773b26..0a31bba6e6 100644 --- a/src/biogeophys/TemperatureType.F90 +++ b/src/biogeophys/TemperatureType.F90 @@ -653,7 +653,8 @@ subroutine InitCold(this, bounds, & use landunit_varcon, only : istwet, istsoil, istdlak, istice, istcrop use column_varcon , only : icol_road_imperv, icol_roof, icol_sunwall use column_varcon , only : icol_shadewall, icol_road_perv - use clm_varctl , only : iulog, use_vancouver, use_mexicocity, use_excess_ice + use clm_varctl , only : iulog, use_vancouver, use_mexicocity + use clm_varctl , only : use_excess_ice, excess_ice_coldstart_depth, excess_ice_coldstart_temp use initVerticalMod , only : find_soil_layer_containing_depth ! ! !ARGUMENTS: @@ -673,7 +674,7 @@ subroutine InitCold(this, bounds, & real(r8) :: snowbd ! temporary calculation of snow bulk density (kg/m3) real(r8) :: fmelt ! snowbd/100 integer :: lev - integer :: n05m ! layer number containing 0.5 meter depth + integer :: nexice_start ! layer number containing 0.5 meter depth !----------------------------------------------------------------------- SHR_ASSERT_ALL_FL((ubound(em_roof_lun) == (/bounds%endl/)), sourcefile, __LINE__) @@ -748,13 +749,13 @@ subroutine InitCold(this, bounds, & else this%t_soisno_col(c,1:nlevgrnd) = 272._r8 if (use_excess_ice .and. exice_init_stream_col(c) > 0.0_r8) then - n05m = nlevsoi - 1 - if (zisoi(nlevsoi) >= 0.5_r8) then - call find_soil_layer_containing_depth(0.5_r8,n05m) + nexice_start = nlevsoi - 1 + if (zisoi(nlevsoi) >= excess_ice_coldstart_depth) then + call find_soil_layer_containing_depth(0.5_r8,nexice_start) else - n05m=nlevsoi-1 + nexice_start=nlevsoi-1 endif - this%t_soisno_col(c,n05m:nlevgrnd) = SHR_CONST_TKFRZ - 12.15_r8 !needs to be below freezing to properly initiate excess ice + this%t_soisno_col(c,nexice_start:nlevgrnd) = SHR_CONST_TKFRZ + excess_ice_coldstart_temp !needs to be below freezing to properly initiate excess ice end if endif endif diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 389ed50f88..09f3dd176a 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -411,10 +411,14 @@ module clm_varctl logical, public :: use_hillslope_routing = .false. ! true => use surface water routing in hillslope hydrology !---------------------------------------------------------- - ! excess ice physics switch + ! excess ice physics switch and params !---------------------------------------------------------- logical, public :: use_excess_ice = .false. ! true. => use excess ice physics + real(r8), public :: excess_ice_coldstart_temp = rundef ! initial coldstart soil temperature for gridcells where excess ice is present + + real(r8), public :: excess_ice_coldstart_depth = rundef ! initial coldstart depth at which excess ice might be present and excess_ice_coldstart_temp will be applied + !---------------------------------------------------------- ! plant hydraulic stress switch !---------------------------------------------------------- diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index dc9622ddac..8ec95c9e81 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -256,7 +256,8 @@ subroutine control_init(dtime) namelist /clm_inparm/ use_soil_moisture_streams - namelist /clm_inparm/ use_excess_ice + ! excess ice flag and parameters + namelist /clm_inparm/ use_excess_ice , excess_ice_coldstart_depth, excess_ice_coldstart_temp namelist /clm_inparm/ use_lai_streams @@ -823,6 +824,10 @@ subroutine control_spmd() call mpi_bcast (use_excess_ice, 1, MPI_LOGICAL, 0, mpicom,ier) + call mpi_bcast (excess_ice_coldstart_depth, 1, MPI_REAL8, 0, mpicom, ier) + + call mpi_bcast (excess_ice_coldstart_temp, 1, MPI_REAL8, 0, mpicom, ier) + call mpi_bcast (use_lai_streams, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_cropcal_streams, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -977,6 +982,10 @@ subroutine control_print () write(iulog,*) ' use_extralakelayers = ', use_extralakelayers write(iulog,*) ' use_vichydro = ', use_vichydro write(iulog,*) ' use_excess_ice = ', use_excess_ice + if (use_excess_ice) then + write(iulog,*) ' excess_ice_coldstart_depth = ', excess_ice_coldstart_depth + write(iulog,*) ' excess_ice_coldstart_temp = ', excess_ice_coldstart_temp + endif write(iulog,*) ' use_cn = ', use_cn write(iulog,*) ' use_cndv = ', use_cndv write(iulog,*) ' use_crop = ', use_crop From 9b3527e333ae50e300a363af1a20b9e2e2a3c04c Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Thu, 11 Apr 2024 07:04:41 -0600 Subject: [PATCH 05/26] change default values for new namelist vars --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 380e3f875a..2e346038f4 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2891,8 +2891,8 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1 .false. --12.15 -1.5 +-2.15 +0.5 lnd/clm2/paramdata/exice_init_0.125x0.125_c20220516.nc lnd/clm2/paramdata/exice_init_0.125x0.125_ESMFmesh_cdf5_c20220802.nc bilinear From 9d6901b5b5db6e18a1804f8a2ceef00761c659f7 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Tue, 4 Jun 2024 08:57:20 -0600 Subject: [PATCH 06/26] fix namelist logic --- bld/CLMBuildNamelist.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 09b721a8f9..f739b033f8 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4588,14 +4588,20 @@ sub setup_logic_exice { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; my $use_exice = $nl->get_value( 'use_excess_ice' ); my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); - # IF excess ice streams is on - if ( (not defined($use_exice_streams) && value_is_true($use_exice)) && ($nl_flags->{'clm_start_type'} == /cold/ || $nl_flags->{'clm_start_type'} == /arb_ic/ ) ) { + my $finidat = $nl->get_value('finidat'); + # If coldstart and use_excess_ice is on: + if ( ( (not defined($use_exice_streams)) && value_is_true($use_exice) ) && string_is_undef_or_empty($finidat) ) { $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.'); - $use_exice_streams = '.true.' + $use_exice_streams = '.true.'; + # if excess ice is turned off + } elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) { + $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.false.'); + $use_exice_streams = '.false.'; } + # If excess ice streams is on if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { # Can only be true if excess ice is also on, otherwise fail - if (defined($use_exice) && not value_is_true($use_exice)) { + if ( defined($use_exice) && (not value_is_true($use_exice)) ) { $log->fatal_error("use_excess_ice_streams can NOT be TRUE when use_excess_ice is FALSE" ); } # Otherwise if ice streams are off From f957f21066335c99f10336560e66b1d72cb4e217 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Mon, 15 Jul 2024 11:12:50 -0600 Subject: [PATCH 07/26] fix argument passing --- src/main/clm_instMod.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/clm_instMod.F90 b/src/main/clm_instMod.F90 index f3cfa9923d..04c4af6611 100644 --- a/src/main/clm_instMod.F90 +++ b/src/main/clm_instMod.F90 @@ -316,7 +316,8 @@ subroutine clm_instInit(bounds) em_wall_lun=urbanparams_inst%em_wall(begl:endl), & em_improad_lun=urbanparams_inst%em_improad(begl:endl), & em_perroad_lun=urbanparams_inst%em_perroad(begl:endl), & - is_simple_buildtemp=IsSimpleBuildTemp(), is_prog_buildtemp=IsProgBuildTemp() ) + is_simple_buildtemp=IsSimpleBuildTemp(), is_prog_buildtemp=IsProgBuildTemp(), & + exice_init_stream_col=exice_init_stream_col(bounds%begc:bounds%endc) ) call active_layer_inst%Init(bounds) From 6e806b5a0d0b1db561f01a403cbae2fc5b450e82 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Tue, 16 Jul 2024 08:50:08 -0600 Subject: [PATCH 08/26] update defaults --- bld/namelist_files/namelist_defaults_ctsm.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 2c6b375140..47f9802aff 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2058,8 +2058,9 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c .false. - --2.15 +0.0 +1.0 +-3.15 0.5 lnd/clm2/paramdata/exice_init_0.125x0.125_c20220516.nc lnd/clm2/paramdata/exice_init_0.125x0.125_ESMFmesh_cdf5_c20220802.nc From 699936eef5097066b4faea29de920541be1d36d0 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Thu, 18 Jul 2024 10:47:24 -0600 Subject: [PATCH 09/26] Move namelist vars, add checks --- bld/CLMBuildNamelist.pm | 43 +++++++-- .../namelist_definition_ctsm.xml | 9 +- src/biogeophys/TemperatureType.F90 | 91 ++++++++++++++++++- src/main/clm_instMod.F90 | 4 +- src/main/clm_varctl.F90 | 4 - src/main/controlMod.F90 | 12 +-- 6 files changed, 132 insertions(+), 31 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 45c0a7bdb8..498de96a4d 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1812,10 +1812,15 @@ sub process_namelist_inline_logic { ######################################### setup_logic_initinterp($opts, $nl_flags, $definition, $defaults, $nl); - ############################### - # namelist group: exice_streams # - ############################### + ################################# + # namelist group: exice_streams # + ################################# setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl); + + ########################################## + # namelist group: clm_temperature_inparm # + ########################################## + setup_logic_coldstart_temp($opts,$nl_flags, $definition, $defaults, $nl); } #------------------------------------------------------------------------------- @@ -4599,7 +4604,7 @@ sub setup_logic_exice { } # Otherwise if ice streams are off } else { - my @list = ( "stream_meshfile_exice", "stream_fldfilename_exice" , "excess_ice_coldstart_temp" , "excess_ice_coldstart_depth"); + my @list = ( "stream_meshfile_exice", "stream_fldfilename_exice" ); # fail is excess ice streams files are set foreach my $var ( @list ) { if ( defined($nl->get_value($var)) ) { @@ -4618,8 +4623,6 @@ sub setup_logic_exice { if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_exice'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_mapalgo_exice'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth'); # If excess ice streams on, but NOT the NUOPC driver fail if ( not $opts->{'driver'} eq "nuopc" ) { $log->fatal_error("nuopc driver is required when use_excess_ice_streams is set to true" ); @@ -4633,6 +4636,33 @@ sub setup_logic_exice { } # end exice streams +sub setup_logic_coldstart_temp { + + my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; + + # set initial temperatures for excess ice gridcells: + + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp'); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth'); + + my $use_exice = $nl->get_value( 'use_excess_ice' ); + my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); + my $exice_cs_temp = $nl->get_value( 'excess_ice_coldstart_temp' ); + my $exice_cs_depth = $nl->get_value( 'excess_ice_coldstart_depth' ); + + if (defined($use_exice) && value_is_true($use_exice)) { + # Checking this setting only needed IF excess ice streams are on get the stream defaults + if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { + if (defined($exice_cs_depth) && $exice_cs_depth <= 0.0 ) { + $log->fatal_error("excess_ice_coldstart_depth is <= 0.0" ); + } + if (defined($exice_cs_temp) && $exice_cs_temp >= 0.0 ) { + $log->fatal_error("excess_ice_coldstart_temp is >= 0.0, no excess ice will be present in this run" ); + } + } + } +} + #------------------------------------------------------------------------------- sub setup_logic_z0param { @@ -4728,6 +4758,7 @@ sub write_output_files { push @groups, "lifire_inparm"; push @groups, "ch4finundated"; push @groups, "exice_streams"; + push @groups, "clm_temperature_inparm"; push @groups, "soilbgc_decomp"; push @groups, "clm_canopy_inparm"; push @groups, "zendersoilerod"; diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 2eb8a67e8c..575d72856f 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -2825,13 +2825,14 @@ If TRUE turn on the excess ice physics, (Lee et al., 2014; Cai et al., 2020) -Initial soil temperature to use for gridcells with excess ice present during a run starting with coldstart (deg C) + group="clm_temperature_inparm" > +Initial soil temperature to use for gridcells with excess ice present during a run starting with coldstart (deg C). Value is only apply if use_excess_ice is true. -Soil depth below which initial excess ice concentration will be applied during a run starting with coldstart (m) + group="clm_temperature_inparm" > +Soil depth below which initial excess ice concentration will be applied during a run starting with coldstart (m). Value is only apply if use_excess_ice is true. +If this is set below depth of the soil depth, only the last soil layer will get excess ice. diff --git a/src/biogeophys/TemperatureType.F90 b/src/biogeophys/TemperatureType.F90 index 0a31bba6e6..6084c7ee2c 100644 --- a/src/biogeophys/TemperatureType.F90 +++ b/src/biogeophys/TemperatureType.F90 @@ -118,6 +118,10 @@ module TemperatureType real(r8), pointer :: xmf_h2osfc_col (:) ! latent heat of phase change of surface water real(r8), pointer :: fact_col (:,:) ! used in computing tridiagonal matrix real(r8), pointer :: c_h2osfc_col (:) ! heat capacity of surface water + + ! Namelist parameters for initialization + real(r8), private :: excess_ice_coldstart_depth ! depth below which excess ice will be present + real(r8), private :: excess_ice_coldstart_temp ! coldstart temperature of layers with excess ice present contains @@ -130,6 +134,8 @@ module TemperatureType procedure, public :: InitAccVars procedure, public :: UpdateAccVars + procedure, private :: ReadNL + end type temperature_type character(len=*), parameter, private :: sourcefile = & @@ -141,7 +147,7 @@ module TemperatureType !------------------------------------------------------------------------ subroutine Init(this, bounds, & em_roof_lun, em_wall_lun, em_improad_lun, em_perroad_lun, & - is_simple_buildtemp, is_prog_buildtemp, exice_init_stream_col) + is_simple_buildtemp, is_prog_buildtemp, exice_init_stream_col, NLFileName) ! ! !DESCRIPTION: ! @@ -157,7 +163,10 @@ subroutine Init(this, bounds, & logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial excess ice concentration from the stream file + character(len=*) , intent(in) :: NLFilename ! Namelist filename + + call this%ReadNL(NLFilename) call this%InitAllocate ( bounds ) call this%InitHistory ( bounds, is_simple_buildtemp, is_prog_buildtemp ) call this%InitCold ( bounds, & @@ -654,7 +663,7 @@ subroutine InitCold(this, bounds, & use column_varcon , only : icol_road_imperv, icol_roof, icol_sunwall use column_varcon , only : icol_shadewall, icol_road_perv use clm_varctl , only : iulog, use_vancouver, use_mexicocity - use clm_varctl , only : use_excess_ice, excess_ice_coldstart_depth, excess_ice_coldstart_temp + use clm_varctl , only : use_excess_ice use initVerticalMod , only : find_soil_layer_containing_depth ! ! !ARGUMENTS: @@ -750,12 +759,21 @@ subroutine InitCold(this, bounds, & this%t_soisno_col(c,1:nlevgrnd) = 272._r8 if (use_excess_ice .and. exice_init_stream_col(c) > 0.0_r8) then nexice_start = nlevsoi - 1 - if (zisoi(nlevsoi) >= excess_ice_coldstart_depth) then - call find_soil_layer_containing_depth(0.5_r8,nexice_start) + if (this%excess_ice_coldstart_depth <= 0.0_r8) then + ! we double check this here, and when building namelists + call endrun(msg="ERROR excess_ice_coldstart_depth <= 0.0. Set a positive value in the namelist"//errmsg(sourcefile, __LINE__)) + endif + if (zisoi(nlevsoi) >= this%excess_ice_coldstart_depth) then + call find_soil_layer_containing_depth(this%excess_ice_coldstart_depth,nexice_start) else nexice_start=nlevsoi-1 endif - this%t_soisno_col(c,nexice_start:nlevgrnd) = SHR_CONST_TKFRZ + excess_ice_coldstart_temp !needs to be below freezing to properly initiate excess ice + if (this%excess_ice_coldstart_temp >= 0.0_r8) then + ! this is here, since we care about excess_ice_coldstart_temp only when there is excess ice in the gridcell + ! which happens only when the streams are read. + call endrun(msg="ERROR excess_ice_coldstart_temp is not below freezing point"//errmsg(sourcefile, __LINE__)) + endif + this%t_soisno_col(c,nexice_start:nlevgrnd) = SHR_CONST_TKFRZ + this%excess_ice_coldstart_temp end if endif endif @@ -1646,4 +1664,67 @@ subroutine Clean(this) end subroutine Clean + !----------------------------------------------------------------------- + subroutine ReadNL( this, NLFilename ) + ! + ! !DESCRIPTION: + ! Read namelist for Temperature type + ! right now (17.07.2024) it only reads variables related to excess ice coldstart initialization + ! but can be extended to replace hardocded values in InitCold by namelist variables + ! + ! !USES: + use shr_mpi_mod , only : shr_mpi_bcast + use shr_log_mod , only : errMsg => shr_log_errMsg + use spmdMod , only : masterproc, mpicom + use fileutils , only : getavu, relavu, opnfil + use clm_nlUtilsMod , only : find_nlgroup_name + use clm_varctl , only : iulog + use abortutils , only : endrun + ! + ! !ARGUMENTS: + class(temperature_type) :: this + character(len=*), intent(in) :: NLFilename ! Namelist filename + ! + ! !LOCAL VARIABLES: + integer :: ierr ! error code + integer :: unitn ! unit for namelist file + real(r8) :: excess_ice_coldstart_temp = spval ! coldstart temperature of layers with excess ice present (deg C) + real(r8) :: excess_ice_coldstart_depth = spval ! depth below which excess ice will be present (m) + character(len=32) :: subname = 'Temperature_readnl' ! subroutine name + !----------------------------------------------------------------------- + + namelist / clm_temperature_inparm / excess_ice_coldstart_depth, excess_ice_coldstart_temp + + if ( masterproc )then + + unitn = getavu() + write(iulog,*) 'Read in clm_temperature_inparm namelist' + call opnfil (NLFilename, unitn, 'F') + call find_nlgroup_name(unitn, 'clm_temperature_inparm', status=ierr) + if (ierr == 0) then + read(unitn, nml=clm_temperature_inparm, iostat=ierr) + if (ierr /= 0) then + call endrun(msg="ERROR reading clm_temperature_inparm namelist"//errmsg(sourcefile, __LINE__)) + end if + else + call endrun(msg="ERROR finding clm_temperature_inparm namelist"//errmsg(sourcefile, __LINE__)) + end if + call relavu( unitn ) + ! namelist might be read but the values not properly set + if ( excess_ice_coldstart_depth == spval ) then + call endrun(msg="ERROR exice_coldstart_depth namelist value is not properly set"//errmsg(sourcefile, __LINE__)) + endif + if ( excess_ice_coldstart_temp == spval ) then + call endrun(msg="ERROR exice_coldstart_temp namelist value is not properly set"//errmsg(sourcefile, __LINE__)) + endif + end if + + call shr_mpi_bcast(excess_ice_coldstart_depth, mpicom) + call shr_mpi_bcast(excess_ice_coldstart_temp, mpicom) + + this%excess_ice_coldstart_depth = excess_ice_coldstart_depth + this%excess_ice_coldstart_temp = excess_ice_coldstart_temp + + end subroutine ReadNL + end module TemperatureType diff --git a/src/main/clm_instMod.F90 b/src/main/clm_instMod.F90 index 04c4af6611..242df92c43 100644 --- a/src/main/clm_instMod.F90 +++ b/src/main/clm_instMod.F90 @@ -222,7 +222,7 @@ subroutine clm_instInit(bounds) type(file_desc_t) :: params_ncid ! pio netCDF file id for parameter file real(r8), allocatable :: h2osno_col(:) real(r8), allocatable :: snow_depth_col(:) - real(r8), allocatable :: exice_init_stream_col(:) + real(r8), allocatable :: exice_init_stream_col(:) ! initial concentration of excess ice in the soil (-) type(excessicestream_type) :: exice_stream integer :: dummy_to_make_pgi_happy @@ -317,7 +317,7 @@ subroutine clm_instInit(bounds) em_improad_lun=urbanparams_inst%em_improad(begl:endl), & em_perroad_lun=urbanparams_inst%em_perroad(begl:endl), & is_simple_buildtemp=IsSimpleBuildTemp(), is_prog_buildtemp=IsProgBuildTemp(), & - exice_init_stream_col=exice_init_stream_col(bounds%begc:bounds%endc) ) + exice_init_stream_col=exice_init_stream_col(bounds%begc:bounds%endc) , NLFileName=NLFilename) call active_layer_inst%Init(bounds) diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index eff05511cd..8804ad2c01 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -422,10 +422,6 @@ module clm_varctl !---------------------------------------------------------- logical, public :: use_excess_ice = .false. ! true. => use excess ice physics - real(r8), public :: excess_ice_coldstart_temp = rundef ! initial coldstart soil temperature for gridcells where excess ice is present - - real(r8), public :: excess_ice_coldstart_depth = rundef ! initial coldstart depth at which excess ice might be present and excess_ice_coldstart_temp will be applied - !---------------------------------------------------------- ! plant hydraulic stress switch !---------------------------------------------------------- diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index a5321e0797..47ce6dce7c 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -256,8 +256,8 @@ subroutine control_init(dtime) namelist /clm_inparm/ use_soil_moisture_streams - ! excess ice flag and parameters - namelist /clm_inparm/ use_excess_ice , excess_ice_coldstart_depth, excess_ice_coldstart_temp + ! excess ice flag + namelist /clm_inparm/ use_excess_ice namelist /clm_inparm/ use_lai_streams @@ -829,10 +829,6 @@ subroutine control_spmd() call mpi_bcast (use_excess_ice, 1, MPI_LOGICAL, 0, mpicom,ier) - call mpi_bcast (excess_ice_coldstart_depth, 1, MPI_REAL8, 0, mpicom, ier) - - call mpi_bcast (excess_ice_coldstart_temp, 1, MPI_REAL8, 0, mpicom, ier) - call mpi_bcast (use_lai_streams, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_cropcal_streams, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -989,10 +985,6 @@ subroutine control_print () write(iulog,*) ' use_extralakelayers = ', use_extralakelayers write(iulog,*) ' use_vichydro = ', use_vichydro write(iulog,*) ' use_excess_ice = ', use_excess_ice - if (use_excess_ice) then - write(iulog,*) ' excess_ice_coldstart_depth = ', excess_ice_coldstart_depth - write(iulog,*) ' excess_ice_coldstart_temp = ', excess_ice_coldstart_temp - endif write(iulog,*) ' use_cn = ', use_cn write(iulog,*) ' use_cndv = ', use_cndv write(iulog,*) ' use_crop = ', use_crop From 9ba2b5f164ad800e6c10f9e7b5f373c9f31ab504 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Mon, 22 Jul 2024 10:51:05 -0600 Subject: [PATCH 10/26] rename vars, add arg to test and depth arg. --- src/biogeophys/TemperatureType.F90 | 16 ++++----- src/biogeophys/WaterStateBulkType.F90 | 8 ++--- src/biogeophys/WaterStateType.F90 | 28 +++++++-------- src/biogeophys/WaterType.F90 | 34 ++++++++++--------- src/main/clm_instMod.F90 | 15 ++++---- .../unittestWaterTypeFactory.F90 | 28 ++++++++++++++- 6 files changed, 79 insertions(+), 50 deletions(-) diff --git a/src/biogeophys/TemperatureType.F90 b/src/biogeophys/TemperatureType.F90 index 6084c7ee2c..a256e22eb7 100644 --- a/src/biogeophys/TemperatureType.F90 +++ b/src/biogeophys/TemperatureType.F90 @@ -120,8 +120,8 @@ module TemperatureType real(r8), pointer :: c_h2osfc_col (:) ! heat capacity of surface water ! Namelist parameters for initialization - real(r8), private :: excess_ice_coldstart_depth ! depth below which excess ice will be present - real(r8), private :: excess_ice_coldstart_temp ! coldstart temperature of layers with excess ice present + real(r8) :: excess_ice_coldstart_depth ! depth below which excess ice will be present + real(r8) :: excess_ice_coldstart_temp ! coldstart temperature of layers with excess ice present contains @@ -147,7 +147,7 @@ module TemperatureType !------------------------------------------------------------------------ subroutine Init(this, bounds, & em_roof_lun, em_wall_lun, em_improad_lun, em_perroad_lun, & - is_simple_buildtemp, is_prog_buildtemp, exice_init_stream_col, NLFileName) + is_simple_buildtemp, is_prog_buildtemp, exice_init_conc_col, NLFileName) ! ! !DESCRIPTION: ! @@ -162,7 +162,7 @@ subroutine Init(this, bounds, & real(r8) , intent(in) :: em_perroad_lun(bounds%begl:) logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used - real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial excess ice concentration from the stream file + real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:) ! initial coldstart excess ice concentration (from the stream file) character(len=*) , intent(in) :: NLFilename ! Namelist filename @@ -175,7 +175,7 @@ subroutine Init(this, bounds, & em_improad_lun(bounds%begl:bounds%endl), & em_perroad_lun(bounds%begl:bounds%endl), & is_simple_buildtemp, is_prog_buildtemp, & - exice_init_stream_col(bounds%begc:bounds%endc) ) + exice_init_conc_col(bounds%begc:bounds%endc) ) end subroutine Init @@ -650,7 +650,7 @@ end subroutine InitHistory !----------------------------------------------------------------------- subroutine InitCold(this, bounds, & em_roof_lun, em_wall_lun, em_improad_lun, em_perroad_lun, & - is_simple_buildtemp, is_prog_buildtemp, exice_init_stream_col) + is_simple_buildtemp, is_prog_buildtemp, exice_init_conc_col) ! ! !DESCRIPTION: ! Initialize cold start conditions for module variables @@ -675,7 +675,7 @@ subroutine InitCold(this, bounds, & real(r8) , intent(in) :: em_perroad_lun(bounds%begl:) logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used - real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from the stream file + real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:) ! initial coldstart excess ice concentration (from the stream file) ! ! !LOCAL VARIABLES: integer :: j,l,c,p ! indices @@ -757,7 +757,7 @@ subroutine InitCold(this, bounds, & end if else this%t_soisno_col(c,1:nlevgrnd) = 272._r8 - if (use_excess_ice .and. exice_init_stream_col(c) > 0.0_r8) then + if (use_excess_ice .and. exice_init_conc_col(c) > 0.0_r8) then nexice_start = nlevsoi - 1 if (this%excess_ice_coldstart_depth <= 0.0_r8) then ! we double check this here, and when building namelists diff --git a/src/biogeophys/WaterStateBulkType.F90 b/src/biogeophys/WaterStateBulkType.F90 index 4f03ba177e..4cd425c976 100644 --- a/src/biogeophys/WaterStateBulkType.F90 +++ b/src/biogeophys/WaterStateBulkType.F90 @@ -47,7 +47,7 @@ module WaterStateBulkType !------------------------------------------------------------------------ subroutine InitBulk(this, bounds, info, vars, & - h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) + h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, exice_coldstart_depth, exice_init_conc_col) class(waterstatebulk_type), intent(inout) :: this type(bounds_type) , intent(in) :: bounds @@ -57,8 +57,8 @@ subroutine InitBulk(this, bounds, info, vars, & real(r8) , intent(in) :: watsat_col(bounds%begc:, 1:) ! volumetric soil water at saturation (porosity) real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run - character(len=*) , intent(in) :: NLFilename ! Namelist filename - real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:) ! initial ammount of excess ice from stream + real(r8) , intent(in) :: exice_coldstart_depth ! depth below which excess ice will be present + real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:) ! initial coldstart excess ice concentration (from the stream file) call this%Init(bounds = bounds, & info = info, & @@ -67,7 +67,7 @@ subroutine InitBulk(this, bounds, info, vars, & watsat_col = watsat_col, & t_soisno_col = t_soisno_col, & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename, exice_init_stream_col = exice_init_stream_col(bounds%begc:bounds%endc)) + exice_coldstart_depth = exice_coldstart_depth, exice_init_conc_col = exice_init_conc_col(bounds%begc:bounds%endc)) call this%InitBulkAllocate(bounds) diff --git a/src/biogeophys/WaterStateType.F90 b/src/biogeophys/WaterStateType.F90 index 4c82e4efa6..8f0ba89104 100644 --- a/src/biogeophys/WaterStateType.F90 +++ b/src/biogeophys/WaterStateType.F90 @@ -80,7 +80,7 @@ module WaterStateType !------------------------------------------------------------------------ subroutine Init(this, bounds, info, tracer_vars, & - h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) + h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, exice_coldstart_depth, exice_init_conc_col) class(waterstate_type), intent(inout) :: this type(bounds_type) , intent(in) :: bounds @@ -90,8 +90,8 @@ subroutine Init(this, bounds, info, tracer_vars, & real(r8) , intent(in) :: watsat_col(bounds%begc:, 1:) ! volumetric soil water at saturation (porosity) real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run - character(len=*) , intent(in) :: NLFilename ! Namelist filename - real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:bounds%endc) ! initial ammount of excess ice from stream + real(r8) , intent(in) :: exice_coldstart_depth ! depth below which excess ice will be present + real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:bounds%endc) ! initial coldstart excess ice concentration (from the stream file) this%info => info @@ -103,7 +103,7 @@ subroutine Init(this, bounds, info, tracer_vars, & watsat_col = watsat_col, & t_soisno_col = t_soisno_col, & use_aquifer_layer = use_aquifer_layer, & - NLFilename = NLFilename, exice_init_stream_col = exice_init_stream_col) + exice_coldstart_depth = exice_coldstart_depth , exice_init_conc_col = exice_init_conc_col) end subroutine Init @@ -322,7 +322,7 @@ end subroutine InitHistory !----------------------------------------------------------------------- subroutine InitCold(this, bounds, & - h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, NLFilename, exice_init_stream_col) + h2osno_input_col, watsat_col, t_soisno_col, use_aquifer_layer, exice_coldstart_depth, exice_init_conc_col) ! ! !DESCRIPTION: ! Initialize time constant variables and cold start conditions @@ -342,12 +342,12 @@ subroutine InitCold(this, bounds, & real(r8) , intent(in) :: watsat_col(bounds%begc:, 1:) ! volumetric soil water at saturation (porosity) real(r8) , intent(in) :: t_soisno_col(bounds%begc:, -nlevsno+1:) ! col soil temperature (Kelvin) logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run - character(len=*) , intent(in) :: NLFilename ! Namelist filename - real(r8) , intent(in) :: exice_init_stream_col(bounds%begc:bounds%endc) ! initial ammount of excess ice from stream + real(r8) , intent(in) :: exice_coldstart_depth ! depth below which excess ice will be present + real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:bounds%endc) ! initial coldstart excess ice concentration (from the stream file) ! ! !LOCAL VARIABLES: integer :: c,j,l,nlevs,g - integer :: nbedrock, n05m ! layer containing 0.5 m + integer :: nbedrock, nexice ! layer containing 0.5 m real(r8) :: ratio !----------------------------------------------------------------------- @@ -550,7 +550,7 @@ subroutine InitCold(this, bounds, & this%dynbal_baseline_ice_col(bounds%begc:bounds%endc) = 0._r8 !Initialize excess ice - this%exice_bulk_init(bounds%begc:bounds%endc) = exice_init_stream_col(bounds%begc:bounds%endc) + this%exice_bulk_init(bounds%begc:bounds%endc) = exice_init_conc_col(bounds%begc:bounds%endc) this%excess_ice_col(bounds%begc:bounds%endc,:) = 0.0_r8 if (use_excess_ice) then do c = bounds%begc,bounds%endc @@ -558,10 +558,10 @@ subroutine InitCold(this, bounds, & l = col%landunit(c) if (.not. lun%lakpoi(l)) then !not lake if (lun%itype(l) == istsoil .or. lun%itype(l) == istcrop) then - if (zisoi(nlevsoi) >= 0.5_r8) then - call find_soil_layer_containing_depth(0.5_r8,n05m) + if (zisoi(nlevsoi) >= exice_coldstart_depth) then + call find_soil_layer_containing_depth(exice_coldstart_depth,nexice) else - n05m=nlevsoi-1 + nexice=nlevsoi-1 endif if (use_bedrock .and. col%nbedrock(c) <=nlevsoi) then nbedrock = col%nbedrock(c) @@ -569,8 +569,8 @@ subroutine InitCold(this, bounds, & nbedrock = nlevsoi endif do j = 2, nlevmaxurbgrnd ! ignore first layer - if (n05m= n05m .and. j= nexice .and. j Date: Mon, 22 Jul 2024 10:55:49 -0600 Subject: [PATCH 11/26] add defaults for the stream test. --- .../testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm index f61ca32a79..aa2c9efa5b 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm @@ -1,2 +1,4 @@ use_excess_ice = .true. use_excess_ice_streams = .true. + excess_ice_coldstart_depth = 0.5 + excess_ice_coldstart_temp = -5.0 From dbf00993bfb1ff626f4f326e03b585293f9bc5da Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Mon, 22 Jul 2024 10:58:36 -0600 Subject: [PATCH 12/26] fix indent --- bld/CLMBuildNamelist.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 498de96a4d..fa0d4a0382 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4589,13 +4589,13 @@ sub setup_logic_exice { my $finidat = $nl->get_value('finidat'); # If coldstart and use_excess_ice is on: if ( ( (not defined($use_exice_streams)) && value_is_true($use_exice) ) && string_is_undef_or_empty($finidat) ) { - $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.'); - $use_exice_streams = '.true.'; - # if excess ice is turned off - } elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) { - $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.false.'); - $use_exice_streams = '.false.'; - } + $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.'); + $use_exice_streams = '.true.'; + # if excess ice is turned off + } elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) { + $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.false.'); + $use_exice_streams = '.false.'; + } # If excess ice streams is on if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { # Can only be true if excess ice is also on, otherwise fail From 811659f6a6bd59a91bef8f10aa0d20b0fc268630 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Tue, 23 Jul 2024 11:11:41 -0600 Subject: [PATCH 13/26] make unit-tests happy --- src/biogeophys/TemperatureType.F90 | 9 +++++++-- src/unit_test_shr/unittestDustEmisInputs.F90 | 6 +++++- src/unit_test_shr/unittestWaterTypeFactory.F90 | 6 +++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/biogeophys/TemperatureType.F90 b/src/biogeophys/TemperatureType.F90 index a256e22eb7..3771735bb7 100644 --- a/src/biogeophys/TemperatureType.F90 +++ b/src/biogeophys/TemperatureType.F90 @@ -163,10 +163,15 @@ subroutine Init(this, bounds, & logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:) ! initial coldstart excess ice concentration (from the stream file) - character(len=*) , intent(in) :: NLFilename ! Namelist filename + character(len=*) , intent(in), optional :: NLFilename ! Namelist filename - call this%ReadNL(NLFilename) + if ( present(NLFilename) ) then + call this%ReadNL(NLFilename) + else ! this is needed for testing + this%excess_ice_coldstart_depth = 0.5_r8 + this%excess_ice_coldstart_temp = -5.0_r8 + endif call this%InitAllocate ( bounds ) call this%InitHistory ( bounds, is_simple_buildtemp, is_prog_buildtemp ) call this%InitCold ( bounds, & diff --git a/src/unit_test_shr/unittestDustEmisInputs.F90 b/src/unit_test_shr/unittestDustEmisInputs.F90 index 6b15680ef7..af3ad63890 100644 --- a/src/unit_test_shr/unittestDustEmisInputs.F90 +++ b/src/unit_test_shr/unittestDustEmisInputs.F90 @@ -50,6 +50,7 @@ subroutine setUp(this) character(len=5) :: NLFilename = 'none' real(r8), allocatable :: urb_em(:) + real(r8), allocatable :: exice_init_conc_col(:) integer :: begl, endl, begc, endc integer :: c type(atm2lnd_params_type) :: atm2lnd_params @@ -91,12 +92,15 @@ subroutine setUp(this) call this%frictionvel_inst%InitForTesting(bounds) allocate( urb_em(begl:endl) ) urb_em(begl:endl) = 0.99_r8 ! Arbitrary won't matter here + allocate( exice_init_conc_col(begc:endc) ) + exice_init_conc_col(begc:endc) = 0.0_r8 ! zero, so it doesn't affect anything. call this%temperature_inst%Init(bounds, & em_roof_lun=urb_em(begl:endl), & em_wall_lun=urb_em(begl:endl), & em_improad_lun=urb_em(begl:endl), & em_perroad_lun=urb_em(begl:endl), & - is_simple_buildtemp=.true., is_prog_buildtemp=.false.) + is_simple_buildtemp=.true., is_prog_buildtemp=.false., & + exice_init_conc_col = exice_init_conc_col(begc:endc)) deallocate( urb_em ) end subroutine setUp diff --git a/src/unit_test_shr/unittestWaterTypeFactory.F90 b/src/unit_test_shr/unittestWaterTypeFactory.F90 index 06362ee1d0..2d83fd0058 100644 --- a/src/unit_test_shr/unittestWaterTypeFactory.F90 +++ b/src/unit_test_shr/unittestWaterTypeFactory.F90 @@ -140,7 +140,7 @@ subroutine create_water_type(this, water_inst, & end if if (present(exice_init_conc_col)) then - SHR_ASSERT_ALL_FL((ubound(exice_init_conc_col,1) == bounds%enc), sourcefile, __LINE__) + SHR_ASSERT_ALL_FL((ubound(exice_init_conc_col,1) == bounds%endc), sourcefile, __LINE__) endif if (present(enable_consistency_checks)) then @@ -177,9 +177,9 @@ subroutine create_water_type(this, water_inst, & l_exice_coldstart_depth = 0.5_r8 endif if (present(exice_init_conc_col)) then - l_exice_init_conc_col(:,:) = exice_init_conc_col + l_exice_init_conc_col(:) = exice_init_conc_col else - l_exice_init_conc_col(:,:) = 0.01_r8 + l_exice_init_conc_col(:) = 0.0_r8 endif call water_inst%InitForTesting(bounds, params, & From 88adda49954f51a4aa3fb1763e0c9d2e152f7c04 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Tue, 23 Jul 2024 12:29:08 -0600 Subject: [PATCH 14/26] Make warning for non-equilibrium. --- src/biogeophys/WaterStateType.F90 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/biogeophys/WaterStateType.F90 b/src/biogeophys/WaterStateType.F90 index 8f0ba89104..35441d65d9 100644 --- a/src/biogeophys/WaterStateType.F90 +++ b/src/biogeophys/WaterStateType.F90 @@ -724,6 +724,17 @@ subroutine Restart(this, bounds, ncid, flag, & ! Restart excess ice vars if (.not. use_excess_ice) then ! no need to even define the restart vars + call RestartExcessIceIssue( & + ncid = ncid, & + flag = flag, & + excess_ice_on_restart = excess_ice_on_restart) + if( excess_ice_on_restart ) then + if (masterproc) then + write(iulog,*) '--WARNING-- Starting from initial conditions with excess ice present.' + write(iulog,*) 'But use_excess_ice=.false.' + write(iulog,*) 'This will cause soil moisture and temperature not being in equilibrium' + endif + endif this%excess_ice_col(bounds%begc:bounds%endc,-nlevsno+1:nlevmaxurbgrnd)=0.0_r8 else call RestartExcessIceIssue( & From 6d07a80bb6a4d0238863907c92a8f984480e72ad Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Mon, 29 Jul 2024 11:50:48 -0600 Subject: [PATCH 15/26] pass physics and proper defaults. --- bld/CLMBuildNamelist.pm | 15 +++++++++------ bld/namelist_files/namelist_defaults_ctsm.xml | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index fa0d4a0382..77fb8a679f 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1815,7 +1815,7 @@ sub process_namelist_inline_logic { ################################# # namelist group: exice_streams # ################################# - setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl); + setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl, $physv); ########################################## # namelist group: clm_temperature_inparm # @@ -2322,7 +2322,6 @@ sub setup_logic_soilstate { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'organic_frac_squared' ); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_bedrock', 'use_fates'=>$nl_flags->{'use_fates'}, 'vichydro'=>$nl_flags->{'vichydro'} ); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice'); # excess ice flag should be read before stream vars my $var1 = "soil_layerstruct_predefined"; my $var2 = "soil_layerstruct_userdefined"; @@ -4583,7 +4582,8 @@ sub setup_logic_exice { # # excess ice streams # - my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; + my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_; + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string()); my $use_exice = $nl->get_value( 'use_excess_ice' ); my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); my $finidat = $nl->get_value('finidat'); @@ -4642,10 +4642,13 @@ sub setup_logic_coldstart_temp { # set initial temperatures for excess ice gridcells: - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth'); - my $use_exice = $nl->get_value( 'use_excess_ice' ); + + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp', + 'use_excess_ice'=>$use_exice); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth', + 'use_excess_ice'=>$use_exice); + my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); my $exice_cs_temp = $nl->get_value( 'excess_ice_coldstart_temp' ); my $exice_cs_depth = $nl->get_value( 'excess_ice_coldstart_depth' ); diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 47f9802aff..7ce2235a84 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2058,8 +2058,8 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c .false. -0.0 -1.0 +-1.0 +0.5 -3.15 0.5 lnd/clm2/paramdata/exice_init_0.125x0.125_c20220516.nc From 7208b6671a7dde13624ecca56bc0e165a111ac9b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 29 Jul 2024 16:36:29 -0600 Subject: [PATCH 16/26] Fix grammar --- bld/namelist_files/namelist_definition_ctsm.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 575d72856f..a987fc1300 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -2826,12 +2826,12 @@ If TRUE turn on the excess ice physics, (Lee et al., 2014; Cai et al., 2020) -Initial soil temperature to use for gridcells with excess ice present during a run starting with coldstart (deg C). Value is only apply if use_excess_ice is true. +Initial soil temperature to use for gridcells with excess ice present during a run starting with coldstart (deg C). Value only applys if use_excess_ice is true. -Soil depth below which initial excess ice concentration will be applied during a run starting with coldstart (m). Value is only apply if use_excess_ice is true. +Soil depth below which initial excess ice concentration will be applied during a run starting with coldstart (m). Value only applys if use_excess_ice is true. If this is set below depth of the soil depth, only the last soil layer will get excess ice. From a8ff15afcd6e4c7f813c4cd9b93605b8ddc7f216 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Tue, 30 Jul 2024 08:01:23 -0600 Subject: [PATCH 17/26] add error when user sets streams to false and exice to true on coldstart --- bld/CLMBuildNamelist.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 77fb8a679f..ca99c131b0 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4595,6 +4595,11 @@ sub setup_logic_exice { } elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) { $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.false.'); $use_exice_streams = '.false.'; + # Checking for cold clm_start_type and not finidat here since finidat can be not set set in branch/hybrid runs and + # These cases are handled in the restart routines in the model + } elsif ( defined($use_exice_streams) && (not value_is_true($use_exice_streams)) && value_is_true($use_exice) && + ( $nl_flags->{'clm_start_type'} eq "'cold'" || $nl_flags->{'clm_start_type'} eq "'arb_ic'" )) { + $log->fatal_error("use_excess_ice_streams can NOT be FALSE when use_excess_ice is TRUE on the cold start" ); } # If excess ice streams is on if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { From e5656454d59db3b2f414993bfb41d18ca54ba1b3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 30 Jul 2024 21:26:45 -0600 Subject: [PATCH 18/26] Add more excess ice tests for fail conditions, the last two don't pass as they aren't setup yet --- bld/unit_testers/build-namelist_test.pl | 31 ++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 53c71ae0e9..b9d20cbba9 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3254; +my $ntests = 3263; if ( defined($opts{'compare'}) ) { - $ntests += 2001; + $ntests += 1965; } plan( tests=>$ntests ); @@ -322,7 +322,7 @@ sub cat_and_create_namelistinfile { "-res 0.9x1.25 -namelist '&a irrigate=.true./'", "-res 0.9x1.25 -verbose", "-res 0.9x1.25 -ssp_rcp SSP2-4.5", "-res 0.9x1.25 -test", "-res 0.9x1.25 -sim_year 1850", "-res 0.9x1.25 -namelist '&a use_lai_streams=.true.,use_soil_moisture_streams=.true./'", "-res 0.9x1.25 -namelist '&a use_excess_ice=.true. use_excess_ice_streams=.true./'", - "-res 0.9x1.25 -namelist '&a use_excess_ice=.true. use_excess_ice_streams=.false./'", + "-res 0.9x1.25 --clm_start_type cold -namelist '&a use_excess_ice=.true. use_excess_ice_streams=.true./'", "-res 0.9x1.25 -use_case 1850_control", "-res 1x1pt_US-UMB -clm_usr_name 1x1pt_US-UMB -namelist '&a fsurdat=\"/dev/null\"/'", "-res 1x1_brazil", @@ -542,6 +542,21 @@ sub cat_and_create_namelistinfile { GLC_TWO_WAY_COUPLING=>"FALSE", phys=>"clm5_0", }, + "coldstart exice on wo stream"=>{ options=>"-res 0.9x1.25 -envxml_dir . --clm_start_type cold", + namelst=>"use_excess_ice=.true., use_excess_ice_streams = .false.", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm6_0", + }, + "coldstart exice on bad temp" =>{ options=>"-res 0.9x1.25 -envxml_dir . --clm_start_type cold", + namelst=>"use_excess_ice=.true., use_excess_ice_streams = .true., excess_ice_coldstart_temp=0.0", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm6_0", + }, + "coldstart exice on bad depth" =>{ options=>"-res 0.9x1.25 -envxml_dir . --clm_start_type cold", + namelst=>"use_excess_ice=.true., use_excess_ice_streams = .true., excess_ice_coldstart_depth=0.0", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm6_0", + }, "clm50CNDVwtransient" =>{ options=>" -envxml_dir . -use_case 20thC_transient -dynamic_vegetation -res 10x15 -ignore_warnings", namelst=>"", GLC_TWO_WAY_COUPLING=>"FALSE", @@ -1295,6 +1310,16 @@ sub cat_and_create_namelistinfile { GLC_TWO_WAY_COUPLING=>"FALSE", phys=>"clm6_0", }, + "Set coldtemp wo coldstart" =>{ options=>"-envxml_dir . --clm_start_type startup", + namelst=>"use_excess_ice=.true.,excess_ice_coldstart_temp=-10.", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm6_0", + }, + "Set colddepth wo coldstart" =>{ options=>"-envxml_dir . --clm_start_type startup", + namelst=>"use_excess_ice=.true.,excess_ice_coldstart_depth=0.5", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm6_0", + }, "NotNEONbutNEONlightres" =>{ options=>"--res CLM_USRDAT --clm_usr_name regional --envxml_dir . --bgc bgc --light_res 106x174", namelst=>"fsurdat='build-namelist_test.pl'", GLC_TWO_WAY_COUPLING=>"FALSE", From e3605abe8fb9e614873fe273967ab6554209b27c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 31 Jul 2024 14:28:18 -0600 Subject: [PATCH 19/26] Change the checks a bit, the coldstart temps always need to be set even if excess ice is off --- bld/CLMBuildNamelist.pm | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index ca99c131b0..ee82afdb17 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4645,9 +4645,22 @@ sub setup_logic_coldstart_temp { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; - # set initial temperatures for excess ice gridcells: + # set initial temperatures for excess ice gridcells: needs to be set whether excess ice is on or not my $use_exice = $nl->get_value( 'use_excess_ice' ); + my $finidat = $nl->get_value('finidat'); + + my @list = ( "excess_ice_coldstart_temp", "excess_ice_coldstart_depth" ); + + # Only needs to be set if it's a coldstart + if ( ! string_is_undef_or_empty($finidat) ) { + foreach my $var ( @list ) { + my $val = $nl->get_value( $var ); + if ( defined($val) ) { + $log->warning("$var only needs to be set if this is a cold-start, although InitCold is always called"); + } + } + } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp', 'use_excess_ice'=>$use_exice); @@ -4658,15 +4671,12 @@ sub setup_logic_coldstart_temp { my $exice_cs_temp = $nl->get_value( 'excess_ice_coldstart_temp' ); my $exice_cs_depth = $nl->get_value( 'excess_ice_coldstart_depth' ); - if (defined($use_exice) && value_is_true($use_exice)) { - # Checking this setting only needed IF excess ice streams are on get the stream defaults - if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { - if (defined($exice_cs_depth) && $exice_cs_depth <= 0.0 ) { - $log->fatal_error("excess_ice_coldstart_depth is <= 0.0" ); - } - if (defined($exice_cs_temp) && $exice_cs_temp >= 0.0 ) { - $log->fatal_error("excess_ice_coldstart_temp is >= 0.0, no excess ice will be present in this run" ); - } + if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { + if (defined($exice_cs_depth) && $exice_cs_depth <= 0.0 ) { + $log->fatal_error("excess_ice_coldstart_depth is <= 0.0" ); + } + if (defined($exice_cs_temp) && $exice_cs_temp >= 0.0 ) { + $log->fatal_error("excess_ice_coldstart_temp is >= 0.0, no excess ice will be present in this run" ); } } } From 18df0661ea867a1b2e8cc75027be5ddaf0ea5753 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 31 Jul 2024 14:59:17 -0600 Subject: [PATCH 20/26] Save use_excice_streams to nl_flags so it doesn't have to be set to false when not needed --- bld/CLMBuildNamelist.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index ee82afdb17..ab70d698f4 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4593,7 +4593,6 @@ sub setup_logic_exice { $use_exice_streams = '.true.'; # if excess ice is turned off } elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) { - $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.false.'); $use_exice_streams = '.false.'; # Checking for cold clm_start_type and not finidat here since finidat can be not set set in branch/hybrid runs and # These cases are handled in the restart routines in the model @@ -4601,6 +4600,9 @@ sub setup_logic_exice { ( $nl_flags->{'clm_start_type'} eq "'cold'" || $nl_flags->{'clm_start_type'} eq "'arb_ic'" )) { $log->fatal_error("use_excess_ice_streams can NOT be FALSE when use_excess_ice is TRUE on the cold start" ); } + + # Put use_exice_streams into nl_flags so can be referenced later + $nl_flags->{'use_excice_streams'} = $use_exice_streams; # If excess ice streams is on if (defined($use_exice_streams) && value_is_true($use_exice_streams)) { # Can only be true if excess ice is also on, otherwise fail @@ -4652,7 +4654,7 @@ sub setup_logic_coldstart_temp { my @list = ( "excess_ice_coldstart_temp", "excess_ice_coldstart_depth" ); - # Only needs to be set if it's a coldstart + # Only needs to be set by the user if it's a coldstart if ( ! string_is_undef_or_empty($finidat) ) { foreach my $var ( @list ) { my $val = $nl->get_value( $var ); @@ -4667,7 +4669,7 @@ sub setup_logic_coldstart_temp { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth', 'use_excess_ice'=>$use_exice); - my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); + my $use_exice_streams = $nl_flags->{'use_excice_streams'}; my $exice_cs_temp = $nl->get_value( 'excess_ice_coldstart_temp' ); my $exice_cs_depth = $nl->get_value( 'excess_ice_coldstart_depth' ); From 797444f1a5878c138ac6e198000f5ed292a992cf Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 31 Jul 2024 16:51:57 -0600 Subject: [PATCH 21/26] Start the ChangeLog --- doc/ChangeLog | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 105 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index aeb7b2972f..f3bf5c91c1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,108 @@ =============================================================== +Tag name: ctsm5.2.018 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Wed 31 Jul 2024 04:38:36 PM MDT +One-line Summary: Fix/excess ice cold start + +Purpose and description of changes +---------------------------------- + +Changed the way soil temperature is initialized when excess ice is on and the model starts from cold. + +Specific notes + +Added 2 parameters: excess_ice_coldstart_depth and excess_ice_coldstart_temp which control top depth and soil temperature for soil layers in columns where excess ice is present. Other columns get their default soil temperature. + +excessicestream_type has been taken out of waterstate_type and its routines are called directly in clm_inst%Init. Checks for UseExcessIceStreams() are still in place in WaterStateType.F90 for double-checking. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #2384 -- Cold start temperature init when excess ice is on + Fixes #2373 -- SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_intel.clm-FatesColdHydro fails + +Notes of particular relevance for users +--------------------------------------- + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + Added: excess_ice_coldstart_temp and excess_ice_coldstart_depth + +Changes made to namelist defaults (e.g., changed parameter values): + Set new namelist items differently when excess ice is on or off + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + Note that the coldstart variables are always used even without excess ice or with an finidat file. + InitCold is always called so the variables are always set. + +Changes to tests or testing: + New tests for build-namelist unit tester + +Testing summary: regular +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS (998 are different from baseline) + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- + izumi ------- + + any other testing (give details below): + + SMS_Lm12.f09_f09_mg17.I1850Clm60Sp.derecho_intel.clm-ExcessIceStartup_output_sp_exice + derecho ---- PASS + +Answer changes +-------------- + +Changes answers relative to baseline: + + Summarize any changes to answers, i.e., + - what code configurations: + - what platforms/compilers: + - nature of change (roundoff; larger than roundoff/same climate; new climate): + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + #2465 -- fix excess ice cold starts + +=============================================================== +=============================================================== Tag name: ctsm5.2.017 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) Date: Tue 30 Jul 2024 08:39:20 AM MDT diff --git a/doc/ChangeSum b/doc/ChangeSum index 15a67bcf04..c70d3a372b 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.2.018 erik 07/31/2024 Fix/excess ice cold start ctsm5.2.017 erik 07/30/2024 Dust emissions control moved to cmeps ctsm5.2.016 samrabin 07/27/2024 Enable new crop calendars for clm60 compsets ctsm5.2.015 multiple 07/22/2024 Update submodule tags to pass runoff from cism to rof From 574380df9b4a465cfdb76d861d16b3f0ea8ec667 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 31 Jul 2024 16:54:27 -0600 Subject: [PATCH 22/26] Fix author --- doc/ChangeLog | 2 +- doc/ChangeSum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index f3bf5c91c1..049a075ad6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,6 +1,6 @@ =============================================================== Tag name: ctsm5.2.018 -Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Originator(s): mvdebolskiy Date: Wed 31 Jul 2024 04:38:36 PM MDT One-line Summary: Fix/excess ice cold start diff --git a/doc/ChangeSum b/doc/ChangeSum index c70d3a372b..d631d2d7dc 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.2.018 erik 07/31/2024 Fix/excess ice cold start + ctsm5.2.018 mvdebols 07/31/2024 Fix/excess ice cold start ctsm5.2.017 erik 07/30/2024 Dust emissions control moved to cmeps ctsm5.2.016 samrabin 07/27/2024 Enable new crop calendars for clm60 compsets ctsm5.2.015 multiple 07/22/2024 Update submodule tags to pass runoff from cism to rof From fb4941b301bead3f5cd42d5147a47a0efa07ac75 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 1 Aug 2024 00:59:41 -0600 Subject: [PATCH 23/26] Don't need to set coldstart temp or depth as these tests are starting up from finidat files --- .../testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm | 2 -- 1 file changed, 2 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm index aa2c9efa5b..f61ca32a79 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/user_nl_clm @@ -1,4 +1,2 @@ use_excess_ice = .true. use_excess_ice_streams = .true. - excess_ice_coldstart_depth = 0.5 - excess_ice_coldstart_temp = -5.0 From 3ed874dd619f2d2af32e4292ae12a37fb765084f Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Thu, 1 Aug 2024 05:40:03 -0600 Subject: [PATCH 24/26] add more to notes. --- doc/ChangeLog | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 049a075ad6..9bd2f3e86f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -11,9 +11,13 @@ Changed the way soil temperature is initialized when excess ice is on and the mo Specific notes -Added 2 parameters: excess_ice_coldstart_depth and excess_ice_coldstart_temp which control top depth and soil temperature for soil layers in columns where excess ice is present. Other columns get their default soil temperature. +TemperatureType now has a private ReadNL subroutine that reads two new namelist options: excess_ice_coldstart_depth and excess_ice_coldstart_temp which control top depth (higher layers get default initial temperature) and soil temperature for soil layers ONLY in columns where excess ice is present. Other columns get their default soil temperature. + +New namelist options belong to a new group "clm_temperature_inparm" with its own logic routine. This is done so in the future hardcoded cold start temperatures can be moved to the namelists. Two namelist tests have been added to check for invalid values logic as well as a test for use_excess_ice_streams logic. use_excess_ice_streams has no default value (due to options for restart) and default value set in the CLMBuildNamelist.pm. + +excessicestream_type has been taken out of waterstate_type and its routines are called directly in clm_inst%Init. Checks for UseExcessIceStreams() are still in place in WaterStateType.F90 for double-checking. clm_inst%Init now has a new local variable with excess ice concentration that are read from streams (or zeros if use_excess_ice is false). Arguments for temperature_type%Init and water_type%Init (and children types) have been changed to include this new variable. Fortran unit tests are also updated to account for these new arguments. + -excessicestream_type has been taken out of waterstate_type and its routines are called directly in clm_inst%Init. Checks for UseExcessIceStreams() are still in place in WaterStateType.F90 for double-checking. Significant changes to scientifically-supported configurations From 6012fc622a7f5867f6ed087841a0dd00fa6ea4c6 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 1 Aug 2024 14:59:21 -0600 Subject: [PATCH 25/26] Update changelog with more info on the expected answer changes --- doc/ChangeLog | 21 ++++++++++++++------- doc/ChangeSum | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 049a075ad6..55e0bb1329 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.2.018 Originator(s): mvdebolskiy -Date: Wed 31 Jul 2024 04:38:36 PM MDT +Date: Thu 01 Aug 2024 02:53:41 PM MDT One-line Summary: Fix/excess ice cold start Purpose and description of changes @@ -76,13 +76,13 @@ Testing summary: regular regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- - izumi ------- + derecho ----- OK + izumi ------- OK any other testing (give details below): SMS_Lm12.f09_f09_mg17.I1850Clm60Sp.derecho_intel.clm-ExcessIceStartup_output_sp_exice - derecho ---- PASS + derecho ---- PASS (but different from baseline) Answer changes -------------- @@ -90,9 +90,16 @@ Answer changes Changes answers relative to baseline: Summarize any changes to answers, i.e., - - what code configurations: - - what platforms/compilers: - - nature of change (roundoff; larger than roundoff/same climate; new climate): + - what code configurations: excess ice on + - what platforms/compilers: all + - nature of change: different at startup + Different for cold-start and can be different for a few points where the cold-start + values are still used on interpoaltion of an existing finidat file + + Tests that compare different to baseline: + ERS_D.f10_f10_mg37.I1850Clm60Sp.izumi_nag.clm-ExcessIceStreams + SMS_Lm12.f09_f09_mg17.I1850Clm60Sp.derecho_intel.clm-ExcessIceStartup_output_sp_exice + failed baseline comparison (though answers for default physics configurations have not changed). Other details ------------- diff --git a/doc/ChangeSum b/doc/ChangeSum index d631d2d7dc..7766c18851 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.2.018 mvdebols 07/31/2024 Fix/excess ice cold start + ctsm5.2.018 mvdebols 08/01/2024 Fix/excess ice cold start ctsm5.2.017 erik 07/30/2024 Dust emissions control moved to cmeps ctsm5.2.016 samrabin 07/27/2024 Enable new crop calendars for clm60 compsets ctsm5.2.015 multiple 07/22/2024 Update submodule tags to pass runoff from cism to rof From a8371f7c1d76ea7b0ccb75ebe9ca63ae090473b2 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 2 Aug 2024 09:27:21 -0600 Subject: [PATCH 26/26] Update change files --- doc/ChangeLog | 7 +++---- doc/ChangeSum | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index c5c7c3b9f7..f5cf28096c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.2.018 Originator(s): mvdebolskiy -Date: Thu 01 Aug 2024 02:53:41 PM MDT +Date: Fri 02 Aug 2024 09:26:33 AM MDT One-line Summary: Fix/excess ice cold start Purpose and description of changes @@ -86,7 +86,7 @@ Testing summary: regular any other testing (give details below): SMS_Lm12.f09_f09_mg17.I1850Clm60Sp.derecho_intel.clm-ExcessIceStartup_output_sp_exice - derecho ---- PASS (but different from baseline) + derecho ---- PASS Answer changes -------------- @@ -94,7 +94,7 @@ Answer changes Changes answers relative to baseline: Summarize any changes to answers, i.e., - - what code configurations: excess ice on + - what code configurations: excess ice on, with coldstart or with finidat file interpolation - what platforms/compilers: all - nature of change: different at startup Different for cold-start and can be different for a few points where the cold-start @@ -102,7 +102,6 @@ Changes answers relative to baseline: Tests that compare different to baseline: ERS_D.f10_f10_mg37.I1850Clm60Sp.izumi_nag.clm-ExcessIceStreams - SMS_Lm12.f09_f09_mg17.I1850Clm60Sp.derecho_intel.clm-ExcessIceStartup_output_sp_exice failed baseline comparison (though answers for default physics configurations have not changed). Other details diff --git a/doc/ChangeSum b/doc/ChangeSum index 7766c18851..3d9d70bc54 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.2.018 mvdebols 08/01/2024 Fix/excess ice cold start + ctsm5.2.018 mvdebols 08/02/2024 Fix/excess ice cold start ctsm5.2.017 erik 07/30/2024 Dust emissions control moved to cmeps ctsm5.2.016 samrabin 07/27/2024 Enable new crop calendars for clm60 compsets ctsm5.2.015 multiple 07/22/2024 Update submodule tags to pass runoff from cism to rof