Closed ssolson closed 1 year ago
Well so... what data are you interested in extracting? h5 files have datasets and each dataset has a name. You need to use that name to extract the data from that dataset. For example, if i was looking at NSRDB files and i wanted global horizontal irradiance (GHI), the dataset name in the h5 file is "ghi"
Hey, Grant if I am making the following request:
from rex import MultiYearWaveX, WaveX
data_type = '3-hour'
years = [1995]
lat_lon = (43.489171,-125.152137)
region ='West_Coast'
parameter = 'significant_wave_height'
wave_path = f'/nrel/US_wave/{region}/{region}_wave_*.h5'
wave_kwargs = {
'tree':None,
'unscale':True,
'str_decode':True,
'hsds':True,
'years':years
}
with MultiYearWaveX(wave_path, **wave_kwargs) as rex_waves:
gid = rex_waves.lat_lon_gid(lat_lon)
rex_waves.get_gid_df(ds_name, gid)
How do I know what ds_name
is and where do I find a list of potentialds_names
?
i think your "parameter" variable is the dataset name you're looking for. The dsets attribute of the WaveX object will print the datasets available.
Hey Rex team I am having issues using the API docs because I cannot find the definition of
ds_name
here: https://nrel.github.io/rex/_autosummary/rex.resource_extraction.resource_extraction.MultiYearWaveX.html#rex.resource_extraction.resource_extraction.MultiYearWaveXCan you point me to the defintinition of
ds_name
the docs to help me use one of these methods? E.g. I am not sure what I need to put here andds_name (str) – Dataset to extract
is unclear to me what I need to put here