Skip to content

Commit

Permalink
Merge branch 'cbegeman/ocn/mask-time-series-stats-vars' (PR #5325)
Browse files Browse the repository at this point in the history
Mask ocean time series stats variables

This PR applies fill value masking to non-restart time series stats
streams in the ocean component. It also specifies the masking array for
a subset of variables in the Registry.

Fixes #5253

[BFB]
  • Loading branch information
jonbob committed Dec 5, 2022
2 parents 146732c + d0b11ef commit 627683e
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 13 deletions.
6 changes: 6 additions & 0 deletions components/mpas-ocean/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ def buildnml(case, caseroot, compname):
lines.append(' type="output"')
lines.append(' precision="single"')
lines.append(' io_type="{}"'.format(ocn_pio_typename))
lines.append(' useMissingValMask="true"')
lines.append(' filename_template="{}.mpaso.hist.am.timeSeriesStatsDaily.$Y-$M-$D.nc"'.format(casename))
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
Expand Down Expand Up @@ -1112,6 +1113,7 @@ def buildnml(case, caseroot, compname):
else:
lines.append(' io_type="{}"'.format(ocn_pio_typename))

lines.append(' useMissingValMask="true"')
lines.append(' filename_template="{}.mpaso.hist.am.timeSeriesStatsMonthly.$Y-$M-$D.nc"'.format(casename))
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
Expand Down Expand Up @@ -1347,6 +1349,7 @@ def buildnml(case, caseroot, compname):
else:
lines.append(' io_type="{}"'.format(ocn_pio_typename))

lines.append(' useMissingValMask="true"')
lines.append(' filename_template="{}.mpaso.hist.am.timeSeriesStatsMonthlyMax.$Y-$M-$D.nc"'.format(casename))
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
Expand Down Expand Up @@ -1408,6 +1411,7 @@ def buildnml(case, caseroot, compname):
else:
lines.append(' io_type="{}"'.format(ocn_pio_typename))

lines.append(' useMissingValMask="true"')
lines.append(' filename_template="{}.mpaso.hist.am.timeSeriesStatsMonthlyMin.$Y-$M-$D.nc"'.format(casename))
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
Expand Down Expand Up @@ -1465,6 +1469,7 @@ def buildnml(case, caseroot, compname):
lines.append(' type="output"')
lines.append(' precision="single"')
lines.append(' io_type="{}"'.format(ocn_pio_typename))
lines.append(' useMissingValMask="true"')
lines.append(' filename_template="{}.mpaso.hist.am.timeSeriesStatsClimatology.$Y-$M-$D.nc"'.format(casename))
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
Expand All @@ -1479,6 +1484,7 @@ def buildnml(case, caseroot, compname):
lines.append(' type="output"')
lines.append(' precision="single"')
lines.append(' io_type="{}"'.format(ocn_pio_typename))
lines.append(' useMissingValMask="true"')
lines.append(' filename_template="{}.mpaso.hist.am.timeSeriesStatsCustom.$Y-$M-$D.nc"'.format(casename))
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
Expand Down
52 changes: 52 additions & 0 deletions components/mpas-ocean/src/Registry.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
type="output"
mode="forward;analysis"
io_type="pnetcdf"
useMissingValMask="true"
precision="single"
filename_template="analysis_members/mpaso.hist.am.timeSeriesStatsClimatology.$Y-$M-$D.nc"
reference_time="01-01-01_00:00:00"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
type="output"
mode="forward;analysis"
io_type="pnetcdf"
useMissingValMask="true"
precision="single"
filename_template="analysis_members/mpaso.hist.am.timeSeriesStatsCustom.$Y-$M-$D.nc"
reference_time="01-01-01_00:00:00"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
type="output"
mode="forward;analysis"
io_type="pnetcdf"
useMissingValMask="true"
precision="single"
filename_template="analysis_members/mpaso.hist.am.timeSeriesStatsDaily.$Y-$M-$D.nc"
reference_time="01-01-01_00:00:00"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
type="output"
mode="forward;analysis"
io_type="pnetcdf"
useMissingValMask="true"
precision="single"
filename_template="analysis_members/mpaso.hist.am.timeSeriesStatsMonthlyMax.$Y-$M-$D.nc"
filename_interval="00-01-00_00:00:00"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
type="output"
mode="forward;analysis"
io_type="pnetcdf"
useMissingValMask="true"
filename_template="analysis_members/mpaso.hist.am.timeSeriesStatsMonthly.$Y-$M-$D.nc"
filename_interval="00-01-00_00:00:00"
reference_time="01-01-01_00:00:00"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
type="output"
mode="forward;analysis"
io_type="pnetcdf"
useMissingValMask="true"
precision="single"
filename_template="analysis_members/mpaso.hist.am.timeSeriesStatsMonthlyMin.$Y-$M-$D.nc"
filename_interval="00-01-00_00:00:00"
Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/tracer_groups/Registry_CFC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="CFCTracers" dimensions="nVertLevels nCells Time" type="real" packages="CFCTracersPKG" default_value="0.0">
<var_array name="CFCTracers" dimensions="nVertLevels nCells Time" type="real" packages="CFCTracersPKG" default_value="0.0" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="CFC11" array_group="CFCGRP" units="mol m^{-3}"
description="CFC11"
Expand All @@ -63,7 +63,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="CFCTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="CFCTracersPKG">
<var_array name="CFCTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="CFCTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="CFC11Tend" array_group="CFCGRP" units="mol m^{-3} s^{-1}"
description="CFC11 Tendency"
Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/tracer_groups/Registry_DMS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="DMSTracers" dimensions="nVertLevels nCells Time" type="real" packages="DMSTracersPKG" >
<var_array name="DMSTracers" dimensions="nVertLevels nCells Time" type="real" packages="DMSTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="DMS" array_group="DMSGRP" units="mmol m^{-3}"
description="Dimethyl Sulfide"
Expand All @@ -63,7 +63,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="DMSTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="DMSTracersPKG">
<var_array name="DMSTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="DMSTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="DMSTend" array_group="DMSGRP" units="mmol m^{-3} s^{-1}"
description="Dimethyl Sulfide Tendency"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="MacroMoleculesTracers" dimensions="nVertLevels nCells Time" type="real" packages="MacroMoleculesTracersPKG" >
<var_array name="MacroMoleculesTracers" dimensions="nVertLevels nCells Time" type="real" packages="MacroMoleculesTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="PROT" array_group="MacroMoleculesGRP" units="mmol m^{-3}"
description="Proteins"
Expand All @@ -66,7 +66,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="MacroMoleculesTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="MacroMoleculesTracersPKG">
<var_array name="MacroMoleculesTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="MacroMoleculesTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="PROTTend" array_group="MacroMoleculesGRP" units="mmol m^{-3} s^{-1}"
description="Proteins Tendency"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="activeTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="activeTracersPKG">
<var_array name="activeTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="activeTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<var name="temperatureTend" array_group="activeGRP" units="C s^-1"
description="time tendency of potential temperature"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="debugTracers" dimensions="nVertLevels nCells Time" type="real" packages="debugTracersPKG" default_value="1.0">
<var_array name="debugTracers" dimensions="nVertLevels nCells Time" type="real" packages="debugTracersPKG" default_value="1.0" missing_value="FILLVAL" missing_value_mask="cellMask">
<var name="tracer1" array_group="debugGRP"
description="tracer for debugging purposes"
/>
Expand All @@ -65,7 +65,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="debugTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersPKG">
<var_array name="debugTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<var name="tracer1Tend" array_group="debugGRP"
description="Tendency for tracer1"
/>
Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/tracer_groups/Registry_ecosys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="ecosysTracers" dimensions="nVertLevels nCells Time" type="real" packages="ecosysTracersPKG" >
<var_array name="ecosysTracers" dimensions="nVertLevels nCells Time" type="real" packages="ecosysTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="PO4" array_group="ecosysGRP" units="mmol P m^{-3}"
description="Dissolved Inorganic Phosphate"
Expand Down Expand Up @@ -193,7 +193,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="ecosysTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="ecosysTracersPKG">
<var_array name="ecosysTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="ecosysTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<!-- Add constituents of tracer group -->
<var name="PO4Tend" array_group="ecosysGRP" units="mmol P m^{-3} s^{-1}"
description="Dissolved Inorganic Phosphate Tendency"
Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/tracer_groups/Registry_idealAge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="idealAgeTracers" dimensions="nVertLevels nCells Time" type="real" packages="idealAgeTracersPKG" default_value="0.0">
<var_array name="idealAgeTracers" dimensions="nVertLevels nCells Time" type="real" packages="idealAgeTracersPKG" default_value="0.0" missing_value="FILLVAL" missing_value_mask="cellMask">
<var name="iAge" array_group="iAgeGRP" units="seconds" description="tracer for ideal age"
/>
</var_array>
Expand All @@ -50,7 +50,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="idealAgeTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="idealAgeTracersPKG">
<var_array name="idealAgeTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="idealAgeTracersPKG" missing_value="FILLVAL" missing_value_mask="cellMask">
<var name="iAgeTend" array_group="iAgeGRP" units="seconds/second" description="Tendency for iAge"
/>
</var_array>
Expand Down

0 comments on commit 627683e

Please sign in to comment.