Skip to content

Commit

Permalink
Merge pull request #2034 from johnpaulalex/hist_doc_bc
Browse files Browse the repository at this point in the history
Document that fincl1 maps to 'h0' history file. And fexcl1.
  • Loading branch information
ekluzek authored Nov 7, 2024
2 parents 26b9aa7 + b32c775 commit 9c07004
Show file tree
Hide file tree
Showing 21 changed files with 161 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
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'
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
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,10 @@ For running "I" cases there are several other noteworthy configuration items tha
CCSM_BGC
DATM_MODE
DATM_PRESAERO
DATM_CLMNCEP_YR_ALIGN
DATM_CLMNCEP_YR_START
DATM_CLMNCEP_YR_END
DATM_CPL_CASE
DATM_CPL_YR_ALIGN
DATM_CPL_YR_START
DATM_CPL_YR_END
DATM_YR_ALIGN
DATM_YR_START
DATM_YR_END
DATM_CPLHIST_CASE

``CCSM_CO2_PPMV``
Sets the mixing ratio of CO2 in parts per million by volume for ALL CESM components to use. Note that most compsets already set this value to something reasonable. Also note that some compsets may tell the atmosphere model to override this value with either historic or ramped values. If the ``CCSM_BGC`` variable is set to something other than "none" the atmosphere model will determine CO2, and CLM will listen and use what the atmosphere sends it. On the CLM side the namelist item ``co2_type`` tells CLM to use the value sent from the atmosphere rather than a value set on it's own namelist.
Expand Down Expand Up @@ -569,36 +566,27 @@ For running "I" cases there are several other noteworthy configuration items tha

``pt1_pt1`` = read in single-point or regional datasets

DATM_CLMNCEP_YR_START
``DATM_CLMNCEP_YR_START`` sets the beginning year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` modes.
DATM_YR_START
``DATM_YR_START`` sets the beginning year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` or ``CPLHISTForcing`` modes.

DATM_CLMNCEP_YR_END
``DATM_CLMNCEP_YR_END`` sets the ending year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` modes.
DATM_YR_END
``DATM_YR_END`` sets the ending year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` or ``CPLHISTForcing`` modes.

DATM_CLMNCEP_YR_ALIGN
``DATM_CLMNCEP_YR_START`` and ``DATM_CLMNCEP_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_CLMNCEP_YR_ALIGN`` determines which year in that range of years the simulation will start with.
DATM_YR_ALIGN
``DATM_YR_START`` and ``DATM_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_YR_ALIGN`` determines which year in that range of years the simulation will start with.

DATM_CPL_CASE
``DATM_CPL_CASE`` sets the casename to use for the ``CPLHISTForcing`` mode.

DATM_CPL_YR_START
``DATM_CPL_YR_START`` sets the beginning year to cycle the atmospheric data over for the ``CPLHISTForcing`` mode.

DATM_CPL_YR_END
``DATM_CPL_YR_END`` sets the ending year to cycle the atmospheric data over for the ``CPLHISTForcing`` mode.

DATM_CPL_YR_ALIGN
``DATM_CPL_YR_START`` and ``DATM_CPL_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_CPL_YR_ALIGN`` determines which year in that range of years the simulation will start with.
DATM_CPLHIST_CASE
``DATM_CPLHIST_CASE`` sets the casename to use for the ``CPLHISTForcing`` mode.

-----------------------------
Downloading DATM Forcing Data
-----------------------------

In Chapter One of the `CESM User's Guide <link-to-CESM-UG>`_ there is a section on "Downloading input data". The normal process of setting up cases will use the "scripts/ccsm_utils/Tools/check_input_data" script to retrieve data from the CESM subversion inputdata repository. This is true for the standard `CLM_QIAN` forcing as well.

The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on cheyenne for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_CPL_YR_START`` and ``DATM_CPL_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data.
The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on derecho for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_YR_START`` and ``DATM_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data.

The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on cheyenne. The DATM assumes the path for the previous NCAR machine cheyenne of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. You can download the data itself from NCAR HPSS from ``/CCSM/csm/$DATM_CPLHIST_CASE``.
The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on derecho. The DATM assumes the path for derecho of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine.

--------------------------------------
Customizing via the build script files
Expand Down
Loading

0 comments on commit 9c07004

Please sign in to comment.