Skip to content

Commit 1d6ec7c

Browse files
committed
Merge branch 'release-v8.0.0'
This merge introduces v8.0.0 of MPAS-Atmosphere. For a summary of significant changes, please see the annotation of the v8.0.0 tag.
2 parents 09bb84c + 49e9db7 commit 1d6ec7c

File tree

171 files changed

+41977
-15048
lines changed

Some content is hidden

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

171 files changed

+41977
-15048
lines changed

Makefile

+535-78
Large diffs are not rendered by default.

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MPAS-v7.3
1+
MPAS-v8.0.0
22
====
33

44
The Model for Prediction Across Scales (MPAS) is a collaborative project for
@@ -43,14 +43,17 @@ only described below the src directory.
4343

4444
MPAS-Model
4545
├── src
46-
│   ├── registry -- Code for building Registry.xml parser (Shared)
4746
│   ├── driver -- Main driver for MPAS in stand-alone mode (Shared)
4847
│   ├── external -- External software for MPAS (Shared)
4948
│   ├── framework -- MPAS Framework (Includes DDT Descriptions, and shared routines. Shared)
5049
│   ├── operators -- MPAS Opeartors (Includes Operators for MPAS meshes. Shared)
51-
│   ├── inc -- Empty directory for include files that Registry generates (Shared)
50+
│   ├── tools -- Empty directory for include files that Registry generates (Shared)
51+
│   │  ├── registry -- Code for building Registry.xml parser (Shared)
52+
│  │  └── input_gen -- Code for generating streams and namelist files (Shared)
5253
│   └── core_* -- Individual model cores.
53-
└────── testing_and_setup -- tools for setting up configurations and tests cases (Shared)
54+
│   └── inc -- Empty directory for include files that Registry generates
55+
├── testing_and_setup -- Tools for setting up configurations and test cases (Shared)
56+
└── default_inputs -- Copies of default stream and namelists files (Shared)
5457

5558
Model cores are typically developed independently. For information about
5659
building and running a particular core, please refer to that core's user's

