Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New docn features and update to documentation #213

Merged
merged 11 commits into from
Feb 1, 2023
24 changes: 12 additions & 12 deletions datm/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
CLMCRUNCEPv7, CLMGSWP3v1, CLMNLDAS2 and 1PT are modes using observational data for forcing prognostic land components.
WARNING for CLMNLDAS2: This is a regional forcing dataset over the U.S. (25-53N, 235-293E). Garbage data will be produced for runs extending beyond this regional domain. </desc>
<values match="last">
<value compset="%NYF">CORE2_NYF</value>
<value compset="%IAF">CORE2_IAF</value>
<value compset="%JRA">CORE_IAF_JRA</value>
<value compset="%JRA-1p4-2018">CORE_IAF_JRA_1p4_2018</value>
<value compset="%QIA">CLM_QIAN</value>
<value compset="%WISOQIA">CLM_QIAN_WISO</value>
<value compset="%CRUv7">CLMCRUNCEPv7</value>
<value compset="%GSWP3v1">CLMGSWP3v1</value>
<value compset="%NLDAS2">CLMNLDAS2</value>
<value compset="%1PT">1PT</value>
<value compset="%CPLHIST">CPLHIST</value>
<value compset="%ERA5">ERA5</value>
<value compset="DATM%NYF">CORE2_NYF</value>
<value compset="DATM%IAF">CORE2_IAF</value>
<value compset="DATM%JRA">CORE_IAF_JRA</value>
<value compset="DATM%JRA-1p4-2018">CORE_IAF_JRA_1p4_2018</value>
<value compset="DATM%QIA">CLM_QIAN</value>
<value compset="DATM%WISOQIA">CLM_QIAN_WISO</value>
<value compset="DATM%CRUv7">CLMCRUNCEPv7</value>
<value compset="DATM%GSWP3v1">CLMGSWP3v1</value>
<value compset="DATM%NLDAS2">CLMNLDAS2</value>
<value compset="DATM%1PT">1PT</value>
<value compset="DATM%ERA5">ERA5</value>
<value compset="DATM%CPLHIST">CPLHIST</value>
</values>
</entry>

Expand Down
10 changes: 6 additions & 4 deletions docn/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
project(docn Fortran)
set(SRCFILES ocn_comp_nuopc.F90
docn_datamode_copyall_mod.F90
docn_datamode_som_mod.F90
docn_datamode_aquaplanet_mod.F90
docn_datamode_iaf_mod.F90)
docn_datamode_copyall_mod.F90
docn_datamode_som_mod.F90
docn_datamode_aquaplanet_mod.F90
docn_datamode_iaf_mod.F90
docn_datamode_cplhist_mod.F90
docn_import_data_mod.F90)

foreach(FILE ${SRCFILES})
if(EXISTS "${CASEROOT}/SourceMods/src.docn/${FILE}")
Expand Down
53 changes: 51 additions & 2 deletions docn/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
This file may have ocn desc entries.
-->
<description modifier_mode="1">
<desc ocn="DOCN[%DOM][%SOM][%SOMAQP][%IAF][%SST_AQUAP][%AQP1][%AQP2][%AQP3][%AQP4][%AQP5][%AQP6][%AQP7][%AQP8][%AQP9][%AQP10][%AQPFILE][%AQPCONST]">DOCN </desc>
<desc ocn="DOCN[%DOM][%SOM][%SOMAQP][%IAF][%SST_AQUAP][%AQP1][%AQP2][%AQP3][%AQP4][%AQP5][%AQP6][%AQP7][%AQP8][%AQP9][%AQP10][%AQPFILE][%AQPCONST][%CPLHIST]">DOCN </desc>
<desc option="DOM"> prescribed ocean mode</desc>
<desc option="SOM"> slab ocean mode</desc>
<desc option="SOMAQP"> aquaplanet slab ocean mode</desc>
Expand All @@ -31,6 +31,7 @@
<desc option="AQP10"> analytic aquaplanet sst - option 10</desc>
<desc option="AQPFILE"> file input aquaplanet sst </desc>
<desc option="AQPCONST"> globally constant SST for idealized experiments, such as RCE </desc>
<desc option="CPLHIST"> mediator history output for ocean fields imported to mediator </desc>
</description>

<entry id="COMP_OCN">
Expand All @@ -44,7 +45,7 @@

