Skip to content

Commit

Permalink
Merge pull request #645 from MPAS-Dev/develop
Browse files Browse the repository at this point in the history
Merge develop to master for v1.2.6 release
  • Loading branch information
xylar authored Oct 29, 2019
2 parents 1634138 + 3a32933 commit 21bf41f
Show file tree
Hide file tree
Showing 61 changed files with 767 additions and 2,203 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,13 @@ notifications:
matrix:
fast_finish: true
include:
- python: 2.7
- python: 3.6
- python: 3.7
dist: xenial
sudo: true

before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ conda activate mpas-analysis
To use the latest version for developers, you will need to set up a conda
environment with the following packages:

* python >= 3.6
* numpy
* scipy
* matplotlib >= 3.0.2
Expand All @@ -59,14 +60,15 @@ environment with the following packages:
* cartopy
* geometric\_features
* gsw
* pyremap

These can be installed via the conda command:
```
conda config --add channels conda-forge
conda create -n mpas-analysis python=3.7 numpy scipy "matplotlib>=3.0.2" \
netCDF4 "xarray>=0.10.0" dask bottleneck basemap lxml "nco>=4.8.1" pyproj \
pillow cmocean progressbar2 requests setuptools shapely cartopy \
geometric_features gsw
geometric_features gsw pyremap
conda activate mpas-analysis
```

Expand Down
1 change: 1 addition & 0 deletions ci/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ dependencies:
- cartopy
- geometric_features
- gsw
- pyremap
11 changes: 11 additions & 0 deletions configs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ the output `baseDirectory`) and using them to run the analysis.
To run tasks in parallel via a job queue, copy and modify the machine-specific
job script or the default job script.

## Analysis focused on polar regions

For analysis such as E3SM cryosphere simulations that is focused on polar
regions, include polarRegions.conf *before* your custom config file on the
command line.

Example:
```
python -m mpas_analysis configs/polarRegions.conf my_favorite.conf --generate=climatologyMapSSH --purge
```

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## compared against

# mainRunName is a name that identifies the simulation being analyzed.
mainRunName = 20190301.GMPAS-DIB-IAF-ISMF.T62_oRRS30to10v3wLI.theta
mainRunName = 20190405.GMPAS-DIB-IAF-ISMF.T62_oRRS30to10v3wLI.theta

# config file for a control run to which this run will be compared. The
# analysis should have already been run to completion once with this config
Expand All @@ -23,7 +23,7 @@ mainRunName = 20190301.GMPAS-DIB-IAF-ISMF.T62_oRRS30to10v3wLI.theta
## options related to executing parallel tasks

# the number of parallel tasks (1 means tasks run in serial, the default)
parallelTaskCount = 8
parallelTaskCount = 12

# the parallelism mode in ncclimo ("serial" or "bck")
# Set this to "bck" (background parallelism) if running on a machine that can
Expand All @@ -45,7 +45,7 @@ baseDirectory = /lus/theta-fs0/projects/ClimateEnergy_3/diagnostics
## options related to reading in the results to be analyzed

# directory containing model results
baseDirectory = /lus/theta-fs0/projects/OceanClimate_2/outputForExampleThetaAnalysisConfigs/20190301.GMPAS-DIB-IAF-ISMF.T62_oRRS30to10v3wLI.theta/run
baseDirectory = /lus/theta-fs0/projects/OceanClimate_2/sprice/20190405.GMPAS-DIB-IAF-ISMF.T62_oRRS30to10v3wLI.theta/run

# names of ocean and sea ice meshes (e.g. oEC60to30v3, oQU240v3, oRRS30to10v3, etc.)
mpasMeshName = oRRS30to10v3wLI
Expand All @@ -62,10 +62,9 @@ seaIceStreamsFileName = streams.seaice
## etc.

# directory where analysis should be written (**** MAKE SURE TO UPDATE WITH YOUR PREFERRED PATH ***)
baseDirectory = /projects/OceanClimate_2/yourUsername/path/here
baseDirectory = /projects/ClimateEnergy_3/yourUsername/path/here

# a list of analyses to generate. Valid names can be seen by running:
# mpas_analysis --list
# a list of analyses to generate. Valid names can be seen by running:# mpas_analysis --list
# This command also lists tags for each analysis.
# Shortcuts exist to generate (or not generate) several types of analysis.
# These include:
Expand All @@ -87,7 +86,7 @@ baseDirectory = /projects/OceanClimate_2/yourUsername/path/here
# option:
# mpas_analysis config.analysis --generate \
# all,no_ocean,all_timeSeries
generate = ['all', 'no_eke', 'no_BGC', 'no_icebergs', 'no_min', 'no_max']
generate = ['all', 'no_BGC', 'no_icebergs', 'no_min', 'no_max' ]

[climatology]
## options related to producing climatologies, typically to compare against
Expand All @@ -97,9 +96,20 @@ generate = ['all', 'no_eke', 'no_BGC', 'no_icebergs', 'no_min', 'no_max']
useNcclimo = False

# the first year over which to average climatalogies
startYear = 1
startYear = 41
# the last year over which to average climatalogies
endYear = 2
endYear = 50

