NCPP / ClimateTranslator

2 stars 1 forks source link

overloaded calendar not properly passed to ocgis #95

Closed bekozi closed 10 years ago

bekozi commented 10 years ago

who: @bekozi

The 't_calendar' argument to a RequestDataset is not being correctly passed. The Hayhoe dataset we are using has an incorrect calendar attribute "365_days" v "365_day". I believe this use to work, but it looks like something changed in the backend.

Here it looks like the calendar variable is initialized, but I cannot tell if it is updated at a later point: https://github.com/NCPP/ClimateTranslator/blob/master/ncpp/ocg.py#L40

Associated CT/OCGIS error attached.

screenshot from 2014-01-15 10 31 06

LucaCinquini commented 10 years ago

It seems to me like the 't_calendar argument is passed in as part of each dataset, when creating a

datasets = ocgis.RequestDatasetCollection(args['datasets'])

For example:

'datasets': [{'time_region': None, 'uri': [u'/data/maurer/concatenated/Maurer02new_OBS_tas_daily.1971-2000.nc'], 'time_range': [datetime.datetime(1971, 1, 1, 0, 0), datetime.datetime(2000, 12, 31, 0, 0)], 'alias': u'tas', 't_units': u'days since 1940-01-01 00:00:00', 'variable': u'tas', 't_calendar': u'standard'}]

Does it need to be passed in some other way ?

LucaCinquini commented 10 years ago

This problem disappeared once we upgraded the OCG libraries to the latest version from master.

bekozi commented 10 years ago

Agree!