Skip to content

Commit

Permalink
Merge pull request ESCOMP#2872 from adrifoster/merge-b4bdev-20241108
Browse files Browse the repository at this point in the history
Merge b4bdev 20241108
  • Loading branch information
adrifoster authored Nov 9, 2024
2 parents 26b9aa7 + bbe061d commit e07c66a
Show file tree
Hide file tree
Showing 24 changed files with 270 additions and 211 deletions.
14 changes: 0 additions & 14 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3602,17 +3602,6 @@ sub setup_logic_luna {
if ( &value_is_true($nl->get_value('lnc_opt') ) && not &value_is_true( $nl_flags->{'use_cn'}) ) {
$log->fatal_error("Cannot turn lnc_opt to true when bgc=sp" );
}
my $var = "jmaxb1";
if ( &value_is_true( $nl_flags->{'use_luna'} ) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,
'use_luna'=>$nl_flags->{'use_luna'} );
}
my $val = $nl->get_value($var);
if ( ! &value_is_true( $nl_flags->{'use_luna'} ) ) {
if ( defined($val) ) {
$log->fatal_error("Cannot set $var when use_luna is NOT on" );
}
}
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -4526,8 +4515,6 @@ sub setup_logic_canopyhydrology {
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'interception_fraction' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'maximum_leaf_wetted_fraction' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_clm5_fpi' );
}

Expand All @@ -4546,7 +4533,6 @@ sub setup_logic_snowpack {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'wind_dependent_snow_density');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'snow_overburden_compaction_method');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'lotmp_snowdensity_method');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'upplim_destruct_metamorph');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_snow');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_snow_glc');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_snow_glc_ela');
Expand Down
18 changes: 4 additions & 14 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).

<!-- Canopy hydrology namelist defaults -->
<use_clm5_fpi >.true.</use_clm5_fpi>
<interception_fraction >1.0</interception_fraction>
<maximum_leaf_wetted_fraction >0.05</maximum_leaf_wetted_fraction>
<use_clm5_fpi phys="clm4_5" >.false.</use_clm5_fpi>
<interception_fraction phys="clm4_5" >0.25</interception_fraction>
<maximum_leaf_wetted_fraction phys="clm4_5" >1.0</maximum_leaf_wetted_fraction>

<!-- Soilwater movement namelist defaults -->
<soilwater_movement_method >1</soilwater_movement_method>
Expand Down Expand Up @@ -493,9 +489,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<lotmp_snowdensity_method >'Slater2017'</lotmp_snowdensity_method>
<lotmp_snowdensity_method phys="clm4_5" >'TruncatedAnderson1976'</lotmp_snowdensity_method>

<upplim_destruct_metamorph >175.d00</upplim_destruct_metamorph>
<upplim_destruct_metamorph phys="clm4_5" >100.d00</upplim_destruct_metamorph>

<overburden_compress_tfactor>0.08d00</overburden_compress_tfactor>

<reset_snow>.false.</reset_snow>
Expand Down Expand Up @@ -551,10 +544,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- The default filenames are given relative to the root directory
for the CLM2 data in the CESM distribution -->
<!-- Plant function types (relative to {csmdata}) -->
<paramfile phys="clm6_0" >lnd/clm2/paramdata/ctsm60_params.c240822.nc</paramfile>
<paramfile phys="clm5_1" >lnd/clm2/paramdata/ctsm51_params.c240814.nc</paramfile>
<paramfile phys="clm5_0" >lnd/clm2/paramdata/clm50_params.c240814.nc</paramfile>
<paramfile phys="clm4_5" >lnd/clm2/paramdata/clm45_params.c240814.nc</paramfile>
<paramfile phys="clm6_0" >lnd/clm2/paramdata/ctsm60_params.c241017.nc</paramfile>
<paramfile phys="clm5_1" >lnd/clm2/paramdata/ctsm51_params.c241017.nc</paramfile>
<paramfile phys="clm5_0" >lnd/clm2/paramdata/clm50_params.c241017.nc</paramfile>
<paramfile phys="clm4_5" >lnd/clm2/paramdata/clm45_params.c241017.nc</paramfile>

