-
Notifications
You must be signed in to change notification settings - Fork 51
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 histogram plot type and ocean histogram task #917
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7726950
Prototype histograms with ssh climatology
cbegeman 0f3f5cb
Generalize histogram task to 2-d ocean variables
cbegeman ba71bda
Enhance ocean histogram capabilities
cbegeman ec47ac6
Support regions list for ocean histogram
cbegeman 3fed828
Support observation list for ocean histogram
cbegeman 792c5b9
Use weights in histogram plot
cbegeman 82c08f7
Change variable dicts to list for histogram subtask
cbegeman f2ac85f
Cleanup OceanHistogram
cbegeman 063a549
Support comparison with control run
cbegeman 5fda1fa
Clean up histogram plot
cbegeman 0c2acca
Purge histogram directory
cbegeman d32b921
Aesthetic changes to OceanHistogram
cbegeman 3121c17
Replace weightByVariable by weightList
cbegeman 7266c6d
Aesthetic changes to OceanHistogram
cbegeman cc50fe4
Add histograms to default.cfg, off by default
cbegeman 0e41dd6
Apply suggestions from code review
cbegeman 7a9c641
Include regionGroup in file and task names
cbegeman ec2b848
Fix typo in ocean histogram task
cbegeman dd29f0c
Fixup mpas_analysis/__main__.py
cbegeman ba6dacd
Fix style
cbegeman 2e6c67e
Change title, caption
cbegeman 24cebbd
Fixup filePrefix for control run
cbegeman 683de8b
Fixup masking for histogram vars
cbegeman abc6895
Fixup weightList checks
cbegeman c836ee2
Add oceanHistogram to user's guide
cbegeman c48363d
Fixup config options
cbegeman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
.. _task_oceanHistogram: | ||
|
||
oceanHistogram | ||
============== | ||
|
||
An analysis task for plotting histograms of 2-d variables of climatologies | ||
in ocean regions. | ||
|
||
Component and Tags:: | ||
|
||
component: ocean | ||
tags: climatology, histogram, regions, publicObs | ||
|
||
Configuration Options | ||
--------------------- | ||
|
||
The following configuration options are available for this task: | ||
|
||
.. code-block:: cfg | ||
|
||
[oceanHistogram] | ||
## options related to plotting histograms of climatologies of 2-d ocean | ||
## variables | ||
|
||
# list of variables to plot | ||
variableList = [] | ||
|
||
# list of observations to compare against | ||
obsList = ['AVISO'] | ||
|
||
# list of ocean variables by which to weight variables in variable list | ||
weightList = [] | ||
|
||
# list of regions to plot from the region list in [regions] below | ||
regionGroups = ['Ocean Basins'] | ||
|
||
# list of region names within the region group listed above | ||
regionNames = [] | ||
|
||
# Seasons to conduct analysis over | ||
# Note: start and end year will be inherited from climatology section | ||
seasons = ['ANN'] | ||
|
||
# Number of histogram bins | ||
bins = 40 | ||
|
||
Region Groups | ||
------------- | ||
|
||
A list of groups of regions, each of which will get its own gallery on | ||
the resulting analysis web page. See :ref:`config_region_groups` for | ||
more information on the available region groups. By default, | ||
the only region group is ``'Ocean Basins'``. | ||
|
||
Region Names | ||
------------ | ||
|
||
The ``regionNames`` can be set to ``['all']`` to plot all of the | ||
regions in the geojson file. In the case of ``Antarctic Regions``, these | ||
are: | ||
|
||
.. code-block:: cfg | ||
|
||
["Southern Ocean", "Southern Ocean 60S", "Eastern Weddell Sea Shelf", | ||
"Eastern Weddell Sea Deep", "Western Weddell Sea Shelf", | ||
"Western Weddell Sea Deep", "Weddell Sea Shelf", "Weddell Sea Deep", | ||
"Bellingshausen Sea Shelf", "Bellingshausen Sea Deep", "Amundsen Sea Shelf", | ||
"Amundsen Sea Deep", "Eastern Ross Sea Shelf", "Eastern Ross Sea Deep", | ||
"Western Ross Sea Shelf", "Western Ross Sea Deep", | ||
"East Antarctic Seas Shelf", "East Antarctic Seas Deep"] | ||
|
||
For ``Ocean Basins``, they are: | ||
|
||
.. code-block:: cfg | ||
|
||
["Atlantic_Basin", "Pacific_Basin", "Indian_Basin", "Arctic_Basin", | ||
"Southern_Ocean_Basin", "Mediterranean_Basin", "Global Ocean", | ||
"Global Ocean 65N to 65S", "Global Ocean 15S to 15N"] | ||
|
||
Variable List | ||
------------- | ||
The ``variableList`` option determines the variables to plot. Currently, only | ||
2-d variables are supported but we envision extending to 3-d variables in the | ||
near future. The variables are to be listed according to their registry names, with ``timeMontly_avg_`` prepended in the code. | ||
|
||
Observations | ||
------------ | ||
The ``obsList`` option contains a list of the names of observational data sets. | ||
Currently, "AVISO" is the only data set available, but we anticipate adding | ||
several additional data sets in the near future. | ||
|
||
:ref:`aviso_ssh` | ||
|
||
Weight List | ||
----------- | ||
The ``weightList`` option determines the variables to normalize by in plotting | ||
the histogram. This is an optional feature. If used, ``weightList`` should be | ||
of the same length as ``variableList``. We currently only support for 2-d | ||
variables that are the same size as their corresponding variables in | ||
``variableList`` and that are present in the restart file. For example, we use | ||
``areaCell`` to weight cell-centered variables such as ``ssh``. | ||
|
||
Bins | ||
---- | ||
``bins`` sets the number of bins to include in the histogram. | ||
|
||
Other Config Options | ||
-------------------- | ||
|
||
Other config options include ``lineWidth``, ``mainColor``, ``obsColor``, | ||
``controlColor``, ``titleFontSize``, ``defaultFontSize``. For more details on | ||
the remaining config options, see | ||
* :ref:`config_seasons` | ||
|
||
Example Result | ||
-------------- | ||
|
||
.. image:: examples/histogram_ssh_aviso_atl.png | ||
:width: 500 px | ||
:align: center |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing:
But this line looks perfectly fine to me. I'm going to ignore it but figured I'd note this in case you can spot the problem for a later clean-up PR.