Open mnlevy1981 opened 1 year ago
I'm pretty sure this is also a problem for CTSM. But, we don't run this way, so we don't see it. But, I do agree that we want the user to be informed that this is setup wrongly and to give an error and let them know how to fix it.
Summary: CESM uses
CCSM_BGC
to control which components are expecting to send / receive CO2, but datm triggers aflds_co2
flag based onDATM_CO2_TSERIES
. Despite that setting, it seems like datm still advertises the co2 fields whenCCSM_BGC=CO2A
andDATM_CO2_TSERIES=none
, but in that case I get errors if I try to receive them in the ocean.Long Version
Over in the MARBL driver for MOM, I'm working on adding an option to allow MOM6 to get CO2 concentration from the coupler. In a test run, starting with a CMOM compset, I set
CCSM_BGC=CO2A
but leftDATM_CO2_TSERIES=none
. SinceDATM_CO2_TSERIES=none
, datm setsflds_co2
to False:https://github.com/ESCOMP/CDEPS/blob/296dfaad895623cae6ef3abcd9796ac9bfa152f2/datm/cime_config/namelist_definition_datm.xml#L295-L306
And I would think that is enough to avoid advertising
Sa_co2prog
andSa_co2diag
:https://github.com/ESCOMP/CDEPS/blob/69e550218bb722372162965d2ab3d26ea2a6e3d6/datm/datm_datamode_core2_mod.F90#L136-L139
However, these lines from
med.log
started showing up when I setCCSM_BGC
toCO2A
(leavingDATM_CO2_TSERIES=none
):And it's unclear where they are coming from. Also, the model crashes if I try to actually access those fields:
I can think of several possible solutions:
flds_co2
to be based onCCSM_BGC
instead ofDATM_CO2_TSERIES
, and then throw an error ifflds_co2
is true butDATM_CO2_TSERIES
is noneflds_co2
to be(DATM_CO2_TSERIES != none) && (CCSM_BGC != none)
, and also fix whatever bug is causing CESM to advertiseSa_co2prog
even ifflds_co2
is falseDATM_CO2_TSERIES
is none butCCSM_BGC
is notand I'm not terribly familiar with this code, so maybe somebody from the land side should chime in? I wouldn't be surprised if @ekluzek pointed out something in the above options that may cause problems for CTSM, and if he has an alternate solution I'd be all for it.