Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.2-incubating
-
None
-
OS X
Description
When a new Dataset Object is initialized the parameters that are required (4 total) are all checked individually as well as together, and if any of these tests fail a ValueError is raised with the following message to the user:
"Dataset given improperly shaped array during initialization."
I would like to try and make that error message more specific about which one of the checks raised the error.
Example Messages:
--------------------------------
- Longitude Array is not 1 dimension
- Latitude Array is not 1 dimension
- Times Array is not 1 dimension
- Times Array doesn't contain datetime objects
- Values Arrays is not 3 dimensional
- Values Array is out of order. Expected (times, lat, lon) but got ([what ever we discovered] lon, times, lat)
To some people this amount of check and rigor might seem overkill, but I think this is necessary since the rest of the OCW code depends on have a properly formed OCW Dataset object to work with.