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

Switch to plotting sea-ice concentration and thickness on projection grids #915

Merged
merged 13 commits into from
Oct 8, 2022
12 changes: 4 additions & 8 deletions docs/developers_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ Ocean tasks

ComputeAnomalySubtask

.. currentmodule:: mpas_analysis.ocean.plot_climatology_map_subtask

.. autosummary::
:toctree: generated/

PlotClimatologyMapSubtask
PlotClimatologyMapSubtask.set_plot_info

.. currentmodule:: mpas_analysis.ocean.plot_depth_integrated_time_series_subtask

.. autosummary::
Expand Down Expand Up @@ -267,6 +259,10 @@ Plotting
ticks.plot_xtick_format
add_inset

PlotClimatologyMapSubtask
PlotClimatologyMapSubtask.set_plot_info



Projection
----------
Expand Down
3 changes: 2 additions & 1 deletion mpas_analysis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,9 @@ def run_analysis(config, analyses):
'logsSubdirectory')

mainRunName = config.get('runs', 'mainRunName')
maxTitleLength = config.getint('plot', 'maxTitleLength')

if len(mainRunName) > 55:
if len(mainRunName) > maxTitleLength:
print('Warning: The main run name is quite long and will be '
'truncated in some plots: \n{}\n\n'.format(mainRunName))

Expand Down
101 changes: 66 additions & 35 deletions mpas_analysis/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ comparisonAntarcticStereoResolution = 10.
comparisonArcticStereoWidth = 6000.
comparisonArcticStereoResolution = 10.

# The extended Antarctic polar stereographic comparison grid size and
# resolution in km
comparisonAntarcticExtendedWidth = 9000.
comparisonAntarcticExtendedResolution = 15.

# The extended Arctic polar stereographic comparison grid size and
# resolution in km
comparisonArcticExtendedWidth = 9000.
comparisonArcticExtendedResolution = 15.


# The comparison North Atlantic grid size and resolution in km
comparisonNorthAtlanticWidth = 8500.
comparisonNorthAtlanticHeight = 5500.
Expand Down Expand Up @@ -347,6 +358,7 @@ titleFontSize = 16
titleFontColor = black
titleFontWeight = normal
axisFontSize = 12
maxTitleLength = 45

# font size for cartopy grid labels
cartopyGridFontSize = 12
Expand Down Expand Up @@ -394,6 +406,36 @@ useCartopyCoastline = True
latLines = np.arange(-80., 81., 10.)
lonLines = np.arange(-180., 181., 30.)

[plot_arctic_extended]
## options related to extended Arctic projection plots

# figure sizes for different numbers of panels and layouts
onePanelFigSize = (8, 8.5)
threePanelVertFigSize = (8, 22)
threePanelHorizFigSize = (22, 7.5)

# whether to use the cartopy coastline (as opposed to the model coastline)
useCartopyCoastline = True

# latitude and longitude grid lines
latLines = np.arange(-80., 81., 10.)
lonLines = np.arange(-180., 181., 30.)

[plot_antarctic_extended]
## options related to extended Antarctic projection plots

# figure sizes for different numbers of panels and layouts
onePanelFigSize = (8, 8.5)
threePanelVertFigSize = (8, 22)
threePanelHorizFigSize = (22, 7.5)

# whether to use the cartopy coastline (as opposed to the model coastline)
useCartopyCoastline = True

# latitude and longitude grid lines
latLines = np.arange(-80., 81., 10.)
lonLines = np.arange(-180., 181., 30.)

[plot_north_atlantic]
## options related to North Atlantic projection plots

Expand Down Expand Up @@ -1049,7 +1091,7 @@ colorbarLevelsDifference = [-5, -3, -2, -1, -0.1, 0, 0.1, 1, 2, 3, 5]
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['JFM', 'JAS', 'ANN']

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

# first and last year of SST observational climatology (preferably one of the
Expand Down Expand Up @@ -1088,7 +1130,7 @@ colorbarLevelsDifference = [-3, -2, -1, -0.5, -0.02, 0, 0.02, 0.5, 1, 2, 3]
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['JFM', 'JAS', 'ANN']

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


