ESCOMP / MOM_interface

CESM interface to MOM Ocean Model
5 stars 18 forks source link

Only build MARBL if requested in compset longname / alias #177

Open mnlevy1981 opened 2 months ago

mnlevy1981 commented 2 months ago

Currently MARBL is built by default, regardless of whether the user requested it. We should switch to only building it when the compset specifies running MOM6 with the MARBL tracers:

  <entry id="MOM6_BUILD_MARBL">
    <type>char</type>
    <valid_values>TRUE,FALSE</valid_values>
-    <default_value>TRUE</default_value>
+    <default_value>FALSE</default_value>
+    <values>
+      <value compset="_MOM6%[^_]*MARBL">TRUE</value>
+    </values>
    <group>build_component_mom</group>
    <file>env_build.xml</file>
    <desc> This variable controls whether MOM6 builds with the full MARBL library (default) or just
           with stubs. If set to FALSE then setting USE_MARBL_TRACERS = True in the Parameters file
-           will result in a runtime error. It is recommended to leave this variable set to TRUE, it
-           exists to allow testing of the MARBL stub in the CESM test suite.
+           will result in a runtime error.
    </desc>
  </entry>

We don't want users to start with a G compset and try to add MARBL after the fact. The default PE layouts for compsets without MARBL are much smaller than the comparable layouts with MARBL enabled, so adding MARBL after create_newcase will run much slower unless the user changes NTASKS_OCN before building. Also there are a handful of env_run.xml changes that come through config_component.xml that would need to be set manually:

A side benefit is that this would allow us to remove cime_config/testdefs/testmods_dirs/mom/no_marbl/ and the lone test using that directory in the test suite because every non-MARBL compset would test the MARBL stub rather than the full library.