<entry id="DOCN_MODE">
<type>char</type>
<valid_values>prescribed,sst_aquap1,sst_aquap2,sst_aquap3,sst_aquap4,sst_aquap5,sst_aquap6,sst_aquap7,sst_aquap8,sst_aquap9,sst_aquap10,sst_aquapfile,som,som_aquap,sst_aquap_constant,interannual,null</valid_values>
<valid_values>prescribed,sst_aquap1,sst_aquap2,sst_aquap3,sst_aquap4,sst_aquap5,sst_aquap6,sst_aquap7,sst_aquap8,sst_aquap9,sst_aquap10,sst_aquapfile,som,som_aquap,sst_aquap_constant,interannual,cplhist</valid_values>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is null no longer a valid option?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You never needed null - and it made no sense to have it there. So it is no longer a valid option.

<default_value>prescribed</default_value>
<values match="last">
<value compset="_DOCN%DOM_" >prescribed</value>
Expand All @@ -63,6 +64,7 @@
<value compset="_DOCN%AQP10_">sst_aquap10</value>
<value compset="_DOCN%AQPFILE_">sst_aquapfile</value>
<value compset="_DOCN%AQPCONST_">sst_aquap_constant</value>
<value compset="_DOCN%CPLHIST">cplhist</value>
</values>
<group>run_component_docn</group>
<file>env_run.xml</file>
Expand Down Expand Up @@ -249,6 +251,45 @@
This is only used when DOCN_MODE=prescribed.</desc>
</entry>

<entry id="DOCN_CPLHIST_YR_ALIGN">
<type>integer</type>
<valid_values></valid_values>
<default_value>1</default_value>
<group>run_component_docn</group>
<file>env_run.xml</file>
<desc>
Simulation year corresponding to DOCN_CPLHIST_YR_START. A common usage
is to set this to RUN_STARTDATE. With this setting, the forcing
in the first year of the run will be the forcing of year
DOCN_CPLHIST_YR_START. Another use case is to align the calendar
of transient forcing with the model calendar. For example,
setting DOCN_CPLHIST_YR_ALIGN=DOCN_CPLHIST_YR_START will lead to
the forcing calendar being the same as the model calendar. The
forcing for a given model year would be the forcing of the same
year. This would be appropriate in transient runs where the
model calendar is setup to span the same year range as the
forcing data.
</desc>
</entry>

<entry id="DOCN_CPLHIST_YR_START">
<type>integer</type>
<valid_values></valid_values>
<default_value>1</default_value>
<group>run_component_docn</group>
<file>env_run.xml</file>
<desc>starting year to loop data over</desc>
</entry>

<entry id="DOCN_CPLHIST_YR_END">
<type>integer</type>
<valid_values></valid_values>
<default_value>1</default_value>
<group>run_component_docn</group>
<file>env_run.xml</file>
<desc>ending year to loop data over</desc>
</entry>

<entry id="DOCN_SKIP_RESTART_READ">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
Expand All @@ -259,6 +300,14 @@
</desc>
</entry>

<entry id="DOCN_IMPORT_FIELDS">
<type>char</type>
<default_value>none</default_value>
<group>run_component_docn</group>
<file>env_run.xml</file>
<desc>none or colon deliminted string of import fields that DOCN will advertise</desc>
</entry>

<help>
=========================================
DOCN naming conventions
Expand Down
65 changes: 39 additions & 26 deletions docn/cime_config/namelist_definition_docn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<category>streams</category>
<group>streams_file</group>
<desc>
List of streams that docn supports.
The following are supported: prescribed, aquapfile, som, som_aquqp, interannual, and blank.
The streamslist
List of streams for a given docn_mode value. Each docn_mode can
have zero or more streams that are associated with it.
</desc>
<values>
<value docn_mode="prescribed">prescribed</value>
<value docn_mode="interannual">interannual</value>
<value docn_mode="som_aquap">som_aquap</value>
<value docn_mode="som">som</value>
<value docn_mode="cplhist">cplhist</value>
<value docn_mode="sst_aquap_file">aquapfile</value>
<value docn_mode="sst_aquap_constant">''</value>
<value docn_mode="sst_aquap1">''</value>
Expand All @@ -39,9 +39,9 @@
<type>char</type>
<category>docn</category>
<group>docn_nml</group>
<valid_values>sstdata,sst_aquap1,sst_aquap2,sst_aquap3,sst_aquap4,sst_aquap5,sst_aquap6,sst_aquap7,sst_aquap8,sst_aquap9,sst_aquap10,sst_aquapfile,sst_aquap_constant,som,som_aquap,iaf</valid_values>
<valid_values>sstdata,sst_aquap1,sst_aquap2,sst_aquap3,sst_aquap4,sst_aquap5,sst_aquap6,sst_aquap7,sst_aquap8,sst_aquap9,sst_aquap10,sst_aquapfile,sst_aquap_constant,som,som_aquap,iaf,cplhist</valid_values>
<desc>
General method that operates on the data.
General method that operates on the data for a given docn_mode.
==> dataMode = "sstdata"
sstdata mode assumes the only field in the input stream is SST.
It also assumes the SST is in Celsius and must be converted to Kelvin.
Expand Down Expand Up @@ -72,21 +72,21 @@
application. A tool is available to derive valid SOM forcing.