azure-pipelines.yml

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
trigger:
2+
branches:
3+
include:
4+
- master
5+
- develop
6+
- ocean/develop
7+
- lanice/develop
8+
- ocean/coastal
9+
tags:
10+
include:
11+
- '*'
12+
pr:
13+
branches:
14+
include:
15+
- master
16+
- develop
17+
- ocean/develop
18+
- lanice/develop
19+
- ocean/coastal
20+
21+
jobs:
22+
- job:
23+
displayName: docs
24+
pool:
25+
vmImage: 'ubuntu-16.04'
26+
strategy:
27+
matrix:
28+
Python38:
29+
python.version: '3.8'
30+
31+
steps:
32+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
33+
displayName: Add conda to PATH
34+
35+
- bash: |
36+
set -e
37+
eval "$(conda shell.bash hook)"
38+
conda config --add channels conda-forge
39+
conda config --set channel_priority strict
40+
displayName: Configure conda
41+
42+
- bash: |
43+
set -e
44+
eval "$(conda shell.bash hook)"
45+
conda create -y -n docs python=$PYTHON_VERSION sphinx mock sphinx_rtd_theme m2r
46+
displayName: Create docs environment
47+
48+
- bash: |
49+
set -e
50+
eval "$(conda shell.bash hook)"
51+
conda activate docs
52+
53+
echo "source branch: $(Build.SourceBranch)"
54+
echo "repository: $(Build.Repository.Name)"
55+
56+
tag=$(git describe --tags $(git rev-list --tags --max-count=1))
57+
echo "tag: $tag"
58+
59+
REPO_PATH=$PWD
60+
61+
if [[ "$(Build.SourceBranch)" == refs/tags/* ]]; then
62+
echo "this is a tag build"
63+
export DOCS_VERSION="$tag"
64+
deploy=True
65+
run=True
66+
elif [[ "$(Build.SourceBranch)" == refs/heads/* ]]; then
67+
branch="$(Build.SourceBranchName)"
68+
echo "this is a merge build of $branch"
69+
deploy=True
70+
elif [[ "$(Build.SourceBranch)" == refs/pull/*/merge ]]; then
71+
branch="$(System.PullRequest.TargetBranch)"
72+
echo "this is a pull request into $branch"
73+
deploy=False
74+
fi
75+
76+
if [ -n ${branch} ]; then
77+
echo "This build is for branch $branch"
78+
if [[ ${branch} == "master" ]]; then
79+
export DOCS_VERSION="stable"
80+
run=True
81+
elif [[ ${branch} == "develop" ]]; then
82+
export DOCS_VERSION="latest"
83+
run=True
84+
elif [[ ${branch} == "ocean/develop" ]]; then
85+
export DOCS_VERSION="latest ocean"
86+
run=True
87+
elif [[ ${branch} == "ocean/coastal" ]]; then
88+
export DOCS_VERSION="latest coastal"
89+
run=True
90+
elif [[ ${branch} == "landice/develop" ]]; then
91+
export DOCS_VERSION="latest landice"
92+
run=True
93+
else
94+
echo "We don't build docs for $branch"
95+
deploy=False
96+
run=False
97+
fi
98+
fi
99+
100+
if [[ "${run}" == "False" ]]; then
101+
echo "Not building docs for branch ${branch}"
102+
exit 0
103+
fi
104+
105+
echo "Docs version: $DOCS_VERSION"
106+
echo "Deploy to gh-pages? $deploy"
107+
cd docs || exit 1
108+
make html
109+
110+
cd "$REPO_PATH" || exit 1
111+
112+
if [[ "$deploy" == "False" ]]; then
113+
exit 0
114+
fi
115+
116+
PUBLICATION_BRANCH=gh-pages
117+
DOCS_PATH="${DOCS_VERSION// /_}"
118+
# Checkout the branch
119+
pushd $HOME || exit 1
120+
git clone --branch=$PUBLICATION_BRANCH https://$(GitHubToken)@github.com/$(Build.Repository.Name) publish
121+
cd publish || exit 1
122+
123+
# Update pages
124+
if [[ -d "$DOCS_PATH" ]]; then
125+
git rm -rf "$DOCS_PATH" > /dev/null
126+
fi
127+
mkdir "$DOCS_PATH"
128+
cp -r "$REPO_PATH"/docs/_build/html/* "$DOCS_PATH"
129+
# Commit and push latest version
130+
git add .
131+
if git diff-index --quiet HEAD; then
132+
echo "No changes in the docs."
133+
else
134+
git config --local user.name "Azure Pipelines"
135+
git config --local user.email "[email protected]"
136+
git commit -m "[skip ci] Update $DOCS_VERSION"
137+
git push -fq origin $PUBLICATION_BRANCH
138+
fi
139+
popd || exit 1
140+
displayName: build and deploy docs
141+

docs/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = mpas_model
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

+182
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# MPAS-Model documentation build configuration file, created by
4+
# sphinx-quickstart on Sat Mar 25 14:39:11 2017.
5+
#
6+
# This file is execfile()d with the current directory set to its
7+
# containing dir.
8+
#
9+
# Note that not all possible configuration values are present in this
10+
# autogenerated file.
11+
#
12+
# All configuration values have a default; values that are commented out
13+
# serve to show the default.
14+
15+
import os
16+
17+
# -- General configuration ------------------------------------------------
18+
19+
# If your documentation needs a minimal Sphinx version, state it here.
20+
#
21+
# needs_sphinx = '1.0'
22+
23+
# Add any Sphinx extension module names here, as strings. They can be
24+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
25+
# ones.
26+
extensions = ['sphinx.ext.autodoc',
27+
'sphinx.ext.autosummary',
28+
'sphinx.ext.intersphinx',
29+
'sphinx.ext.mathjax',
30+
'sphinx.ext.viewcode',
31+
'sphinx.ext.napoleon']
32+
33+
autosummary_generate = True
34+
35+
# Otherwise, the Return parameter list looks different from the Parameters list
36+
napoleon_use_rtype = False
37+
# Otherwise, the Attributes parameter list looks different from the Parameters
38+
# list
39+
napoleon_use_ivar = True
40+
41+
# Add any paths that contain templates here, relative to this directory.
42+
templates_path = ['_templates']
43+
44+
# The suffix(es) of source filenames.
45+
# You can specify multiple suffix as a list of string:
46+
#
47+
source_suffix = ['.rst']
48+
# source_suffix = '.rst'
49+
50+
# The master toctree document.
51+
master_doc = 'index'
52+
53+
# General information about the project.
54+
project = u'MPAS-Model'
55+
copyright = u'Copyright (c) 2013-2020, Los Alamos National Security, LLC (LANS) (Ocean: LA-CC-13-047;' \
56+
u'Land Ice: LA-CC-13-117) and the University Corporation for Atmospheric Research (UCAR).'
57+
author = u'Xylar Asay-Davis, Doug Jacobsen, Michael Duda, Mark Petersen, ' \
58+
u'Matt Hoffman, Adridan Turner, Philip Wolfram'
59+
60+
# The version info for the project you're documenting, acts as replacement for
61+
# |version| and |release|, also used in various other places throughout the
62+
# built documents.
63+
if 'DOCS_VERSION' in os.environ:
64+
version = os.environ.get('DOCS_VERSION')
65+
release = version
66+
else:
67+
# The short X.Y.Z version.
68+
version = '7.0'
69+
# The full version, including alpha/beta/rc tags.
70+
release = '7.0'
71+
72+
# The language for content autogenerated by Sphinx. Refer to documentation
73+
# for a list of supported languages.
74+
#
75+
# This is also used if you do content translation via gettext catalogs.
76+
# Usually you set "language" from the command line for these cases.
77+
language = None
78+
79+
# List of patterns, relative to source directory, that match files and
80+
# directories to ignore when looking for source files.
81+
# This patterns also effect to html_static_path and html_extra_path
82+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store',
83+
'design_docs/template.md']
84+
85+
# The name of the Pygments (syntax highlighting) style to use.
86+
pygments_style = 'sphinx'
87+
88+
# If true, `todo` and `todoList` produce output, else they produce nothing.
89+
todo_include_todos = False
90+
91+
92+
# -- Options for HTML output ----------------------------------------------
93+
94+
# The theme to use for HTML and HTML Help pages. See the documentation for
95+
# a list of builtin themes.
96+
#
97+
98+
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
99+
# docs.readthedocs.org
100+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
101+
102+
if not on_rtd: # only import and set the theme if we're building docs locally
103+
import sphinx_rtd_theme
104+
html_theme = 'sphinx_rtd_theme'
105+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
106+
107+
# Theme options are theme-specific and customize the look and feel of a theme
108+
# further. For a list of options available for each theme, see the
109+
# documentation.
110+
#
111+
# html_theme_options = {}
112+
113+
# Add any paths that contain custom static files (such as style sheets) here,
114+
# relative to this directory. They are copied after the builtin static files,
115+
# so a file named "default.css" will overwrite the builtin "default.css".
116+
html_static_path = ['_static']
117+
118+
119+
# -- Options for HTMLHelp output ------------------------------------------
120+
121+
# Output file base name for HTML help builder.
122+
htmlhelp_basename = 'mpas_model_doc'
123+
124+
125+
# -- Options for LaTeX output ---------------------------------------------
126+
127+
latex_elements = {
128+
# The paper size ('letterpaper' or 'a4paper').
129+
#
130+
# 'papersize': 'letterpaper',
131+
132+
# The font size ('10pt', '11pt' or '12pt').
133+
#
134+
# 'pointsize': '10pt',
135+
136+
# Additional stuff for the LaTeX preamble.
137+
#
138+
# 'preamble': '',
139+
140+
# Latex figure (float) alignment
141+
#
142+
# 'figure_align': 'htbp',
143+
}
144+
145+
# Grouping the document tree into LaTeX files. List of tuples
146+
# (source start file, target name, title,
147+
# author, documentclass [howto, manual, or own class]).
148+
latex_documents = [
149+
(master_doc, 'mpas_model.tex', u'MPAS-Model Documentation',
150+
author, 'manual'),
151+
]
152+
153+
154+
# -- Options for manual page output ---------------------------------------
155+
156+
# One entry per manual page. List of tuples
157+
# (source start file, name, description, authors, manual section).
158+
man_pages = [
159+
(master_doc, 'mpas_model', u'MPAS-Model Documentation',
160+
[author], 1)
161+
]
162+
163+
164+
# -- Options for Texinfo output -------------------------------------------
165+
166+
# Grouping the document tree into Texinfo files. List of tuples
167+
# (source start file, target name, title, author,
168+
# dir menu entry, description, category)
169+
texinfo_documents = [
170+
(master_doc, 'mpas_model', u'MPAS-Model Documentation',
171+
author, 'MPAS-Model', 'One line description of project.',
172+
'Miscellaneous'),
173+
]
174+
175+
# Example configuration for intersphinx: refer to the Python standard library.
176+
intersphinx_mapping = {
177+
'python': ('https://docs.python.org/', None),
178+
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
179+
'xarray': ('http://xarray.pydata.org/en/stable/', None)}
180+
181+
182+
github_doc_root = 'https://github.com/rtfd/recommonmark/tree/master/doc/'

docs/index.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MPAS-Model
2+
==========
3+
4+
The Model for Prediction Across Scales (MPAS) is a collaborative project for
5+
developing atmosphere, ocean, and other earth-system simulation components for
6+
use in climate, regional climate, and weather studies. The primary development
7+
partners are the climate modeling group at Los Alamos National Laboratory
8+
(COSIM) and the National Center for Atmospheric Research. Both primary
9+
partners are responsible for the MPAS framework, operators, and tools common to
10+
the applications; LANL has primary responsibility for the ocean, sea-ice and
11+
land-ice models, and NCAR has primary responsibility for the atmospheric model.
12+
13+
The MPAS framework facilitates the rapid development and prototyping of models
14+
by providing infrastructure typically required by model developers, including
15+
high-level data types, communication routines, and I/O routines. By using MPAS,
16+
developers can leverage pre-existing code and focus more on development of
17+
18+
.. toctree::
19+
:titlesonly:
20+
21+
ocean/index
22+
23+

0 commit comments

Comments
 (0)