Skip to content

Commit 3b7f962

Browse files
authored
Merge pull request #933 from MPAS-Dev/develop
Merge develop into master
2 parents bccde34 + 314acea commit 3b7f962

File tree

71 files changed

+3447
-953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3447
-953
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# User defined config files
22
/config.*
3-
!/config.default
3+
/*.cfg
44

55
# Byte-compiled / optimized / DLL files
66
__pycache__/

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ used those components.
2828

2929
## Documentation
3030

31-
[https://mpas-dev.github.io/MPAS-Analysis/stable/](https://mpas-dev.github.io/MPAS-Analysis/stable/)
31+
[https://mpas-dev.github.io/MPAS-Analysis/latest/](https://mpas-dev.github.io/MPAS-Analysis/latest/)
3232

3333
## Installation for users
3434

@@ -116,7 +116,7 @@ for more details.
116116

117117
## Running the analysis
118118

119-
1. Create and empty config file (say `config.myrun`), copy `config.example`,
119+
1. Create and empty config file (say `myrun.cfg`), copy `example.cfg`,
120120
or copy one of the example files in the `configs` directory (if using a
121121
git repo) or download one from the
122122
[example configs directory](https://github.com/MPAS-Dev/MPAS-Analysis/tree/develop/configs).
@@ -125,9 +125,9 @@ for more details.
125125
from GitHub:
126126
[default.cfg](https://github.com/MPAS-Dev/MPAS-Analysis/tree/develop/mpas_analysis/default.cfg).
127127
3. If you installed the `mpas-analysis` package, run:
128-
`mpas_analysis config.myrun`. This will read the configuration
128+
`mpas_analysis myrun.cfg`. This will read the configuration
129129
first from `mpas_analysis/default.cfg` and then replace that
130-
configuraiton with any changes from from `config.myrun`
130+
configuraiton with any changes from from `myrun.cfg`
131131
4. If you want to run a subset of the analysis, you can either set the
132132
`generate` option under `[output]` in your config file or use the
133133
`--generate` flag on the command line. See the comments in
@@ -290,16 +290,15 @@ to be generated and is set up properly.
290290

291291
## Generating Documentation
292292

293+
Create a development environment as described above in "Installation for
294+
developers". Then run:
293295
To generate the `sphinx` documentation, run:
294296
```
295-
conda config --add channels conda-forge
296-
conda remove -y --all -n mpas-analysis-docs
297-
conda env create -f docs/environment.yml
298-
conda install -y -n mpas-analysis-docs mock pillow sphinx sphinx_rtd_theme
299-
conda activate mpas-analysis-docs
300-
pip install .
301-
rm -rf build dist mpas_analysis.egg-info
302297
cd docs
303298
make clean
304299
make html
305300
```
301+
The results can be viewed in your web browser by opening:
302+
```
303+
_build/html/index.html
304+
```

azure-pipelines.yml

Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,61 @@ jobs:
2121
vmImage: 'ubuntu-latest'
2222
strategy:
2323
matrix:
24-
Python38:
25-
python.version: '3.8'
2624
Python39:
2725
python.version: '3.9'
2826
Python310:
2927
python.version: '3.10'
28+
Python311:
29+
python.version: '3.11'
3030

3131
steps:
3232
- bash: echo "##vso[task.prependpath]$CONDA/bin"
3333
displayName: Add conda to PATH
3434

3535
- bash: |
36+
set -e
37+
eval "$(conda shell.bash hook)"
3638
conda config --add channels conda-forge
3739
conda config --set channel_priority strict
38-
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
39-
displayName: Create Anaconda build environment
40+
conda install --yes "conda<22.11.0" conda-build mamba boa
41+
displayName: Update conda base environment
4042
4143
- bash: |
44+
set -e
4245
eval "$(conda shell.bash hook)"
43-
conda activate build
44-
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
46+
conda activate
47+
# workaround based on recent failures
48+
rm /usr/share/miniconda/pkgs/cache/*.json
49+
conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
4550
displayName: Build MPAS-Analysis
4651
4752
- bash: |
53+
set -e
4854
eval "$(conda shell.bash hook)"
49-
conda activate build
50-
conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \
55+
conda activate
56+
mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
5157
python=$PYTHON_VERSION mpas-analysis pytest
52-
displayName: Create Anaconda test environment
58+
displayName: Create Anaconda mpas environment
5359
5460
- bash: |
61+
set -e
5562
eval "$(conda shell.bash hook)"
56-
conda activate test
63+
conda activate mpas
5764
pytest --pyargs mpas_analysis
5865
displayName: pytest
5966
6067
- bash: |
68+
set -e
6169
eval "$(conda shell.bash hook)"
62-
conda activate build
63-
conda create --yes --quiet --name docs -c ${CONDA_PREFIX}/conda-bld/ \
70+
conda activate
71+
mamba create --yes --quiet --name docs -c ${CONDA_PREFIX}/conda-bld/ \
6472
python=$PYTHON_VERSION mpas-analysis sphinx mock sphinx_rtd_theme \
6573
tabulate m2r2 "mistune<2"
66-
condition: eq(variables['python.version'], '3.9')
74+
condition: eq(variables['python.version'], '3.10')
6775
displayName: Create Anaconda docs environment
6876
6977
- bash: |
78+
set -e
7079
eval "$(conda shell.bash hook)"
7180
conda activate docs
7281
@@ -128,7 +137,7 @@ jobs:
128137
fi
129138
popd || exit 1
130139
fi
131-
condition: eq(variables['python.version'], '3.9')
140+
condition: eq(variables['python.version'], '3.10')
132141
displayName: build and deploy docs
133142
134143
- job:
@@ -137,38 +146,45 @@ jobs:
137146
vmImage: 'ubuntu-latest'
138147
strategy:
139148
matrix:
140-
Python39:
141-
python.version: '3.9'
149+
Python310:
150+
python.version: '3.10'
142151

143152
steps:
144153
- bash: echo "##vso[task.prependpath]$CONDA/bin"
145154
displayName: Add conda to PATH
146155

147156
- bash: |
157+
set -e
158+
eval "$(conda shell.bash hook)"
148159
conda config --add channels conda-forge
149160
conda config --set channel_priority strict
150-
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
151-
displayName: Create Anaconda build environment
161+
conda install --yes python=$PYTHON_VERSION "conda<22.11.0" conda-build mamba boa
162+
displayName: Update conda base environment
152163
153164
- bash: |
165+
set -e
154166
eval "$(conda shell.bash hook)"
155-
conda activate build
156-
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
167+
conda activate
168+
# workaround based on recent failures
169+
rm /usr/share/miniconda/pkgs/cache/*.json
170+
conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
157171
displayName: Build MPAS-Analysis
158172
159173
- bash: |
174+
set -e
160175
eval "$(conda shell.bash hook)"
161-
conda activate build
162-
conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \
176+
conda activate
177+
mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
163178
python=$PYTHON_VERSION mpas-analysis pytest
164-
conda activate test
179+
conda activate mpas
165180
pip install git+https://github.com/pydata/xarray.git
166181
167-
displayName: Create Anaconda test environment
182+
displayName: Create Anaconda mpas environment
168183
169184
- bash: |
185+
set -e
170186
eval "$(conda shell.bash hook)"
171-
conda activate test
187+
conda activate mpas
172188
pytest --pyargs mpas_analysis
173189
displayName: pytest
174190
@@ -178,12 +194,12 @@ jobs:
178194
vmImage: 'macOS-latest'
179195
strategy:
180196
matrix:
181-
Python38:
182-
python.version: '3.8'
183197
Python39:
184198
python.version: '3.9'
185199
Python310:
186200
python.version: '3.10'
201+
Python311:
202+
python.version: '3.11'
187203

188204
steps:
189205
- bash: echo "##vso[task.prependpath]$CONDA/bin"
@@ -193,26 +209,31 @@ jobs:
193209
displayName: Fix permissions
194210

195211
- bash: |
212+
set -e
213+
eval "$(conda shell.bash hook)"
196214
conda config --add channels conda-forge
197215
conda config --set channel_priority strict
198-
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
199-
displayName: Create Anaconda build environment
216+
conda install --yes "conda<22.11.0" conda-build mamba boa
217+
displayName: Update conda base environment
200218
201219
- bash: |
220+
set -e
202221
eval "$(conda shell.bash hook)"
203-
conda activate build
204-
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
222+
conda activate
223+
conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
205224
displayName: Build MPAS-Analysis
206225
207226
- bash: |
227+
set -e
208228
eval "$(conda shell.bash hook)"
209-
conda activate build
210-
conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \
229+
conda activate
230+
mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
211231
python=$PYTHON_VERSION mpas-analysis pytest
212-
displayName: Create Anaconda test environment
232+
displayName: Create Anaconda mpas environment
213233
214234
- bash: |
235+
set -e
215236
eval "$(conda shell.bash hook)"
216-
conda activate test
237+
conda activate mpas
217238
pytest --pyargs mpas_analysis
218239
displayName: pytest

ci/python3.8.yaml renamed to ci/python3.11.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pin_run_as_build:
55
min_pin: x.x
66
max_pin: x.x
77
python:
8-
- 3.8.* *_cpython
8+
- 3.11.* *_cpython

ci/recipe/meta.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "MPAS-Analysis" %}
2-
{% set version = "1.7.2" %}
2+
{% set version = "1.8.0" %}
33

44
package:
55
name: {{ name|lower }}
@@ -27,6 +27,7 @@ requirements:
2727
- cartopy_offlinedata
2828
- cmocean
2929
- dask
30+
- esmf >=8.0.0,<8.3.0
3031
- esmf=*=nompi_*
3132
- f90nml
3233
- geometric_features >=0.5.0

dev-spec.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cartopy >=0.18.0
88
cartopy_offlinedata
99
cmocean
1010
dask
11+
esmf >=8.0.0,<8.3.0
1112
esmf=*=nompi_*
1213
f90nml
1314
geometric_features>=0.5.0

docs/developers_guide/api.rst

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ Ocean tasks
9090

9191
ComputeAnomalySubtask
9292

93-
.. currentmodule:: mpas_analysis.ocean.plot_climatology_map_subtask
94-
95-
.. autosummary::
96-
:toctree: generated/
97-
98-
PlotClimatologyMapSubtask
99-
PlotClimatologyMapSubtask.set_plot_info
100-
10193
.. currentmodule:: mpas_analysis.ocean.plot_depth_integrated_time_series_subtask
10294

10395
.. autosummary::
@@ -126,14 +118,6 @@ Sea ice tasks
126118
TimeSeriesSeaIce
127119
ClimatologyMapIcebergConc
128120

129-
.. currentmodule:: mpas_analysis.sea_ice.plot_climatology_map_subtask
130-
131-
.. autosummary::
132-
:toctree: generated/
133-
134-
PlotClimatologyMapSubtask
135-
PlotClimatologyMapSubtask.set_plot_info
136-
137121

138122
Shared modules
139123
==============
@@ -267,6 +251,10 @@ Plotting
267251
ticks.plot_xtick_format
268252
add_inset
269253

254+
PlotClimatologyMapSubtask
255+
PlotClimatologyMapSubtask.set_plot_info
256+
257+
270258

271259
Projection
272260
----------

docs/users_guide/analysis_tasks.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ Analysis Tasks
3535
tasks/geojsonTransects
3636
tasks/oceanRegionalProfiles
3737
tasks/regionalTSDiagrams
38+
tasks/oceanHistogram
3839

3940
tasks/climatologyMapSeaIceConcNH
4041
tasks/climatologyMapSeaIceThickNH
4142
tasks/climatologyMapSeaIceConcSH
4243
tasks/climatologyMapSeaIceThickSH
4344
tasks/timeSeriesSeaIceAreaVol
4445

46+
tasks/climatologyMapSeaIceProductionNH
47+
tasks/climatologyMapSeaIceMeltingNH
48+
tasks/climatologyMapSeaIceProductionSH
49+
tasks/climatologyMapSeaIceMeltingSH
50+
4551
tasks/climatologyMapIcebergConcSH

docs/users_guide/config/output.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ Finally, we note that the ``generate`` option in the configuration file can
151151
be overridden by specifying the ``--generate`` option on the command line::
152152

153153
mpas_analysis --generate=all_publicObs,no_index,no_climatologyMapSST \
154-
config.my_run
154+
my_run.cfg
155155

156156
This example would override whatever ``generate`` option was specified in
157-
``config.my_run`` with a directive to generate only tasks that support the
157+
``my_run.cfg`` with a directive to generate only tasks that support the
158158
publicly available observations, skipping those using climate indices (e.g.
159159
El Ni |n~| o 3.4) and also skipping ``climatologyMapSST``.
160160

docs/users_guide/config/regions.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ web page.
3535
Region Groups
3636
-------------
3737

38-
Currently, seven analysis tasks (:ref:`task_climatologyMapAntarcticMelt`,
38+
Currently, eight analysis tasks (:ref:`task_climatologyMapAntarcticMelt`,
3939
:ref:`task_hovmollerOceanRegions`, :ref:`task_oceanRegionalProfiles`,
4040
:ref:`task_regionalTSDiagrams`, :ref:`task_streamfunctionMOC`,
41-
:ref:`task_timeSeriesAntarcticMelt`, and :ref:`task_timeSeriesOceanRegions`)
42-
use masks that define regions in an MPAS mesh as part of their analysis. Most
43-
of these region group are defined in
41+
:ref:`task_oceanHistogram`, :ref:`task_timeSeriesAntarcticMelt`, and
42+
:ref:`task_timeSeriesOceanRegions`) use masks that define regions in an MPAS
43+
mesh as part of their analysis. Most of these region group are defined in
4444
:py:func:`geometric_features.aggregation.get_aggregator_by_name()`.
45-
Several tasks (:ref:`task_hovmollerOceanRegions`,
45+
Several tasks (:ref:`task_hovmollerOceanRegions`, :ref:`task_oceanHistogram`,
4646
:ref:`task_oceanRegionalProfiles`, :ref:`task_regionalTSDiagrams`, and
4747
:ref:`task_timeSeriesOceanRegions`) can use any of the defined region groups.
48-
Currently, available region groups are: ``Antarctic Regions``,
48+
Currently, available region groups are: ``Artic Ocean Regions``, ``Antarctic Regions``,
4949
``Ocean Basins``, ``Ice Shelves``, and ``Ocean Subbasins``.
5050

5151
The option ``regionMaskSubdirectory`` in the ``[diagnostics]`` section specifies

0 commit comments

Comments
 (0)