cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Retrieve throws error when retrieving Reanalysis data for Station #390

Open elehmer opened 2 months ago

elehmer commented 2 months ago

If you switch to Station data type and select Historical Reconstruction and then retrieve you get the following error message:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In [4], line 1
----> 1 data_to_use = selections.retrieve()
      2 data_to_use

File ~/src/climakitae/climakitae/core/data_interface.py:1207, in DataParameters.retrieve(self, config, merge)
   1203     else:
   1204         raise ValueError(
   1205             "To retrieve data specified in a configuration file, please input the path to your local configuration csv as a string"
   1206         )
-> 1207 data_return = read_catalog_from_select(self)
   1209 if isinstance(data_return, list):
   1210     for l in data_return:

File ~/src/climakitae/climakitae/core/data_load.py:868, in read_catalog_from_select(selections)
    866     if "Historical Climate" not in original_scenario_historical:
    867         selections.scenario_historical.remove("Historical Climate")
--> 868         da["scenario"] = [x.split("Historical + ")[1] for x in da.scenario.values]
    869     selections.time_slice = original_time_slice
    871 return da

File ~/src/climakitae/climakitae/core/data_load.py:868, in <listcomp>(.0)
    866     if "Historical Climate" not in original_scenario_historical:
    867         selections.scenario_historical.remove("Historical Climate")
--> 868         da["scenario"] = [x.split("Historical + ")[1] for x in da.scenario.values]
    869     selections.time_slice = original_time_slice
    871 return da

IndexError: list index out of range

Select options: image