Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
695abd5
add getting started guide
Sep 13, 2018
cae401b
Move LeProvost and ADCIRC tidal database extractors into Harmonica re…
Sep 14, 2018
e457395
Merge branch 'master' of https://github.com/erdc/harmonica into aquav…
Sep 19, 2018
a648bb3
Fix TPX0 extraction in test case. Use (lat, lon) instead of (x, y) lo…
Sep 19, 2018
800a6b9
changed a list comprehension
Sep 20, 2018
b6a5677
Merge pull request #6 from erdc/example
kajiglet Sep 21, 2018
880c4cd
fix docstring and missing import
kajiglet Sep 21, 2018
488570e
Merge pull request #9 from erdc/docstring_fix
kajiglet Sep 21, 2018
1bb7a49
Reorganized test case into Tutorials folder. Added Sphinx files for a…
Sep 21, 2018
c931951
Subclass TPX0 from TidalDb, Move resource download/extract into base …
Oct 4, 2018
a2f5abe
removed redundant have_constituent code, fixed doc strings, deleted u…
Oct 4, 2018
4addbae
Merge pull request #1 from aclark-aquaveo/aquaveo-leprovost
aclark-aquaveo Oct 4, 2018
4dd9aba
Fix docstrings and Sphinx errors, update tutorial
Oct 4, 2018
20248e1
Converted LeProvost legi files to a NetCDF format I think matches 201…
Oct 7, 2018
ebacf9e
Removed unused 'resource_dir' variable from LeProvostDB. Transition t…
Oct 8, 2018
aab8580
Removed unused delete_files attribute from ResourceManager
Oct 8, 2018
33ce591
Added support for FES2014 NetCDF4 files. One file per constituent. We…
Oct 8, 2018
1f88e4a
Updated LeProvost download link to point at the new NetCDF4 version. …
Oct 8, 2018
e67c72e
Merge pull request #2 from aclark-aquaveo/aquaveo-leprovost-adcirc
aclark-aquaveo Oct 8, 2018
828b753
Update LeProvost resource URL
Oct 9, 2018
2ab1b35
Added changes for an updated ADCIRC tidal database. This includes moving
Oct 11, 2018
0ebbc0f
Converted the phase to radians for the calculation. Cleaned up commented
Oct 17, 2018
19883d8
Merge pull request #3 from aclark-aquaveo/aquaveo-leprovost-adcirc
aclark-aquaveo Oct 18, 2018
059fd5c
Merge pull request #4 from aclark-aquaveo/adcirc
aclark-aquaveo Oct 18, 2018
afe31aa
Added a level of obstruction to the Constituents interface so the use…
Oct 18, 2018
8a8d609
Clean up commented code
Oct 18, 2018
4cf2228
Refactored some of the common interpolation code in LeProvost and ADC…
Oct 18, 2018
be1c546
Converted the ResourceManager RESOURCE dictionary values to classes.
Oct 19, 2018
44e8595
Fix CLI functions to work with the list of pandas.DataFrame from Cons…
Oct 19, 2018
f9ceac0
Use pytides to get astronomical variables. Removed some unused method…
Oct 19, 2018
fe25d2f
Don't download ADCIRC resources until necessary.
Oct 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = harmonica
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12 changes: 12 additions & 0 deletions doc/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
To build the documentation for harmonica execute the following command in a console:

make <format>

Format is typically "html", but to view all available formats execute the make command with no arguments.

After executing the make command, the output files will be in the build directory. "Index.html"
(or "Index" with other format extension) is the root of the documentation pages.

Edit the *.rst reStructuredText files in the source directory to change the layout/content/format
of the pages. Edit the conf.py file in the source directory to change the settings used by Sphinx
to generate the documentation.
36 changes: 36 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=harmonica

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
10 changes: 10 additions & 0 deletions doc/source/Documentation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Documentation
=====================================

.. toctree::

tidal_database
tidal_constituents
adcirc_database
leprovost_database
resource
6 changes: 6 additions & 0 deletions doc/source/Installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _Installation:

Installation
=====================================

TODO: Provide steps for installing the harmonica package.
6 changes: 6 additions & 0 deletions doc/source/Tutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Tutorials
=====================================

.. toctree::

simple_python
13 changes: 13 additions & 0 deletions doc/source/adcirc_database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
harmonica.adcirc_database Module
=====================================

This module is used to extract amplitude and phase tidal harmonics from the
ADCIRC tidal database. NOAA constituent speeds are also provided (https://tidesandcurrents.noaa.gov).
This module can also extract the frequency, earth tidal reduction factor, amplitude, nodal factor,
and equilibrium argument for specified constituents at a specified time. ADCIRC provides two
tidal databases, one for the Northwest Atlantic and one for Northeast Pacific. Specify
the appropriate location on construction.

.. automodule:: harmonica.adcirc_database
:members:
:noindex:
168 changes: 168 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
import sys
# sys.path.insert(0, os.path.abspath('.'))
sys.path.append("C:\\Users\\aclark\\AppData\\Local\\conda\\conda\\envs\\harmonica\\Lib\\site-packages")


# -- Project information -----------------------------------------------------

project = 'harmonica'
copyright = '2018, Kevin Winters'
author = 'Kevin Winters'

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.1'


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'harmonicadoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'harmonica.tex', 'harmonica Documentation',
'Kevin Winters', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'harmonica', 'harmonica Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'harmonica', 'harmonica Documentation',
author, 'harmonica', 'One line description of project.',
'Miscellaneous'),
]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
28 changes: 28 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. harmonica documentation master file, created by
sphinx-quickstart on Thu Sep 20 17:01:36 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to harmonica's documentation!
=====================================

harmonica is an API and CLI to get amplitude, phase, and speed of tidal harmonics
from various tidal models. harmonica currently supports TPXO (versions 7.2, 8, and 9),
ADCIRC, and LeProvost. Also provides functionality to build water surface time series
utilizing pytides reconstruction and access to pytides deconstruction.

.. toctree::
:maxdepth: 1

Installation
Documentation
Tutorials



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
11 changes: 11 additions & 0 deletions doc/source/leprovost_database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
harmonica.leprovost_database Module
=====================================

This module is used to extract amplitude and phase tidal harmonics from the
LeProvost tidal database. NOAA constituent speeds are also provided (https://tidesandcurrents.noaa.gov).
This module can also provide the frequency, earth tidal reduction factor, amplitude,
nodal factor, and equilibrium argument for specified constituents at a specified time.

.. automodule:: harmonica.leprovost_database
:members:
:noindex:
6 changes: 6 additions & 0 deletions doc/source/resource.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
harmonica.resource Module
=====================================

.. automodule:: harmonica.resource
:members:
:noindex:
Loading