diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml
index 7520050cf5..d3c2eda0a7 100644
--- a/cime_config/config_component.xml
+++ b/cime_config/config_component.xml
@@ -69,10 +69,12 @@
clm4_5_CRUv7
clm4_5_GSWP3v1
clm4_5_cam6.0
+ clm4_5_cam6.0
clm5_0_CRUv7
clm5_0_CRUv7
clm5_0_GSWP3v1
clm5_0_cam6.0
+ clm5_0_cam6.0
clm5_1_GSWP3v1
diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml
index 649306b05a..6a0ac8b3f6 100644
--- a/cime_config/config_compsets.xml
+++ b/cime_config/config_compsets.xml
@@ -151,7 +151,7 @@
I1850Clm51BgcCrop
- 1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV
+ 1850_DATM%GSWP3v1_CLM51%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV
@@ -264,12 +264,6 @@
-
- I1850Clm51Bgc
- 1850_DATM%GSWP3v1_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV
-
-
-
I1850Clm51SpNoAnthro
1850_DATM%GSWP3v1_CLM51%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV
diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml
index 232b6e6a90..90c45ef919 100644
--- a/cime_config/testdefs/ExpectedTestFails.xml
+++ b/cime_config/testdefs/ExpectedTestFails.xml
@@ -30,6 +30,13 @@
+
+
+ FAIL
+ #1887
+
+
+
FAIL
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 304740b1b8..68aea97f7e 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,4 +1,78 @@
===============================================================
+Tag name: ctsm5.1.dev113
+Originator(s): sacks (Bill Sacks), ekluzek (Erik Kluzek), jedwards (Jim Edwards)
+Date: Fri Oct 28 11:00:26 MDT 2022
+One-line Summary: Fix some compsets; add only clauses for ESMF use statements
+
+Purpose and description of changes
+----------------------------------
+
+(1) Fix I1850Clm51BgcCrop compset (was using CLM50 instead of CLM51)
+- Resolves https://github.com/ESCOMP/CTSM/issues/1882
+
+(2) Change LND_TUNING_MODE for DATM%CPLHIST compsets to use CAM tunings
+ since these cases typically use atmosphere forcings from CAM.
+- Resolves https://github.com/ESCOMP/CTSM/issues/1885
+
+(3) Add "only" clauses to ESMF use statements
+- Resolves https://github.com/ESCOMP/CTSM/issues/1846
+
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed or introduced
+------------------------
+CTSM issues fixed (include CTSM Issue #):
+- Resolves https://github.com/ESCOMP/CTSM/issues/1882 (I1850Clm51BgcCrop actually uses CLM50)
+- Resolves https://github.com/ESCOMP/CTSM/issues/1885 (CPLHIST compsets should use same land tunings as for CAM compsets)
+- Resolves https://github.com/ESCOMP/CTSM/issues/1846 (Add "only" clause to a problematic use statement in lnd_comp_nuopc for cce compiler)
+
+Known bugs introduced in this tag (include issue #):
+- https://github.com/ESCOMP/CTSM/issues/1887 (Gnu MCT builds will fail starting in ctsm5.1.dev113)
+
+
+Testing summary:
+----------------
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ cheyenne ---- OK
+ izumi ------- OK
+
+Answer changes
+--------------
+
+Changes answers relative to baseline: YES, but just for limited cases
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations:
+ - Cases with I1850Clm51BgcCrop compset
+ - Cases with DATM%CPLHIST
+ - what platforms/compilers: all
+ - nature of change (roundoff; larger than roundoff/same climate; new climate):
+ Larger than roundoff; may be new climate
+
+Other details
+-------------
+Pull Requests that document the changes (include PR ids):
+https://github.com/ESCOMP/CTSM/pull/1870
+
+===============================================================
+===============================================================
Tag name: ctsm5.1.dev112
Originator(s): adrifoster (Adrianna Foster), glemieux (Gregory Lemieux, LBL/NGEET)
Date: Sat Oct 15 16:26:28 MDT 2022
diff --git a/doc/ChangeSum b/doc/ChangeSum
index 9eab48d7e5..3008f25f69 100644
--- a/doc/ChangeSum
+++ b/doc/ChangeSum
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
+ ctsm5.1.dev113 multiple 10/28/2022 Fix some compsets; add only clauses for ESMF use statements
ctsm5.1.dev112 multiple 10/15/2022 Rework fates test definitions and add new fates tests
ctsm5.1.dev111 multiple 10/05/2022 Fixes for NEON cases
ctsm5.1.dev110 slevis 09/26/2022 Introduction of modify_meshes tool for use in I-cases and F-cases
diff --git a/src/cpl/lilac/lnd_comp_esmf.F90 b/src/cpl/lilac/lnd_comp_esmf.F90
index c172ec8c06..298aa730c0 100644
--- a/src/cpl/lilac/lnd_comp_esmf.F90
+++ b/src/cpl/lilac/lnd_comp_esmf.F90
@@ -6,7 +6,14 @@ module lnd_comp_esmf
!----------------------------------------------------------------------------
! external libraries
- use ESMF
+ use ESMF , only : ESMF_GridComp, ESMF_SUCCESS, ESMF_LogSet, ESMF_State
+ use ESMF , only : ESMF_Clock, ESMF_FieldBundle, ESMF_MAXSTR, ESMF_Field
+ use ESMF , only : ESMF_FieldCreate, ESMF_AttributeGet
+ use ESMF , only : ESMF_Time, ESMF_LogWrite, ESMF_LogFoundError, ESMF_Finalize
+ use ESMF , only : ESMF_FieldBundleAdd, ESMF_FieldBundleCreate
+ use ESMF , only : ESMF_ClockGet, ESMF_ClockGetAlarm, ESMF_LOGMSG_INFO
+ use ESMF , only : ESMF_TYPEKIND_R8, ESMF_MESHLOC_ELEMENT, ESMF_LOGERR_PASSTHRU
+ use ESMF , only : ESMF_END_ABORT, ESMF_TimeGet, ESMF_LOGMSG_ERROR
use shr_mpi_mod , only : shr_mpi_bcast
use perf_mod , only : t_startf, t_stopf, t_barrierf
@@ -68,6 +75,8 @@ module lnd_comp_esmf
subroutine lnd_register(comp, rc)
! Register the clm initial, run, and final phase methods with ESMF.
+ use ESMF , only : ESMF_GridCompSetEntryPoint
+ use ESMF , only : ESMF_METHOD_INITIALIZE, ESMF_METHOD_RUN, ESMF_METHOD_FINALIZE
! input/output argumenents
type(ESMF_GridComp) :: comp ! CLM grid component
@@ -97,6 +106,13 @@ subroutine lnd_init(comp, import_state, export_state, clock, rc)
! Initialize land surface model and obtain relevant atmospheric model arrays
! back from (i.e. albedos, surface temperature and snow cover over land).
+ ! Uses:
+ use ESMF , only : ESMF_VM, ESMF_VMGet, ESMF_VMGetCurrent
+ use ESMF , only : ESMF_DistGrid, ESMF_AttributeSet
+ use ESMF , only : ESMF_CalKind_Flag, ESMF_CALKIND_NOLEAP, ESMF_CALKIND_GREGORIAN
+ use ESMF , only : ESMF_TimeInterval, ESMF_TimeIntervalGet
+ use ESMF , only : ESMF_StateAdd
+ use ESMF , only : operator(==)
! input/output variables
type(ESMF_GridComp) :: comp ! CLM gridded component
@@ -509,6 +525,8 @@ subroutine lnd_run(gcomp, import_state, export_state, clock, rc)
!------------------------
! Run CTSM
!------------------------
+ use ESMF , only : ESMF_Alarm, ESMF_AlarmIsRinging, ESMF_AlarmRingerOff
+ use ESMF , only : ESMF_FAILURE, ESMF_ClockGetNextTime
! input/output variables
type(ESMF_GridComp) :: gcomp ! CLM gridded component
@@ -834,6 +852,8 @@ end subroutine lnd_final
subroutine log_clock_advance(clock, logunit, rc)
+ !-----------------------------------------------------------------------
+ use ESMF , only : ESMF_ClockPrint
! input/output variables
type(ESMF_Clock) :: clock
integer , intent(in) :: logunit
diff --git a/src/cpl/lilac/lnd_comp_shr.F90 b/src/cpl/lilac/lnd_comp_shr.F90
index dd619c7648..8dc9738f7a 100644
--- a/src/cpl/lilac/lnd_comp_shr.F90
+++ b/src/cpl/lilac/lnd_comp_shr.F90
@@ -2,7 +2,7 @@ module lnd_comp_shr
! Model mesh info is here in order to be leveraged by CDEPS in line calls
- use ESMF
+ use ESMF , only : ESMF_Clock, ESMF_Mesh
use shr_kind_mod, only : r8 => shr_kind_r8, cl=>shr_kind_cl
implicit none
diff --git a/src/cpl/lilac/lnd_import_export.F90 b/src/cpl/lilac/lnd_import_export.F90
index 32d1bace46..2da277dcee 100644
--- a/src/cpl/lilac/lnd_import_export.F90
+++ b/src/cpl/lilac/lnd_import_export.F90
@@ -1,6 +1,7 @@
module lnd_import_export
- use ESMF
+ use ESMF , only : ESMF_State, ESMF_SUCCESS, ESMF_StatePrint, ESMF_LogWrite, ESMF_LOGMSG_INFO, ESMF_LOGMSG_INFO
+ use ESMF , only : ESMF_FAILURE
use shr_kind_mod , only : r8 => shr_kind_r8, cx=>shr_kind_cx, cxx=>shr_kind_cxx, cs=>shr_kind_cs
use shr_sys_mod , only : shr_sys_abort
use shr_const_mod , only : fillvalue=>SHR_CONST_SPVAL
@@ -667,6 +668,10 @@ subroutine state_getfldptr(State, fb, fldname, fldptr1d, fldptr2d, rc)
! ----------------------------------------------
! Get pointer to a state field
! ----------------------------------------------
+ use ESMF , only : ESMF_FieldStatus_Flag, ESMF_Field, ESMF_FieldBundle
+ use ESMF , only : ESMF_FIELDSTATUS_COMPLETE, ESMF_StateGet
+ use ESMF , only : ESMF_FieldBundleGet, ESMF_FieldGet
+ use ESMF , only : operator(/=)
! input/output variables
type(ESMF_State), intent(in) :: State
diff --git a/src/cpl/lilac/lnd_shr_methods.F90 b/src/cpl/lilac/lnd_shr_methods.F90
index 078aef08d9..f8ca9f4f3e 100644
--- a/src/cpl/lilac/lnd_shr_methods.F90
+++ b/src/cpl/lilac/lnd_shr_methods.F90
@@ -1,6 +1,9 @@
module lnd_shr_methods
- use ESMF
+ use ESMF , only : ESMF_State, ESMF_MAXSTR, ESMF_StateGet
+ use ESMF , only : ESMF_LogWrite, ESMF_LOGMSG_ERROR, ESMF_FAILURE
+ use ESMF , only : ESMF_LOGERR_PASSTHRU, ESMF_LogFoundError
+ use ESMF , only : ESMF_SUCCESS, ESMF_Field, ESMF_LOGMSG_INFO
use shr_kind_mod , only : r8 => shr_kind_r8, cl=>shr_kind_cl, cs=>shr_kind_cs
use shr_sys_mod , only : shr_sys_abort
@@ -93,6 +96,11 @@ subroutine field_getfldptr(field, rc, fldptr1, fldptr2, rank, abort)
! abort is true by default and will abort if fldptr is not yet allocated in field
! rank returns 0, 1, or 2. 0 means fldptr not allocated and abort=false
! ----------------------------------------------
+ use ESMF , only : ESMF_FieldStatus_Flag, ESMF_Mesh
+ use ESMF , only : ESMF_FieldGet, ESMF_GEOMTYPE_GRID, ESMF_GEOMTYPE_MESH
+ use ESMF , only : ESMF_MeshGet, ESMF_GeomType_Flag
+ use ESMF , only : ESMF_FIELDSTATUS_COMPLETE
+ use ESMF , only : operator(/=), operator(==)
! input/output variables
type(ESMF_Field) , intent(in) :: field
diff --git a/src/cpl/nuopc/lnd_comp_nuopc.F90 b/src/cpl/nuopc/lnd_comp_nuopc.F90
index f7c3cb9a13..3852a1bf1b 100644
--- a/src/cpl/nuopc/lnd_comp_nuopc.F90
+++ b/src/cpl/nuopc/lnd_comp_nuopc.F90
@@ -4,9 +4,20 @@ module lnd_comp_nuopc
! This is the NUOPC cap for CTSM
!----------------------------------------------------------------------------
- use ESMF
+ use ESMF , only : ESMF_SUCCESS, ESMF_GridComp, ESMF_LogWrite, ESMF_LOGMSG_INFO, ESMF_GridCompSetEntryPoint
+ use ESMF , only : ESMF_METHOD_INITIALIZE, ESMF_FAILURE, ESMF_Time, ESMF_LogSetError, ESMF_RC_NOT_VALID
+ use ESMF , only : ESMF_Clock, ESMF_State, ESMF_Field, ESMF_MAXSTR, ESMF_LOGMSG_WARNING,ESMF_RC_ARG_BAD
+ use ESMF , only : ESMF_LOGFOUNDERROR, ESMF_LOGERR_PASSTHRU, ESMF_CALKIND_FLAG, ESMF_TIMEINTERVAL
+ use ESMF , only : ESMF_LogSetError, ESMF_FieldGet, ESMF_ClockGet, ESMF_GridCompGet, ESMF_ClockGetNextTime
+ use ESMF , only : ESMF_AlarmRingerOff, ESMF_TimeIntervalGet, ESMF_TimeGet, ESMF_StateGet
+ use ESMF , only : ESMF_MethodRemove, ESMF_VM, ESMF_VMGet, ESMF_CALKIND_NOLEAP, ESMF_CALKIND_GREGORIAN
+ use ESMF , only : ESMF_ALARMLIST_ALL, ESMF_ALARM, ESMF_ALARMISRINGING, ESMF_ClockGetAlarm, ESMF_ClockGetAlarmList
+ use ESMF , only : ESMF_AlarmSet, ESMF_ClockAdvance
+ use ESMF , only : operator(==), operator(+)
+ use ESMF , only : ESMF_AlarmIsCreated, ESMF_LOGMSG_ERROR, ESMF_ClockSet
use NUOPC , only : NUOPC_CompDerive, NUOPC_CompSetEntryPoint, NUOPC_CompSpecialize
use NUOPC , only : NUOPC_CompFilterPhaseMap, NUOPC_CompAttributeGet, NUOPC_CompAttributeSet
+ use NUOPC , only : NUOPC_CompGet, Nuopc_IsAtTime, Nuopc_GetAttribute
use NUOPC_Model , only : model_routine_SS => SetServices
use NUOPC_Model , only : SetVM
use NUOPC_Model , only : model_label_Advance => label_Advance
@@ -1275,8 +1286,6 @@ subroutine clm_orbital_update(clock, logunit, mastertask, eccen, obliqr, lambm0
end subroutine clm_orbital_update
subroutine CheckImport(gcomp, rc)
- use NUOPC
- use ESMF
type(ESMF_GridComp) :: gcomp
integer, intent(out) :: rc
character(len=*) , parameter :: subname = "("//__FILE__//":CheckImport)"
diff --git a/src/cpl/nuopc/lnd_comp_shr.F90 b/src/cpl/nuopc/lnd_comp_shr.F90
index dd619c7648..8dc9738f7a 100644
--- a/src/cpl/nuopc/lnd_comp_shr.F90
+++ b/src/cpl/nuopc/lnd_comp_shr.F90
@@ -2,7 +2,7 @@ module lnd_comp_shr
! Model mesh info is here in order to be leveraged by CDEPS in line calls
- use ESMF
+ use ESMF , only : ESMF_Clock, ESMF_Mesh
use shr_kind_mod, only : r8 => shr_kind_r8, cl=>shr_kind_cl
implicit none
diff --git a/src/cpl/share_esmf/FireDataBaseType.F90 b/src/cpl/share_esmf/FireDataBaseType.F90
index 40d5f3c260..42bb874812 100644
--- a/src/cpl/share_esmf/FireDataBaseType.F90
+++ b/src/cpl/share_esmf/FireDataBaseType.F90
@@ -7,7 +7,7 @@ module FireDataBaseType
! module for handling of fire data
!
! !USES:
- use ESMF
+ use ESMF , only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT
use dshr_strdata_mod , only : shr_strdata_type
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_CL
use shr_log_mod , only : errMsg => shr_log_errMsg
diff --git a/src/cpl/share_esmf/SoilMoistureStreamMod.F90 b/src/cpl/share_esmf/SoilMoistureStreamMod.F90
index d5ef28f924..a93f413e7a 100644
--- a/src/cpl/share_esmf/SoilMoistureStreamMod.F90
+++ b/src/cpl/share_esmf/SoilMoistureStreamMod.F90
@@ -7,7 +7,7 @@ module SoilMoistureStreamMod
! Read in soil moisture from data stream
!
! !USES:
- use ESMF
+ use ESMF , only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT, ESMF_SUCCESS
use dshr_strdata_mod , only : shr_strdata_type, shr_strdata_print
use dshr_strdata_mod , only : shr_strdata_init_from_inline, shr_strdata_advance
use dshr_methods_mod , only : dshr_fldbun_getfldptr
diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90
index cc48bf4833..6a6f982438 100644
--- a/src/cpl/share_esmf/UrbanTimeVarType.F90
+++ b/src/cpl/share_esmf/UrbanTimeVarType.F90
@@ -5,7 +5,7 @@ module UrbanTimeVarType
! Urban Time Varying Data
!
! !USES:
- use ESMF
+ use ESMF , only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT
use dshr_strdata_mod, only : shr_strdata_type
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_CL
use shr_log_mod , only : errMsg => shr_log_errMsg
diff --git a/src/cpl/share_esmf/ch4FInundatedStreamType.F90 b/src/cpl/share_esmf/ch4FInundatedStreamType.F90
index 0d78bd6469..2bebf30062 100644
--- a/src/cpl/share_esmf/ch4FInundatedStreamType.F90
+++ b/src/cpl/share_esmf/ch4FInundatedStreamType.F90
@@ -7,7 +7,7 @@ module ch4FInundatedStreamType
! Contains methods for reading in finundated streams file for methane code.
!
! !USES
- use ESMF
+ use ESMF , only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT
use dshr_strdata_mod , only : shr_strdata_type
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl
use shr_log_mod , only : errMsg => shr_log_errMsg
diff --git a/src/cpl/share_esmf/laiStreamMod.F90 b/src/cpl/share_esmf/laiStreamMod.F90
index a44f0b7198..3966488e0b 100644
--- a/src/cpl/share_esmf/laiStreamMod.F90
+++ b/src/cpl/share_esmf/laiStreamMod.F90
@@ -7,7 +7,7 @@ module laiStreamMod
! Read LAI from stream
!
! !USES:
- use ESMF
+ use ESMF , only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_CL, CS => shr_kind_CS
use dshr_strdata_mod , only : shr_strdata_type
use decompMod , only : bounds_type
diff --git a/src/cpl/share_esmf/lnd_set_decomp_and_domain.F90 b/src/cpl/share_esmf/lnd_set_decomp_and_domain.F90
index c3556193a7..d1d29672b3 100644
--- a/src/cpl/share_esmf/lnd_set_decomp_and_domain.F90
+++ b/src/cpl/share_esmf/lnd_set_decomp_and_domain.F90
@@ -1,6 +1,9 @@
module lnd_set_decomp_and_domain
- use ESMF
+ use ESMF , only : ESMF_VM, ESMF_Mesh, ESMF_DistGrid, ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU
+ use ESMF , only : ESMF_Array, ESMF_ArrayCreate, ESMF_SUCCESS, ESMF_MeshCreate, ESMF_FILEFORMAT_ESMFMESH
+ use ESMF , only : ESMF_MeshGet, ESMF_DistGridGet, ESMF_Grid, ESMF_Field, ESMF_FieldGet, ESMF_FieldCreate, ESMF_FieldDestroy
+ use ESMF , only : ESMF_TYPEKIND_R8, ESMF_MESHLOC_ELEMENT, ESMF_VMAllReduce, ESMF_REDUCE_SUM
use shr_kind_mod , only : r8 => shr_kind_r8, cl=>shr_kind_cl
use shr_sys_mod , only : shr_sys_abort
use shr_log_mod , only : errMsg => shr_log_errMsg
@@ -42,6 +45,7 @@ subroutine lnd_set_decomp_and_domain_from_readmesh(driver, vm, meshfile_lnd, mes
use decompMod , only : gindex_global, bounds_type, get_proc_bounds
use clm_varpar , only : nlevsoi
use clm_varctl , only : use_soil_moisture_streams
+ use ESMF , only : ESMF_DistGridCreate
! input/output variables
character(len=*) , intent(in) :: driver ! cmeps or lilac
@@ -185,8 +189,8 @@ end subroutine lnd_set_decomp_and_domain_from_readmesh
subroutine lnd_set_mesh_for_single_column(scol_lon, scol_lat, mesh, rc)
! Generate a mesh for single column
- use netcdf
use clm_varcon, only : spval
+ use ESMF , only : ESMF_Grid, ESMF_GridCreateNoPeriDimUfrm, ESMF_STAGGERLOC_CENTER, ESMF_STAGGERLOC_CORNER
! input/output variables
real(r8) , intent(in) :: scol_lon
@@ -348,6 +352,12 @@ subroutine lnd_set_lndmask_from_maskmesh(mesh_lnd, mesh_mask, vm, gsize, lndmask
! exist then simply read in the global land fraction and land mask
! from the file
+ ! Uses:
+ use ESMF , only : ESMF_RouteHandle, ESMF_FieldRegridStore, ESMF_FieldRegrid
+ use ESMF , only : ESMF_REGRIDMETHOD_CONSERVE, ESMF_NORMTYPE_DSTAREA, ESMF_UNMAPPEDACTION_IGNORE
+ use ESMF , only : ESMF_TERMORDER_SRCSEQ, ESMF_REGION_TOTAL
+
+
! input/out variables
type(ESMF_Mesh) , intent(in) :: mesh_lnd
type(ESMF_Mesh) , intent(in) :: mesh_mask
@@ -662,6 +672,7 @@ subroutine lnd_set_ldomain_gridinfo_from_mesh(mesh, vm, gindex, begg, endg, isgr
use clm_varcon , only : grlnd
use fileutils , only : getfil
use ncdio_pio , only : ncd_io, file_desc_t, ncd_pio_openfile, ncd_pio_closefile
+ use ESMF , only : ESMF_FieldRegridGetArea
! input/output variables
type(ESMF_Mesh) , intent(in) :: mesh
diff --git a/src/cpl/share_esmf/ndepStreamMod.F90 b/src/cpl/share_esmf/ndepStreamMod.F90
index 1a51382862..b1c9d1a0e5 100644
--- a/src/cpl/share_esmf/ndepStreamMod.F90
+++ b/src/cpl/share_esmf/ndepStreamMod.F90
@@ -7,7 +7,7 @@ module ndepStreamMod
! interpolation.
!
! !USES
- use ESMF
+ use ESMF , only : ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU, ESMF_Finalize, ESMF_END_ABORT
use dshr_strdata_mod , only : shr_strdata_type
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl, CS => shr_kind_cs
use spmdMod , only : mpicom, masterproc, iam
diff --git a/src/utils/clm_time_manager.F90 b/src/utils/clm_time_manager.F90
index bbf3d8bb29..492dfb3a75 100644
--- a/src/utils/clm_time_manager.F90
+++ b/src/utils/clm_time_manager.F90
@@ -6,7 +6,11 @@ module clm_time_manager
use spmdMod , only: masterproc
use clm_varctl , only: iulog
use clm_varcon , only: isecspday
- use ESMF
+ use ESMF , only: ESMF_Clock, ESMF_Calendar, ESMF_MAXSTR, ESMF_Time, ESMF_TimeInterval
+ use ESMF , only: ESMF_TimeIntervalSet, ESMF_TimeSet, ESMF_TimeGet, ESMF_ClockGet
+ use ESMF , only: operator(==), operator(+), operator(<=), operator(>=)
+ use ESMF , only: operator(>), operator(<), operator(-)
+ use ESMF , only: ESMF_KIND_I8, ESMF_TimeIntervalGet
implicit none
private
@@ -245,6 +249,8 @@ subroutine init_clock( start_date, ref_date, curr_date )
!---------------------------------------------------------------------------------
! Purpose: Initialize the clock based on the start_date, ref_date and curr_date
!
+ use ESMF , only : ESMF_ClockCreate, ESMF_ClockAdvance
+
type(ESMF_Time), intent(in) :: start_date ! start date for run
type(ESMF_Time), intent(in) :: ref_date ! reference date for time coordinate
type(ESMF_Time), intent(in) :: curr_date ! current date (equal to start_date)
@@ -553,6 +559,8 @@ subroutine init_calendar( )
!---------------------------------------------------------------------------------
! Initialize calendar
+ use ESMF , only : ESMF_CalKind_Flag, ESMF_CALKIND_NOLEAP
+ use ESMF , only : ESMF_CALKIND_GREGORIAN, ESMF_CalendarCreate
!
! Local variables
!
@@ -652,6 +660,7 @@ end subroutine timemgr_print
subroutine advance_timestep()
! Increment the timestep number.
+ use ESMF , only : ESMF_ClockAdvance
character(len=*), parameter :: sub = 'clm::advance_timestep'
integer :: rc
@@ -1782,6 +1791,7 @@ end subroutine timemgr_datediff
!=========================================================================================
subroutine chkrc(rc, mes)
+ use ESMF , only : ESMF_SUCCESS
integer, intent(in) :: rc ! return code from time management library
character(len=*), intent(in) :: mes ! error message
if ( rc == ESMF_SUCCESS ) return
@@ -1886,6 +1896,7 @@ subroutine timemgr_reset()
! does not explicitly initialize all variables).
!
! !USES:
+ use ESMF , only : ESMF_ClockDestroy
!
! !ARGUMENTS:
!
@@ -1963,6 +1974,7 @@ subroutine for_test_set_curr_date(yr, mon, day, tod)
! *** Should only be used in unit tests!!! ***
!
! !USES:
+ use ESMF , only : ESMF_ClockSet
!
! !ARGUMENTS:
integer, intent(in) :: yr ! year