diff --git a/cime_config/config_component_cesm.xml b/cime_config/config_component_cesm.xml
index cfcdc12ef..048a90598 100644
--- a/cime_config/config_component_cesm.xml
+++ b/cime_config/config_component_cesm.xml
@@ -466,37 +466,6 @@
-
- char
- none,never,nsteps,nseconds,nminutes,nhours,ndays,nmonths,nyears,date,end
- never
-
- nmonths
-
- med_history
- env_run.xml
- Sets mediator average history file frequency (like REST_OPTION)
-
-
- char
-
- -999
-
- 1
-
- med_history
- env_run.xml
- Sets mediator average history file frequency (like REST_N)
-
-
- integer
-
- -999
- med_history
- env_run.xml
- yyyymmdd format, sets mediator average history date (like REST_DATE)
-
-
logical
TRUE,FALSE
diff --git a/cime_config/namelist_definition_drv.xml b/cime_config/namelist_definition_drv.xml
index e35ff537d..0117f99a0 100644
--- a/cime_config/namelist_definition_drv.xml
+++ b/cime_config/namelist_definition_drv.xml
@@ -1765,6 +1765,71 @@
+
+
+ logical
+ aux_hist
+ MED_attributes
+ Auxiliary mediator ocn2med average history output every day.
+
+ .false.
+
+
+
+ char
+ aux_hist
+ MED_attributes
+ Auxiliary mediator ocn2med average history output every day.
+
+ So_bldepth:So_t:So_u:So_v
+
+
+
+ char
+ aux_hist
+ MED_attributes
+ history option type
+
+ ndays
+
+
+
+ char
+ aux_hist
+ MED_attributes
+ history option type
+
+ 1
+
+
+
+ logical
+ aux_hist
+ MED_attributes
+ If true, use time average for aux file output.
+
+ .true.
+
+
+
+ char
+ aux_hist
+ MED_attributes
+ Auxiliary name identifier in history name
+
+ ocn.24h.avg
+
+
+
+ integer
+ aux_hist
+ MED_attributes
+ Number of time sames per file.
+
+ 30
+
+
+
char
time
diff --git a/cime_config/runseq/driver_config.py b/cime_config/runseq/driver_config.py
index e5fe2715d..9694c7503 100644
--- a/cime_config/runseq/driver_config.py
+++ b/cime_config/runseq/driver_config.py
@@ -132,7 +132,8 @@ def __compute_ocn(self, case, coupling_times):
# TODO: check of data model prognostic flag is on - this is a new xml variable
# If the prognostic flag is on, then should set med_to_wav to True
docn_mode = case.get_value("DOCN_MODE")
- med_to_ocn = ('som' in docn_mode or 'interannual' in docn_mode)
+ docn_import_fields = case.get_value("DOCN_IMPORT_FIELDS")
+ med_to_ocn = ('som' in docn_mode or 'interannual' in docn_mode or docn_import_fields != 'none')
return (run_ocn, med_to_ocn, coupling_times["ocn_cpl_dt"])
diff --git a/cime_config/runseq/runseq_general.py b/cime_config/runseq/runseq_general.py
index 2b7f0cc0a..ddbfca598 100644
--- a/cime_config/runseq/runseq_general.py
+++ b/cime_config/runseq/runseq_general.py
@@ -94,7 +94,7 @@ def gen_runseq(case, coupling_times):
runseq.add_action("MED med_phases_aofluxes_run" , run_ocn and run_atm and (med_to_ocn or med_to_atm))
runseq.add_action("MED med_phases_prep_ocn_accum" , med_to_ocn)
runseq.add_action("MED med_phases_ocnalb_run" , (run_ocn and run_atm and (med_to_ocn or med_to_atm)) and not xcompset)
- runseq.add_action("MED med_phases_diag_ocn" , run_ocn and diag_mode)
+ runseq.add_action("MED med_phases_diag_ocn" , run_ocn and diag_mode)
if (cpl_seq_option == 'OPTION1'):
if ocn_cpl_time != atm_cpl_time:
@@ -104,11 +104,17 @@ def gen_runseq(case, coupling_times):
if ocn_cpl_time != atm_cpl_time:
runseq.leave_time_loop(inner_loop, addextra_atsign=True)
+ if (cpl_seq_option == 'TIGHT'):
+ runseq.add_action("MED med_phases_aofluxes_run" , med_to_ocn)
+ runseq.add_action("MED med_phases_prep_ocn_accum" , med_to_ocn)
+ runseq.add_action("MED med_phases_prep_ocn_avg" , med_to_ocn and ocn_outer_loop)
+ runseq.add_action("MED -> OCN :remapMethod=redist", med_to_ocn and ocn_outer_loop)
+
runseq.add_action("MED med_phases_prep_lnd" , med_to_lnd)
runseq.add_action("MED -> LND :remapMethod=redist" , med_to_lnd)
- runseq.add_action("MED med_phases_prep_ice" , med_to_ice)
- runseq.add_action("MED -> ICE :remapMethod=redist" , med_to_ice)
+ runseq.add_action("MED med_phases_prep_ice" , med_to_ice)
+ runseq.add_action("MED -> ICE :remapMethod=redist" , med_to_ice)
runseq.add_action("MED med_phases_prep_wav_accum" , med_to_wav)
runseq.add_action("MED med_phases_prep_wav_avg" , med_to_wav)
diff --git a/mediator/med_phases_prep_ocn_mod.F90 b/mediator/med_phases_prep_ocn_mod.F90
index b8b4f2fa6..9bae344c9 100644
--- a/mediator/med_phases_prep_ocn_mod.F90
+++ b/mediator/med_phases_prep_ocn_mod.F90
@@ -372,7 +372,6 @@ subroutine med_phases_prep_ocn_custom_cesm(gcomp, rc)
rc = ESMF_SUCCESS
- call t_startf('MED:'//subname)
if (dbug_flag > 20) then
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
end if
@@ -383,6 +382,13 @@ subroutine med_phases_prep_ocn_custom_cesm(gcomp, rc)
call ESMF_GridCompGetInternalState(gcomp, is_local, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
+ ! Check that the necessary export field is present
+ if ( .not. FB_fldchk(is_local%wrap%FBExp(compocn), 'Foxx_swnet', rc=rc)) then
+ return
+ end if
+
+ call t_startf('MED:'//subname)
+
!---------------------------------------
! Compute netsw for ocean
!---------------------------------------