Skip to content

Commit

Permalink
Merge pull request #2039 from jedwards4b/data_assimilation_to_fortran…
Browse files Browse the repository at this point in the history
…_try1

Data assimilation to fortran try1

Separate DATA_ASSIMILATION flag by component and add to Fortran infodata.
Components can now query infodata for the flag data_assimilation_xxx where xxx is one of
(cpl, atm, ocn, wav, glc, ice, rof, lnd)
Removes variable PAUSE_COMPONENT_LIST
Note that while this brings the appropriate signals into CIME, no components yet test for their presence at the appropriate times. These tests will be part of future PRs.

Supersedes #2028
Test suite: scripts_regression_tests.py
Test baseline: NA
Test namelist changes: XML variable PAUSE_COMPONENT_LIST eliminated
namelist variable pause_component_list eliminated
XML variables DATA_ASSIMILATION_XXX added for XXX = [ CPL, ATM, OCN, WAV, GLC, ICE, ROF, LND ]
namelist variables data_assimilation_xxx added for xxx = [ cpl, atm, ocn, wav, glc, ice, rof, lnd ]
Test status: bit for bit

Partially fixes #1980
This PR will close #1980 and new issues to address the remaining requests.

User interface changes?:

Update gh-pages html (Y/N)?:

Code review: @gold2718
  • Loading branch information
jgfouca authored Nov 14, 2017
2 parents 3915cfd + cf21125 commit d2ad414
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 104 deletions.
14 changes: 1 addition & 13 deletions driver-mct/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,8 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):

# Set up the pause_component_list if pause is active
pauseo = case.get_value('PAUSE_OPTION')
if pauseo != 'never' and pauseo != 'none':
if pauseo is not None and pauseo != 'never' and pauseo != 'none':
pausen = case.get_value('PAUSE_N')
pcl = nmlgen.get_default('pause_component_list')
nmlgen.add_default('pause_component_list', pcl)
# Check to make sure pause_component_list is valid
pcl = nmlgen.get_value('pause_component_list')
if pcl != 'none' and pcl != 'all':
pause_comps = pcl.split(':')
comp_classes = case.get_values("COMP_CLASSES")
for comp in pause_comps:
expect(comp == 'drv' or comp.upper() in comp_classes,
"Invalid PAUSE_COMPONENT_LIST, {} is not a valid component type".format(comp))
# End for
# End if
# Set esp interval
if 'nstep' in pauseo:
esp_time = mindt
Expand Down
41 changes: 18 additions & 23 deletions driver-mct/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -381,21 +381,6 @@
</desc>
</entry>

<entry id="PAUSE_COMPONENT_LIST">
<type>char</type>
<default_value>none</default_value>
<values match="last">
<value compset="_DESP">cpl</value>
</values>
<group>run_begin_stop_restart</group>
<file>env_run.xml</file>
<desc>
A colon-separated list of components to receive pause and resume signals
A value of 'all' means all components will pause and resume
A value of 'none' means that no components will pause or resume
</desc>
</entry>

<entry id="BARRIER_N">
<type>char</type>
<default_value>1</default_value>
Expand Down Expand Up @@ -424,13 +409,13 @@
<group>run_begin_stop_restart</group>
<file>env_run.xml</file>
<desc>
ESP component runs after driver 'pause cycle'
If any component 'pauses' (see PAUSE_OPTION, PAUSE_N and
PAUSE_COMPONENT_LIST XML variables), the ESP component (if
present) will be run to process the component 'pause' (restart)
files and set any required 'resume' signals.
If true, esp_cpl_dt and esp_cpl_offset settings are ignored.
default: false
ESP component runs after driver 'pause cycle' If any component
'pauses' (see PAUSE_OPTION,
PAUSE_N and DATA_ASSIMILATION XML variables),
the ESP component (if present) will be run to process the
component 'pause' (restart) files and set any required 'resume'
signals. If true, esp_cpl_dt and esp_cpl_offset settings are
ignored. default: false
</desc>
</entry>

Expand Down Expand Up @@ -2583,11 +2568,21 @@
<entry id="DATA_ASSIMILATION">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<group>external_tools</group>
<file>env_run.xml</file>
<desc> Run the external tool pointed to by DATA_ASSIMILATION_SCRIPT after the model run completes </desc>
<values>
<value compclass="ATM">FALSE</value>
<value compclass="CPL">FALSE</value>
<value compclass="OCN">FALSE</value>
<value compclass="WAV">FALSE</value>
<value compclass="GLC">FALSE</value>
<value compclass="ICE">FALSE</value>
<value compclass="ROF">FALSE</value>
<value compclass="LND">FALSE</value>
</values>
</entry>

