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

Add analysis task for waves #869

Merged
merged 26 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
272425a
Add climatology_map_waves.py
sbrus89 Jan 5, 2022
80105cf
Add climatologyMapWaves section in default.cfg
sbrus89 Jan 5, 2022
7a39eb5
Add wave analysis task and import
sbrus89 Jan 5, 2022
cc9a006
Get climatologies working
sbrus89 Jan 8, 2022
a27c9b5
Get wave table working
sbrus89 Jan 10, 2022
2c0950e
Add wave histograms
sbrus89 Jan 12, 2022
bfa5d69
Histogram updates and freq -> period conversion
sbrus89 Jan 12, 2022
1938a53
Update default.cgf
sbrus89 Jan 14, 2022
7a8bb15
Output width and x location vaules for histograms
sbrus89 Jan 14, 2022
8d16b6f
Override regionsInTable with list of regions
sbrus89 Jan 14, 2022
2be3867
Add ERA5 comparision
sbrus89 Oct 6, 2022
389bfb1
Updates to wave histograms
sbrus89 Oct 6, 2022
f358cd2
Incorporate review suggestions
sbrus89 Nov 11, 2022
e0c29a8
Add SS_CCI observataion, remove table subtask, PEP8 cleanup
sbrus89 Nov 11, 2022
4561503
Fix f string mistake
sbrus89 Nov 12, 2022
1a4292d
Remove table options from default.cfg
sbrus89 Nov 23, 2022
2399209
Incorporate review suggestions and improvements
sbrus89 Nov 23, 2022
2504ebd
Add "no_waves" to generate in test suite
xylar Nov 24, 2022
01733c7
Fix controlConfig runs
sbrus89 Dec 2, 2022
859e6bd
Separate wave observation directories
sbrus89 Dec 7, 2022
e7ad84d
Fix variable name capitalization mistake
sbrus89 Dec 7, 2022
94bded3
Add user's guide documentation
sbrus89 Dec 7, 2022
4829372
Add wave observation information
sbrus89 Dec 7, 2022
708f82b
Fix user guide documnetation issues
sbrus89 Dec 8, 2022
5acd138
Add waves in developer's guide
sbrus89 Dec 8, 2022
147b962
Moving `climatologyMapWaves` up with the other ocean tasks
xylar Dec 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/developers_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Ocean tasks
ClimatologyMapSose
ClimatologyMapArgoTemperature
ClimatologyMapArgoSalinity
ClimatologyMapWaves
xylar marked this conversation as resolved.
Show resolved Hide resolved
IndexNino34
MeridionalHeatTransport
StreamfunctionMOC
Expand Down
1 change: 1 addition & 0 deletions docs/users_guide/analysis_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Analysis Tasks
tasks/climatologyMapWoa
tasks/climatologyMapSchmidtko
tasks/climatologyMapAntarcticMelt
tasks/climatologyMapWaves

tasks/hovmollerOceanRegions
tasks/timeSeriesAntarcticMelt
Expand Down
108 changes: 108 additions & 0 deletions docs/users_guide/tasks/climatologyMapWaves.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.. _task_climatologyMapWaves:

climatologyMapWaves
===================

An analysis task for comparison of global maps of wave quantities
(significant wave height and peak period) against observations.

Component and Tags::

component: ocean
tags: climatology, horizontalMap, waves

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

The following configuration options are available for this task::

[climatologyMapWaves]
## options related to plotting climatology maps of wave fields
## ERA5 climatological data

# 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,
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['ANN', 'JFM', 'JAS']

# a list of fields to plot ('significantWaveHeight', 'peakWavePeriod')
fieldList = ['significantWaveHeight', 'peakWavePeriod']

era5ObsStartYear = 1959
era5ObsEndYear = 2021
sscciObsStartYear = 1991
sscciObsEndYear = 2018

[climatologyMapWavesSignificantWaveHeight]
## options related to plotting climatology maps of significant wave height

# colormap for model/observations
colormapNameResult = viridis
# whether the colormap is indexed or continuous
colormapTypeResult = continuous
# the type of norm used in the colormap
normTypeResult = linear
# A dictionary with keywords for the norm
normArgsResult = {'vmin': 0., 'vmax': 7.}
# place the ticks automatically by default
# colorbarTicksResult = numpy.linspace(-2., 10., 9)

# colormap for differences
colormapNameDifference = 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': -5., 'vmax': 5.}
# place the ticks automatically by default
# colorbarTicksDifference = numpy.linspace(-5., 5., 9)

[climatologyMapWavesPeakWavePeriod]
## options related to plotting climatology maps of peak wave frequency

# colormap for model/observations
colormapNameResult = plasma
# whether the colormap is indexed or continuous
colormapTypeResult = continuous
# the type of norm used in the colormap
normTypeResult = linear
# A dictionary with keywords for the norm
normArgsResult = {'vmin': 0.0, 'vmax':15.0}
# place the ticks automatically by default
# colorbarTicksResult = numpy.linspace(-2., 10., 9)

