marbl-ecosys / MARBL

Marine Biogeochemistry Library
https://marbl-ecosys.github.io
Other
14 stars 25 forks source link

Mechanism for MARBL_generate_settings_file.py to change tracer module variables #455

Closed mnlevy1981 closed 1 week ago

mnlevy1981 commented 8 months ago

In the MOM interface, I'm working on defining CESM compsets that control base_bio_on and abio_dic_on. Currently the only way CESM users can change those values in marbl_in is by adding them to user_nl_marbl, but I'd like the buildnml script to be able to set them correctly based on the compset (well, based on an env_run.xml variable set differently by different compsets).

We already have a GRID option that gets passed to the default settings files:

   lo2_consumption_scalef :
      dependencies : base_bio_on
      longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)
      subcategory : 3. config flags
      units : unitless
      datatype : logical
      default_value : # default value is resolution dependent!
         default : .false.
         GRID == "CESM_x1" : .true.

So maybe the tracer module section could add BASE_BIO_ON and ABIO_DIC_ON variables to that interface as well:

tracer_modules :
   base_bio_on :
      longname : Control whether the base ecosystem tracer module is active
      subcategory : 1. tracer modules
      units : unitless
      datatype : logical
      default_value : # can be set by GCM
        default: .true.
        BASE_BIO_ON == "FALSE": .false.
      _append_to_config_keywords : true
   abio_dic_on :
      longname : Control whether abiotic carbon tracer module is active
      subcategory : 1. tracer modules
      units : unitless
      datatype : logical
      default_value :# can be set by GCM
        default: .false.
        ABIO_DIC_ON == "TRUE": .true.
      _append_to_config_keywords : true
mnlevy1981 commented 1 week ago

Implemented in #457