(1) map the xml variable DOCN_MODE => config variable docn_mode => namelist variable datamode
compset="_DOCN%DOM_" => docn_mode=prescribed => datamode=prescribed
compset="_DOCN%IAF_" => docn_mode=interannual => datamode=interannual
compset="_DOCN%SOM_" => docn_mode=som => datamode=som
compset="_DOCN%SOMAQP_" => docn_mode=som_aquap => datamode=som_aquap
compset="_DOCN%AQP1_" => docn_mode=sst_aquap1 => datamode=sst_aquap1
compset="_DOCN%AQP2_" => docn_mode=sst_aquap2 => datamode=sst_aquap2
compset="_DOCN%AQP3_" => docn_mode=sst_aquap3 => datamode=sst_aquap3
compset="_DOCN%AQP4_" => docn_mode=sst_aquap4 => datamode=sst_aquap4
compset="_DOCN%AQP5_" => docn_mode=sst_aquap5 => datamode=sst_aquap5
compset="_DOCN%AQP6_" => docn_mode=sst_aquap6 => datamode=sst_aquap6
compset="_DOCN%AQP7_" => docn_mode=sst_aquap7 => datamode=sst_aquap7
compset="_DOCN%AQP8_" => docn_mode=sst_aquap8 => datamode=sst_aquap8
compset="_DOCN%AQP9_" => docn_mode=sst_aquap9 => datamode=sst_aquap9
compset="_DOCN%AQP10_" => docn_mode=sst_aquap10 => datamode=sst_aquap10
compset="_DOCN%AQPFILE_" => docn_mode=sst_aquapfile => datamode=sst_aquap_file
compset="_DOCN%DOM_" => docn_mode=prescribed => datamode=prescribed
compset="_DOCN%IAF_" => docn_mode=interannual => datamode=interannual
compset="_DOCN%SOM_" => docn_mode=som => datamode=som
compset="_DOCN%SOMAQP_" => docn_mode=som_aquap => datamode=som_aquap
compset="_DOCN%AQP1_" => docn_mode=sst_aquap1 => datamode=sst_aquap1
compset="_DOCN%AQP2_" => docn_mode=sst_aquap2 => datamode=sst_aquap2
compset="_DOCN%AQP3_" => docn_mode=sst_aquap3 => datamode=sst_aquap3
compset="_DOCN%AQP4_" => docn_mode=sst_aquap4 => datamode=sst_aquap4
compset="_DOCN%AQP5_" => docn_mode=sst_aquap5 => datamode=sst_aquap5
compset="_DOCN%AQP6_" => docn_mode=sst_aquap6 => datamode=sst_aquap6
compset="_DOCN%AQP7_" => docn_mode=sst_aquap7 => datamode=sst_aquap7
compset="_DOCN%AQP8_" => docn_mode=sst_aquap8 => datamode=sst_aquap8
compset="_DOCN%AQP9_" => docn_mode=sst_aquap9 => datamode=sst_aquap9
compset="_DOCN%AQP10_" => docn_mode=sst_aquap10 => datamode=sst_aquap10
compset="_DOCN%AQPFILE_" => docn_mode=sst_aquapfile => datamode=sst_aquap_file
compset="_DOCN%AQPCONST_" => docn_mode=sst_aquap_constant => datamode=sst_aquap_constant
</desc>
<values>
Expand All @@ -106,10 +106,11 @@
<value docn_mode="sst_aquap10$">sst_aquap10</value>
<value docn_mode="sst_aquapfile$">sst_aquap_file</value>
<value docn_mode="sst_aquap_constant$">sst_aquap_constant</value>
<value docn_mode="cplhist">cplhist</value>
</values>
</entry>

<entry id="model_meshfile">
<entry id="model_meshfile">
<type>char</type>
<category>streams</category>
<input_pathname>abs</input_pathname>
Expand All @@ -119,11 +120,11 @@
</desc>
<values>
<value>$OCN_DOMAIN_MESH</value>
<value single_column='true'>null</value>
<value single_column='true'>null</value>
</values>
</entry>

