ulmo-dev / ulmo

clean, simple and fast access to public hydrology and climatology data.
http://ulmo.readthedocs.org
Other
169 stars 63 forks source link

ulmo.ncdc.gsod.get_data parameter argument does not work #92

Closed jirikadlec2 closed 10 years ago

jirikadlec2 commented 10 years ago

I am having trouble using the parameter (for example 'snow_depth') in the ulmo.ncdc.gsod.get_data function. Here is my example code:

ts = ulmo.ncdc.gsod.get_data('114140-99999', start='2013-01-01', end='2014-01-01', parameters=['snow_depth'])

this code doesn't return any data. There is a TypeError: Cannot change data-type for object array in \numpy\core_internal.py line 301, in _index_fields (called from ulmo\ncdc\gsod\core.py line 82, in year_data = year_data[parameters]

When I don't set the parameters, code works and I receive all the data: ts2 = ulmo.ncdc.gsod.get_data('114140-99999', start='2013-01-01', end='2014-01-01')

wilsaj commented 10 years ago

Good catch! Should be fixed now.