Skip to content

Commit f272854

Browse files
authored
Merge pull request #1069 from xylar/fix-bsf-again
Fix barotropic streamfunction calculation
2 parents 0930d0c + b4e586b commit f272854

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+903
-183
lines changed

docs/users_guide/tasks/climatologyMapBSF.rst

Lines changed: 75 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,25 @@ The following configuration options are available for this task::
2121
## (if available)
2222

2323
# colormap for model/observations
24-
colormapNameResult = blue-orange-div
24+
colormapNameResult = 3wave-blue-red-brown
2525
# whether the colormap is indexed or continuous
2626
colormapTypeResult = continuous
2727
# color indices into colormapName for filled contours
2828
# the type of norm used in the colormap
29-
normTypeResult = symLog
29+
normTypeResult = linear
3030
# A dictionary with keywords for the norm
31-
normArgsResult = {'linthresh': 30., 'linscale': 0.5, 'vmin': -100., 'vmax': 100.}
32-
colorbarTicksResult = [-100.,-40., -20., -10., 0., 10., 20., 40., 100.]
31+
normArgsResult = {'vmin': -100, 'vmax': 200.}
3332
# Adding contour lines to the figure
34-
contourLevelsResult = np.arange(-100., 101.0, 10.)
33+
contourLevelsResult = np.arange(-100., 201.0, 10.)
3534
contourThicknessResult = 0.5
3635
contourColorResult = black
37-
# Add arrows to contour lines
38-
# whether to include arrows on the contour lines showing the direction of flow
39-
arrowsOnContourResult = True
36+
# The spacing (in meters) between arrows on contours in projection plots
37+
# (None to disable)
38+
arrowSpacingResult = 8e5
39+
# The width (in meters) of arrows on contours in projection plots (None to
40+
# disable)
41+
arrowWidthResult = 1.5e4
42+
4043
# colormap for differences
4144
colormapNameDifference = cmo.balance
4245
# whether the colormap is indexed or continuous
@@ -54,18 +57,76 @@ The following configuration options are available for this task::
5457
# comparison grid(s) on which to plot analysis
5558
comparisonGrids = ['latlon', 'subpolar_north_atlantic']
5659

57-
# list of tuples(pairs) of depths (min, max) to integrate horizontal transport over
58-
depthRanges = [(0.0, -10000.0), (0.0, -2000.0)]
60+
# list of tuples(pairs) of depths (min, max) to integrate horizontal transport
61+
# over
62+
depthRanges = [(10.0, -10000.0), (10.0, -2000.0)]
5963

60-
# minimum latitude (degrees) above which the mean BSF on boundary vertices
61-
# averages to zero
62-
minLatitudeForZeroBSF = -45.0
64+
# minimum and maximum latitude (degrees) between which the mean BSF on boundary
65+
# vertices averages to zero
66+
latitudeRangeForZeroBSF = (-45.0, 90.0)
6367

6468

6569
By default, the BSF is computed over two depth ranges---the full depth of
6670
the ocean and only to 2000 m. By default, global and subpolar North Atlantic
6771
plots are produced. The BSF is constrained to have a mean value on coastal
68-
boundaries of zero north of ``minLatitudeForZeroBSF``.
72+
boundaries between the bounds set in ``latitudeRangeForZeroBSF``.
73+
74+
You can set config options for individual comparison grids in a separate
75+
seciton with the suffix associated with the comparison grid appended, e.g.::
76+
77+
[climatologyMapBSF]
78+
## options related to plotting horizontally remapped climatologies of
79+
## the barotropic streamfunction (BSF) against control model results
80+
## (if available)
81+
82+
# comparison grid(s) on which to plot analysis
83+
comparisonGrids = ['latlon', 'arctic_extended', 'antarctic_extended',
84+
'subpolar_north_atlantic', 'fris']
85+
86+
[climatologyMapBSFAntarcticExtended]
87+
## options related to plotting Antarctic climatologies of the barotropic
88+
## streamfunction (BSF)
89+
90+
# colormap for model/observations
91+
colormapNameResult = blue-orange-div
92+
# whether the colormap is indexed or continuous
93+
colormapTypeResult = continuous
94+
# color indices into colormapName for filled contours
95+
# the type of norm used in the colormap
96+
normTypeResult = symLog
97+
# A dictionary with keywords for the norm
98+
normArgsResult = {'linthresh': 30., 'linscale': 0.5, 'vmin': -150., 'vmax': 150.}
99+
colorbarTicksResult = [-150., -100.,-60., -40., -20., -10., 0., 10., 20., 40., 60., 100., 150.]
100+
# Adding contour lines to the figure
101+
contourLevelsResult = np.arange(-150., 150.1, 10.)
102+
contourThicknessResult = 0.5
103+
contourColorResult = black
104+
# The spacing (in meters) between arrows on contours in projection plots
105+
# (None to disable)
106+
arrowSpacingResult = 8e5
107+
# The width (in meters) of arrows on contours in projection plots (None to
108+
# disable)
109+
arrowWidthResult = 1.5e4
110+
111+
# colormap for differences
112+
colormapNameDifference = cmo.balance
113+
# whether the colormap is indexed or continuous
114+
colormapTypeDifference = continuous
115+
# the type of norm used in the colormap
116+
normTypeDifference = linear
117+
# A dictionary with keywords for the norm
118+
normArgsDifference = {'vmin': -10., 'vmax': 10.}
119+
# colorbarTicksDifference = numpy.linspace(-10., 10., 9)
120+
121+
# minimum and maximum latitude (degrees) between which the mean BSF on boundary
122+
# vertices averages to zero
123+
latitudeRangeForZeroBSF = (-90.0, -60.0)
124+
125+
You must define both a new set of colormaps, norms, etc. and a new range of
126+
latitudes over which the BSF is constrained to have a mean value of zero.
127+
128+
This is useful because plots are more intuitive if the BSF is close to zero
129+
at local boundaries.
69130

