ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
295 stars 298 forks source link

Add option to NOT set the dust-emission drv_flds_in settings when coupled to CAM #2524

Open ekluzek opened 1 month ago

ekluzek commented 1 month ago

As part of the work on dust emissions, we need a way to choose if either CAM or CTSM is going to set the CMEPS dust_emission namelist. The current logic for this is that if CAM and CTSM disagree on the fields in drv_fld_in -- CESM aborts with an error. This happens inside of CMEPS buildnml.

In the case of fire-emissions, MEGAN, or drydep these are all optional so we just don't set them when coupled to CAM. So there is no disagreement with CAM. In this case though dust_emissions -- must be set. So when coupled to CAM, CTSM needs to know not to set it, which means default values should NOT be set for this case.

ekluzek commented 1 month ago

One way to do this is to have this handled in build-namelist and add something like a "--no-dust_settings" option. This would be added to compsets that run with CAM for CLM_BLDNML_OPTS in cime_config/config_component.xml.

ekluzek commented 1 month ago

Another way would be to add a new XML variable for dust emission drv_flds_in settings to say whether it's in CLM or ATM. build-namelist (or buildnml) would then see it and then do the appropriate thing. In light of #1763 we should go along this route.

This could be done with either a generic field for all drv_flds_in setting or one specific for dust. I'll start with a dust specific one. Error checking in buildnml/build-namelist could then check that if it's set to ATM that CAM is in the COMPSET name. This wouldn't be something that users should NOT mess with.

So maybe something like:

  <entry id="LND_SETS_DUST_EMIS_DRV_FLDS">
    <type>logical</type>
    <valid_values>TRUE,FALSE</valid_values>
    <default_value>TRUE</default_value>
    <values>
      <value compset="CAM"  >FALSE</value>
    </values>
    <group>run_component_cpl</group>
    <file>env_run.xml</file>
    <desc>If CTSM will set the dust settings in drv_flds_in (TRUE), or if ATM (i.e. CAM) will - DO NOT EDIT (set by compset name)</desc>
  </entry>
ekluzek commented 1 month ago

Thinking about it initially this should only be TRUE, even when connected to CAM, until CAM is updated to be able to control the dust_emis drv_flds_in namelist.

@fvitt do you have any thoughts on this issue?

fvitt commented 1 month ago

Thinking about it initially this should only be TRUE, even when connected to CAM, until CAM is updated to be able to control the dust_emis drv_flds_in namelist.

@fvitt do you have any thoughts on this issue?

I think this makes sense.

ekluzek commented 1 week ago

This will be coming into b4b-dev with #2545.