Skip to content

Commit

Permalink
Merge pull request #1063 from xylar/fix-bsf
Browse files Browse the repository at this point in the history
Fix computation of barotropic streamfunction
  • Loading branch information
xylar authored Feb 14, 2025
2 parents 4ad6733 + f62744b commit 4b07bb6
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 87 deletions.
84 changes: 41 additions & 43 deletions docs/users_guide/analysis_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,74 @@ Analysis Tasks
.. toctree::
:maxdepth: 1

tasks/climatologyMapMassFluxes
tasks/climatologyMapAntarcticMelt
tasks/climatologyMapArgoSalinity
tasks/climatologyMapArgoTemperature
tasks/climatologyMapBGC
tasks/climatologyMapBSF
tasks/climatologyMapEKE
tasks/climatologyMapHeatFluxes
tasks/climatologyMapMassFluxes
tasks/climatologyMapMLD
tasks/climatologyMapMLDMinMax
tasks/climatologyMapOHCAnomaly
tasks/climatologyMapSchmidtko
tasks/climatologyMapSose
tasks/climatologyMapSST
tasks/climatologyMapSSS
tasks/climatologyMapSSH
tasks/climatologyMapEKE
tasks/climatologyMapOHCAnomaly
tasks/climatologyMapSose
tasks/climatologyMapVel
tasks/climatologyMapBGC
tasks/climatologyMapArgoTemperature
tasks/climatologyMapArgoSalinity
tasks/climatologyMapWoa
tasks/climatologyMapSchmidtko
tasks/climatologyMapAntarcticMelt
tasks/climatologyMapWaves
tasks/climatologyMapWoa

tasks/antshipTransects
tasks/conservation
tasks/geojsonTransects
tasks/hovmollerOceanRegions
tasks/indexNino34
tasks/meridionalHeatTransport
tasks/oceanHistogram
tasks/oceanRegionalProfiles
tasks/osnapTransects
tasks/regionalTSDiagrams
tasks/soseTransects
tasks/streamfunctionMOC
tasks/timeSeriesAntarcticMelt
tasks/timeSeriesOHCAnomaly
tasks/timeSeriesOceanRegions
tasks/timeSeriesTemperatureAnomaly
tasks/timeSeriesSalinityAnomaly
tasks/timeSeriesOHCAnomaly
tasks/timeSeriesSST
tasks/timeSeriesTemperatureAnomaly
tasks/timeSeriesTransport
tasks/meridionalHeatTransport
tasks/streamfunctionMOC
tasks/indexNino34
tasks/osnapTransects
tasks/woceTransects
tasks/soseTransects
tasks/woaTransects
tasks/antshipTransects
tasks/geojsonTransects
tasks/oceanRegionalProfiles
tasks/regionalTSDiagrams
tasks/oceanHistogram
tasks/conservation
tasks/woceTransects

tasks/climatologyMapSeaIceAlbedoNH
tasks/climatologyMapSeaIceAlbedoSH
tasks/climatologyMapSeaIceAreaFractionRidgeNH
tasks/climatologyMapSeaIceAreaFractionRidgeSH
tasks/climatologyMapSeaIceAreaTendencyThermoNH
tasks/climatologyMapSeaIceAreaTendencyThermoSH
tasks/climatologyMapSeaIceAreaTendencyTranspNH
tasks/climatologyMapSeaIceAreaTendencyTranspSH
tasks/climatologyMapSeaIceConcNH
tasks/climatologyMapSeaIceConcSH
tasks/climatologyMapSeaIceThickNH
tasks/climatologyMapSeaIceThickSH
tasks/climatologyMapSeaIceMeltingNH
tasks/climatologyMapSeaIceMeltingSH
tasks/climatologyMapSeaIcePondAreaNH
tasks/climatologyMapSeaIcePondAreaSH
tasks/climatologyMapSeaIceProductionNH
tasks/climatologyMapSeaIceProductionSH
tasks/climatologyMapSeaIceSnowDepthNH
tasks/climatologyMapSeaIceSnowDepthSH

tasks/climatologyMapSeaIceSnowiceFormationNH
tasks/climatologyMapSeaIceSnowiceFormationSH
tasks/climatologyMapSeaIceSnowMeltNH
tasks/climatologyMapSeaIceSnowMeltSH
tasks/climatologyMapSeaIcePondAreaNH
tasks/climatologyMapSeaIcePondAreaSH
tasks/climatologyMapSeaIceAreaFractionRidgeNH
tasks/climatologyMapSeaIceAreaFractionRidgeSH
tasks/climatologyMapSeaIceThickNH
tasks/climatologyMapSeaIceThickSH
tasks/climatologyMapSeaIceVolumeRidgeNH
tasks/climatologyMapSeaIceVolumeRidgeSH
tasks/climatologyMapSeaIceAlbedoNH
tasks/climatologyMapSeaIceAlbedoSH

tasks/climatologyMapSeaIceProductionNH
tasks/climatologyMapSeaIceProductionSH
tasks/climatologyMapSeaIceMeltingNH
tasks/climatologyMapSeaIceMeltingSH

tasks/climatologyMapSeaIceAreaTendencyThermoNH
tasks/climatologyMapSeaIceAreaTendencyThermoSH
tasks/climatologyMapSeaIceAreaTendencyTranspNH
tasks/climatologyMapSeaIceAreaTendencyTranspSH
tasks/climatologyMapSeaIceVolumeTendencyThermoNH
tasks/climatologyMapSeaIceVolumeTendencyThermoSH
tasks/climatologyMapSeaIceVolumeTendencyTranspNH
Expand Down
80 changes: 80 additions & 0 deletions docs/users_guide/tasks/climatologyMapBSF.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.. _task_climatologyMapBSF:

climatologyMapBSF
=================

An analysis task for comparison of maps of barotropic streamfunction (BSF).

Component and Tags::

component: ocean
tags: climatology, horizontalMap, barotropicStreamfunction, publicObs, streamfunction

Configuration Options
---------------------

The following configuration options are available for this task::

[climatologyMapBSF]
## options related to plotting horizontally remapped climatologies of
## the barotropic streamfunction (BSF) against control model results
## (if available)

# colormap for model/observations
colormapNameResult = blue-orange-div
# whether the colormap is indexed or continuous
colormapTypeResult = continuous
# color indices into colormapName for filled contours
# the type of norm used in the colormap
normTypeResult = symLog
# A dictionary with keywords for the norm
normArgsResult = {'linthresh': 30., 'linscale': 0.5, 'vmin': -100., 'vmax': 100.}
colorbarTicksResult = [-100.,-40., -20., -10., 0., 10., 20., 40., 100.]
# Adding contour lines to the figure
contourLevelsResult = np.arange(-100., 101.0, 10.)
contourThicknessResult = 0.5
contourColorResult = black
# Add arrows to contour lines
# whether to include arrows on the contour lines showing the direction of flow
arrowsOnContourResult = True
# colormap for differences
colormapNameDifference = cmo.balance
# whether the colormap is indexed or continuous
colormapTypeDifference = continuous
# the type of norm used in the colormap
normTypeDifference = linear
# A dictionary with keywords for the norm
normArgsDifference = {'vmin': -10., 'vmax': 10.}
# colorbarTicksDifference = numpy.linspace(-10., 10., 9)

# Months or seasons to plot (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct,
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['ANN']

# comparison grid(s) on which to plot analysis
comparisonGrids = ['latlon', 'subpolar_north_atlantic']

# list of tuples(pairs) of depths (min, max) to integrate horizontal transport over
depthRanges = [(0.0, -10000.0), (0.0, -2000.0)]

# minimum latitude (degrees) above which the mean BSF on boundary vertices
# averages to zero
minLatitudeForZeroBSF = -45.0


By default, the BSF is computed over two depth ranges---the full depth of
the ocean and only to 2000 m. By default, global and subpolar North Atlantic
plots are produced. The BSF is constrained to have a mean value on coastal
boundaries of zero north of ``minLatitudeForZeroBSF``.

For more details, see:
* :ref:`config_colormaps`
* :ref:`config_seasons`
* :ref:`config_comparison_grids`

Example Result
--------------

.. image:: examples/bsf.png
:width: 500 px
:align: center
5 changes: 1 addition & 4 deletions docs/users_guide/tasks/climatologyMapEKE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
climatologyMapEKE
=================

An analysis task for comparison of global maps of sea surface height (SSH)
with zero mean against observations. The mean has been subtracted because the
initial sea level is somewhat arbitrary and will lead to a systematic offset
when compared with the observations.
An analysis task for comparison of global maps of eddy kinetic energy (EKE).

Component and Tags::

Expand Down
Binary file added docs/users_guide/tasks/examples/bsf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions mpas_analysis/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1544,15 +1544,15 @@ comparisonGrids = ['latlon', 'subpolar_north_atlantic']
## (if available)

# colormap for model/observations
colormapNameResult = cmo.curl
colormapNameResult = blue-orange-div
# whether the colormap is indexed or continuous
colormapTypeResult = continuous
# color indices into colormapName for filled contours
# the type of norm used in the colormap
normTypeResult = symLog
# A dictionary with keywords for the norm
normArgsResult = {'linthresh': 30., 'linscale': 0.5, 'vmin': -100., 'vmax': 100.}
colorbarTicksResult = [-100.,-40.,-20.,-10., 0., 10., 20., 40.,100.]
colorbarTicksResult = [-100.,-40., -20., -10., 0., 10., 20., 40., 100.]
# Adding contour lines to the figure
contourLevelsResult = np.arange(-100., 101.0, 10.)
contourThicknessResult = 0.5
Expand Down Expand Up @@ -1580,6 +1580,10 @@ comparisonGrids = ['latlon', 'subpolar_north_atlantic']
# list of tuples(pairs) of depths (min, max) to integrate horizontal transport over
depthRanges = [(0.0, -10000.0), (0.0, -2000.0)]

# minimum latitude (degrees) above which the mean BSF on boundary vertices
# averages to zero
minLatitudeForZeroBSF = -45.0

[climatologyMapOHCAnomaly]
## options related to plotting horizontally remapped climatologies of
## ocean heat content (OHC) against control model results (if available)
Expand Down
Loading

0 comments on commit 4b07bb6

Please sign in to comment.