From a802ad43b402fd461ffd5c5031916ee3d53aa23d Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Wed, 26 Jun 2024 06:38:33 -0600 Subject: [PATCH 1/2] added new logic for sending dms and bromo to cmeps --- cime_config/buildnml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cime_config/buildnml b/cime_config/buildnml index 6ef0f906..88c7bde8 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -322,6 +322,17 @@ def buildnml(case, caseroot, compname): fwrite.write(line) shutil.move(namelist_file_temp, namelist_file) + # change xml variable settings if appropriate + if "ecosys" in case.get_value("BLOM_TRACER_MODULES"): + dms_emis = case.get_value("DMS_EMIS") + if dms_emis is not None or dms_emis is False: + case.set_value('DMS_EMIS','TRUE') + print (" ***Resetting DMS_EMIS to TRUE***") + brf_emis = pg_blom.get_value('use_bromo') + if brf_emis == ".true.": + case.set_value('BRF_EMIS','TRUE') + print (" ***Resetting BRF_EMIS to TRUE***") + ############################################################################### def _main_func(): From 4917926c3e4fa7a9637e0cfda5af9f92a4ca4e60 Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Thu, 27 Jun 2024 06:32:27 -0600 Subject: [PATCH 2/2] new mechanism to send dms and brf to mediator --- cime_config/buildnml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index 88c7bde8..b57f785a 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -323,14 +323,17 @@ def buildnml(case, caseroot, compname): shutil.move(namelist_file_temp, namelist_file) # change xml variable settings if appropriate + # Note - this does not change the blom namelist - it changes xml variables that are then + # used by cmeps to change attributes that are sent to the atm + # TODO: add n2o_emis and nh3_emis logic if "ecosys" in case.get_value("BLOM_TRACER_MODULES"): dms_emis = case.get_value("DMS_EMIS") if dms_emis is not None or dms_emis is False: - case.set_value('DMS_EMIS','TRUE') - print (" ***Resetting DMS_EMIS to TRUE***") + case.set_value('DMS_EMIS_OCN','TRUE') + print (" ***Resetting DMS_EMIS_OCN to TRUE***") brf_emis = pg_blom.get_value('use_bromo') if brf_emis == ".true.": - case.set_value('BRF_EMIS','TRUE') + case.set_value('BRF_EMIS_OCN','TRUE') print (" ***Resetting BRF_EMIS to TRUE***") ###############################################################################