Skip to content

Commit

Permalink
Merge pull request #995 from MPAS-Dev/develop
Browse files Browse the repository at this point in the history
Merge develop into main for v1.10.0 release
  • Loading branch information
xylar authored Mar 22, 2024
2 parents 83c4054 + f24f15c commit 79bc218
Show file tree
Hide file tree
Showing 51 changed files with 1,364 additions and 295 deletions.
43 changes: 18 additions & 25 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
Expand All @@ -37,27 +37,22 @@ jobs:
eval "$(conda shell.bash hook)"
conda config --add channels conda-forge
conda config --set channel_priority strict
conda update --yes --all
conda install --yes mamba
# workaround based on recent failures
rm /usr/share/miniconda/pkgs/cache/*.json
mamba install --yes conda-build boa
displayName: Update conda base environment
conda create --yes --name build_env conda-build
displayName: Create build environment
- bash: |
set -e
eval "$(conda shell.bash hook)"
conda activate
# workaround based on recent failures
rm /usr/share/miniconda/pkgs/cache/*.json
conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
conda activate build_env
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
displayName: Build MPAS-Analysis
- bash: |
set -e
eval "$(conda shell.bash hook)"
conda activate
mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
conda create --yes --quiet --name mpas \
-c ${CONDA_PREFIX}/envs/build_env/conda-bld/ \
python=$PYTHON_VERSION mpas-analysis pytest
displayName: Create Anaconda mpas environment
Expand All @@ -72,7 +67,8 @@ jobs:
set -e
eval "$(conda shell.bash hook)"
conda activate
mamba create --yes --quiet --name docs -c ${CONDA_PREFIX}/conda-bld/ \
conda create --yes --quiet --name docs \
-c ${CONDA_PREFIX}/envs/build_env/conda-bld/ \
python=$PYTHON_VERSION mpas-analysis sphinx mock sphinx_rtd_theme \
tabulate "m2r2>=0.3.3" "mistune<2"
condition: eq(variables['python.version'], '3.10')
Expand Down Expand Up @@ -151,7 +147,7 @@ jobs:
strategy:
matrix:
Python310:
python.version: '3.10'
python.version: '3.11'

steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
Expand All @@ -162,28 +158,25 @@ jobs:
eval "$(conda shell.bash hook)"
conda config --add channels conda-forge
conda config --set channel_priority strict
conda update --yes --all
conda install --yes mamba
# workaround based on recent failures
rm /usr/share/miniconda/pkgs/cache/*.json
mamba install --yes conda-build boa
displayName: Update conda base environment
conda create --yes --name build_env conda-build
displayName: Create build environment
- bash: |
set -e
eval "$(conda shell.bash hook)"
conda activate
conda activate build_env
# workaround based on recent failures
rm /usr/share/miniconda/pkgs/cache/*.json
conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
displayName: Build MPAS-Analysis
- bash: |
set -e
eval "$(conda shell.bash hook)"
conda activate
mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
python=$PYTHON_VERSION mpas-analysis pytest
conda create --yes --quiet --name mpas \
-c ${CONDA_PREFIX}/envs/build_env/conda-bld/ \
python=$PYTHON_VERSION mpas-analysis pytest
conda activate mpas
pip install git+https://github.com/pydata/xarray.git
Expand Down
2 changes: 1 addition & 1 deletion ci/python3.9.yaml → ci/python3.12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pin_run_as_build:
min_pin: x.x
max_pin: x.x
python:
- 3.9.* *_cpython
- 3.12.* *_cpython
4 changes: 2 additions & 2 deletions ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "MPAS-Analysis" %}
{% set version = "1.9.1" %}
{% set version = "1.10.0" %}

package:
name: {{ name|lower }}
Expand Down Expand Up @@ -43,7 +43,7 @@ requirements:
- pillow >=10.0.0,<11.0.0
- progressbar2
- pyproj
- pyremap >=0.0.14,<0.1.0
- pyremap >=1.2.0,<2.0.0
- python-dateutil
- requests
- scipy
Expand Down
2 changes: 1 addition & 1 deletion dev-spec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pandas
pillow >=10.0.0,<11.0.0
progressbar2
pyproj
pyremap>=0.0.14,<0.1.0
pyremap>=1.2.0,<2.0.0
python-dateutil
requests
scipy
Expand Down
2 changes: 2 additions & 0 deletions docs/developers_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Ocean tasks
.. autosummary::
:toctree: generated/

ConservationTask
ClimatologyMapSST
ClimatologyMapSSS
ClimatologyMapMLD
Expand All @@ -75,6 +76,7 @@ Ocean tasks
ClimatologyMapWaves
IndexNino34
MeridionalHeatTransport
OceanHistogram
StreamfunctionMOC
TimeSeriesOHCAnomaly
TimeSeriesTemperatureAnomaly
Expand Down
16 changes: 4 additions & 12 deletions docs/tutorials/dev_getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -642,24 +642,16 @@ climate index.
## options related to producing time series plots, often to compare against
## observations and previous runs
# start and end years for timeseries analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
# start and end years for timeseries analysis. Out-of-bounds values will lead
# to an error.
startYear = 1
endYear = 5
[index]
## options related to producing nino index.
# start and end years for El Nino 3.4 analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
# start and end years for El Nino 3.4 analysis. Out-of-bounds values will lead
# to an error.
startYear = 1
endYear = 5
Expand Down
16 changes: 4 additions & 12 deletions docs/tutorials/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -443,24 +443,16 @@ climate index.
## options related to producing time series plots, often to compare against
## observations and previous runs
# start and end years for timeseries analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
# start and end years for timeseries analysis. Out-of-bounds values will lead
# to an error.
startYear = 1
endYear = 5
[index]
## options related to producing nino index.
# start and end years for El Nino 3.4 analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
# start and end years for timeseries analysis. Out-of-bounds values will lead
# to an error.
startYear = 1
endYear = 5
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 @@ -37,6 +37,7 @@ Analysis Tasks
tasks/oceanRegionalProfiles
tasks/regionalTSDiagrams
tasks/oceanHistogram
tasks/conservation

tasks/climatologyMapSeaIceConcNH
tasks/climatologyMapSeaIceThickNH
Expand Down
15 changes: 4 additions & 11 deletions docs/users_guide/config/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,15 @@ determine the start and end years of climate indices (such as El Ni |n~| o
[index]
## options related to producing nino index.

# start and end years for El Nino 3.4 analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
# start and end years for El Nino 3.4 analysis. Out-of-bounds values will lead
# to an error.
startYear = 1
endYear = end
endYear = 20

Start and End Year
------------------

A custom config file should specify a start and end year for time axis.
If ``errorOnMissing = False`` in the ``input`` section and the start or end
year is beyond the range of the simulation, the range will be reduced to those
dates with available data and a warning message will be displayed. If
``errorOnMissing = True``, out of range year will produce an error.
Out of range year will produce an error.


15 changes: 4 additions & 11 deletions docs/users_guide/config/timeSeries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,16 @@ for anomalies::
# only the anomaly over a later span of years is of interest.
# anomalyRefYear = 249

# start and end years for timeseries analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
# start and end years for timeseries analysis. Out-of-bounds values will lead
# to an error.
startYear = 1
endYear = end
endYear = 20

Start and End Year
------------------

A custom config file should specify a start and end year for time series.
If ``errorOnMissing = False`` in the ``input`` section and the start or end
year is beyond the range of the simulation, the range will be reduced to those
dates with available data and a warning message will be displayed. If
``errorOnMissing = True``, out of range year will produce an error.
Out of range year will produce an error.


Anomaly Reference Year
Expand Down
4 changes: 2 additions & 2 deletions docs/users_guide/tasks/climatologyMapAntarcticMelt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ climatologyMapAntarcticMelt
===========================

An analysis task for comparison of Antarctic maps of melt rates against
observations from `Adusumilli et al. (2020) <https://doi.org/10.1038/s41561-020-0616-z>`_.
observations from `Paolo et al. (2023) <https://doi.org/10.5194/tc-17-3409-2023>`_.

Component and Tags::

Expand Down Expand Up @@ -76,7 +76,7 @@ For more details, see:
Observations
------------

:ref:`adusumilli_melt`
:ref:`paolo_melt`

Example Result
--------------
Expand Down
63 changes: 63 additions & 0 deletions docs/users_guide/tasks/conservation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.. _task_conservation:

conservation
============

An analysis task for plotting histograms of 2-d variables of climatologies
in ocean regions.

Component and Tags::

component: ocean
tags: timeseries, conservation

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

The following configuration options are available for this task:

.. code-block:: cfg
[conservation]
## options related to producing time series plots, often to compare against
## observations and previous runs
# the year from which to compute anomalies if not the start year of the
# simulation. This might be useful if a long spin-up cycle is performed and
# only the anomaly over a later span of years is of interest.
# anomalyRefYear = 249
# start and end years for timeseries analysis. Use endYear = end to indicate
# that the full range of the data should be used. If errorOnMissing = False,
# the start and end year will be clipped to the valid range. Otherwise, out
# of bounds values will lead to an error. In a "control" config file used in
# a "main vs. control" analysis run, the range of years must be valid and
# cannot include "end" because the original data may not be available.
startYear = 1
endYear = end
# Plot types to generate. The following plotTypes are supported:
# total_energy_flux : Total energy flux
# absolute_energy_error : Energy error
# ice_salt_flux : Salt flux related to land ice and sea ice
# absolute_salt_error : Salt conservation error
# total_mass_flux : Total mass flux
# total_mass_change : Total mass anomaly
# land_ice_mass_change : Mass anomaly due to land ice fluxes
# land_ice_ssh_change : SSH anomaly due to land ice fluxes
# land_ice_mass_flux_components : Mass fluxes from land ice
plotTypes = 'land_ice_mass_flux_components'
# line colors for the main, control and obs curves
# see https://matplotlib.org/stable/gallery/color/named_colors.html
# and https://matplotlib.org/stable/tutorials/colors/colors.html
mainColor = black
controlColor = tab:red
Example Result
--------------

.. image:: examples/total_mass_flux.png
:width: 500 px
:align: center
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/users_guide/tasks/timeSeriesAntarcticMelt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ timeSeriesAntarcticMelt
=======================

An analysis task for plotting time series of mean melt rates per ice shelf or
Antarctic region along with observations from `Rignot et al. (2013)`_
and `Adusumilli et al. (2020) <https://doi.org/10.1038/s41561-020-0616-z>`_.
Antarctic region along with observations from `Rignot et al. (2013)`_,
`Adusumilli et al. (2020) <https://doi.org/10.1038/s41561-020-0616-z>`_,
and `Paolo et al. (2023) <https://doi.org/10.5194/tc-17-3409-2023>`_.

Component and Tags::

Expand Down
3 changes: 3 additions & 0 deletions docs/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Documentation On GitHub
`v1.7.2`_ `1.7.2`_
`v1.8.0`_ `1.8.0`_
`v1.9.0`_ `1.9.0`_
`v1.10.0`_ `1.10.0`_
================ ===============

.. _`stable`: ../stable/index.html
Expand All @@ -38,6 +39,7 @@ Documentation On GitHub
.. _`v1.7.2`: ../1.7.2/index.html
.. _`v1.8.0`: ../1.8.0/index.html
.. _`v1.9.0`: ../1.9.0/index.html
.. _`v1.10.0`: ../1.10.0/index.html
.. _`main`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/main
.. _`develop`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/develop
.. _`1.2.6`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.2.6
Expand All @@ -54,3 +56,4 @@ Documentation On GitHub
.. _`1.7.2`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.7.2
.. _`1.8.0`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.8.0
.. _`1.9.0`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.9.0
.. _`1.10.0`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.10.0
2 changes: 1 addition & 1 deletion mpas_analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
import matplotlib as mpl
mpl.use('Agg')

__version_info__ = (1, 9, 1)
__version_info__ = (1, 10, 0)
__version__ = '.'.join(str(vi) for vi in __version_info__)
Loading

0 comments on commit 79bc218

Please sign in to comment.