Expand Down Expand Up @@ -1118,7 +1160,7 @@ colorbarLevelsDifference = [-150, -80, -30, -10, -1, 0, 1, 10, 30, 80, 150]
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['JFM', 'JAS', 'ANN']

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


Expand All @@ -1131,7 +1173,7 @@ comparisonGrids = ['latlon']
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['JFM', 'JAS', 'ANN']

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


Expand Down Expand Up @@ -1363,7 +1405,7 @@ colorbarLevelsDifference = [-100., -80., -60., -40., -20., -10., 0., 10., 20.,
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['JFM', 'JAS', 'ANN']

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


Expand Down Expand Up @@ -1397,7 +1439,7 @@ normArgsDifference = {'vmin': -300., 'vmax': 300.}
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['ANN']

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


Expand All @@ -1423,7 +1465,6 @@ contourColorResult = black
# Add arrows to contour lines
# whether to include arrows on the contour lines showing the direction of flow
arrowsOnContourResult = True
#ticks = [np.arange(-100., 101.0, 10.), np.arange(-100., 101.0, 10.)]
# colormap for differences
colormapNameDifference = cmo.balance
# whether the colormap is indexed or continuous
Expand Down Expand Up @@ -1473,7 +1514,7 @@ colorbarLevelsDifference = numpy.linspace(-2., 2., 10)
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['ANN']

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

# A list of pairs of minimum and maximum depths (positive up, in meters) to
Expand Down Expand Up @@ -2122,7 +2163,7 @@ normArgsDifference = {'vmin': -0.2, 'vmax': 0.2}
## fields at various levels, including the sea floor against control model
## results and WOA climatological data

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

# Months or seasons to plot (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct,
Expand Down Expand Up @@ -3215,7 +3256,7 @@ variables = ['PO4', 'NO3', 'SiO3', 'CO2_gas_flux', 'pH_3D', 'DIC', 'ALK', 'O2',
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['ANN', 'JFM', 'JAS']

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

# Whether to compare to preindustrial observations that are available.
Expand Down Expand Up @@ -3612,19 +3653,18 @@ colorbarLevelsDifference = [-1., -0.8, -0.6, -0.4, -0.2, -0.1, 0, 0.1, 0.2, 0.4,
# observations are only available for these seasons)
seasons = ['JFM', 'JAS']

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

# reference lat/lon for sea ice plots in the northern hemisphere
minimumLatitude = 50
referenceLongitude = 0
# comparison grid(s) (typically 'arctic_extended') on which to plot analysis
comparisonGrids = ['arctic_extended']

# a list of prefixes describing the sources of the observations to be used
observationPrefixes = ['NASATeam', 'Bootstrap']

# arrange subplots vertically?
vertical = False

# the minimum threshold below which concentration is masked out
minConcentration = 0.15

# observations files
concentrationNASATeamNH_JFM = SSMI/NASATeam_NSIDC0051/SSMI_NASATeam_gridded_concentration_NH_jfm.interp0.5x0.5_20180710.nc
concentrationNASATeamNH_JAS = SSMI/NASATeam_NSIDC0051/SSMI_NASATeam_gridded_concentration_NH_jas.interp0.5x0.5_20180710.nc
Expand Down Expand Up @@ -3659,19 +3699,18 @@ colorbarLevelsDifference = [-1., -0.8, -0.6, -0.4, -0.2, -0.1, 0, 0.1, 0.2, 0.4,
# observations are only available for these seasons)
seasons = ['DJF', 'JJA']

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

# reference lat/lon for sea ice plots in the northern hemisphere
minimumLatitude = -50
referenceLongitude = 180
# comparison grid(s) (typically 'antarctic_extended') on which to plot analysis
comparisonGrids = ['antarctic_extended']

# a list of prefixes describing the sources of the observations to be used
observationPrefixes = ['NASATeam', 'Bootstrap']

# arrange subplots vertically?
vertical = False

# the minimum threshold below which concentration is masked out
minConcentration = 0.15

# observations files
concentrationNASATeamSH_DJF = SSMI/NASATeam_NSIDC0051/SSMI_NASATeam_gridded_concentration_SH_djf.interp0.5x0.5_20180710.nc
concentrationNASATeamSH_JJA = SSMI/NASATeam_NSIDC0051/SSMI_NASATeam_gridded_concentration_SH_jja.interp0.5x0.5_20180710.nc
Expand Down Expand Up @@ -3706,12 +3745,8 @@ colorbarLevelsDifference = [-3., -2.5, -2, -0.5, -0.1, 0, 0.1, 0.5, 2, 2.5, 3.]
# observations are only available for these seasons)
seasons = ['FM', 'ON']

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

# reference lat/lon for sea ice plots in the northern hemisphere
minimumLatitude = 50
referenceLongitude = 0
# comparison grid(s) (typically 'arctic_extended') on which to plot analysis
comparisonGrids = ['arctic_extended']

# a list of prefixes describing the sources of the observations to be used
observationPrefixes = ['']
Expand Down Expand Up @@ -3751,12 +3786,8 @@ colorbarLevelsDifference = [-3., -2.5, -2, -0.5, -0.1, 0, 0.1, 0.5, 2, 2.5, 3.]
# observations are only available for these seasons)
seasons = ['FM', 'ON']

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

# reference lat/lon for sea ice plots in the northern hemisphere
minimumLatitude = -50
referenceLongitude = 180
# comparison grid(s) (typically 'antarctic_extended') on which to plot analysis
comparisonGrids = ['antarctic_extended']

# a list of prefixes describing the sources of the observations to be used
observationPrefixes = ['']
Expand Down Expand Up @@ -3796,7 +3827,7 @@ normArgsDifference = {'linthresh': 1e-5, 'linscale': 1, 'vmin': -1e-2, 'vmax': 1
# Times for comparison times
seasons = ['ANN', 'DJF', 'JJA']

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

# reference lat/lon for sea ice plots in the northern hemisphere
Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_antarctic_melt.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
from mpas_analysis.shared.climatology.climatology import \
get_masked_mpas_climatology_file_name

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask

from mpas_analysis.shared.constants import constants

Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_argo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
from mpas_analysis.ocean.remap_depth_slices_subtask import \
RemapDepthSlicesSubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask

from mpas_analysis.shared.io.utility import build_obs_path

Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_bgc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask, \
RemapObservedClimatologySubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask

from mpas_analysis.shared.interpolation.utility import add_periodic_lon

Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_bsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

from mpas_analysis.shared import AnalysisTask
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask
from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask
from mpas_analysis.ocean.utility import compute_zmid


Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_eke.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask, \
RemapObservedClimatologySubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask


class ClimatologyMapEKE(AnalysisTask):
Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_mld.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask, \
RemapObservedClimatologySubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask


class ClimatologyMapMLD(AnalysisTask):
Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_mld_min_max.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask


class ClimatologyMapMLDMinMax(AnalysisTask):
Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_ohc_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

from mpas_analysis.shared import AnalysisTask
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask
from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask
from mpas_analysis.ocean.utility import compute_zmid


Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_schmidtko.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

from mpas_analysis.ocean.remap_depth_slices_subtask import \
RemapDepthSlicesSubtask
from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask

from mpas_analysis.shared.io.utility import build_obs_path

Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_sose.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

from mpas_analysis.ocean.remap_depth_slices_subtask import \
RemapDepthSlicesSubtask
from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask
from mpas_analysis.ocean.remap_sose_climatology import RemapSoseClimatology

from mpas_analysis.shared.io.utility import build_obs_path
Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask, \
RemapObservedClimatologySubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask

from mpas_analysis.shared.constants import constants

Expand Down
3 changes: 1 addition & 2 deletions mpas_analysis/ocean/climatology_map_sss.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
from mpas_analysis.shared.climatology import RemapMpasClimatologySubtask, \
RemapObservedClimatologySubtask

from mpas_analysis.ocean.plot_climatology_map_subtask import \
PlotClimatologyMapSubtask
from mpas_analysis.shared.plot import PlotClimatologyMapSubtask


class ClimatologyMapSSS(AnalysisTask):
Expand Down
Loading