Skip to content

Commit 2340566

Browse files
authored
Merge pull request #1053 from xylar/fix-velocity-difference-colormap
A few fixes to climatology maps of velocity
2 parents b892c8c + 761f6cb commit 2340566

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

mpas_analysis/default.cfg

+29-4
Original file line numberDiff line numberDiff line change
@@ -2036,12 +2036,10 @@ obs = ['WOA23']
20362036

20372037

20382038
[climatologyMapVel]
2039-
## options related to plotting climatology maps of Antarctic fields at various
2040-
## levels, including the sea floor against control model results and SOSE
2041-
## reanalysis data
2039+
## options related to plotting climatology maps of velocity components and
2040+
## matnitude
20422041

20432042
# comparison grid(s)
2044-
# only the Antarctic really makes sense but lat-lon could technically work.
20452043
comparisonGrids = ['latlon']
20462044

20472045
# Months or seasons to plot (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct,
@@ -2072,6 +2070,15 @@ normTypeResult = linear
20722070
# A dictionary with keywords for the norm
20732071
normArgsResult = {'vmin': -0.2, 'vmax': 0.2}
20742072

2073+
# colormap for differences
2074+
colormapNameDifference = balance
2075+
# whether the colormap is indexed or continuous
2076+
colormapTypeDifference = continuous
2077+
# the type of norm used in the colormap
2078+
normTypeDifference = linear
2079+
# A dictionary with keywords for the norm
2080+
normArgsDifference = {'vmin': -0.2, 'vmax': 0.2}
2081+
20752082

20762083
[climatologyMapVel_VelocityMagnitudeShallow]
20772084

@@ -2084,6 +2091,15 @@ normTypeResult = log
20842091
# A dictionary with keywords for the norm
20852092
normArgsResult = {'vmin': 1.e-3, 'vmax': 1.}
20862093

2094+
# colormap for differences
2095+
colormapNameDifference = balance
2096+
# whether the colormap is indexed or continuous
2097+
colormapTypeDifference = continuous
2098+
# the type of norm used in the colormap
2099+
normTypeDifference = linear
2100+
# A dictionary with keywords for the norm
2101+
normArgsDifference = {'vmin': -0.2, 'vmax': 0.2}
2102+
20872103

20882104
[climatologyMapVel_VelocityMagnitudeDeep]
20892105

@@ -2096,6 +2112,15 @@ normTypeResult = log
20962112
# A dictionary with keywords for the norm
20972113
normArgsResult = {'vmin': 1.e-4, 'vmax': 5.e-1}
20982114

2115+
# colormap for differences
2116+
colormapNameDifference = balance
2117+
# whether the colormap is indexed or continuous
2118+
colormapTypeDifference = continuous
2119+
# the type of norm used in the colormap
2120+
normTypeDifference = linear
2121+
# A dictionary with keywords for the norm
2122+
normArgsDifference = {'vmin': -0.2, 'vmax': 0.2}
2123+
20992124

21002125
[climatologyMapSose]
21012126
## options related to plotting climatology maps of Antarctic fields at various

mpas_analysis/ocean/climatology_map_vel.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# distributed with this code, or at
1010
# https://raw.githubusercontent.com/MPAS-Dev/MPAS-Analysis/main/LICENSE
1111
"""
12-
Analysis tasks for comparing Antarctic climatology maps against observations
13-
and reanalysis data.
12+
An analysis task for plotting climatologies of velocity components and
13+
magnitude
1414
"""
1515
# Authors
1616
# -------
@@ -32,8 +32,8 @@
3232

3333
class ClimatologyMapVel(AnalysisTask):
3434
"""
35-
An analysis task for comparison of antarctic field against the Southern
36-
Ocean State Estimate
35+
An analysis task for plotting climatologies of velocity components and
36+
magnitude
3737
"""
3838
# Authors
3939
# -------
@@ -185,12 +185,11 @@ def __init__(self, config, mpasClimatologyTask,
185185
outFileLabel = fieldPrefix
186186
refTitleLabel = None
187187
diffTitleLabel = None
188-
galleryName = 'Velocity'
188+
galleryGroup = 'Velocity'
189189
if controlConfig is not None:
190190
refFieldName = field['mpas']
191191
controlRunName = controlConfig.get('runs', 'mainRunName')
192-
galleryName = f'Control: {controlRunName}'
193-
refTitleLabel = galleryName
192+
refTitleLabel = f'Control: {controlRunName}'
194193
diffTitleLabel = 'Main - Control'
195194

196195
if field['3D']:
@@ -243,7 +242,7 @@ def __init__(self, config, mpasClimatologyTask,
243242
diffTitleLabel=diffTitleLabel,
244243
unitsLabel=field['units'],
245244
imageCaption=field['titleName'],
246-
galleryGroup=galleryName,
245+
galleryGroup=galleryGroup,
247246
groupSubtitle=None,
248247
groupLink=f'{fieldPrefix}Vel',
249248
galleryName=field['titleName'],

0 commit comments

Comments
 (0)