<?xml version="1.0"?>

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

<entry_id version="2.0">

  <!-- Note that streamslist here does not handle the optional streams - -->
  <!-- those are handled in buildnml -->

  <entry id="streamslist">
    <type>char(100)</type>
    <category>streams</category>
    <group>streams_file</group>
    <desc>List of streams used for the given DATM_MODE</desc>
    <values>
      <value datm_mode="CLM_QIAN$">
        CLM_QIAN.Solar,CLM_QIAN.Precip,CLM_QIAN.TPQW
      </value>
      <value datm_mode="CLM_QIAN_WISO">
        CLM_QIAN_WISO.Solar,CLM_QIAN_WISO.Precip,CLM_QIAN_WISO.TPQW
      </value>
      <value datm_mode="CLMCRUNCEPv7">
        CLMCRUNCEPv7.Solar,CLMCRUNCEPv7.Precip,CLMCRUNCEPv7.TPQW
      </value>
      <value datm_mode="CLMGSWP3v1">
        CLMGSWP3v1.Solar,CLMGSWP3v1.Precip,CLMGSWP3v1.TPQW
      </value>
      <value datm_mode="CLMICONEXAMPLE">
        CLMICONEXAMPLE.Solar,CLMICONEXAMPLE.Precip,CLMICONEXAMPLE.TPQW
      </value>
      <value datm_mode="CLMICONhistorical">
        CLMICONhistorical.Solar,CLMICONhistorical.Precip,CLMICONhistorical.TPQW
      </value>
      <value datm_mode="CLMICONCNRMSSP370">
        CLMICONCNRMSSP370.Solar,CLMICONCNRMSSP370.Precip,CLMICONCNRMSSP370.TPQW
      </value>
      <value datm_mode="CLMICONNORESMhistorical">
        CLMICONNORESMhistorical.Solar,CLMICONNORESMhistorical.Precip,CLMICONNORESMhistorical.TPQW
      </value>
      <value datm_mode="CLMICONNORESMSSP370">
        CLMICONNORESMSSP370.Solar,CLMICONNORESMSSP370.Precip,CLMICONNORESMSSP370.TPQW
      </value>
      <value datm_mode="CLMHCLIMhistorical">
        CLMHCLIMhistorical.Solar,CLMHCLIMhistorical.Precip,CLMHCLIMhistorical.TPQW
      </value>
      <value datm_mode="CLMHCLIMCNRMhistorical">
        CLMHCLIMCNRMhistorical.Solar,CLMHCLIMCNRMhistorical.Precip,CLMHCLIMCNRMhistorical.TPQW
      </value>
      <value datm_mode="CLMHCLIMNORESMhistorical">
        CLMHCLIMNORESMhistorical.Solar,CLMHCLIMNORESMhistorical.Precip,CLMHCLIMNORESMhistorical.TPQW
      </value>
      <value datm_mode="CLMNLDAS2">
        CLMNLDAS2.Solar,CLMNLDAS2.Precip,CLMNLDAS2.TPQW
      </value>
      <value datm_mode="1PT" model_grid="1x1_mexicocityMEX">
        1PT.mexicocityMEX
      </value>
      <value datm_mode="1PT" model_grid="1x1_vancouverCAN">
        1PT.vancouverCAN
      </value>
      <value datm_mode="1PT" model_grid="1x1_urbanc_alpha">
        1PT.urbanc_alpha
      </value>
      <value datm_mode="1PT" model_grid="CLM_USRDAT" neon="True">
        NEON.$NEONSITE
      </value>
      <value datm_mode="1PT" model_grid="CLM_USRDAT">
        CLM_USRDAT.$CLM_USRDAT_NAME
      </value>
      <value datm_mode="CORE2_NYF" >
        CORE2_NYF.GISS,CORE2_NYF.GXGXS,CORE2_NYF.NCEP
      </value>
      <value datm_mode="CORE2_IAF" >
        CORE2_IAF.GCGCS.PREC,CORE2_IAF.GISS.LWDN,CORE2_IAF.GISS.SWDN,CORE2_IAF.GISS.SWUP,CORE2_IAF.NCEP.DN10,CORE2_IAF.NCEP.Q_10,CORE2_IAF.NCEP.SLP_,CORE2_IAF.NCEP.T_10,CORE2_IAF.NCEP.U_10,CORE2_IAF.NCEP.V_10,CORE2_IAF.CORE2.ArcFactor
      </value>
      <value datm_mode="CORE_IAF_JRA_1p4_2018" >
        CORE_IAF_JRA_1p4_2018.GCGCS.PREC,CORE_IAF_JRA_1p4_2018.GISS.LWDN,CORE_IAF_JRA_1p4_2018.GISS.SWDN,CORE_IAF_JRA_1p4_2018.NCEP.Q_10,CORE_IAF_JRA_1p4_2018.NCEP.SLP_,CORE_IAF_JRA_1p4_2018.NCEP.T_10,CORE_IAF_JRA_1p4_2018.NCEP.U_10,CORE_IAF_JRA_1p4_2018.NCEP.V_10
      </value>
      <value datm_mode="CORE_RYF8485_JRA">
        CORE_RYF8485_JRA.GISS.LWDN,CORE_RYF8485_JRA.GISS.SWDN,CORE_RYF8485_JRA.GCGCS,CORE_RYF8485_JRA.NCEP
      </value>
      <value datm_mode="CORE_RYF9091_JRA">
        CORE_RYF9091_JRA.GISS.LWDN,CORE_RYF9091_JRA.GISS.SWDN,CORE_RYF9091_JRA.GCGCS,CORE_RYF9091_JRA.NCEP
      </value>
      <value datm_mode="CORE_RYF0304_JRA">
        CORE_RYF0304_JRA.GISS.LWDN,CORE_RYF0304_JRA.GISS.SWDN,CORE_RYF0304_JRA.GCGCS,CORE_RYF0304_JRA.NCEP
      </value>
      <value datm_mode="CORE_IAF_JRA" >
        CORE_IAF_JRA.PREC,CORE_IAF_JRA.LWDN,CORE_IAF_JRA.SWDN,CORE_IAF_JRA.Q_10,CORE_IAF_JRA.SLP_,CORE_IAF_JRA.T_10,CORE_IAF_JRA.U_10,CORE_IAF_JRA.V_10
      </value>
      <value datm_mode="CORE2_IAF" model_grid="01col" >
        CORE2_IAF.NCEP.DENS.SOFS,CORE2_IAF.NCEP.PSLV.SOFS,CORE2_IAF.PREC.SOFS.DAILY,CORE2_IAF.LWDN.SOFS.DAILY,CORE2_IAF.SWDN.SOFS.DAILY,CORE2_IAF.SWUP.SOFS.DAILY,CORE2_IAF.SHUM.SOFS.6HOUR,CORE2_IAF.TBOT.SOFS.6HOUR,CORE2_IAF.U.SOFS.6HOUR,CORE2_IAF.V.SOFS.6HOUR,CORE2_IAF.CORE2.ArcFactor
      </value>
      <value datm_mode="ERA5">
        ERA5_HOURLY
      </value>
      <value datm_mode="SIMPLE" ></value>
      <value datm_mode="CPLHIST">
        CPLHISTForcing.Solar,CPLHISTForcing.nonSolarFlux,CPLHISTForcing.State3hr,CPLHISTForcing.State1hr
      </value>
    </values>
  </entry>

  <entry id="datamode">
    <type>char</type>
    <category>datm</category>
    <group>datm_nml</group>
    <valid_values>CLMNCEP,CORE2_NYF,CORE2_IAF,CORE_IAF_JRA,ERA5,SIMPLE,CPLHIST,1PT</valid_values>
    <desc>
      general method that operates on the data.
      ----datamode = "CPLHIST"----
      CPLHIST mode will examine the fields found in all input data streams,
      if any input field names match the field names used internally, they
      are copied into the export array and passed directly to the coupler
      without any special user code.  Any required fields not found on an
      input stream will be set to zero except for aerosol deposition fields
      which will be set to a special value.
      ----datamode = "CORE2_NYF"----
      Coordinated Ocean-ice Reference Experiments (CORE) Version 2 Normal Year Forcing.
      ----datamode = "CORE2_IAF"----
      In conjunction with with CORE Version 2 atmospheric forcing data,
      provides the atmosphere forcing favored by the Ocean Model Working
      Group when coupling an active ocean model with observed atmospheric
      forcing.  This mode and associated data sets implement the CORE-IAF
      Version 2 forcing data, as developed by Large and Yeager (2008) at
      NCAR.  See the documentation for CORE version 2 datasets at
      http://data1.gfdl.noaa.gov/nomads/forms/mom4/COREv2.html Also see
      W.G.Large, S.G.Yeager (2008), The global climatology of an
      interannually varying air-sea flux data set.
      Clm Dyn doi 10.1007/s00382-008-0441-3.
      ----datamode = "CORE_IAF_JRA"----
      JRA55 intra-annual year forcing
      ----datamode = "CLMNCEP"----
      In conjunction with NCEP climatological atmosphere data, provides the
      atmosphere forcing favored by the Land Model Working Group when
      coupling an active land model with observed atmospheric forcing.  This
      mode replicates code previously found in CLM (circa 2005), before the
      LMWG started using the CCSM flux coupler and data models to do
      active-land-only simulations.
      ----datamode = "ERA5"----
      Fifth generation ECMWF atmospheric reanalysis of the global climate
      ----datamode = "SIMPLE"----
      Namelist-configurable, constant datm forcing for simple experiments
      ----datamode = "CPLHIST" ----
    </desc>
    <values>
      <value datm_mode="CLM">
        CLMNCEP
      </value>
      <value datm_mode="1PT">
        CLMNCEP
      </value>
      <value datm_mode="CORE2_IAF">
        CORE2_IAF
      </value>
      <value datm_mode="CORE_IAF_JRA">
        CORE_IAF_JRA
      </value>
      <value datm_mode="ERA5">
        ERA5
      </value>
      <value datm_mode="SIMPLE">
        SIMPLE
      </value>
      <value datm_mode="CPLHIST">
        CPLHIST
      </value>
      <value>
        $DATM_MODE
      </value>
    </values>
  </entry>

  <entry id="model_meshfile">
    <type>char</type>
    <category>streams</category>
    <input_pathname>abs</input_pathname>
    <group>datm_nml</group>
    <desc>
      file specifying model mesh
    </desc>
    <values>
      <value>$ATM_DOMAIN_MESH</value>
      <value single_column='true'>null</value>
    </values>
  </entry>

  <entry id="model_maskfile">
    <type>char</type>
    <category>streams</category>
    <input_pathname>abs</input_pathname>
    <group>datm_nml</group>
    <desc>
      file specifying model mask if not obtained from input model mesh
    </desc>
    <values>
      <value>$ATM_DOMAIN_MESH</value>
      <value single_column='true'>null</value>
    </values>
  </entry>

  <entry id="nx_global" modify_via_xml="ATM_NX">
    <type>integer</type>
    <category>streams</category>
    <group>datm_nml</group>
    <desc>
      global size of nx
    </desc>
    <values>
      <value>$ATM_NX</value>
      <value single_column='true'>1</value>
    </values>
  </entry>

  <entry id="ny_global" modify_via_xml="ATM_NY">
    <type>integer</type>
    <category>streams</category>
    <group>datm_nml</group>
    <desc>
      global size of ny
    </desc>
    <values>
      <value>$ATM_NY</value>
      <value single_column='true'>1</value>
    </values>
  </entry>

  <entry id="bias_correct" skip_default_entry="true"><!--- anomaly forcing - bias correction -->
    <type>char</type>
    <category>datm</category>
    <group>datm_nml</group>
    <valid_values>BC.QIAN.CMAP.Precip,BC.QIAN.GPCP.Precip,BC.CRUNCEP.CMAP.Precip,BC.CRUNCEP.GPCP.Precip</valid_values>
    <desc>
      If set, include bias correction streams in namelist.
    </desc>
    <values>
      <value/>
    </values>
  </entry>

  <entry id="anomaly_forcing" skip_default_entry="true"> <!--- for anomaly forcing -->
    <type>char(10)</type>
    <category>datm</category>
    <group>datm_nml</group>
    <valid_values>Anomaly.Forcing.Precip,Anomaly.Forcing.Temperature,Anomaly.Forcing.Pressure,Anomaly.Forcing.Humidity,Anomaly.Forcing.Uwind,Anomaly.Forcing.Vwind,Anomaly.Forcing.Shortwave,Anomaly.Forcing.Longwave</valid_values>
    <desc>
      If set, include anomaly forcing streams in namelist.
    </desc>
    <values>
      <value/>
    </values>
  </entry>

  <entry id="factorfn_data">
    <type>char</type>
    <category>datm</category>
    <group>datm_nml</group>
    <input_pathname>abs</input_pathname>
    <desc>
      filename containing correction factor data for use only with CORE2 modes (CORE2_IAF and CORE2_NYF).
    </desc>
    <values>
      <value>null</value>
      <value datm_mode="CORE2_NYF">$DIN_LOC_ROOT/atm/datm7/CORE2/COREv2.correction_factors.T62.121007.nc</value>
      <value datm_mode="CORE2_IAF">$DIN_LOC_ROOT/atm/datm7/CORE2/COREv2.correction_factors.T62.121007.nc</value>
      <value datm_mode="CORE2_IAF" model_grid="01col">null</value>
    </values>
  </entry>

  <entry id="factorfn_mesh">
    <type>char</type>
    <category>datm</category>
    <group>datm_nml</group>
    <input_pathname>abs</input_pathname>
    <desc>
      filename containing correction factor data for use only with CORE2 modes (CORE2_IAF and CORE2_NYF).
    </desc>
    <values>
      <value>null</value>
      <value datm_mode="CORE2_NYF">$DIN_LOC_ROOT/share/meshes/T62_040121_ESMFmesh_c20190714.nc</value>
      <value datm_mode="CORE2_IAF">$DIN_LOC_ROOT/share/meshes/T62_040121_ESMFmesh_c20190714.nc</value>
      <value datm_mode="CORE2_IAF" model_grid="01col">null</value>
    </values>
  </entry>

  <entry id="flds_presaero">
    <type>logical</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      If true, prescribed aerosols are sent from datm (must be true for running with CLM).
    </desc>
    <values>
      <value>.true.</value>
      <value datm_presaero="none">.false.</value>
    </values>
  </entry>

  <entry id="flds_presndep">
    <type>logical</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      If true, prescribed nitrogen deposition fluxes are sent from datm (must be true for running with CLM).
    </desc>
    <values>
      <value>.true.</value>
      <value datm_presndep="none">.false.</value>
    </values>
  </entry>

  <entry id="flds_preso3">
    <type>logical</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      If true, prescribed o3 is sent from datm (must be true for running with CLM).
    </desc>
    <values>
      <value>.true.</value>
      <value datm_preso3="none">.false.</value>
    </values>
  </entry>

  <entry id="flds_co2">
    <type>logical</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      If true, prescribed co2 is sent from datm (must be true for running with CLM).
    </desc>
    <values>
      <value>.true.</value>
      <value datm_co2_tseries="none">.false.</value>
    </values>
  </entry>

  <entry id="flds_wiso">
    <type>logical</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      If true, prescribed water isotopes are sent from datm (must be true for running with CLM).
    </desc>
    <values>
      <value>.false.</value>
      <!-- <value datm_mode="CLM_QIAN_WISO">.true.</value> -->
    </values>
  </entry>

  <entry id="iradsw">
    <type>integer</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      Frequency to update radiation in number of steps (or hours if negative)
      irdasw is the radiation setting used to compute the next shortwave
      Julian date.  values greater than 1 set the next radiation to the
      present time plus 2 timesteps every iradsw.  values less than 0 turn
      set the next radiation to the present time plus two timesteps every
      -iradsw hours.  if iradsw is zero, the next radiation time is the
      present time plus 1 timestep.  (default=0.)
    </desc>
    <values>
      <value>1</value>
      <value datm_mode="CPLHIST">-1</value>
    </values>
  </entry>

  <entry id="restfilm">
    <type>char</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      Model restart filename for the data atmosphere model data.  This is
      optional.  If restfilm is null, the restart
      filename will be read from the DATM restart pointer file (or files for multiple instances).
    </desc>
    <values>
      <value>null</value>
    </values>
  </entry>

  <entry id="skip_restart_read" modify_via_xml="DATM_SKIP_RESTART_READ">
    <type>logical</type>
    <category>datm</category>
    <group>datm_nml</group>
    <desc>
      If set to true, than datm restarts will not be read on a continuation run.
      This capability is used, for example, in CTSM spinup runs.
    </desc>
    <values>
      <value>$DATM_SKIP_RESTART_READ</value>
    </values>
  </entry>

  <entry id="dn10">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      density at the lowest model layer
      units: kg m-3
    </desc>
    <values>
      <value>1.204</value>
    </values>
  </entry>

  <entry id="slp">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      inst_pres_height_surface
      units: Pa
    </desc>
    <values>
      <value>101325.0</value>
    </values>
  </entry>

  <entry id="q">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      Constant bottom layer specific humidity
      units: kg kg-1
    </desc>
    <values>
      <value>0.0</value>
    </values>
  </entry>

  <entry id="t">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      Constant air temperature at lowest model layer
      units: K
    </desc>
    <values>
      <value>273.15</value>
    </values>
  </entry>

  <entry id="u">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      Constant zonal wind speed forcing for simple models.
      units: m s-1
    </desc>
    <values>
      <value>0.0</value>
    </values>
  </entry>

  <entry id="v">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      Constant meridional wind speed forcing for simple models.
      units: m s-1
    </desc>
    <values>
      <value>0.0</value>
    </values>
  </entry>

  <entry id="peak_swdn">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      Peak idealized shortwave radiation to be passed to ice/ocean surface.
      units: W m-2
    </desc>
    <values>
      <value>330.0</value>
    </values>
  </entry>

  <entry id="peak_lwdn">
    <type>real</type>
    <category>datm</category>
    <group>const_forcing_nml</group>
    <desc>
      Peak idealized longwave radiation to be passed to ice/ocean surface.
      units: W m-2
    </desc>
    <values>
      <value>450.0</value>
    </values>
  </entry>
</entry_id>
