<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="definitions_variables.xsl" ?>

<entry_id version="3.0">

  <!-- modifier_mode allowed values are
       '*' 0 or more modifiers (default)
       '1' exactly 1 modifier
       '?' 0 or 1 modifiers
       '+' 1 or more modifiers
       This file may have lnd desc entries.
  -->

  <!-- Descriptions of all the different valid configurations for different model versions -->
  <description modifier_mode="1">
    <desc lnd="CLM45[%SP][%SP-VIC][%CN][%CNDV][%CN-CROP][%CNDV-CROP][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP]"                  >clm4.5:</desc>
    <desc lnd="CLM50[%SP][%SP-VIC][%SP-NOANTHRO][%BGC-NOANTHRO][%CN][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP][%BGC-CROP-CMIP6DECK][%BGC-CROP-CMIP6WACCMDECK][%NWP-SP][%NWP-BGC-CROP]">clm5.0:</desc>
    <desc lnd="CLM51[%SP][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%NWP-SP][%NWP-BGC-CROP]">clm5.1:</desc>
    <desc option="SP"              >Satellite phenology:</desc>
    <desc option="CN"              >CN: Carbon Nitrogen model</desc>
    <desc option="CNDV"            >CNDV: CN with Dynamic Vegetation (deprecated)</desc>
    <desc option="CN-CROP"         >CN with prognostic crop:</desc>
    <desc option="CNDV-CROP"       >CNDV with prognostic crop: (deprecated)</desc>

    <desc option="SP-VIC"          >Satellite phenology with VIC hydrology:</desc>
    <desc option="SP-NOANTHRO"     >Satellite phenology without anthropomorphic influences</desc>
    <desc option="BGC"             >BGC (vert. resol. CN and methane):</desc>
    <desc option="BGC-CROP"        >BGC (vert. resol. CN and methane) with prognostic crop:</desc>
    <desc option="BGC-NOANTHRO"    >BGC (vert. resol. CN and methane) without anthropomorphic influences:</desc>
    <desc option="FATES"           >FATES (Functionally Assembled Terrestrial Ecosystem Simulator) Ecosystem Demography model: (experimental)</desc>
    <desc option="BGCDV"           >BGC (vert. resol. CN and methane) with dynamic vegetation:</desc>
    <desc option="BGCDV-CROP"      >BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop:</desc>
    <desc option="BGC-CROP-CMIP6DECK">BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 DECK experiments:</desc>
    <desc option="BGC-CROP-CMIP6WACCMDECK">BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 WACCM DECK experiments:</desc>

    <desc option="NWP-SP"          >NWP configuration with satellite phenology:</desc>
    <desc option="NWP-BGC-CROP"    >NWP configuration with BGC and CROP:</desc>
  </description>
  <entry id="COMP_LND">
    <type>char</type>
    <valid_values>clm,ctsm</valid_values>
    <default_value>UNSET</default_value>
    <values>
      <value compset="CLM" >clm</value>
      <value compset="CTSM">ctsm</value>
    </values>
    <group>case_comp</group>
    <file>env_case.xml</file>
    <desc>Name of land component</desc>
  </entry>

  <entry id="LILAC_MODE">
    <type>char</type>
    <valid_values>on,off</valid_values>
    <default_value>off</default_value>
    <group>build_component_ctsm</group>
    <file>env_build.xml</file>
    <desc>Flag to enable building the LILAC cap and coupling code</desc>
  </entry>

  <entry id="LND_TUNING_MODE">
    <type>char</type>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Tuning parameters and initial conditions should be optimized for what CLM model version and what meteorlogical forcing combination?
    </desc>
    <default_value>UNSET</default_value>
    <valid_values>clm5_0_cam6.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_cam6.0,clm5_1_GSWP3v1</valid_values>
    <values>
      <value compset=             "CLM45" >clm4_5_CRUv7</value>
      <value compset="DATM%CRUv7.+_CLM45" >clm4_5_CRUv7</value>
      <value compset="DATM%GSWP3.+_CLM45" >clm4_5_GSWP3v1</value>
      <value compset="CAM.+_CLM45"        >clm4_5_cam6.0</value>
      <value compset=             "CLM50" >clm5_0_CRUv7</value>
      <value compset="DATM%CRUv7.+_CLM50" >clm5_0_CRUv7</value>
      <value compset="DATM%GSWP3.+_CLM50" >clm5_0_GSWP3v1</value>
      <value compset="CAM.+_CLM50"        >clm5_0_cam6.0</value>
      <value compset=            "_CLM51" >clm5_1_GSWP3v1</value>
    </values>
  </entry>

  <entry id="CLM_PHYSICS_VERSION" >
    <type>char</type>
    <valid_values>clm4_5,clm5_0,clm5_1</valid_values>
    <!-- By setting the default_value to UNSET (or some other non-empty
         string that doesn't appear in the list of valid_values), the
         scripts will ensure that one of the below values is picked up
         by the compset match. -->
    <default_value>UNSET</default_value>
    <values>
      <value compset="_CLM45" >clm4_5</value>
      <value compset="_CLM50" >clm5_0</value>
      <value compset="_CLM51" >clm5_1</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Overall physics version to use.
    This sets the default values for many different namelist options.
    This is typically set by the compset.</desc>
  </entry>

  <entry id="CLM_CONFIGURATION">
    <type>char</type>
    <valid_values>clm,nwp</valid_values>
    <default_value>clm</default_value>
    <values>
      <value compset="_CLM[^_]*%NWP">nwp</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Sets CLM default namelist options related to model configuration.
    clm: Configuration used for climate applications (CLM)
    nwp: Configuration used for numerical weather prediction applications
    </desc>
  </entry>

  <entry id="CLM_STRUCTURE">
    <type>char</type>
    <valid_values>standard,fast</valid_values>
    <default_value>standard</default_value>
    <values>
      <value compset="_CLM[^_]*%NWP">fast</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Sets CLM default namelist options related to model structure.
    standard: Standard model structure, allowing for more subgrid heterogeneity,
    deeper soil, etc., at the cost of slower speeds.
    fast: Simplified model structure, achieving faster speeds at the cost of less
    subgrid heterogeneity, shallower soil, etc.
    </desc>
  </entry>

  <entry id="CLM_NML_USE_CASE">
    <type>char</type>
    <default_value>UNSET</default_value>
    <values>
      <!-- Use SSP5-8.5 for PI to PDAY so will have data up to the current year available (for WACCM compsets that use PDAY) -->
      <value compset="^2010_"                       >2010_control</value>
      <value compset="^2000_"                	    >2000_control</value>
      <value compset="^1850_"		            >1850_control</value>
      <value compset="^1850_.*_CLM50%[^_]*NOANTHRO" >1850_noanthro_control</value>
      <value compset="^HIST_"                       >20thC_transient</value>
      <value compset="^SSP585_"	                    >1850-2100_SSP5-8.5_transient</value>
      <value compset="^SSP126_"	                    >1850-2100_SSP1-2.6_transient</value>
      <value compset="^SSP370_"	                    >1850-2100_SSP3-7.0_transient</value>
      <value compset="^SSP534_"	                    >1850-2100_SSP5-3.4_transient</value>
      <value compset="^SSP245_"	                    >1850-2100_SSP2-4.5_transient</value>
      <value compset="^SSP119_"	                    >1850-2100_SSP1-1.9_transient</value>
      <value compset="^SSP434_"	                    >1850-2100_SSP4-3.4_transient</value>
      <value compset="^SSP460_"	                    >1850-2100_SSP4-6.0_transient</value>
      <value compset="^SSP585_"	                    >1850-2100_SSP5-8.5_transient</value>
      <value compset="^AMIP_"	                    >20thC_transient</value>
      <value compset="^PIPD_"                       >1850-2100_SSP5-8.5_transient</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>CLM namelist use_case.
      Determines the use-case that will be sent to the CLM build-namelist utility.
      This is normally set by the component set. This is an advanced flag and should only be
      used by expert users.</desc>
  </entry>

  <!-- CLM_BLDNML_OPTS is not additive, we must list all possible combinations -->
  <!-- ERROR: the node below is never matched, see bug 2025 -->
  <entry id="CLM_BLDNML_OPTS">
    <type>char</type>
    <default_value></default_value>
    <values>
      <value compset="_CLM45%[^_]*SP"		 >-bgc sp</value>
      <value compset="_CLM45%[^_]*CN"		 >-bgc cn</value>
      <value compset="_CLM45%[^_]*BGC"		 >-bgc bgc</value>
      <value compset="_CLM45%[^_]*CN-CROP"	 >-bgc cn -crop</value>
      <value compset="_CLM45%[^_]*BGC-CROP"	 >-bgc bgc -crop</value>
      <value compset="_CLM45%[^_]*CNDV"		 >-bgc cn -dynamic_vegetation</value>
      <value compset="_CLM45%[^_]*BGCDV"	 >-bgc bgc -dynamic_vegetation</value>
      <value compset="_CLM45%[^_]*CNDV-CROP"	 >-bgc cn -dynamic_vegetation -crop</value>
      <value compset="_CLM45%[^_]*BGCDV-CROP"	 >-bgc bgc -dynamic_vegetation -crop</value>
      <value compset="_CLM45%[^_]*SP-VIC"	 >-bgc sp -vichydro </value>
      <value compset="_CLM45%[^_]*FATES"	 >-bgc fates -no-megan</value>

      <value compset="_CLM50%[^_]*SP"		 >-bgc sp</value>
      <value compset="_CLM50%[^_]*BGC"		 >-bgc bgc</value>
      <value compset="_CLM50%[^_]*BGCDV"	 >-bgc bgc -dynamic_vegetation</value>
      <value compset="_CLM50%[^_]*BGC-CROP"	 >-bgc bgc -crop</value>
      <value compset="_CLM50%[^_]*CN"		 >-bgc cn</value>
      <value compset="_CLM50%[^_]*CN-CROP"	 >-bgc cn -crop</value>
      <value compset="_CLM50%[^_]*CNDV"		 >-bgc cn -dynamic_vegetation</value>
      <value compset="_CLM50%[^_]*CNDV-CROP"	 >-bgc cn -dynamic_vegetation -crop</value>
      <value compset="_CLM50%[^_]*BGCDV-CROP"	 >-bgc bgc -dynamic_vegetation -crop</value>
      <value compset="_CLM50%[^_]*SP-VIC"	 >-bgc sp -vichydro </value>
      <value compset="_CLM50%[^_]*FATES"         >-bgc fates -no-megan</value>

      <value compset="_CLM51%[^_]*SP"		 >-bgc sp</value>
      <value compset="_CLM51%[^_]*BGC"		 >-bgc bgc</value>
      <value compset="_CLM51%[^_]*BGC-CROP"	 >-bgc bgc -crop</value>
      <value compset="_CLM51%[^_]*FATES"         >-bgc fates -no-megan</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>CLM build-namelist options</desc>
  </entry>

  <entry id="CLM_CO2_TYPE">
    <type>char</type>
    <valid_values>constant,diagnostic,prognostic</valid_values>
    <default_value>constant</default_value>
    <values>
      <value compset="_CAM"        >diagnostic</value>
      <value compset="_BGC%BDRD"   >diagnostic</value>
      <value compset="_BGC%BPRP"   >prognostic</value>
      <value compset="HIST.*_DATM" >diagnostic</value>
      <value compset="SSP.*_DATM"  >diagnostic</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Determines how CLM will determine where CO2 is set.
      If value is constant, it will be set to CCSM_CO2_PPMV,
      if value is either diagnostic or prognostic, the atmosphere model
      MUST send it to CLM. CLM_CO2_TYPE is normally set by the specific
      compset, since it HAS to be coordinated with settings for the
      atmospheric model. Do not modify this variable. If you want to modify for
      your experiment, use your own user-defined component set
      This is an advanced flag and should only be used by expert users.</desc>
  </entry>

  <entry id="CLM_NAMELIST_OPTS">
    <type>char</type>
    <default_value></default_value>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>CLM-specific namelist settings for -namelist option in the CLM
      build-namelist. CLM_NAMELIST_OPTS is normally set as a compset variable
      and in general should not be modified for supported compsets.
      It is recommended that if you want to modify this value for your experiment,
      you should use your own user-defined component sets via using create_newcase
      with a compset_file argument.
      This is an advanced flag and should only be used by expert users.</desc>
  </entry>

  <entry id="CLM_ACCELERATED_SPINUP">
    <type>char</type>
    <valid_values>on,sasu,off</valid_values>
    <default_value>off</default_value>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Turn on any settings for accellerating the model spinup. SASU is to run the Semi-Analytic Spin-Up with the CN soil matrix method.
    </desc>
  </entry>

  <entry id="CLM_USRDAT_NAME">
    <type>char</type>
    <default_value>UNSET</default_value>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Dataset name for user-created datasets. This is used as the argument
      in Buildconf/clm.buildnml to build-namelist -clm_usr_name. An example of
      such a dataset would be 1x1pt_boulderCO_c090722. The default value is UNSET.
      This is an advanced flag and should only be used by expert users.</desc>
  </entry>

  <entry id="CLM_FORCE_COLDSTART">
    <type>char</type>
    <valid_values>on,off</valid_values>
    <default_value>off</default_value>
    <group>run_component_ctsm</group>
    <file>env_run.xml</file>
    <desc>Flag to the CLM build-namelist command to force CLM to do a
      cold start (finidat will be set to blanks).
      A value of on forces the model to spin up from a cold-start
      (arbitrary initial conditions). Setting this value in the xml file will take
      precedence over any settings for finidat in the $CASEROOT/user_nl_ctsm file.</desc>
  </entry>

  <entry id="CLM_USER_MODS">
    <type>char</type>
    <valid_values></valid_values>
    <default_value></default_value>
    <values match="last">
      <value                  compset="_CLM50%[^_]*CMIP6DECK[%_]"     >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck</value>
      <value grid="l%1.9x2.5" compset="_CLM50%[^_]*CMIP6DECK[%_]"     >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_nociso_deck</value>
      <value                  compset="_CLM50%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_deck</value>
      <value grid="l%1.9x2.5" compset="_CLM50%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_nociso_deck</value>
    </values>
    <group>run_component_ctsm</group>
    <file>env_case.xml</file>
    <desc>User mods to apply to specific compset matches. </desc>
  </entry>

  <help>
    =========================================
    CLM naming conventions
    =========================================
    note: [^_]* means match zero or more of any character BUT an underbar.
    (in other words make sure there is NOT a underbar before the string afterwards)
  </help>

</entry_id>
