Whats going on? ( I read into xarray doing cut in projected coordinates and taking nanmean over spatial coordinates, then to pandas and to csv shown below)
Here is minimal example code to reproduce the result:
import xarray as xr
import pyproj
ds = xr.open_dataset(
"https://thredds.met.no/thredds/dodsC/metpparchive/2022/06/15/met_forecast_1_0km_nordic_20220615T00Z.nc"
)
proj = pyproj.Proj(ds.projection_lcc.proj4)
X, Y = proj(longitude=25.1, latitude=60.2)
dm = 1500
east = X + dm
west = X - dm
north = Y + dm
south = Y - dm
ds = ds.sel(x=slice(west, east), y=slice(south, north))
ds = ds.mean(dim=("x", "y"), skipna=True)
df = ds.to_dataframe()
df.to_csv("helsinki_20220615_00.csv")
Dear Developers, I download file https://thredds.met.no/thredds/dodsC/metpparchive/2022/06/15/met_forecast_1_0km_nordic_20220615T00Z.nc And cut coordinates to Helsinki region The other values below look ok, but the precipation amount (sorry its off in the copy paste below) at the first time stamp is 9.96921E+036
Whats going on? ( I read into xarray doing cut in projected coordinates and taking nanmean over spatial coordinates, then to pandas and to csv shown below)
Here is minimal example code to reproduce the result:
Terveisin, Markus