<!-- ================================================================== -->
<!-- FATES default parameter file -->
Expand Down Expand Up @@ -606,9 +599,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<use_fertilizer >.false.</use_fertilizer>
<use_fertilizer use_crop=".true." >.true.</use_fertilizer>

<!-- Could depend on physics version -->
<jmaxb1 use_luna=".true." >0.17</jmaxb1>

<!-- o3_veg_stress_method-->
<o3_veg_stress_method>unset</o3_veg_stress_method>

Expand Down
20 changes: 0 additions & 20 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,11 @@ Max number of iterations used in subr. CanopyFluxes. For many years, 40 was the
<default>Default: 40</default>
</entry>

<entry id="interception_fraction" type="real" category="clm_physics"
group="clm_canopyhydrology_inparm" valid_values="" >
Fraction of intercepted precipitation
</entry>

<entry id="use_clm5_fpi" type="logical" category="clm_physics"
group="clm_canopyhydrology_inparm" valid_values="" >
If TRUE use clm5 equation for fraction of intercepted precipitation
</entry>

<entry id="maximum_leaf_wetted_fraction" type="real" category="clm_physics"
group="clm_canopyhydrology_inparm" valid_values="" >
Maximum fraction of leaf that may be wet prior to drip occuring
</entry>

<entry id="baseflow_scalar" type="real" category="clm_physics"
group="soilhydrology_inparm" valid_values="" >
Scalar multiplier for base flow rate
Expand Down Expand Up @@ -712,11 +702,6 @@ Scalar of leaf respiration to vcmax
The maximum value to use for zeta under stable conditions
</entry>

<entry id="Jmaxb1" type="real" category="clm_physics"
group="luna" >
baseline proportion of nitrogen allocated for electron transport (J)
</entry>

<entry id="use_fates" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the FATES model
Expand Down Expand Up @@ -2844,11 +2829,6 @@ TruncatedAnderson1976 -- Truncate the Anderson-1976 equation at the value for -1
Slater2017 ------------- Use equation from Slater that increases snow density for very cold temperatures (Arctic, Antarctic)
</entry>

<entry id="upplim_destruct_metamorph" type="real" category="clm_physics"
group="clm_snowhydrology_inparm" >
Upper Limit on Destructive Metamorphism Compaction [kg/m3]
</entry>