<entry id="DATA_ASSIMILATION_CYCLES">
<type>integer</type>
<valid_values></valid_values>
Expand Down
7 changes: 7 additions & 0 deletions driver-mct/cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,11 @@
<lname>2000_XATM_XLND_XICE_XOCN_XROF_XGLC_XWAV</lname>
</compset>

<entries>
<entry id="DATA_ASSIMILATION_CPL">
<values match="last">
<value compset="DESP">TRUE</value>
</values>
</entry>
</entries>
</compsets>
124 changes: 103 additions & 21 deletions driver-mct/cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1643,13 +1643,13 @@
<category>time</category>
<group>seq_timemgr_inparm</group>
<desc>
true => ESP component runs after driver 'pause cycle'
If any component 'pauses' (see PAUSE_OPTION, PAUSE_N and
PAUSE_COMPONENT_LIST XML variables), the ESP component (if
present) will be run to process the component 'pause' (restart)
files and set any required 'resume' signals.
If true, esp_cpl_dt and esp_cpl_offset settings are ignored.
default: true
true => ESP component runs after driver 'pause cycle' If any
component 'pauses' (see PAUSE_OPTION,
PAUSE_N and DATA_ASSIMILATION_XXX XML
variables), the ESP component (if present) will be run to
process the component 'pause' (restart) files and set any
required 'resume' signals. If true, esp_cpl_dt and
esp_cpl_offset settings are ignored. default: true
</desc>
<values>
<value>.true.</value>
Expand Down Expand Up @@ -2059,20 +2059,6 @@
</values>
</entry>

<entry id="pause_component_list" modify_via_xml="PAUSE_COMPONENT_LIST" skip_default_entry="true">
<type>char</type>
<category>time</category>
<group>seq_timemgr_inparm</group>
<desc>
A colon-separated list of component types (e.g., ocn,atm) to receive a
resume signal after a pause has happened. Special values "all" or "none"
may be used in place of a list
</desc>
<values>
<value>$PAUSE_COMPONENT_LIST</value>
</values>
</entry>

<entry id="logfilepostfix">
<type>char</type>
<category>driver</category>
Expand Down Expand Up @@ -3934,4 +3920,100 @@
</values>
</entry>

<entry id="data_assimilation_atm" modify_via_xml="DATA_ASSIMILATION_ATM">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component atm
</desc>
<values>
<value>$DATA_ASSIMILATION_ATM</value>
</values>
</entry>

<entry id="data_assimilation_cpl" modify_via_xml="DATA_ASSIMILATION_CPL">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component CPL
</desc>
<values>
<value>$DATA_ASSIMILATION_CPL</value>
</values>
</entry>

<entry id="data_assimilation_ocn" modify_via_xml="DATA_ASSIMILATION_OCN">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component ocn
</desc>
<values>
<value>$DATA_ASSIMILATION_OCN</value>
</values>
</entry>

<entry id="data_assimilation_wav" modify_via_xml="DATA_ASSIMILATION_WAV">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component wav
</desc>
<values>
<value>$DATA_ASSIMILATION_WAV</value>
</values>
</entry>

<entry id="data_assimilation_glc" modify_via_xml="DATA_ASSIMILATION_GLC">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component glc
</desc>
<values>
<value>$DATA_ASSIMILATION_GLC</value>
</values>
</entry>

<entry id="data_assimilation_rof" modify_via_xml="DATA_ASSIMILATION_ROF">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component rof
</desc>
<values>
<value>$DATA_ASSIMILATION_ROF</value>
</values>
</entry>

<entry id="data_assimilation_ice" modify_via_xml="DATA_ASSIMILATION_ICE">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component ice
</desc>
<values>
<value>$DATA_ASSIMILATION_ICE</value>
</values>
</entry>

<entry id="data_assimilation_lnd" modify_via_xml="DATA_ASSIMILATION_LND">
<type>logical</type>
<category>data_assimilation</category>
<group>seq_timemgr_inparm</group>
<desc>
Whether Data Assimilation is on for component lnd
</desc>
<values>
<value>$DATA_ASSIMILATION_LND</value>
</values>
</entry>

</entry_id>
2 changes: 1 addition & 1 deletion driver-mct/shr/seq_infodata_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
! !REVISION HISTORY:
! 2005-Nov-11 - E. Kluzek - creation of shr_inputinfo_mod
! 2007-Nov-15 - T. Craig - refactor for ccsm4 system and move to seq_infodata_mod
! 2016-Dec-08 - R. Montuoro - updated for multiple coupler instances
! 2016-Dec-08 - R. Montuoro - updated for multiple driver instances
!
! !INTERFACE: ------------------------------------------------------------------

Expand Down
Loading

0 comments on commit d2ad414

Please sign in to comment.