From 0f9fee7ea3b3f6732e2f0dd7bf75f7f6536b3cfa Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 29 Jul 2024 11:42:44 -0600 Subject: [PATCH] LILAC needs to read and handle the drv_flds_in file as dust emission settings are required and it's namelist must be read --- cime_config/SystemTests/lilacsmoke.py | 2 +- python/ctsm/lilac_make_runtime_inputs.py | 1 - src/CMakeLists.txt | 1 + src/cpl/lilac/lnd_comp_esmf.F90 | 5 +++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cime_config/SystemTests/lilacsmoke.py b/cime_config/SystemTests/lilacsmoke.py index 1287301ba2..5bdbb31ec1 100644 --- a/cime_config/SystemTests/lilacsmoke.py +++ b/cime_config/SystemTests/lilacsmoke.py @@ -38,7 +38,7 @@ logger = logging.getLogger(__name__) -_LILAC_RUNTIME_FILES = ["lnd_in", "lnd_modelio.nml", "lilac_in"] +_LILAC_RUNTIME_FILES = ["lnd_in", "lnd_modelio.nml", "drv_flds_in", "lilac_in"] class LILACSMOKE(SystemTestsCommon): diff --git a/python/ctsm/lilac_make_runtime_inputs.py b/python/ctsm/lilac_make_runtime_inputs.py index 33b87c543e..e751f6c931 100644 --- a/python/ctsm/lilac_make_runtime_inputs.py +++ b/python/ctsm/lilac_make_runtime_inputs.py @@ -307,7 +307,6 @@ def buildnml(cime_path, rundir): # remove temporary files in rundir os.remove(os.path.join(rundir, "config_cache.xml")) os.remove(os.path.join(rundir, "env_lilac.xml")) - os.remove(os.path.join(rundir, "drv_flds_in")) os.remove(infile) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9388e65bc2..5b0f6c9b1b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -107,5 +107,6 @@ add_subdirectory(${CLM_ROOT}/src/init_interp/test clm_init_interp_test) add_subdirectory(${CLM_ROOT}/src/self_tests/test clm_self_tests_test) # Add driver unit test directories +# (these should be moved to the appropriate submodule) add_subdirectory(${CLM_ROOT}/src/drv_test drv_test) diff --git a/src/cpl/lilac/lnd_comp_esmf.F90 b/src/cpl/lilac/lnd_comp_esmf.F90 index 298aa730c0..6c8bb2a491 100644 --- a/src/cpl/lilac/lnd_comp_esmf.F90 +++ b/src/cpl/lilac/lnd_comp_esmf.F90 @@ -114,6 +114,8 @@ subroutine lnd_init(comp, import_state, export_state, clock, rc) use ESMF , only : ESMF_StateAdd use ESMF , only : operator(==) + use shr_dust_emis_mod , only : shr_dust_emis_readnl + ! input/output variables type(ESMF_GridComp) :: comp ! CLM gridded component type(ESMF_State) :: import_state ! CLM import state @@ -270,6 +272,9 @@ subroutine lnd_init(comp, import_state, export_state, clock, rc) ! Fill in the value for model_meshfile in lnd_comp_shr used by the stream routines in share_esmf/ model_meshfile = trim(lnd_mesh_filename) + ! Reading in the drv_flds_in namelist is required for dust emissions + call shr_dust_emis_readnl( mpicom, "drv_flds_in") + !---------------------- ! Obtain caseid and start type from attributes in import state !----------------------