<entry id="overburden_compress_Tfactor" type="real" category="clm_physics"
group="clm_snowhydrology_inparm" >
Snow compaction overburden exponential factor (1/K)
Expand Down
4 changes: 0 additions & 4 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1235,10 +1235,6 @@ sub cat_and_create_namelistinfile {
namelst=>"use_luna=.true., lnc_opt=.true.",
phys=>"clm5_0",
},
"NOlunabutsetJmaxb1" =>{ options=>"-envxml_dir . -bgc sp",
namelst=>"use_luna=.false., jmaxb1=1.0",
phys=>"clm5_0",
},
"envxml_not_dir" =>{ options=>"-envxml_dir myuser_nl_clm",
namelst=>"",
phys=>"clm5_0",
Expand Down
12 changes: 2 additions & 10 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,8 @@ def buildnml(case, caseroot, compname):
clm_accelerated_spinup = case.get_value("CLM_ACCELERATED_SPINUP")
comp_interface = case.get_value("COMP_INTERFACE")
lilac_mode = case.get_value("LILAC_MODE")
if comp_interface == "nuopc":
yr_start = case.get_value("DATM_YR_START")
yr_end = case.get_value("DATM_YR_END")
else:
yr_start = case.get_value("DATM_CLMNCEP_YR_START")
yr_end = case.get_value("DATM_CLMNCEP_YR_END")

if yr_start != None and yr_start < 0:
yr_start = case.get_value("DATM_CPLHIST_YR_START")
yr_end = case.get_value("DATM_CPLHIST_YR_END")
yr_start = case.get_value("DATM_YR_START")
yr_end = case.get_value("DATM_YR_END")

# For LILAC
if yr_start == None or lilac_mode == "on":
Expand Down
51 changes: 51 additions & 0 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,57 @@
<issue>#2325</issue>
</phase>
</test>

<!-- izumi nag failures -->
<test name="ERS_D_Ld5_Mmpi-serial.1x1_vancouverCAN.I1PtClm50SpRs.izumi_nag.clm-CLM1PTStartDate">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="ERS_D_Mmpi-serial_Ld5.1x1_brazil.I2000Clm50FatesRs.izumi_nag.clm-FatesCold">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="SMS_D_Ld1_Mmpi-serial.f45_f45_mg37.I2000Clm50SpRs.izumi_nag.clm-ptsRLA">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="SMS_D_Mmpi-serial_Ld5.5x5_amazon.I2000Clm60FatesRs.izumi_nag.clm-FatesCold">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Bgc.izumi_nag.clm-default--clm-NEON-HARV">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60SpRs.izumi_nag.clm-default--clm-NEON-TOOL">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="ERP_D_Ld5_P48x1.f10_f10_mg37.I1850Clm60Bgc.izumi_nag.clm-ciso">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>


<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.derecho_intel.clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO">
<phase name="SHAREDLIB_BUILD">
Expand Down
9 changes: 9 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,15 @@
<option name="comment" >Run matrix solution fast spinup for restart beyond a year (to trigger next year logic) turning off extra options to make faster (so without crop or isotopes). This test would've caught a previous bug.</option>
</options>
</test>
<test name="SMS_Lm1" grid="f10_f10_mg37" compset="I1850Clm60Bgc" testmods="clm/clm60_monthly_matrixcn_soilCN30">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">01:20:00</option>
<option name="comment" >Smoke test of soil CN-matrix on with soil CN ratio set to 30</option>
</options>
</test>
<test name="ERS_D" grid="f19_g17" compset="I1850Clm50BgcCrop" testmods="clm/ciso_monthly_matrixcn_spinup">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c240814.nc'
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c241017.nc'
hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr'
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
use_soil_matrixcn = .true.
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c240822.nc'
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c241017.nc'
57 changes: 57 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,61 @@
===============================================================
Tag name: ctsm5.3.010
Originator(s): afoster (Adrianna Foster)
Date: Sat Nov 9 12:54:18 MST 2024
One-line Summary: Merge b4b-dev

Purpose and description of changes
----------------------------------

- moves namelist variables to parameter file for PPE and makes some parameter variables pft-dimensioned (resolves ESCOMP/CTSM#2830 and resolves ESCOMP/CTSM#2831)
- removes/replaces references to DATM_C* _YR_* variables (resolves ESCOMP/CTSM#2743)
- documents that fincl1 and fexcl1 map to 'h0' history files


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
----------
- ESCOMP/CTSM#2830 (allow LUNA & mortality parameter to vary by PFT; https://github.com/ESCOMP/CTSM/issues/2830)
- ESCOMP/CTSM#2831 (Move namelist parameters to paramfile; https://github.com/ESCOMP/CTSM/issues/2831)
- ESCOMP/CTSM#2743 (Docs: Remove refs to DATM_CLMNCEP_YR_* and DATM_CPL_YR_* variables; https://github.com/ESCOMP/CTSM/issues/2743)


Testing summary:
----------------
regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK


Other details
-------------

Pull Requests that document the changes (include PR ids):
- ESCOMP/CTSM#2845: PPE parameter work -Addresses issues 2830 and 2831 (https://github.com/ESCOMP/CTSM/pull/2845)
- ESCOMP/CTSM#2852: Remove/replace refs to DATM_C*_YR_* variables (https://github.com/ESCOMP/CTSM/pull/2852)
- ESCOMP/CTSM#2866: Document that fincl1 maps to 'h0' history file. And fexcl1 (https://github.com/ESCOMP/CTSM/pull/2866)

===============================================================
===============================================================
Tag name: ctsm5.3.009
Originator(s): samrabin (Sam Rabin, UCAR/TSS, [email protected])
Date: Tue Oct 15 17:35:40 MDT 2024
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.3.010 afoster 11/09/2024 Merge b4b-dev
ctsm5.3.009 samrabin 10/15/2024 Reduce outputs from matrixcnOn tests
ctsm5.3.008 olyson 10/14/2024 PPE change to sa_leaf in CanopyFluxesMod.F90
ctsm5.3.007 slevis 10/14/2024 Clm60 finidat updates for ne30, f09, f19 grids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@
Running with MOAR data
========================

.. warning::
These instructions are outdated and will not work. This page will be either updated or removed as part of the CTSM6/CLM3 release.

Because it takes so long to spinup the CN model (as we just saw previously), if you are doing fully coupled simulations with active atmosphere and ocean, you will want to do the spinup portion of this "offline". So instead of doing expensive fully coupled simulations for the spinup duration, you run CLM in a very cheap "I" compset using atmospheric forcing from a shorter fully coupled simulation (or a simulation run previously by someone else).

In this example we will use the ``I1850Clm50BgcSpinup compset`` to setup CLM to run with atmospheric forcing from a previous fully coupled simulation with data that is already stored on disk on Cheyenne. There are several simulations that have high frequency data for which we can do this. You can also do this on a machine other than Cheyenne, but would need to download the data from the Earth System Grid and change the datapath similar to Example :numref:`eg-sim-data-from-prev-sim`.

Example: Simulation with MOAR Data on cheyenne
Example: Simulation with MOAR Data on derecho
-------------------------------------------------------------
::

> cd cime/scripts
> ./create_newcase -case MOARforce1850 -res f19_g17_gl4 -compset I1850Clm50BgcSpinup
> cd MOARforce1850
# The following sets the casename to point to for atm forcing (you could also use an editor)
> ./xmlchange DATM_CPL_CASE=b40.1850.track1.1deg.006a
> ./xmlchange DATM_CPLHIST_CASE=b40.1850.track1.1deg.006a
# The following sets the align year and years to run over for atm forcing
# (you could also use an editor)
> ./xmlchange DATM_CPL_YR_ALIGN=1,DATM_CPL_YR_START=960,DATM_CPL_YR_END=1030
> ./xmlchange DATM_YR_ALIGN=1,DATM_YR_START=960,DATM_YR_END=1030
> ./case.setup
# Now build and run as normal
> ./case.build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ For single point simulations, the global anomaly forcing files can be used, but

mapalgo = 'nn','nn','nn','nn','nn','nn','nn','nn','nn','nn','nn','nn','nn' (the number of 'nn' values will depend on the number of original streams plus the number of anomaly forcing streams)

The cycling of the present-day (base) climate is controlled through the DATM\_CLMNCEP\_YR\_START and DATM_CLMNCEP\_YR\_END variables in env\_run.xml.
The cycling of the present-day (base) climate is controlled through the DATM\_YR\_START and DATM\_YR\_END variables in env\_run.xml.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Example: Simulation Forced with Data from the Previous Simulation
> ./xmlchange DATM_CPLHIST_CASE="myB1850"
# The following sets the align year and years to run over for atm forcing
# (you could also use an editor)
> ./xmlchange DATM_CPLHIST_YR_ALIGN="1",DATM_CPLHIST_YR_START=1,DATM_CPLHIST_YR_END=20
> ./xmlchange DATM_YR_ALIGN="1",DATM_YR_START=1,DATM_YR_END=20
# Set the strm_datdir in the namelist_defaults_datm.xml
# file to the archival path of the case above in the form of: /glade/home/achive/$USER/$DATM_CPLHIST_CASE/cpl/hist
# NOTE: THIS WILL CHANGE THE PATH FOR ALL I1850Clm50BgcSpinup COMPSET CASES MADE AFTER THIS!
Expand Down
Loading

0 comments on commit e07c66a

Please sign in to comment.