1

I downloaded CERRA grib data of 173 Go. Here is the informations of the grib2 file : enter image description here

By this code i try to get ws variables for all timestamp in particular lat,lon:

lat = 47 
lon = 4.9 
abslat = np.abs(ds.latitude-lat) 
abslon = np.abs(ds.longitude-lon) 
c = np.maximum(abslon, abslat) 
([xloc], [yloc]) = np.where(c == np.min(c)) 
dfb = ds.sel(x=yloc, y=xloc,heightAboveGround=100)

The informations of the new xarray.Dataset is : enter image description here

Finally, i want to get all values of variable ws :

dfb.to_dataframe()

It should return a dataframe of 18984 value for each time. Unfornately, I have this error : enter image description here

For me, it's not the expected shape of the dataframe. I tried to limit the number of ws value by :

dfb.ws[:100].to_dataframe()

And it returns as expected : enter image description here

Kareivis
  • 85
  • 6
  • it appears that i can't get the value when the index is >= 235 :' OSError: [Errno 22] Invalid argument' – Kareivis Feb 01 '23 at 02:03

0 Answers0