# if useNcclimo = False, the number of threads dask is allowed to spawn for each# process computing a climatology for a given month or season
# Decrease this number if mpasClimatology* subtasks are running
# out of available threads
daskThreads = 2

# if useNcclimo = False, the number of subprocesses that each climatology
# subtask gets counted as occupying.
# Increase this number if mpasClimatology* subtasks are running
# out of memory, and fewer tasks will be allowed to run at once
subprocessCount = 2

[timeSeries]
## options related to producing time series plots, often to compare against
Expand All @@ -109,7 +119,7 @@ endYear = 2
# like start_year = 1 and end_year = 9999 will be clipped to the valid range
# of years, and is a good way of insuring that all values are used.
startYear = 1
endYear = 2
endYear = 50

[index]
## options related to producing nino index.
Expand All @@ -119,7 +129,7 @@ endYear = 2
# of years, and is a good way of insuring that all values are used.
# For valid statistics, index times should include at least 30 years
startYear = 1
endYear = 2
endYear = 50

[streamfunctionMOC]
## options related to plotting the streamfunction of the meridional overturning
Expand All @@ -132,3 +142,4 @@ endYear = 2
# NOTE: this is a temporary option that will be removed once the online
# MOC takes into account the bolus velocity when GM is on.
usePostprocessingScript = True

Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ endYear = 30
# For valid statistics, index times should include at least 30 years
startYear = 1
endYear = 30

4 changes: 3 additions & 1 deletion configs/cori/job_script.cori-haswell.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ if [ ! -f $run_config_file ]; then
exit 1
fi

srun -N 1 -n 1 python -m mpas_analysis $run_config_file
# For an E3SM cryosphere run, include configs/polarRegions.conf, or exclude
# this extra config file for defalut parameters
srun -N 1 -n 1 python -m mpas_analysis configs/polarRegions.conf $run_config_file

# If running from the conda package, use this instead:
#srun -N 1 -n 1 mpas_analysis $run_config_file
Expand Down
8 changes: 5 additions & 3 deletions configs/cori/job_script.cori-knl.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ if [ ! -f $run_config_file ]; then
exit 1
fi

# if using the mpas_analysis conda package instead of the git repo, remove
# "python -m"
# For an E3SM cryosphere run, include configs/polarRegions.conf, or exclude
# this extra config file for defalut parameters
srun -N 1 -n 1 python -m mpas_analysis configs/polarRegions.conf $run_config_file

srun -N 1 -n 1 python -m mpas_analysis $run_config_file
# if using the mpas_analysis conda package instead of the git repo
# srun -N 1 -n 1 mpas_analysis $run_config_file

143 changes: 143 additions & 0 deletions configs/polarRegions.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
[climatologyMapWoa]
## options related to plotting climatology maps of Temperature and Salinity
## fields at various levels, including the sea floor against control model
## results and WOA climatological data

# list of depths in meters (positive up) at which to analyze, 'top' for the
# sea surface. Note that, for seasons='ANN', depths can be as deep as 5500 m,
# otherwise use a maximum depth of 1500 m.
depths = ['top', -50, -200, -400, -600, -800]

[climatologyMapWoaTemperature]
## options related to plotting climatology maps of potential temperature
## at various levels, including the sea floor against control model results
## and WOA18 climatological data

# A dictionary with keywords for the norm
normArgsResult = {'vmin': -2., 'vmax': 2.}

[climatologyMapWoaSalinity]
## options related to plotting climatology maps of salinity
## at various levels, including the sea floor against control model results
## and WOA18 climatological data

# A dictionary with keywords for the norm
normArgsResult = {'vmin': 33.8, 'vmax': 35.0}


[TSDiagramsForAntarcticRegions]
## options related to plotting T/S diagrams of Antarctic regions

# The minimum and maximum depth over which fields are plotted, default is
# to take these values from the geojson feature's zmin and zmax properties.
zmin = -1000
zmax = 0


[soseTransects]
## options related to plotting model vs. Southern Ocean State Estimate (SOSE)
## transects.

# longitudes of transects
# Western Weddell 1, Filchner (318=42W), Western Weddell 2 (325=35W),
# West Maud Rise, Fimbul (0), Amery (75E), Totten (117E),
# George V coast, Merzt (145E), Wilkes (160E), Western Ross (184=176W),
# Center Ross (187=173W), Eastern Ross (198=162W),
# Amudsen, Thwaites (253=107W), Bellingshausen (280=80W),
# West Antarctica (288=72W)
# Note: Transects at 325, 145, 160, 184, 198 and 288 are chosen for comparison with
# Whitworth et al. (1998) doi: 10.1029/AR075p0001, Figs. 3, 7, 6, 5, 4, 10, respectively.
longitudes = [318., 325., 0., 75., 117., 145., 160., 184., 187., 198., 253.,
280., 288.]

[soseTemperatureTransects]
# options related to plotting SOSE transects of potential temperature

# whether the colormap is indexed or continuous
colormapTypeResult = indexed
# color indices into colormapName for filled contours
colormapIndicesResult = [0, 14, 28, 57, 85, 113, 125, 142, 170, 180, 198, 227,
240, 255]
# colormap levels/values for contour boundaries
colorbarLevelsResult = [-1.6, -1.2, -0.4, 0.0, 0.4, 0.6, 0.8, 1.0, 1.5, 2.0,
3.0, 4.0, 6.0]

# whether the colormap is indexed or continuous
colormapTypeDifference = indexed
# color indices into colormapName for filled contours
colormapIndicesDifference = [0, 28, 57, 85, 113, 128, 128, 142, 170, 198, 227,
255]
# colormap levels/values for contour boundaries
colorbarLevelsDifference = [-2, -1.5, -1.25, -1, -0.2, 0, 0.2, 1, 1.25, 1.5, 2]

[soseSalinityTransects]
## options related to plotting SOSE transects of salinity

# whether the colormap is indexed or continuous
colormapTypeResult = indexed
# color indices into colormapName for filled contours
colormapIndicesResult = [0, 20, 40, 80, 120, 140, 160, 180, 200, 220, 240, 255]
# colormap levels/values for contour boundaries
colorbarLevelsResult = [34.1, 34.2, 34.3, 34.4, 34.5, 34.55, 34.6, 34.65,
34.68, 34.7, 35.0]

# whether the colormap is indexed or continuous
colormapTypeDifference = indexed
# color indices into colormapName for filled contours
colormapIndicesDifference = [0, 28, 57, 85, 113, 128, 128, 142, 170, 198, 227,
255]
# colormap levels/values for contour boundaries
colorbarLevelsDifference = [-0.5, -0.2, -0.1, -0.05, -0.02, 0, 0.02, 0.05,
0.1, 0.2, 0.5]


[woceTransects]
## options related to plotting model vs. World Ocean Circulation Experiment
## (WOCE) transects.

# Horizontal bounds of the plot (in km), or an empty list for automatic bounds
# The bounds are a 2-element list of the minimum and maximum distance along the
# transect
horizontalBounds = {'WOCE_A21': [630., 830.],
'WOCE_A23': [0., 200.],
'WOCE_A12': [4620., 4820.]}

[woceTemperatureTransects]
## options related to plotting WOCE transects of potential temperature

# whether the colormap is indexed or continuous
colormapTypeResult = indexed
# color indices into colormapName for filled contours
colormapIndicesResult = [0, 14, 28, 57, 85, 113, 125, 142, 170, 180, 198, 227,
240, 255]
# colormap levels/values for contour boundaries
colorbarLevelsResult = [-1.6, -1.2, -0.4, 0.0, 0.4, 0.6, 0.8, 1.0, 1.5, 2.0,
3.0, 4.0, 6.0]

# whether the colormap is indexed or continuous
colormapTypeDifference = indexed
# color indices into colormapName for filled contours
colormapIndicesDifference = [0, 28, 57, 85, 113, 128, 128, 142, 170, 198, 227,
255]
# colormap levels/values for contour boundaries
colorbarLevelsDifference = [-2, -1.5, -1.25, -1, -0.2, 0, 0.2, 1, 1.25, 1.5, 2]

[woceSalinityTransects]
## options related to plotting WOCE transects of salinity

# whether the colormap is indexed or continuous
colormapTypeResult = indexed
# color indices into colormapName for filled contours
colormapIndicesResult = [0, 20, 40, 80, 120, 140, 160, 180, 200, 220, 240, 255]
# colormap levels/values for contour boundaries
colorbarLevelsResult = [34.1, 34.2, 34.3, 34.4, 34.5, 34.55, 34.6, 34.65,
34.68, 34.7, 35.0]

# whether the colormap is indexed or continuous
colormapTypeDifference = indexed
# color indices into colormapName for filled contours
colormapIndicesDifference = [0, 28, 57, 85, 113, 128, 128, 142, 170, 198, 227,
255]
# colormap levels/values for contour boundaries
colorbarLevelsDifference = [-0.5, -0.2, -0.1, -0.05, -0.02, 0, 0.02, 0.05,
0.1, 0.2, 0.5]
21 changes: 1 addition & 20 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Top-level script: mpas_analysis
update_generate
run_analysis
wait_for_task

Downloading data
================

Expand Down Expand Up @@ -221,25 +221,6 @@ Time Series

MpasTimeSeriesTask

Interpolation
-------------
.. currentmodule:: mpas_analysis.shared.interpolation

.. autosummary::
:toctree: generated/

Remapper

.. currentmodule:: mpas_analysis.shared.grid

.. autosummary::
:toctree: generated/

MpasMeshDescriptor
LatLonGridDescriptor
ProjectionGridDescriptor


Namelist and Streams Files
--------------------------
.. currentmodule:: mpas_analysis.shared.io.namelist_streams_interface
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
# built documents.
#
# The short X.Y version.
version = u'1.2.5'
version = u'1.2.6'
# The full version, including alpha/beta/rc tags.
release = u'1.2.5'
release = u'1.2.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading

0 comments on commit 21bf41f

Please sign in to comment.