You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to load the requested data into memory without saving to disk? I am trying to load the data as netcdf and do something like this:
importcdsapic=cdsapi.Client()
params= {
'product_type': 'reanalysis',
'variable': 'total_precipitation',
'year': '2019',
'month': '01',
'day': '01',
'time': '00:00',
'format': 'netcdf',
'grid':[1.0, 1.0],
}
data=c.retrieve('reanalysis-era5-single-levels', params)
ds=data.load() # doesn't exist, but could load data into memory# process the data below here
I know .download() will save to disk. but I am curious if there is any way to implement something like a .load() method which would load the data into memory as an xarray dataset. This way one could load the data and process it in one script. The current solution is to download the data and just throw away the original dataset after processing, but I feel like this process could be streamlined.
I looked at the download method but couldn't figure out a way to implement some type of load method. Any thoughts?
Thanks for making this package. This has saved me so much time!
The text was updated successfully, but these errors were encountered:
Is there any way to load the requested data into memory without saving to disk? I am trying to load the data as netcdf and do something like this:
I know
.download()
will save to disk. but I am curious if there is any way to implement something like a.load()
method which would load the data into memory as an xarray dataset. This way one could load the data and process it in one script. The current solution is to download the data and just throw away the original dataset after processing, but I feel like this process could be streamlined.I looked at the download method but couldn't figure out a way to implement some type of load method. Any thoughts?
Thanks for making this package. This has saved me so much time!
The text was updated successfully, but these errors were encountered: