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
for each dateset query we make, xarray.open_dataset() sends multiple requests to the server:
4 meta data requests (to the .dds, .das, .dds, and .dods endpoints respectively)
1 request per parameter we want data for.
Given that some datasets contain over 20 parameters, this can result in a lot of requests to get some data.
It is possible to reduce this to 2 request, by filling in the OPeNDAP Dataset Access Form programmatically and converting the resulting data to an xarray Dataset.
The example below returns an xarray.Dataset with dimensions: (y: 2, x: 2, time: 1, height: 6) and variables (latitude, longitude, wind_speed, wind_direction)
where request = '.dods?rlat[500],rlon[2000],time[0:23],projection_ob_tran,ff[0:23][500][2000]' etc.
For 5 variables i got 241ms and 309ms respectively, and for all (51) variables 4.54s and 3.81s respectively. So in terms of speed there is little difference, but perhaps this approach can reduce server load.
for each dateset query we make, xarray.open_dataset() sends multiple requests to the server:
Given that some datasets contain over 20 parameters, this can result in a lot of requests to get some data.
It is possible to reduce this to 2 request, by filling in the OPeNDAP Dataset Access Form programmatically and converting the resulting data to an xarray Dataset.
The example below returns an xarray.Dataset with dimensions: (y: 2, x: 2, time: 1, height: 6) and variables (latitude, longitude, wind_speed, wind_direction)
The text was updated successfully, but these errors were encountered: