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 2013/08/16 15:55:56 UTC
svn commit: r1514713 -
/incubator/climate/branches/RefactorInput/ocw/dataset.py
Author: joyce
Date: Fri Aug 16 13:55:55 2013
New Revision: 1514713
URL: http://svn.apache.org/r1514713
Log:
CLIMATE-254 - Initial Bounds work
Modified:
incubator/climate/branches/RefactorInput/ocw/dataset.py
Modified: incubator/climate/branches/RefactorInput/ocw/dataset.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/dataset.py?rev=1514713&r1=1514712&r2=1514713&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/dataset.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/dataset.py Fri Aug 16 13:55:55 2013
@@ -18,6 +18,8 @@
'''
Classes:
Dataset - Container for a dataset's attributes and data.
+ Bounds - Container for holding spatial and temporal bounds information
+ for operations on a Dataset.
'''
import numpy
@@ -127,3 +129,19 @@ class Dataset:
raise ValueError(error)
return time_resolution
+
+
+class Bounds:
+ '''Container for holding spatial and temporal bounds information.
+
+ Certain operations require valid bounding information to be present for
+ correct functioning. Bounds guarantees that a function receives well
+ formed information without the need to do the validation manually.
+
+ Spatial and temporal bounds must follow the following guidelines.
+
+ * Latitude values must be in the range [-90, 90]
+ * Longitude values must be in the range [-180, 180]
+ * Temporal bounds must a valid datetime object
+ '''
+ pass