70131
For more details, see:
71132
* :ref:`config_colormaps`
19.4 KB
Loading

mpas_analysis/default.cfg

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ comparisonSubpolarNorthAtlanticResolution = 20.
265265
# The comparison FRIS Antarctic polar stereographic grid size and resolution in km
266266
comparisonFrisBounds = [-1800., -400., 100., 1500.]
267267
# comparisonFrisWidth = 6000.
268-
comparisonFrisResolution = 10.
268+
comparisonFrisResolution = 4.
269269

270270
# interpolation order for model and observation results. Likely values are
271271
# 'bilinear', 'neareststod' (nearest neighbor) or 'conserve'
@@ -1564,22 +1564,25 @@ comparisonGrids = ['latlon', 'subpolar_north_atlantic']
15641564
## (if available)
15651565

15661566
# colormap for model/observations
1567-
colormapNameResult = blue-orange-div
1567+
colormapNameResult = 3wave-blue-red-brown
15681568
# whether the colormap is indexed or continuous
15691569
colormapTypeResult = continuous
15701570
# color indices into colormapName for filled contours
15711571
# the type of norm used in the colormap
1572-
normTypeResult = symLog
1572+
normTypeResult = linear
15731573
# A dictionary with keywords for the norm
1574-
normArgsResult = {'linthresh': 30., 'linscale': 0.5, 'vmin': -100., 'vmax': 100.}
1575-
colorbarTicksResult = [-100.,-40., -20., -10., 0., 10., 20., 40., 100.]
1574+
normArgsResult = {'vmin': -100, 'vmax': 200.}
15761575
# Adding contour lines to the figure
1577-
contourLevelsResult = np.arange(-100., 101.0, 10.)
1576+
contourLevelsResult = np.arange(-100., 201.0, 10.)
15781577
contourThicknessResult = 0.5
15791578
contourColorResult = black
1580-
# Add arrows to contour lines
1581-
# whether to include arrows on the contour lines showing the direction of flow
1582-
arrowsOnContourResult = True
1579+
# The spacing (in meters) between arrows on contours in projection plots
1580+
# (None to disable)
1581+
arrowSpacingResult = 8e5
1582+
# The width (in meters) of arrows on contours in projection plots (None to
1583+
# disable)
1584+
arrowWidthResult = 1.5e4
1585+
15831586
# colormap for differences
15841587
colormapNameDifference = cmo.balance
15851588
# whether the colormap is indexed or continuous
@@ -1597,12 +1600,14 @@ seasons = ['ANN']
15971600
# comparison grid(s) on which to plot analysis
15981601
comparisonGrids = ['latlon', 'subpolar_north_atlantic']
15991602

1600-
# list of tuples(pairs) of depths (min, max) to integrate horizontal transport over
1601-
depthRanges = [(0.0, -10000.0), (0.0, -2000.0)]
1603+
# list of tuples(pairs) of depths (min, max) to integrate horizontal transport
1604+
# over
1605+
depthRanges = [(10.0, -10000.0), (10.0, -2000.0)]
1606+
1607+
# minimum and maximum latitude (degrees) between which the mean BSF on boundary
1608+
# vertices averages to zero
1609+
latitudeRangeForZeroBSF = (-45.0, 90.0)
16021610

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

16071612
[climatologyMapOHCAnomaly]
16081613
## options related to plotting horizontally remapped climatologies of

0 commit comments

Comments
 (0)