Skip to content

Commit 89e4ba6

Browse files
author
Mariana Vertenstein
committed
changes needed for CDEP PR ESCOMP#213
1 parent a268235 commit 89e4ba6

File tree

4 files changed

+18
-36
lines changed

4 files changed

+18
-36
lines changed

cime_config/config_component_cesm.xml

-31
Original file line numberDiff line numberDiff line change
@@ -466,37 +466,6 @@
466466
<!-- averaged history frequencies -->
467467
<!-- ===================================================================== -->
468468

469-
<entry id="AVGHIST_OPTION">
470-
<type>char</type>
471-
<valid_values>none,never,nsteps,nseconds,nminutes,nhours,ndays,nmonths,nyears,date,end</valid_values>
472-
<default_value>never</default_value>
473-
<values match="last">
474-
<value compset="_DOCN%IAF">nmonths</value>
475-
</values>
476-
<group>med_history</group>
477-
<file>env_run.xml</file>
478-
<desc>Sets mediator average history file frequency (like REST_OPTION)</desc>
479-
</entry>
480-
<entry id="AVGHIST_N">
481-
<type>char</type>
482-
<valid_values></valid_values>
483-
<default_value>-999</default_value>
484-
<values match="last">
485-
<value compset="_DOCN%IAF">1</value>
486-
</values>
487-
<group>med_history</group>
488-
<file>env_run.xml</file>
489-
<desc>Sets mediator average history file frequency (like REST_N)</desc>
490-
</entry>
491-
<entry id="AVGHIST_DATE">
492-
<type>integer</type>
493-
<valid_values></valid_values>
494-
<default_value>-999</default_value>
495-
<group>med_history</group>
496-
<file>env_run.xml</file>
497-
<desc>yyyymmdd format, sets mediator average history date (like REST_DATE)</desc>
498-
</entry>
499-
500469
<entry id="BUDGETS">
501470
<type>logical</type>
502471
<valid_values>TRUE,FALSE</valid_values>

cime_config/runseq/driver_config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def __compute_ocn(self, case, coupling_times):
132132
# TODO: check of data model prognostic flag is on - this is a new xml variable
133133
# If the prognostic flag is on, then should set med_to_wav to True
134134
docn_mode = case.get_value("DOCN_MODE")
135-
med_to_ocn = ('som' in docn_mode or 'interannual' in docn_mode)
135+
docn_import_fields = case.get_value("DOCN_IMPORT_FIELDS")
136+
med_to_ocn = ('som' in docn_mode or 'interannual' in docn_mode or docn_import_fields != 'none')
136137

137138
return (run_ocn, med_to_ocn, coupling_times["ocn_cpl_dt"])
138139

cime_config/runseq/runseq_general.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def gen_runseq(case, coupling_times):
9494
runseq.add_action("MED med_phases_aofluxes_run" , run_ocn and run_atm and (med_to_ocn or med_to_atm))
9595
runseq.add_action("MED med_phases_prep_ocn_accum" , med_to_ocn)
9696
runseq.add_action("MED med_phases_ocnalb_run" , (run_ocn and run_atm and (med_to_ocn or med_to_atm)) and not xcompset)
97-
runseq.add_action("MED med_phases_diag_ocn" , run_ocn and diag_mode)
97+
runseq.add_action("MED med_phases_diag_ocn" , run_ocn and diag_mode)
9898

9999
if (cpl_seq_option == 'OPTION1'):
100100
if ocn_cpl_time != atm_cpl_time:
@@ -104,11 +104,17 @@ def gen_runseq(case, coupling_times):
104104
if ocn_cpl_time != atm_cpl_time:
105105
runseq.leave_time_loop(inner_loop, addextra_atsign=True)
106106

107+
if (cpl_seq_option == 'TIGHT'):
108+
runseq.add_action("MED med_phases_aofluxes_run" , med_to_ocn)
109+
runseq.add_action("MED med_phases_prep_ocn_accum" , med_to_ocn)
110+
runseq.add_action("MED med_phases_prep_ocn_avg" , med_to_ocn and ocn_outer_loop)
111+
runseq.add_action("MED -> OCN :remapMethod=redist", med_to_ocn and ocn_outer_loop)
112+
107113
runseq.add_action("MED med_phases_prep_lnd" , med_to_lnd)
108114
runseq.add_action("MED -> LND :remapMethod=redist" , med_to_lnd)
109115

110-
runseq.add_action("MED med_phases_prep_ice" , med_to_ice)
111-
runseq.add_action("MED -> ICE :remapMethod=redist" , med_to_ice)
116+
runseq.add_action("MED med_phases_prep_ice" , med_to_ice)
117+
runseq.add_action("MED -> ICE :remapMethod=redist" , med_to_ice)
112118

113119
runseq.add_action("MED med_phases_prep_wav_accum" , med_to_wav)
114120
runseq.add_action("MED med_phases_prep_wav_avg" , med_to_wav)

mediator/med_phases_prep_ocn_mod.F90

+7-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ subroutine med_phases_prep_ocn_custom_cesm(gcomp, rc)
372372

373373
rc = ESMF_SUCCESS
374374

375-
call t_startf('MED:'//subname)
376375
if (dbug_flag > 20) then
377376
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
378377
end if
@@ -383,6 +382,13 @@ subroutine med_phases_prep_ocn_custom_cesm(gcomp, rc)
383382
call ESMF_GridCompGetInternalState(gcomp, is_local, rc)
384383
if (ChkErr(rc,__LINE__,u_FILE_u)) return
385384

385+
! Check that the necessary export field is present
386+
if ( .not. FB_fldchk(is_local%wrap%FBExp(compocn), 'Foxx_swnet', rc=rc)) then
387+
return
388+
end if
389+
390+
call t_startf('MED:'//subname)
391+
386392
!---------------------------------------
387393
! Compute netsw for ocean
388394
!---------------------------------------

0 commit comments

Comments
 (0)