Commit b5d115cf authored by PIOLLE's avatar PIOLLE
Browse files

updated documentation

parent 14615e1f
===============================================
`add_tide` : adding tidal currents to a feature
===============================================
The `add_tide` command line creates a new file with the tidal current
components (northward and eastward) at every time and location of a given
feature (e.g. at all pixels of a swath, grid or track).
It is based on the :mod:`~cerbereutils.ancillary.tide` module.
Usage
=====
.. program:: add_tide
::
add_tide [-h] [-o OUTPUT] [-m MAPPER] [-d DATAMODEL] [-t TIDAL_MODEL]
[-k string] source_file
Add the tidal current components at each pixel time and location of the feature
given in input.
.. option:: -h, --help
show this help message and exit.
.. option:: feature_file
full path to the source file that stores the feature on which to compute the
tidal currents.
.. option:: -d, --source-model-class <DATAMODEL>
The name of the datamodel class of the feature (in **cerbere** library).
.. option:: m, --source-mapper-class <MAPPER>
The name of the mapper class of the feature (in **cerbere** library), used
to read the source_file data.
.. option:: t, --tidal-model <TIDAL_MODEL>
The name of the tide model to apply (currently only `fes2012` is available).
.. option:: -k, --mask <VARIABLE>
The processing of the tide values can take a lot of time. It is therefore
recommended to avoid processing over areas which are irrelevant (such as
land or where there are no valid data in the feature). For this, you can
specify a variable in the feature file, which native mask (as in a numpy
MaskedArray) will be used : tidal currents will not be estimated over the
masked areas.
Examples
========
Over a SAR image
----------------
Computing the tide field over a SAR image from Soprano database.
* the datamodel is :class:`~cerbere.datamodel.image.Image`
* the mapper is :class:`~cerbere.mapper.sopranoncfile.SopranoNCFile`
* we prevent from processing the tide over irrelevant areas by using the
mask of the MaskedArray returned by the variable `quality_flag`.
::
$ add_tide -p /home/cerdata/provider/cls/satellite/l2/envisat/asar/soprano-wind/2012/081/ASA_WSM_1PNPDE20120321_101733_000000923113_00008_52608_4735_SAR_wind.nc -m SopranoNCFile -d Image -k quality_flag
This results in two vector components, northward and eastward, for tidal
currents at each valid pixel of the SAR image.:
.. image:: ./images/tide_sar_eastward.png
.. image:: ./images/tide_sar_northward.png
Over a Grid
-----------
Gridding over the GlobCurrent/WaveWatch3 stokes grid::
$ add_tide -p /home/cercache/project/globcurrent/data/workdata/resampled/global_010/model/wind/ww3_ifremer_global_hindcast/20120930210000_RESAMP_ww3.201209_wnd.nc -m NCFile -d Grid -k uuss
Over an altimeter track
-----------------------
Adding tide over a altimeter track::
......@@ -50,13 +50,14 @@ the **closest neighbour** method (`-a closest_neighbour`)
.. Note::
The outfile keeps all important information to trace back to the original
data.
* `lat`, `lon`, and `time` are preserved in the `resampled_lat`,
`resampled_lon`, `resampled_time` fields.
* the indices of the resampled data in the source files are preserved
in the `resampled_x` and `resampled_y` variables
* the `distance_to_pixel` contains the distance from the original pixel
to its reprojected location.
data:
* `lat`, `lon`, and `time` are preserved in the `resampled_lat`,
`resampled_lon`, `resampled_time` fields.
* the indices of the resampled data in the source files are preserved
in the `resampled_x` and `resampled_y` variables
* the `distance_to_pixel` contains the distance from the original pixel
to its reprojected location.
The resampled zonal Stokes drift looks as follow:
......
ancillary package
=================
:mod:`ancillary` Package
------------------------
.. automodule:: cerbereutils.ancillary
:members:
:undoc-members:
:show-inheritance:
:mod:`icemask` Module
---------------------
.. automodule:: cerbereutils.ancillary.icemask
:members:
:undoc-members:
:show-inheritance:
:mod:`landmask` Module
----------------------
.. automodule:: cerbereutils.ancillary.landmask
:members:
:undoc-members:
:show-inheritance:
:mod:`tide` Module
------------------
.. automodule:: cerbereutils.ancillary.tide
:members:
:undoc-members:
:show-inheritance:
plot Package
=============
:mod:`plot` Package
-------------------
.. automodule:: cerbereutils.plot
:members:
:undoc-members:
:show-inheritance:
:mod:`mapping` Module
---------------------
.. automodule:: cerbereutils.plot.mapping
:members:
:undoc-members:
:show-inheritance:
:mod:`palette` Module
---------------------
.. automodule:: cerbereutils.plot.palette
:members:
:undoc-members:
:show-inheritance:
cerbereutils Package
====================
:mod:`resampler` Package
------------------------
.. automodule:: cerbere.resampler
:members:
:undoc-members:
:show-inheritance:
science Package
===============
:mod:`science` Package
----------------------
.. automodule:: cerbereutils.science
:members:
:undoc-members:
:show-inheritance:
:mod:`zenital` Module
---------------------
.. automodule:: cerbereutils.science.zenital
:members:
:undoc-members:
:show-inheritance:
resampling Package
==================
resampler Package
=================
:mod:`resampling` Package
:mod:`resampler` Package
------------------------
.. automodule:: cerbereutils.resampling
:members:
:undoc-members:
:show-inheritance:
:mod:`resampler` Module
-----------------------------
.. automodule:: cerbereutils.resampling.resampler
.. automodule:: cerinterp.resampler
:members:
:undoc-members:
:show-inheritance:
......@@ -20,7 +12,7 @@ resampling Package
:mod:`fastregrid` Module
-------------------------------
.. automodule:: cerbereutils.resampling.fastregrid
.. automodule:: cerinterp.fastregrid
:members:
:undoc-members:
:show-inheritance:
......
cerbereutils Package
====================
cerinterp Package
=================
:mod:`cerbereutils` Package
:mod:`cerinterp` Package
---------------------------
.. automodule:: cerbereutils
.. automodule:: cerinterp
:members:
:undoc-members:
:show-inheritance:
......@@ -14,8 +14,5 @@ Subpackages
.. toctree::
:maxdepth: 4
cerbereutils.ancillary
cerbereutils.plot
cerbereutils.resampling
cerbereutils.science
cerinterp.resampler
.. cerbere documentation master file, created by
sphinx-quickstart on Tue Dec 10 15:47:17 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to cerbere's reference documentation!
=============================================
Contents:
.. toctree::
:maxdepth: 4
cerbere
setup
......@@ -41,7 +41,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'cerbere-utils'
project = u'cerinterp'
copyright = u'2014, Jeff Piolle'
# The version info for the project you're documenting, acts as replacement for
......@@ -168,7 +168,7 @@ html_static_path = ['_static']
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'cerbereutilsdoc'
htmlhelp_basename = 'cerinterpdoc'
# -- Options for LaTeX output --------------------------------------------------
......@@ -187,7 +187,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'cerbereutils.tex', u'cerbereutils Documentation',
('index', 'cerinterp.tex', u'cerinterp Documentation',
u'Jeff Piolle', 'manual'),
]
......@@ -217,7 +217,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'cerbereutils', u'cerbereutils Documentation',
('index', 'cerinterp', u'cerinterp Documentation',
[u'Jeff Piolle'], 1)
]
......@@ -231,8 +231,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'cerbere-utils', u'cerbere-utils Documentation',
u'Jeff Piolle', 'cerbere-utils', 'One line description of project.',
('index', 'cerinterp', u'cerinterp Documentation',
u'Jeff Piolle', 'cerinterp', 'One line description of project.',
'Miscellaneous'),
]
......@@ -252,7 +252,7 @@ texinfo_documents = [
# -- Options for Epub output ---------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = u'cerbere-utils'
epub_title = u'cerinterp'
epub_author = u'Jeff Piolle'
epub_publisher = u'Jeff Piolle'
epub_copyright = u'2014, Jeff Piolle'
......
=======================================
Welcome to cerbere-utils documentation!
=======================================
===================================
Welcome to cerinterp documentation!
===================================
*cerbere-utils* is a collection of modules to perform classic operations on
EO data such as:
* resampling a feature on top of another
* adding information such as bathymetry, distance to coast or tide
to data files
*cerinterp* is a complementary package to *cerbere* package to perform
resampling and interpolation operations on EO data.
It provides both modules and handy command-line tools to perform this kind
of operations.
It is based on the *cerbere* python library for the file readers (mapper
It uses the *cerbere* python library for the file readers (mapper
package) and features (datamodel package).
......@@ -21,7 +18,7 @@ Reference documentation
.. toctree::
:maxdepth: 2
api/cerbereutils
api/cerinterp
Utilities
......@@ -31,4 +28,3 @@ Utilities
:maxdepth: 2
cerresample
add_tide
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment