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

Error retrieving values for Shortwave surface downward direct irradiance #371

Open nathancoliver opened 1 month ago

nathancoliver commented 1 month ago

I recently tried to set Select.variable equal to Shortwave surface downward direct irradiance, but I got the following error message:

AttributeError: 'numpy.ndarray' object has no attribute 'append'

Here is a minimum working example:

import climakitae as ck

selections = ck.Select()
selections.variable = "Shortwave surface downward direct irradiance"

Shortwave surface downward direct irradiance is listed in the variable_descriptions.csv. Is it possible to retrieve values for this variable? Is there a canonical reference for which variables are available?

elehmer commented 1 month ago

Issue "fixed" in #372. Still need to follow up on param logic.

elehmer commented 1 month ago

@nathancoliver That variable was hidden to the GUI using the show=FALSE attribute. Technically you are supposed to be able retrieve data that is hidden to the GUI so we will look into that. Might be just failing into a logic hole that is handled by the GUI (such as changing frequency before selecting variable). Regardless, we have enabled this variable in the GUI so you should be to use it now.

elehmer commented 1 month ago

Error is still thrown when doing it manually. Workaround is to set selections.timescale = "hourly" first.

nathancoliver commented 1 month ago

It is working now. Thank you very much.

elehmer commented 1 month ago

Reopening so we can remember to see about fixing changing variable before timescale or other parameters.