# colormap for differences
colormapNameDifference = 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': -5., 'vmax': 5.}
# place the ticks automatically by default
# colorbarTicksDifference = numpy.linspace(-5., 5., 9)

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

Observations
------------

:ref:`era5_waves`
:ref:`sscci_waves`

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

.. image:: examples/swh.png
:width: 500 px
:align: center

.. image:: examples/peak_period.png
:width: 500 px
:align: center
Binary file added docs/users_guide/tasks/examples/peak_period.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/users_guide/tasks/examples/swh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions mpas_analysis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ def build_analysis_list(config, controlConfig):
config=config, mpasClimatologyTask=seaIceClimatologyTask,
hemisphere='SH', controlConfig=controlConfig))

# Wave Analyses
analyses.append(ocean.ClimatologyMapWaves(
config, oceanClimatologyTasks['avg'], oceanRegionMasksTask,
controlConfig))

check_for_duplicate_names(analyses)

return analyses
Expand Down
70 changes: 70 additions & 0 deletions mpas_analysis/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ alkSubdirectory = BGC/ALK
ph_3dSubdirectory = BGC/pH_3D
pco2surfaceSubdirectory = BGC/pCO2surface
chlSubdirectory = BGC/Chl
era5Subdirectory = ERA5
sscciSubdirectory = SSCCI

# interpolation order for observations. Likely values are
# 'bilinear', 'neareststod' (nearest neighbor) or 'conserve'
Expand Down Expand Up @@ -2158,6 +2160,74 @@ normArgsDifference = {'vmin': -0.2, 'vmax': 0.2}
# determine the ticks automatically by default, uncomment to specify
# colorbarTicksDifference = numpy.linspace(-0.2, 0.2, 9)

[climatologyMapWaves]
## options related to plotting climatology maps of wave fields
## ERA5 climatological data

# 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,
# Nov, Dec, JFM, AMJ, JAS, OND, ANN)
seasons = ['ANN', 'JFM', 'JAS']

# a list of fields to plot ('significantWaveHeight', 'peakWavePeriod')
fieldList = ['significantWaveHeight', 'peakWavePeriod']

era5ObsStartYear = 1959
era5ObsEndYear = 2021
sscciObsStartYear = 1991
sscciObsEndYear = 2018

[climatologyMapWavesSignificantWaveHeight]
## options related to plotting climatology maps of significant wave height

# colormap for model/observations
colormapNameResult = viridis
# whether the colormap is indexed or continuous
colormapTypeResult = continuous
# the type of norm used in the colormap
normTypeResult = linear
# A dictionary with keywords for the norm
normArgsResult = {'vmin': 0., 'vmax': 7.}
# place the ticks automatically by default
# colorbarTicksResult = numpy.linspace(-2., 10., 9)

# colormap for differences
colormapNameDifference = 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': -5., 'vmax': 5.}
# place the ticks automatically by default
# colorbarTicksDifference = numpy.linspace(-5., 5., 9)

[climatologyMapWavesPeakWavePeriod]
## options related to plotting climatology maps of peak wave frequency

# colormap for model/observations
colormapNameResult = plasma
# whether the colormap is indexed or continuous
colormapTypeResult = continuous
# the type of norm used in the colormap
normTypeResult = linear
# A dictionary with keywords for the norm
normArgsResult = {'vmin': 0.0, 'vmax':15.0}
# place the ticks automatically by default
# colorbarTicksResult = numpy.linspace(-2., 10., 9)

# colormap for differences
colormapNameDifference = 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': -5., 'vmax': 5.}
# place the ticks automatically by default
# colorbarTicksDifference = numpy.linspace(-5., 5., 9)

[climatologyMapWoa]
## options related to plotting climatology maps of Temperature and Salinity
Expand Down
6 changes: 6 additions & 0 deletions mpas_analysis/obs/analysis_input_files
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ observations/Ocean/ARGO/README.md
observations/Ocean/EKE/obs.bib
observations/Ocean/EKE/README.md
observations/Ocean/EKE/drifter_variance_20180804.nc
observations/Ocean/ERA5/ERA5_Monthly_1959-2021.nc
observations/Ocean/ERA5/obs.bib
observations/Ocean/ERA5/README.md
observations/Ocean/SSH/obs.bib
observations/Ocean/SSH/README.md
observations/Ocean/SSH/zos_AVISO_L4_199210-201012_20180710.nc
Expand Down Expand Up @@ -109,6 +112,9 @@ observations/Ocean/Nino/ERS_SSTv4/README.md
observations/Ocean/MLD/obs.bib
observations/Ocean/MLD/holtetalley_mld_climatology_20180710.nc
observations/Ocean/MLD/README.md
observations/Ocean/SSCCI/obs.bib
observations/Ocean/SSCCI/README.md
observations/Ocean/SSCCI/SS_CCI_1991_2018.nc
observations/Ocean/SSS/obs.bib
observations/Ocean/SSS/Aquarius_V3_SSS_Monthly_20180710.nc
observations/Ocean/SSS/README.md
Expand Down
Loading