pangeo-data / scikit-downscale

Statistical climate downscaling in Python
https://scikit-downscale.readthedocs.io/en/latest/
Apache License 2.0
185 stars 47 forks source link

add time index check and corresponding error handling to PointWiseDownscaler _da_to_df function #37

Open dgergel opened 4 years ago

dgergel commented 4 years ago

Currently the PointWiseDownscaler seems to fail if the model data time dimension does not have a pandas Datetime Index, and it fails with KeyError: 'time' even when the time attribute is present. This occurs in the _da_to_df function when transposing the data array and extracting the time index for the resulting dataframe.

jhamman commented 4 years ago

Thanks for the report. Can you provide an example of the dataset you were using that triggered this error?