metno / NWPdocs

Description of the numerical weather prediction products at MET Norway
GNU General Public License v3.0
14 stars 4 forks source link

The precipitation_amount in Helsinki on 15th of June 2022 6 am is 9.96921E+036 #18

Closed paapu88 closed 1 year ago

paapu88 commented 1 year ago

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:

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")

Terveisin, Markus

time,projection_lcc,forecast_reference_time,altitude,land_area_fraction,air_temperature_2m,air_pressure_at_sea_level,relative_humidity_2m,cloud_area_fraction,wind_speed_10m,integral_of_surface_downwelling_longwave_flux_in_air_wrt_time,integral_of_surface_downwelling_shortwave_flux_in_air_wrt_time,precipitation_amount,wind_speed_of_gust,wind_direction_10m
2022-06-15 00:00:00,-2147483647.0,2022-06-15,5.0,0.7633333,287.91003,100622.59,0.7065686,0.9068469,5.9370203,7261794.0,172984.89,9.96921e+36,10.124577,322.83487
2022-06-15 01:00:00,-2147483647.0,2022-06-15,5.0,0.7633333,287.61575,100620.016,0.74328095,0.780403,5.9827876,8463072.0,172984.89,0.0,10.053935,322.14633
2022-06-15 02:00:00,-2147483647.0,2022-06-15,5.0,0.7633333,287.3064,100627.5,0.73399603,0.6613028,5.8526263,9633541.0,230882.69,0.0,10.06389,320.86154
2
paapu88 commented 1 year ago

closed due lack of activity