You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2014/11/19 17:53:36 UTC
[21/21] climate git commit: Resolve CLIMATE-558. Merge PR #139.
Resolve CLIMATE-558. Merge PR #139.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/1adafc13
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/1adafc13
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/1adafc13
Branch: refs/heads/master
Commit: 1adafc13660c885d477fc9c90022522e642478a8
Parents: a5c394e 95f0943
Author: Michael Joyce <jo...@apache.org>
Authored: Wed Nov 19 08:52:26 2014 -0800
Committer: Michael Joyce <jo...@apache.org>
Committed: Wed Nov 19 08:52:26 2014 -0800
----------------------------------------------------------------------
docs/source/conf.py | 5 +-
docs/source/index.rst | 1 +
docs/source/ocw/utils.rst | 5 +
ocw/data_source/dap.py | 12 +-
ocw/data_source/esgf.py | 26 ++--
ocw/data_source/local.py | 22 ++--
ocw/data_source/rcmed.py | 30 +++--
ocw/dataset.py | 39 +++---
ocw/dataset_processor.py | 47 ++++---
ocw/evaluation.py | 19 +--
ocw/metrics.py | 48 ++++---
ocw/plotter.py | 275 +++++++++++++++++++++++++----------------
ocw/utils.py | 36 +++---
13 files changed, 342 insertions(+), 223 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/1adafc13/ocw/data_source/dap.py
----------------------------------------------------------------------
diff --cc ocw/data_source/dap.py
index b188cb5,1d6a494..3694410
--- a/ocw/data_source/dap.py
+++ b/ocw/data_source/dap.py
@@@ -25,14 -25,13 +25,16 @@@ def load(url, variable, name='')
'''Load a Dataset from an OpenDAP URL
:param url: The OpenDAP URL for the dataset of interest.
- :type url: String
+ :type url: :mod:`string`
+
:param variable: The name of the variable to read from the dataset.
- :type variable: String
+ :type variable: :mod:`string`
+
+ :param name: (Optional) A name for the loaded dataset.
- :type name: String
++ :type name: :mod:`string`
+
- :returns: A Dataset object containing the dataset pointed to by the
- OpenDAP URL.
+ :returns: A :class:`dataset.Dataset` containing the dataset pointed to by
+ the OpenDAP URL.
:raises: ServerError
'''
http://git-wip-us.apache.org/repos/asf/climate/blob/1adafc13/ocw/data_source/esgf.py
----------------------------------------------------------------------
diff --cc ocw/data_source/esgf.py
index 11eb138,1e8038d..c5ed03a
--- a/ocw/data_source/esgf.py
+++ b/ocw/data_source/esgf.py
@@@ -39,20 -38,25 +39,28 @@@ def load_dataset(dataset_id
''' Load an ESGF dataset.
:param dataset_id: The ESGF ID of the dataset to load.
- :type dataset_id: String
+ :type dataset_id: :mod:`string`
+
:param variable: The variable to load.
- :type variable: String
+ :type variable: :mod:`string`
+
:param esgf_username: ESGF OpenID value to use for authentication.
- :type esgf_username: String
+ :type esgf_username: :mod:`string`
+
:param esgf_password: ESGF Password to use for authentication.
- :type esgf_password: String
+ :type esgf_password: :mod:`string`
+
:param search_url: (Optional) The ESGF node to use for searching. Defaults
to the Jet Propulsion Laboratory node.
- :type search_url: String
+ :type search_url: :mod:`string`
+
:param elevation_index: (Optional) The elevation level to strip out when
loading the dataset using ocw.data_source.local.
+ :type elevation_index: :class:`int`
+
+ :param name: (Optional) A name for the loaded dataset.
- :type name: String
++ :type name: :mod:`string`
++
:param additional_constraints: (Optional) Additional key,value pairs to
pass as constraints to the search wrapper. These can be anything found
on the ESGF metadata page for a dataset.
http://git-wip-us.apache.org/repos/asf/climate/blob/1adafc13/ocw/data_source/local.py
----------------------------------------------------------------------
diff --cc ocw/data_source/local.py
index 5fd0571,ae6c286..c6405a9
--- a/ocw/data_source/local.py
+++ b/ocw/data_source/local.py
@@@ -128,18 -129,19 +130,22 @@@ def load_file(file_path
expects 3D data so a single layer needs to be stripped out when loading.
By default, the first elevation layer is used. If desired you may
specify the elevation value to use.
- :type elevation_index: Integer
+ :type elevation_index: :class:`int`
+
+ :param name: (Optional) A name for the loaded dataset.
- :type name: String
++ :type name: :mod:`string`
++
:param lat_name: (Optional) The latitude variable name to extract from the
dataset.
- :type lat_name: String
+ :type lat_name: :mod:`string`
+
:param lon_name: (Optional) The longitude variable name to extract from the
dataset.
- :type lon_name: String
+ :type lon_name: :mod:`string`
+
:param time_name: (Optional) The time variable name to extract from the
dataset.
- :type time_name: String
+ :type time_name: :mod:`string`
:returns: An OCW Dataset object with the requested variable's data from
the NetCDF file.
http://git-wip-us.apache.org/repos/asf/climate/blob/1adafc13/ocw/data_source/rcmed.py
----------------------------------------------------------------------
diff --cc ocw/data_source/rcmed.py
index 16cc21c,669556e..d184078
--- a/ocw/data_source/rcmed.py
+++ b/ocw/data_source/rcmed.py
@@@ -316,26 -316,31 +316,34 @@@ def parameter_dataset(dataset_id, param
'''Get data from one database(parameter).
:param dataset_id: Dataset id.
- :type dataset_id: Integer
+ :type dataset_id: :class:`int`
+
:param parameter_id: Parameter id
- :type parameter_id: Integer
+ :type parameter_id: :class:`int`
+
:param min_lat: Minimum latitude
- :type min_lat: Float
+ :type min_lat: :class:`float`
+
:param max_lat: Maximum latitude
- :type max_lat: Float
+ :type max_lat: :class:`float`
+
:param min_lon: Minimum longitude
- :type min_lon: Float
+ :type min_lon: :class:`float`
+
:param max_lon: Maximum longitude
- :type max_lon: Float
+ :type max_lon: :class:`float`
+
:param start_time: Start time
- :type start_time: Datetime
+ :type start_time: :class:`datetime.datetime`
+
:param end_time: End time
- :type end_time: Datetime
+ :type end_time: :class:`datetime.datetime`
+
+ :param name: (Optional) A name for the loaded dataset.
- :type name: String
++ :type name: :mod:`string`
+
:returns: An OCW Dataset object contained the requested data from RCMED.
- :rtype: ocw.dataset.Dataset object
+ :rtype: :class:`dataset.Dataset`
'''
parameters_metadata = get_parameters_metadata()