Skip to content

Commit

Permalink
Merge pull request #714 from MPAS-Dev/develop
Browse files Browse the repository at this point in the history
Merge develop to master for 1.2.7 release
  • Loading branch information
xylar authored Jul 7, 2020
2 parents 21bf41f + 74003a6 commit 250c05c
Show file tree
Hide file tree
Showing 246 changed files with 11,022 additions and 6,432 deletions.
55 changes: 36 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
# Based on http://conda.pydata.org/docs/travis.html
language: python
sudo: false # use container based build
# Based on https://github.com/NOAA-ORR-ERD/gridded/blob/master/.travis.yml
language: minimal

sudo: false

notifications:
email: false

matrix:
fast_finish: true
include:
- python: 3.6
- python: 3.7
dist: xenial
sudo: true
- name: "python-3.6"
python: 3.6
env: CONDA_ENV=py36
- name: "python-3.7"
python: 3.7
env: CONDA_ENV=py37
- name: "python-3.8"
python: 3.8
env: CONDA_ENV=py38
- name: "python-3.7-xarray-master"
python: 3.7
env: CONDA_ENV=py37-xarray-master

env:
global:
secure: "RcARu+7YXJCWMDkwaP151JUuJW0aei0DG8ES6xwjlPjCy0wht1aDyZlcS4aE+hoQOZL/dGM4ppKLoxy7PlTMg3bocn4782VbnGT1p94FieuNVj+irs54UrTBouKbDmJQtgGPNV8WnXt3suKlcb62304eJs5Ryfl2ZOIpS+yBFcfUgTFn3wBGba4WO+wzx2mG+e5E6CIOLkoFlLYaJJ+2vShXHaCNYIgq4DrLYR1U/Jq6HAli6x3iETPqL0ZPdLAtB96lYYssV+4VZjyMzAkxNjj3RhRAIFH8K/Fe9VWke1MZqwnz0Bu2Z8GyhwFkdc8u+epUDCUIgGxGps57RgiBi2dmLW0RyNdQ2pG5WgT7M5/dkx4STq2ofv/YAKniG7LyM30X/H7G9/RlyIQ354P54265zdul1sasREeHKhNe82QsX2tos/jo7/E2f0uYtrQ1btSo1jItyTukOHER11W6yqYTSc4yqFJLCXxWFbEuzSyaIfVp7AJFHGjYU3A/ZdMG6Y+cs9Q/xapwx2Zoon67GGDJ7OItQeScKcF7pIYbo1uWWYHdQ9GBedyqWgqz75H6wCXbxo2jGUze/pP5I/2plBMeDiY4eSBulbbpupRXpj1uNOAZv+PiP1UDjwMQCzz/NwBLCcG+jxEDwOHnzoPwPnZeOBNPHXkEAZxeW9z9TjA="

before_install:
- 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
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda update -q conda
- conda info -a
- |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate base
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
conda update conda
conda config --add channels conda-forge --force
conda config --set channel_priority strict
conda env create --file ci/environment-$CONDA_ENV.yml
source activate TEST
# conda info --all
# conda list
install:
- conda create -n test_env -c conda-forge python=$TRAVIS_PYTHON_VERSION
- conda env update -n test_env -f ci/requirements.yml
- source activate test_env
- conda list
- ./ci/install.bash

script:
- pytest
- ./ci/test_and_publish_docs.bash
12 changes: 6 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
This software is open source software available under the BSD-3 license.

Copyright (c) 2019 Triad National Security, LLC. All rights reserved.
Copyright (c) 2019 Lawrence Livermore National Security, LLC. All rights reserved.
Copyright (c) 2019 UT-Battelle, LLC. All rights reserved.
Copyright (c) 2020 Triad National Security, LLC. All rights reserved.
Copyright (c) 2020 Lawrence Livermore National Security, LLC. All rights reserved.
Copyright (c) 2020 UT-Battelle, LLC. All rights reserved.


Copyright (c) 2019 Triad National Security, LLC. This program was produced
Copyright (c) 2020 Triad National Security, LLC. This program was produced
under U.S. Government contract 89233218CNA000001 for Los Alamos National
Laboratory (LANL), which is operated by Triad National Security, LLC for the
U.S. Department of Energy/National Nuclear Security Administration. All rights
Expand All @@ -16,7 +16,7 @@ irrevocable worldwide license in this material to reproduce, prepare derivative
works, distribute copies to the public, perform publicly and display publicly,
and to permit others to do so.

Copyright (c) 2019 Lawrence Livermore National Security, LLC. This work was
Copyright (c) 2020 Lawrence Livermore National Security, LLC. This work was
produced under the auspices of the U.S. Department of Energy by Lawrence
Livermore National Laboratory under Contract DE-AC52-07NA27344. This work was
prepared as an account of work sponsored by an agency of the United States
Expand All @@ -34,7 +34,7 @@ reflect those of the United States Government or Lawrence Livermore National
Security, LLC, and shall not be used for advertising or product endorsement
purposes.

Copyright 2019 UT-Battelle. LLC. This technology acquired under license from
Copyright 2020 UT-Battelle. LLC. This technology acquired under license from
UT-Battelle, LLC, the management and operating contractor of the Oak Ridge
National Laboratory acting on behalf of the U.S. Department of Energy under
Contract No. DE-AC05-00OR22725. The United States Government and UT-Battelle,
Expand Down
73 changes: 23 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# MPAS-Analysis
[![Build Status](https://travis-ci.org/MPAS-Dev/MPAS-Analysis.svg?branch=develop)](https://travis-ci.org/MPAS-Dev/MPAS-Analysis)
[![Documentation Status](http://readthedocs.org/projects/mpas-analysis/badge/?version=develop)](http://mpas-analysis.readthedocs.io/en/develop/?badge=develop)

Analysis for simulations produced with Model for Prediction Across Scales
(MPAS) components and the Energy Exascale Earth System Model (E3SM), which
Expand All @@ -12,8 +11,14 @@ used those components.

### Current build status

All platforms:
[![noarch](https://img.shields.io/circleci/project/github/conda-forge/mpas-analysis-feedstock/master.svg?label=noarch)](https://circleci.com/gh/conda-forge/mpas-analysis-feedstock)
<table><tr><td>All platforms:</td>
<td>
<a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=6243&branchName=master">
<img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/mpas-analysis-feedstock?branchName=master">
</a>
</td>
</tr>
</table>

### Current release info

Expand All @@ -23,8 +28,7 @@ All platforms:

## Documentation

[http://mpas-analysis.readthedocs.io](http://mpas-analysis.readthedocs.io)

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

## Installation

Expand All @@ -42,12 +46,11 @@ environment with the following packages:
* python >= 3.6
* numpy
* scipy
* matplotlib >= 3.0.2
* matplotlib-base >= 3.0.2
* netCDF4
* xarray >= 0.10.0
* xarray >= 0.14.1
* dask
* bottleneck
* basemap
* lxml
* nco >= 4.8.1
* pyproj
Expand All @@ -57,18 +60,22 @@ environment with the following packages:
* requests
* setuptools
* shapely
* cartopy
* geometric\_features
* cartopy >= 0.18.0
* cartopy\_offlinedata
* geometric\_features >= 0.1.9
* gsw
* pyremap
* pyremap < 0.1.0
* mpas\_tools >= 0.0.8

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 pyremap
conda config --set channel_priority strict
conda create -n mpas-analysis python=3.8 numpy scipy "matplotlib-base>=3.0.2" \
netCDF4 "xarray>=0.14.1" dask bottleneck lxml "nco>=4.8.1" pyproj \
pillow cmocean progressbar2 requests setuptools shapely "cartopy>=0.18.0" \
cartopy_offlinedata "geometric_features>=0.1.9" gsw "pyremap<0.1.0" \
"mpas_tools>=0.0.8"
conda activate mpas-analysis
```

Expand Down Expand Up @@ -97,47 +104,13 @@ two subdirectories:
* `mpas_analysis`, which includes mapping and region mask files for
standard resolution MPAS meshes
* `observations`, which includes the pre-processed observations listed in the
[Observations table](http://mpas-analysis.readthedocs.io/en/latest/observations.html)
[Observations table](https://mpas-dev.github.io/MPAS-Analysis/latest/observations.html)
and used to evaluate the model results

Once you have downloaded the analysis data, you will point to its location
(your equivalent of `path/to/mpas_analysis/diagnostics` above) in the config
option `baseDirectory` in the `[diagnostics]` section.

## Download Natural Earth data for cartopy

The cartopy package (used for creating inset maps) requires shapes of the land,
ocean and coastline from [Natural Earth](https://www.naturalearthdata.com).
Typically, these data are downloaded automatically by cartopy. However, for
systems with compute nodes that cannot reach the internet, you will need to
download the data manually into your conda environment from a login node before
launching any MPAS-Analysis jobs:

```
download_natural_earth_110m
```
(or if using the git repo: `./download_natural_earth_110m.py`).

If the data have already been downloaded, you will see nothing. Otherwise, you
should see a warning that the data are being downloaded.

**Note**: If you are having issues downloading the shape files (e.g., a time out error or forbidden error), follow these steps:

1. Run the following in python on your local machine (i.e., one that has no trouble downloading these files):
```
import cartopy.io.shapereader as shpreader
for name in ['ocean', 'coastline', 'land']:
shpfilename = shpreader.natural_earth(resolution='110m',
category='physical',
name=name)
shpreader.Reader(shpfilename)
```
2. On your local machine, run `python -c "import cartopy; print(cartopy.config['data_dir'])"`. This will print out the directory in which the natural earth shapefiles are being placed locally.
3. Copy these files onto the remote machine you are working on. Include folders `shapefiles/natural_earth/physical/*` where `*` is the set of shapefiles that were downloaded.
4. On your remote machine, run `python -c "import cartopy; print(cartopy.config['data_dir'])"`. Copy the `shapefiles` folder and all contents over to this location.
5. `cartopy` should now be able to find these files for `MPAS-Analysis`.`


## List Analysis

If you installed the `mpas-analysis` package, list the available analysis tasks
Expand Down
32 changes: 32 additions & 0 deletions ci/environment-py36.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: TEST
dependencies:
- python=3.6
- pytest
- six
- numpy
- scipy
- lxml
- xarray >=0.14.1
- matplotlib-base >=3.0.2
- dask
- netcdf4
- hdf5
- hdf4
- nco >=4.8.1
- pyproj
- pillow
- cmocean
- progressbar2
- requests
- shapely
- cartopy >=0.18.0
- geometric_features
- gsw
- pyremap
- mpas_tools
- sphinx
- mock
- sphinx_rtd_theme
- numpydoc
- tabulate >=0.8.2
- m2r
34 changes: 34 additions & 0 deletions ci/environment-py37-xarray-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: TEST
dependencies:
- python=3.7
- pytest
- six
- numpy
- scipy
- lxml
- matplotlib-base >=3.0.2
- dask
- netcdf4
- hdf5
- hdf4
- nco >=4.8.1
- pyproj
- pillow
- cmocean
- progressbar2
- requests
- shapely
- cartopy >=0.18.0
- geometric_features
- gsw
- pyremap
- mpas_tools
- sphinx
- mock
- sphinx_rtd_theme
- numpydoc
- tabulate >=0.8.2
- m2r
- pip:
# following https://github.com/xgcm/xgcm/blob/master/ci/environment-py37-upstream-master.yml
- git+https://github.com/pydata/xarray.git
32 changes: 32 additions & 0 deletions ci/environment-py37.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: TEST
dependencies:
- python=3.7
- pytest
- six
- numpy
- scipy
- lxml
- xarray >=0.14.1
- matplotlib-base >=3.0.2
- dask
- netcdf4
- hdf5
- hdf4
- nco >=4.8.1
- pyproj
- pillow
- cmocean
- progressbar2
- requests
- shapely
- cartopy >=0.18.0
- geometric_features
- gsw
- pyremap
- mpas_tools
- sphinx
- mock
- sphinx_rtd_theme
- numpydoc
- tabulate >=0.8.2
- m2r
32 changes: 32 additions & 0 deletions ci/environment-py38.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: TEST
dependencies:
- python=3.8
- pytest
- six
- numpy
- scipy
- lxml
- xarray >=0.14.1
- matplotlib-base >=3.0.2
- dask
- netcdf4
- hdf5
- hdf4
- nco >=4.8.1
- pyproj
- pillow
- cmocean
- progressbar2
- requests
- shapely
- cartopy >=0.18.0
- geometric_features
- gsw
- pyremap
- mpas_tools
- sphinx
- mock
- sphinx_rtd_theme
- numpydoc
- tabulate >=0.8.2
- m2r
21 changes: 21 additions & 0 deletions ci/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -e

pip install -e . --no-deps

if [[ "$TRAVIS_BRANCH" == "develop" ]]; then
export DOCS_VERSION="latest"
elif [[ "$TRAVIS_BRANCH" == "master" ]]; then
export DOCS_VERSION="stable"
elif [ -n "$TRAVIS_TAG" ]; then
# this is a tag build
export DOCS_VERSION="$TRAVIS_TAG"
else
DOCS_VERSION=`python -c "import mpas_analysis; print(mpas_analysis.__version__)"`
export DOCS_VERSION
fi
cd docs || exit 1
make clean
make html
cd ..
Loading

0 comments on commit 250c05c

Please sign in to comment.