Skip to content

Commit b381644

Browse files
authored
add sphinx documentation (contents) (#2)
* switch to sphinx_rtd_theme * convert documentation from tex to sphinx using pandoc (fixes needed) * index.rst: incorporate abstract content and Fig 1 * prep_basic.rst, prep_demo.rst: include figures and treat fig refs * add the figure files * add sphinxcontrib-bibtex requirement * fix quotes, tables, and references * various fixes and improvements. * document octave branch, grid directories, and doInteractive option * add links for Octave and m_map
1 parent 2f97542 commit b381644

File tree

13 files changed

+635
-7
lines changed

13 files changed

+635
-7
lines changed

docs/bibli.bib

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
@string{angl = {Ann.\ Glaciol.}}
2+
@string{arfm = {Annu.~Rev.~Fluid Mech.}}
3+
@string{bams = {Bull.~Am.~Met.~Soc.}}
4+
@string{blm = {Bound.~Layer~Meteorol.}}
5+
@string{climd = {Clim.~Dynamics}}
6+
@string{cch = {Clim.\ Change}}
7+
@string{cup = {Cambridge University Press}}
8+
@string{dao = {Dyn.~Atmos.~Oceans}}
9+
@string{dkrz = {Deutsches Klimarechenzentrum (DKRZ)}}
10+
@string{dnmi = {The Norwegian Meteorological Institute (DNMI)}}
11+
@string{dsr = {Deep Sea Res.}}
12+
@string{ecmwf = {ECMWF}}
13+
@string{eos = {Eos~Trans.\ AGU}}
14+
@string{esa = {European Space Agency (ESA)}}
15+
@string{esapub = {ESA Publications Division, ESTEC, Noordwijk (NL)}}
16+
@string{estec = {European Space Research and Technology Centre (ESTEC)}}
17+
@string{gaos = {Global Atmos.~Ocean System}}
18+
@string{grl = {Geophys.~Res.~Lett.}}
19+
@string{ieee = {IEEE Trans.~Geosci. Remote Sensing}}
20+
@string{ifremer = {IFREMER/CERSAT}}
21+
@string{igarss = {IEEE Press, Piscataway, N.J., USA}}
22+
@string{jam = {J.~Appl.~Meteor.}}
23+
@string{jaot = {J.~Atmos.~Ocean.~Technol.}}
24+
@string{jas = {J.~Atmos.~Sci.}}
25+
@string{jclim = {J.~Clim.}}
26+
@string{jcp = {J.~Comput.~Phys.}}
27+
@string{jfm = {J.~Fluid Mech.}}
28+
@string{jgr = {J.~Geophys.~Res.}}
29+
@string{ijrs = {Int.~J.~Remote Sensing}}
30+
@string{jms = {J.~Mar.~Sys.}}
31+
@string{jpo = {J.~Phys.~Oceanogr.}}
32+
@string{mpi = {MPI f\"ur Meteorologie}}
33+
@string{mcp = {Meth. Comput. Phys.}}
34+
@string{mwr = {Mon.~Wea.~Rev.}}
35+
@string{om = {Ocean Modelling}}
36+
@string{pf = {Physics of Fluids}}
37+
@string{pd = {Physica D.}}
38+
@string{ptrsl = {{Phil.~Trans.~R.~Soc.~Lond.}}}
39+
@string{rgsp = {{Rev.~Geophys.~Space~Phys.}}}
40+
@string{qjrms = {{Q.~J.~R.~Meteorol.~Soc.}}}
41+
@string{siscicom= {SIAM J.\ Sci.\ Comput.}}
42+
@string{tel = {Tellus}}
43+
44+
@Article{for-eta:15,
45+
author = {Forget, G. and Campin, J.-M. and Heimbach, P. and Hill, C. N. and Ponte, R. M and Wunsch, C.},
46+
title = {{ECCO} version 4: an integrated framework for non-linear inverse modeling and global ocean state estimation},
47+
journal = {Geoscientific Model Development},
48+
volume = {8},
49+
year = {2015},
50+
number = {10},
51+
pages = {3071--3104},
52+
url = {http://www.geosci-model-dev.net/8/3071/2015/},
53+
doi = {10.5194/gmd-8-3071-2015}
54+
}
55+
56+
@Article{dspace-eccov4r2,
57+
AUTHOR = {Forget, G. and Campin, J.-M. and Heimbach, P. and Hill, C. N. and Ponte, R. M and Wunsch, C.},
58+
TITLE = {{ECCO} version 4: Second Release},
59+
YEAR = {2016},
60+
journal = {},
61+
URL = {http://hdl.handle.net/1721.1/102062}
62+
}
63+

docs/biblirefs.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _references:
2+
3+
.. only:: html
4+
5+
References
6+
**********
7+
8+
.. bibliography:: bibli.bib
9+
:all:
10+

docs/conf.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = []
33+
extensions = ['sphinx.ext.autodoc',
34+
'sphinx.ext.mathjax',
35+
'sphinx.ext.viewcode',
36+
'sphinxcontrib.bibtex']
3437

3538
# Add any paths that contain templates here, relative to this directory.
3639
templates_path = ['_templates']
@@ -76,13 +79,30 @@
7679
# If true, `todo` and `todoList` produce output, else they produce nothing.
7780
todo_include_todos = False
7881

82+
# number figures
83+
84+
numfig_format = {'figure': 'Figure %s',
85+
'table': 'Table %s',
86+
'code-block': 'Code %s',
87+
}
88+
89+
numfig = True
90+
91+
# number figures within section
92+
numfig_secnum_depth = 1
93+
94+
#math_number_all = True
95+
96+
numfig_format = {'figure': 'Figure %s', 'table': 'Table %s', 'code-block': 'Listing %s', 'section': 'Section %s'}
7997

8098
# -- Options for HTML output ----------------------------------------------
8199

82100
# The theme to use for HTML and HTML Help pages. See the documentation for
83101
# a list of builtin themes.
84102
#
85-
html_theme = 'alabaster'
103+
import sphinx_rtd_theme
104+
html_theme = "sphinx_rtd_theme"
105+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
86106

87107
# Theme options are theme-specific and customize the look and feel of a theme
88108
# further. For a list of options available for each theme, see the
@@ -93,7 +113,9 @@
93113
# Add any paths that contain custom static files (such as style sheets) here,
94114
# relative to this directory. They are copied after the builtin static files,
95115
# so a file named "default.css" will overwrite the builtin "default.css".
96-
html_static_path = ['_static']
116+
### gf: the following is commented to avoid warning
117+
### gf: see https://github.com/terasolunaorg/guideline/issues/1358
118+
# html_static_path = ['_static']
97119

98120
# Custom sidebar templates, must be a dictionary that maps document names
99121
# to template names.

docs/figs/fig12-eccov4.pdf

1.39 MB
Binary file not shown.

docs/figs/plot_m_map.pdf

429 KB
Binary file not shown.

docs/figs/sphere_all.pdf

1.08 MB
Binary file not shown.

docs/gcmfaces_demo_dirtree.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
::
3+
4+
gcmfaces/ (Matlab / Octave toolbox)
5+
MITprof/ (Matlab / Octave toolbox)
6+
m_map/ (Matlab / Octave toolbox)
7+
nctiles_grid/ (downloaded data)
8+
release2_climatology/
9+
nctiles_climatology/ (downloaded data)
10+
mat/ (created by software)
11+
tex/ (created by software)
12+
release2/
13+
nctiles_monthly/ (downloaded data)
14+
nctiles_remotesensing/ (downloaded data)
15+
profiles/ (downloaded data)
16+
mat/ (created by software)
17+
tex/ (created by software)
18+

docs/index.rst

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,50 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Welcome to gcmfaces's documentation!
7-
====================================
6+
Welcome to gcmfaces' documentation!
7+
===================================
8+
9+
.. A Generic Treatment Of Gridded Earth Variables In Matlab And Octave.
10+
11+
Here, you will learn about the `gcmfaces` toolbox that provides a generic
12+
treatment of gridded Earth variables in Matlab and Octave.
13+
14+
The `gcmfaces` toolbox handles gridded Earth variables as sets of connected
15+
arrays. This object-oriented approach allows users to
16+
write generic, compact analysis codes that readily become applicable
17+
to a wide variety of grids (e.g., those in :numref:`sphere_all`).
18+
`gcmfaces` notably allows for analysis of MITgcm output on any of its
19+
`familiar grids <ftp://mit.ecco-group.org/ecco_for_las/version_4/grids/>`__.
20+
It was originally developed as part the `ECCO version 4` framework along with
21+
the companion `MITprof` toolbox that handles unevenly
22+
distributed in-situ ocean observations :cite:`for-eta:15`.
23+
24+
This user manual provides an installation guide for `gcmfaces` and `MITprof`
25+
(:numref:`install`), a documentation of the basic `gcmfaces` features
26+
(:numref:`features`), and an overview of higher-level `gcmfaces` functionalities
27+
for mapping, transport, etc. operations (:numref:`demo` and :numref:`standard`).
828

929
.. toctree::
10-
:maxdepth: 2
11-
:caption: Contents:
30+
:maxdepth: 3
31+
:caption: Contents
32+
:numbered: 4
33+
34+
prep_install.rst
35+
prep_basic.rst
36+
prep_demo.rst
37+
prep_diags.rst
38+
biblirefs.rst
39+
40+
Sample grids
41+
============
1242

43+
.. figure:: figs/sphere_all.pdf
44+
:width: 95%
45+
:align: center
46+
:alt: TBD
47+
:name: sphere_all
1348

49+
Four approaches to gridding the Earth which are all commonly used in numerical models. Top left: lat-lon grid; mapping the Earth to a single rectangular array (`face`). Top right: cube-sphere grid; mapping the earth to the six faces of a cube. Bottom right: lat-lon-cap, `LLC`, grid (five faces). Bottom left: quadripolar grid (four faces). In this depiction, faces are color-coded, only grid line subsets are shown, and gaps are introduced between faces to highlight the defining characteristics of each grid.
1450

1551
Indices and tables
1652
==================

0 commit comments

Comments
 (0)