From 4b36eb97f80699d9d03ffb556a5aa4c4e7e55fdd Mon Sep 17 00:00:00 2001 From: Matthew Dawson Date: Tue, 18 Oct 2022 13:31:44 -0600 Subject: [PATCH 1/6] add CAM linked lbs to exe build --- cime_config/buildexe | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cime_config/buildexe b/cime_config/buildexe index 7f1a64471..348a3382e 100755 --- a/cime_config/buildexe +++ b/cime_config/buildexe @@ -38,6 +38,7 @@ def _main_func(): num_esp = case.get_value("NUM_COMP_INST_ESP") ocn_model = case.get_value("COMP_OCN") gmake_args = get_standard_makefile_args(case) + link_libs = case.get_value("CAM_LINKED_LIBS", subgroup="build_component_cam") esmf_aware_threading = case.get_value("ESMF_AWARE_THREADING") # Determine valid components @@ -65,6 +66,9 @@ def _main_func(): if ocn_model == 'mom': gmake_args += "USE_FMS=TRUE" + if link_libs is not None: + gmake_args += 'USER_SLIBS="{}"'.format(link_libs) + comp_classes = case.get_values("COMP_CLASSES") for comp in comp_classes: model = case.get_value("COMP_{}".format(comp)) From 5bb31fea49e4939613e483dba94d156b2bcfaf31 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 28 Mar 2023 09:59:47 -0600 Subject: [PATCH 2/6] Send nitrogen deposition from atm to ocn --- mediator/esmFldsExchange_cesm_mod.F90 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90 index 149c7791d..9b8f7b1e1 100644 --- a/mediator/esmFldsExchange_cesm_mod.F90 +++ b/mediator/esmFldsExchange_cesm_mod.F90 @@ -1963,6 +1963,21 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc) end if end if + ! --------------------------------------------------------------------- + ! to ocn: nitrogen deposition fields from atm + ! --------------------------------------------------------------------- + if (phase == 'advertise') then + call addfld_to(compocn, 'Faxa_ndep') + call addfld_from(compatm, 'Faxa_ndep') + else + if ( fldchk(is_local%wrap%FBImp(compatm,compatm), 'Faxa_ndep', rc=rc) .and. & + fldchk(is_local%wrap%FBExp(compocn) , 'Faxa_ndep', rc=rc)) then + call addmap_from(compatm, 'Faxa_ndep', compocn, mapconsf, 'one', atm2ocn_map) + call addmrg_to(compocn, 'Faxa_ndep', & + mrg_from=compatm, mrg_fld='Faxa_ndep', mrg_type='copy_with_weights', mrg_fracname='ofrac') + end if + end if + ! --------------------------------------------------------------------- ! to ocn: enthalpy from atm rain, snow, evaporation ! to ocn: enthalpy from liquid and ice river runoff From 6cfd189087cfa10aaf5d2bb581eeb5b6ef3e5bb7 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 28 Mar 2023 10:08:15 -0600 Subject: [PATCH 3/6] Clean up comments There was already a comment claiming nitrogen deposition was being passed, so all I needed to add were the actual addfld_to(), addfld_from(), addmap_from(), and addmrg_to() calls. --- mediator/esmFldsExchange_cesm_mod.F90 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90 index 9b8f7b1e1..97729b63c 100644 --- a/mediator/esmFldsExchange_cesm_mod.F90 +++ b/mediator/esmFldsExchange_cesm_mod.F90 @@ -1962,10 +1962,6 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc) mrg_from=compatm, mrg_fld='Faxa_dstdry', mrg_type='copy_with_weights', mrg_fracname='ofrac') end if end if - - ! --------------------------------------------------------------------- - ! to ocn: nitrogen deposition fields from atm - ! --------------------------------------------------------------------- if (phase == 'advertise') then call addfld_to(compocn, 'Faxa_ndep') call addfld_from(compatm, 'Faxa_ndep') From 5476eaa402327b3d42e17a0e420d3be19f92fc4e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 29 Mar 2023 10:47:46 -0600 Subject: [PATCH 4/6] A fix for #346 so that LND2ROF_FMAPNAME will be used --- cime_config/namelist_definition_drv.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cime_config/namelist_definition_drv.xml b/cime_config/namelist_definition_drv.xml index e35ff537d..6a5de628d 100644 --- a/cime_config/namelist_definition_drv.xml +++ b/cime_config/namelist_definition_drv.xml @@ -2055,25 +2055,25 @@ idmap - + char mapping abs MED_attributes - lnd to rof mapping, 'unset' or 'idmap' are normal possible values + lnd to rof mapping, 'unset' or 'idmap' are normal possible values (mapping file given for mizuRoute grids) - unset + $LND2ROF_FMAPNAME idmap - + char mapping abs MED_attributes - rof to lnd mapping, 'unset' or 'idmap' are normal possible values + rof to lnd mapping, 'unset' or 'idmap' are normal possible values (mapping file given for mizuRoute grids) - unset + $ROF2LND_FMAPNAME idmap From c3e8e2335e658f3227ed103366ff20ec9763ff18 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 5 Apr 2023 09:53:22 -0600 Subject: [PATCH 5/6] replace aux_cam with aux_cmeps in testlist --- cime_config/testdefs/testlist_drv.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/testlist_drv.xml b/cime_config/testdefs/testlist_drv.xml index ec86e5989..985bd6ce9 100644 --- a/cime_config/testdefs/testlist_drv.xml +++ b/cime_config/testdefs/testlist_drv.xml @@ -189,7 +189,7 @@ - + From 805d252f6f6c9590739ad2f10d7ad809e1076347 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 5 Apr 2023 15:59:46 -0600 Subject: [PATCH 6/6] using copy_with_weights causes weights to be applied twice --- mediator/esmFldsExchange_cesm_mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90 index 97729b63c..ad98ae684 100644 --- a/mediator/esmFldsExchange_cesm_mod.F90 +++ b/mediator/esmFldsExchange_cesm_mod.F90 @@ -1970,7 +1970,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc) fldchk(is_local%wrap%FBExp(compocn) , 'Faxa_ndep', rc=rc)) then call addmap_from(compatm, 'Faxa_ndep', compocn, mapconsf, 'one', atm2ocn_map) call addmrg_to(compocn, 'Faxa_ndep', & - mrg_from=compatm, mrg_fld='Faxa_ndep', mrg_type='copy_with_weights', mrg_fracname='ofrac') + mrg_from=compatm, mrg_fld='Faxa_ndep', mrg_type='copy') end if end if