<entry id="model_maskfile">
<entry id="model_maskfile">
<type>char</type>
<category>streams</category>
<input_pathname>abs</input_pathname>
Expand All @@ -134,7 +135,7 @@
<values>
<value>$MASK_MESH</value>
<value aqua_planet="true">$ATM_DOMAIN_MESH</value>
<value single_column='true'>null</value>
<value single_column='true'>null</value>
</values>
</entry>

Expand All @@ -147,7 +148,7 @@
</desc>
<values>
<value>$OCN_NX</value>
<value single_column='true'>1</value>
<value single_column='true'>1</value>
</values>
</entry>

Expand All @@ -160,7 +161,7 @@
</desc>
<values>
<value>$OCN_NY</value>
<value single_column='true'>1</value>
<value single_column='true'>1</value>
</values>
</entry>

Expand Down Expand Up @@ -203,4 +204,16 @@
</values>
</entry>

<entry id="import_data_fields" modify_via_xml="DOCN_IMPORT_FIELDS">
<type>char</type>
<category>docn</category>
<group>docn_nml</group>
<desc>
Colon delimited set of fields to advertise as import data
</desc>
<values>
<value>$DOCN_IMPORT_FIELDS</value>
</values>
</entry>

</entry_id>
43 changes: 38 additions & 5 deletions docn/cime_config/stream_definition_docn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<stream_data version="2.0" xmlns:xi="http://www.w3.org/2001/XInclude">

<stream_entry name="prescribed">
<stream_entry name="prescribed">
<stream_meshfile >
<meshfile>$SSTICE_MESH_FILENAME</meshfile>
</stream_meshfile>
Expand Down Expand Up @@ -35,7 +35,7 @@
<stream_readmode>single</stream_readmode>
</stream_entry>

<stream_entry name="interannual">
<stream_entry name="interannual">
<stream_meshfile>
<meshfile >$DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_1x1_clim_c101029_ESMFmesh_120520.nc</meshfile>
</stream_meshfile>
Expand Down Expand Up @@ -66,7 +66,7 @@
<stream_readmode>single</stream_readmode>
</stream_entry>

<stream_entry name="som">
<stream_entry name="som">
<stream_meshfile>
<meshfile>$DIN_LOC_ROOT/ocn/docn7/SOM/pop_frc.1x1d.SCRIP.030620_ESMFmesh.nc</meshfile>
</stream_meshfile>
Expand Down Expand Up @@ -104,7 +104,7 @@
<stream_readmode>single</stream_readmode>
</stream_entry>

<stream_entry name="som_aquap">
<stream_entry name="som_aquap">
<stream_meshfile>
<meshfile model_grid="_oi%1.9x2.5">$DIN_LOC_ROOT/share/meshes/fv1.9x2.5_141008_ESMFmesh.nc</meshfile>
<meshfile model_grid="_oi%0.9x1.25">$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc</meshfile>
Expand Down Expand Up @@ -144,7 +144,7 @@
<stream_readmode>single</stream_readmode>
</stream_entry>

<stream_entry name="aquapfile">
<stream_entry name="aquapfile">
<stream_meshfile>
<meshfile model_grid="_oi%0.9x1.25">%DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc</meshfile>
</stream_meshfile>
Expand Down Expand Up @@ -175,4 +175,37 @@
<stream_readmode>single</stream_readmode>
</stream_entry>

<stream_entry name="cplhist">
<stream_meshfile>
<meshfile>$OCN_DOMAIN_MESH</meshfile>
</stream_meshfile>
<stream_datafiles>
<file>UNSET</file>
</stream_datafiles>
<stream_datavars>
<var>ocnImp_So_bldepth So_bldepth</var>
<var>ocnImp_So_t So_t</var>
<var>ocnImp_So_u So_u</var>
<var>ocnImp_So_v So_v</var>
</stream_datavars>
<stream_lev_dimname>null</stream_lev_dimname>
<stream_mapalgo>
<mapalgo>bilinear</mapalgo>
</stream_mapalgo>
<stream_vectors>null</stream_vectors>
<stream_year_align>$DOCN_CPLHIST_YR_ALIGN</stream_year_align>
<stream_year_first>$DOCN_CPLHIST_YR_START</stream_year_first>
<stream_year_last>$DOCN_CPLHIST_YR_END</stream_year_last>
<stream_offset>0</stream_offset>
<stream_tintalgo>
<tintalgo>nearest</tintalgo>
</stream_tintalgo>
<stream_taxmode>
<taxmode>extend</taxmode>
</stream_taxmode>
<stream_dtlimit>
<dtlimit>1.e30</dtlimit>
</stream_dtlimit>
<stream_readmode>single</stream_readmode></stream_entry>

</stream_data>
Loading