From cf7a00310b7f67d88226ccc5d2c3069a03c5271e Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 10 Oct 2023 16:00:55 -0600 Subject: [PATCH 1/9] View factor fix --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index bf8b68c7eb..83422f0971 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -424,10 +424,8 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! This view factor implicitly converts from per unit wall area to per unit floor area vf_wf(l) = 0.5_r8*(1._r8 - vf_rf(l)) - ! This view factor implicitly converts from per unit floor area to per unit wall area - vf_fw(l) = vf_wf(l) / building_hwr(l) + vf_fw(l) = vf_wf(l) - ! This view factor implicitly converts from per unit roof area to per unit wall area vf_rw(l) = vf_fw(l) ! This view factor implicitly converts from per unit wall area to per unit roof area @@ -831,7 +829,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, + em_floori(l)*sb*t_floor_bef(l)**4._r8 & + 4._r8*em_floori(l)*sb*t_floor_bef(l)**3.*(t_floor(l) - t_floor_bef(l)) - qrd_building(l) = qrd_roof(l) + building_hwr(l)*(qrd_sunw(l) + qrd_shdw(l)) + qrd_floor(l) + qrd_building(l) = qrd_roof(l) + qrd_sunw(l) + qrd_shdw(l) + qrd_floor(l) if (abs(qrd_building(l)) > .10_r8 ) then write (iulog,*) 'urban inside building net longwave radiation balance error ',qrd_building(l) From 1b3d377bf76d225d98fd545228625f49076a8671 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 10 Oct 2023 16:42:25 -0600 Subject: [PATCH 2/9] Add comments --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index 83422f0971..4c985f0ab3 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -383,9 +383,11 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! Get terms from soil temperature equations to compute conduction flux ! Negative is toward surface - heat added - ! Note that the conduction flux here is in W m-2 wall area but for purposes of solving the set of - ! simultaneous equations this must be converted to W m-2 floor area. This is done below when - ! setting up the equation coefficients. + ! Note that the convection and conduction fluxes for the walls are in W m-2 wall area + ! but for purposes of solving the set of simultaneous equations this must be converted to W m-2 + ! floor or roof area. This is done below when setting up the equation coefficients by multiplying by building_hwr. + ! Note also that the longwave radiation terms for the walls are in terms of W m-2 floor area since the view + ! factors implicitly convert from per unit wall area to per unit floor or roof area. do fc = 1,num_nolakec c = filter_nolakec(fc) From a5e8382425e98ce888958b562102185d98eed2d2 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 17 Jan 2024 15:27:36 -0700 Subject: [PATCH 3/9] Answer-changing merge tag: turn Meier2022 on and bring in #2212 --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 456d99ac2a..fcb9bc2074 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -498,7 +498,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). + +Meier2022 .true. .false. From 96466e868cd3a674c81a5fdeb929dc99664155a1 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 18 Jan 2024 11:44:23 -0700 Subject: [PATCH 4/9] Making Meier2022 the default for ctsm5.1 --- bld/namelist_files/namelist_defaults_ctsm.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index fcb9bc2074..fd5b18f132 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -498,11 +498,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). - -Meier2022 .true. .false. From 1ca0860e63db55f5a75e5089d6da6b3a6ae37fdf Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 18 Jan 2024 13:20:28 -0700 Subject: [PATCH 5/9] Add subr. setup_logic_roughness_methods to CLMBuildNamelist.pm --- bld/CLMBuildNamelist.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 17c46f9bef..14a3a2ddb5 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1571,6 +1571,7 @@ sub process_namelist_inline_logic { setup_logic_irrigate($opts, $nl_flags, $definition, $defaults, $nl); setup_logic_start_type($opts, $nl_flags, $nl); setup_logic_decomp_performance($opts, $nl_flags, $definition, $defaults, $nl); + setup_logic_roughness_methods($opts, $nl_flags, $definition, $defaults, $nl, $physv); setup_logic_snicar_methods($opts, $nl_flags, $definition, $defaults, $nl); setup_logic_snow($opts, $nl_flags, $definition, $defaults, $nl); setup_logic_glacier($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref); @@ -2002,6 +2003,25 @@ sub setup_logic_decomp_performance { #------------------------------------------------------------------------------- +sub setup_logic_roughness_methods { + my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_; + + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'z0param_method', + 'phys'=>$nl_flags->{'phys'} ); + + my $var = remove_leading_and_trailing_quotes( $nl->get_value("z0param_method") ); + if ( $var ne "Meier2022" && $var ne "ZengWang2007" ) { + $log->fatal_error("$var is incorrect entry for the namelist variable z0param_method; expected Meier2022 or ZengWang2007"); + } + my $phys = $physv->as_string(); + if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) { + if ( $var eq "Meier2022" ) { + $log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm5_1 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file"); + } + } +} +#------------------------------------------------------------------------------- + sub setup_logic_snicar_methods { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; From b3a05fae812fff71fbab3e23eca5c51a10b5914a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 18 Jan 2024 14:55:40 -0700 Subject: [PATCH 6/9] Add clm51 namelist defaults for crop_residue_removal_frac and tillage_mode --- bld/CLMBuildNamelist.pm | 3 +++ bld/namelist_files/namelist_defaults_ctsm.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 14a3a2ddb5..555f0d5f98 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2262,6 +2262,7 @@ sub setup_logic_crop_inparm { 'use_crop'=>$nl->get_value('use_crop') ); my $crop_residue_removal_frac = $nl->get_value('crop_residue_removal_frac'); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'crop_residue_removal_frac' ); if ( $crop_residue_removal_frac < 0.0 or $crop_residue_removal_frac > 1.0 ) { $log->fatal_error("crop_residue_removal_frac must be in range [0, 1]"); } @@ -2276,6 +2277,8 @@ sub setup_logic_crop_inparm { sub setup_logic_tillage { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'tillage_mode' ); + my $tillage_mode = remove_leading_and_trailing_quotes( $nl->get_value( "tillage_mode" ) ); if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl->get_value('use_crop')) ) { $log->fatal_error( "Tillage only works on crop columns, so use_crop must be true if tillage is enabled." ); diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index fd5b18f132..5ae01ef2ae 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -555,6 +555,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. 0.d+0 +0.5d00 constant @@ -2814,6 +2815,8 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1 off +low + .false. 0.26d00 From 7b14631ef2f7fc5ab02e00669f8580c11f842a86 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 19 Jan 2024 09:32:26 -0700 Subject: [PATCH 7/9] Add new expected failures to ExpectedTestFails.xml --- cime_config/testdefs/ExpectedTestFails.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 16fff0e71e..55d1363e6b 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -228,4 +228,25 @@ + + + FAIL + #2325 + + + + + + FAIL + #2325 + + + + + + FAIL + #2325 + + + From 0244d13a6ce2e87f5bd38947dfb573d58e89e4cd Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 19 Jan 2024 10:59:39 -0700 Subject: [PATCH 8/9] Making sure tillage stays off when use_crop = .false. --- bld/CLMBuildNamelist.pm | 9 +++++---- bld/namelist_files/namelist_defaults_ctsm.xml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 555f0d5f98..dae7b5f7f0 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1637,7 +1637,7 @@ sub process_namelist_inline_logic { ############################### # namelist group: tillage # ############################### - setup_logic_tillage($opts, $nl_flags, $definition, $defaults, $nl); + setup_logic_tillage($opts, $nl_flags, $definition, $defaults, $nl, $physv); ############################### # namelist group: ch4par_in # @@ -2275,12 +2275,13 @@ sub setup_logic_crop_inparm { #------------------------------------------------------------------------------- sub setup_logic_tillage { - 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, 'tillage_mode' ); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'tillage_mode', + 'use_crop'=>$nl_flags->{'use_crop'}, 'phys'=>$physv->as_string() ); my $tillage_mode = remove_leading_and_trailing_quotes( $nl->get_value( "tillage_mode" ) ); - if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl->get_value('use_crop')) ) { + if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl_flags->{'use_crop'}) ) { $log->fatal_error( "Tillage only works on crop columns, so use_crop must be true if tillage is enabled." ); } } diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 5ae01ef2ae..d5d8bc08eb 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2815,7 +2815,7 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1 off -low +low .false. 0.26d00 From 9a54faf4b8ebd908bdf21acc6fe73d14bba8bb69 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 19 Jan 2024 18:57:31 -0700 Subject: [PATCH 9/9] Updated ChangeLog/ChangeSum --- doc/ChangeLog | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 3 +- 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 5b4a214880..ee6314d1cc 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,80 @@ =============================================================== +Tag name: ctsm5.1.dev165 +Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310), oleson (Keith Oleson), samrabin (Sam Rabin) +Date: Fri 19 Jan 2024 06:40:36 PM MST +One-line Summary: Turn Meier2022, tillage, and residue removal on for ctsm5.1, fix #2212 + +Purpose and description of changes +---------------------------------- + +Answer-changing merge-tag: +- Turn Meier2022 on for ctsm5.1. Had turned off temporarily while fixing a bug. +- Bring in Urban answer fix #2212. +- Turn tillage and residue removal on for ctsm5.1. + +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.] + +[x] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +CTSM issues fixed (include CTSM Issue #): +Fixes #2212 + +Notes of particular relevance for users +--------------------------------------- +Changes made to namelist defaults (e.g., changed parameter values): +- Making Meier2022 the default for ctsm5.1 again. +- Making tillage low by default for ctsm5.1. +- Making residue removal 0.5 by default for ctsm5.1. + +Testing summary: +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: YES + + [ If a tag changes answers relative to baseline comparison the + following should be filled in (otherwise remove this section). + And always remove these three lines and parts that don't apply. ] + + Summarize any changes to answers, i.e., + - what code configurations: ALL + - what platforms/compilers: ALL + - nature of change:i + clm45 and clm50: larger than roundoff + clm51: possibly climate changing + Effect of Meier2022 was documented here: https://github.com/NCAR/LMWG_dev/issues/38 + Effect of tillage and residue removal may require an Answer Changing Tag simulation + +Other details +------------- +Pull Requests that document the changes (include PR ids): + https://github.com/ESCOMP/ctsm/pull/2323 + +=============================================================== +=============================================================== Tag name: ctsm5.1.dev164 Originator(s): rgknox (Ryan Knox) Date: Wed 17 Jan 2024 12:38:18 PM MST diff --git a/doc/ChangeSum b/doc/ChangeSum index dee25d848c..0d563ec2bb 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,7 +1,8 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.1.dev165 slevis 01/19/2024 Turn Meier2022, tillage, residue removal on for ctsm5.1, fix #2212 ctsm5.1.dev164 rgknox 01/17/2024 Compatibility and tests for FATES 2-Stream - ctsm5.1.dev163 sam 01/10/2024 Add tillage and residue removal + ctsm5.1.dev163 samrabin 01/10/2024 Add tillage and residue removal ctsm5.1.dev162 samrabin 01/05/2024 Improvements to processing of crop calendar files ctsm5.1.dev161 samrabin 01/04/2024 Refactor 20-year running means of crop GDD accumulation ctsm5.1.dev160 glemieux 12/30/2023 FATES landuse version 1