question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue while opening KNMI Harmonie-Arome output

See original GitHub issue

I am using the open data files proviede by KNMI under open data policy. Data can be downloaded under 06_RUN

data = xarray.open_dataset('HA40_N55_202006030600_03900_GB', engine='cfgrib', backend_kwargs={'filter_by_keys':{'typeOfLevel': 'heightAboveGround','level': 10, 'stepType': 'instant'}})

At least only one variables named paramId_0 is listed in the Dataset. Why does cfgrib does not detect all available variables?

Maybe the solution is to force cfgrib to use NCEP-opn parameter table as wgrib does. But I am not really familiar with the cfgrib backend.

xarray.version: 0.15.1 cfgrib.version: 0.9.8.2

Output of wgrib -v :

Undefined parameter table (center 99-0 table 253), using NCEP-opn
1:0:D=2020060306:PRES:0 m above MSL:kpds=1,103,0:47hr fcst:winds in grid direction:"Pressure [Pa]
2:347422:D=2020060306:TMP:2 m above gnd:kpds=11,105,2:47hr fcst:winds in grid direction:"Temp. [K]
3:579244:D=2020060306:RH:2 m above gnd:kpds=52,105,2:47hr fcst:winds in grid direction:"Relative humidity [%]
4:811066:D=2020060306:DPT:2 m above gnd:kpds=17,105,2:47hr fcst:winds in grid direction:"Dew point temp. [K]
5:1158488:D=2020060306:UGRD:10 m above gnd:kpds=33,105,10:47hr fcst:winds in grid direction:"u wind [m/s]
6:1390310:D=2020060306:VGRD:10 m above gnd:kpds=34,105,10:47hr fcst:winds in grid direction:"v wind [m/s]
7:1622132:D=2020060306:CSULF:10 m above gnd:kpds=162,105,10:valid 0-47hr:winds in grid direction:"Clear sky upward long wave flux [W/m^2]
8:1853954:D=2020060306:CSDLF:10 m above gnd:kpds=163,105,10:valid 0-47hr:winds in grid direction:"Clear sky downward long wave flux [W/m^2]
9:2085776:D=2020060306:NSWRS:0 m above gnd:kpds=111,105,0:0-47hr acc:winds in grid direction:"Net short wave (surface) [W/m^2]
10:2317598:D=2020060306:NLWRS:0 m above gnd:kpds=112,105,0:0-47hr acc:winds in grid direction:"Net long wave (surface) [W/m^2]
11:2549420:D=2020060306:4LFTX:0 m above gnd:kpds=132,105,0:0-47hr acc:winds in grid direction:"Best (4-layer) lifted index [K]
12:2781242:D=2020060306:GRAD:0 m above gnd:kpds=117,105,0:0-47hr acc:winds in grid direction:"Global radiation [W/m^2]
13:3013064:D=2020060306:LAND:0 m above gnd:kpds=81,105,0:47hr fcst:winds in grid direction:"Land cover (land=1;sea=0) [fraction]
14:3244886:D=2020060306:TCDC:0 m above gnd:kpds=71,105,0:47hr fcst:winds in grid direction:"Total cloud cover [%]
15:3476708:D=2020060306:HCDC:0 m above gnd:kpds=75,105,0:47hr fcst:winds in grid direction:"High level cloud cover [%]
16:3708530:D=2020060306:MCDC:0 m above gnd:kpds=74,105,0:47hr fcst:winds in grid direction:"Mid level cloud cover [%]
17:3940352:D=2020060306:LCDC:0 m above gnd:kpds=73,105,0:47hr fcst:winds in grid direction:"Low level cloud cover [%]
18:4172174:D=2020060306:MIXHT:0 m above gnd:kpds=67,105,0:47hr fcst:winds in grid direction:"Mixed layer depth [m]
19:4403996:D=2020060306:GP:0 m above gnd:kpds=6,105,0:47hr fcst:winds in grid direction:"Geopotential [m^2/s^2]
20:4751418:D=2020060306:VIS:0 m above gnd:kpds=20,105,0:47hr fcst:winds in grid direction:"Visibility [m]
21:5098840:D=2020060306:SNOD:0 m above gnd:kpds=66,105,0:47hr fcst:winds in grid direction:"Snow depth [m]
22:5314620:D=2020060306:LPSX:0 m above gnd:kpds=181,105,0:47hr fcst:winds in grid direction:"x-gradient of log pressure [1/m]
23:5546442:D=2020060306:HGTY:0 m above gnd:kpds=184,105,0:47hr fcst:winds in grid direction:"y-gradient of height [m/m]
24:5778264:D=2020060306:ICWAT:0 m above gnd:kpds=201,105,0:47hr fcst:winds in grid direction:"Ice-free water surface [%]
25:6010086:D=2020060306:LPSX:0 m above gnd:kpds=181,105,0:0-47hr acc:winds in grid direction:"x-gradient of log pressure [1/m]
26:6241908:D=2020060306:HGTY:0 m above gnd:kpds=184,105,0:0-47hr acc:winds in grid direction:"y-gradient of height [m/m]
27:6473730:D=2020060306:ICWAT:0 m above gnd:kpds=201,105,0:0-47hr acc:winds in grid direction:"Ice-free water surface [%]
28:6705552:D=2020060306:SHTFL:0 m above gnd:kpds=122,105,0:0-47hr acc:winds in grid direction:"Sensible heat flux [W/m^2]
29:6937374:D=2020060306:ICNG:atmos col:kpds=186,200,0:47hr fcst:winds in grid direction:"Icing SIGMET/AIRMET [non-dim]
30:7223820:D=2020060306:ICWAT:atmos col:kpds=201,200,0:47hr fcst:winds in grid direction:"Ice-free water surface [%]
31:7571242:D=2020060306:UGRD:50 m above gnd:kpds=33,105,50:47hr fcst:winds in grid direction:"u wind [m/s]
32:7803064:D=2020060306:VGRD:50 m above gnd:kpds=34,105,50:47hr fcst:winds in grid direction:"v wind [m/s]
33:8034886:D=2020060306:UGRD:100 m above gnd:kpds=33,105,100:47hr fcst:winds in grid direction:"u wind [m/s]
34:8266708:D=2020060306:VGRD:100 m above gnd:kpds=34,105,100:47hr fcst:winds in grid direction:"v wind [m/s]
35:8498530:D=2020060306:UGRD:200 m above gnd:kpds=33,105,200:47hr fcst:winds in grid direction:"u wind [m/s]
36:8730352:D=2020060306:VGRD:200 m above gnd:kpds=34,105,200:47hr fcst:winds in grid direction:"v wind [m/s]
37:8962174:D=2020060306:UGRD:300 m above gnd:kpds=33,105,300:47hr fcst:winds in grid direction:"u wind [m/s]
38:9193996:D=2020060306:VGRD:300 m above gnd:kpds=34,105,300:47hr fcst:winds in grid direction:"v wind [m/s]
39:9425818:D=2020060306:TMP:925 mb:kpds=11,100,925:47hr fcst:winds in grid direction:"Temp. [K]
40:9773240:D=2020060306:TMP:850 mb:kpds=11,100,850:47hr fcst:winds in grid direction:"Temp. [K]
41:10120662:D=2020060306:TMP:500 mb:kpds=11,100,500:47hr fcst:winds in grid direction:"Temp. [K]
42:10468084:D=2020060306:TMP:300 mb:kpds=11,100,300:47hr fcst:winds in grid direction:"Temp. [K]
43:10815506:D=2020060306:RH:925 mb:kpds=52,100,925:47hr fcst:winds in grid direction:"Relative humidity [%]
44:11162928:D=2020060306:RH:850 mb:kpds=52,100,850:47hr fcst:winds in grid direction:"Relative humidity [%]
45:11510350:D=2020060306:RH:500 mb:kpds=52,100,500:47hr fcst:winds in grid direction:"Relative humidity [%]
46:11857772:D=2020060306:RH:300 mb:kpds=52,100,300:47hr fcst:winds in grid direction:"Relative humidity [%]
47:12205194:D=2020060306:UGRD:925 mb:kpds=33,100,925:47hr fcst:winds in grid direction:"u wind [m/s]
48:12552616:D=2020060306:UGRD:850 mb:kpds=33,100,850:47hr fcst:winds in grid direction:"u wind [m/s]
49:12900038:D=2020060306:UGRD:500 mb:kpds=33,100,500:47hr fcst:winds in grid direction:"u wind [m/s]
50:13247460:D=2020060306:UGRD:300 mb:kpds=33,100,300:47hr fcst:winds in grid direction:"u wind [m/s]
51:13594882:D=2020060306:VGRD:925 mb:kpds=34,100,925:47hr fcst:winds in grid direction:"v wind [m/s]
52:13942304:D=2020060306:VGRD:850 mb:kpds=34,100,850:47hr fcst:winds in grid direction:"v wind [m/s]
53:14289726:D=2020060306:VGRD:500 mb:kpds=34,100,500:47hr fcst:winds in grid direction:"v wind [m/s]
54:14637148:D=2020060306:VGRD:300 mb:kpds=34,100,300:47hr fcst:winds in grid direction:"v wind [m/s]
55:14984570:D=2020060306:GP:925 mb:kpds=6,100,925:47hr fcst:winds in grid direction:"Geopotential [m^2/s^2]
56:15331992:D=2020060306:GP:850 mb:kpds=6,100,850:47hr fcst:winds in grid direction:"Geopotential [m^2/s^2]
57:15679414:D=2020060306:GP:500 mb:kpds=6,100,500:47hr fcst:winds in grid direction:"Geopotential [m^2/s^2]
58:16026836:D=2020060306:GP:300 mb:kpds=6,100,300:47hr fcst:winds in grid direction:"Geopotential [m^2/s^2]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
meteoDanielcommented, Jul 7, 2020

Thanks guys for your support ! It works fine for me now.

2reactions
shahramncommented, Jul 7, 2020

You are using a much older ecCodes version it seems (v2.6.0) In the older versions you have to include the standard location of definitions as well. For example if you installed ecCodes in /usr/local/eccodes, then the default location will be /usr/local/eccodes/share/eccodes/definitions

So the environment variable would have to include this as well as your overridden location export ECCODES_DEFINITION_PATH=/tmp/Downloads/knmi_def/definitions:/usr/local/eccodes/share/eccodes/definitions

A good way of doing this is to use the “codes_info” command to get the standard installed definitions location

export ECCODES_DEFINITION_PATH=/tmp/Downloads/knmi_def/definitions:$(codes_info -d)
Read more comments on GitHub >

github_iconTop Results From Across the Web

HARMONIE-AROME Cy40 forecasts of last 24 hours Europe ...
Weather model - HARMONIE-AROME Cy40 forecasts of last 24 hours Europe, near surface, boundary layer and pressure level parameters - Dataset - KNMI...
Read more >
Weather model - HARMONIE-AROME Cy40 forecasts of last ...
Current operational HARMONIE information in gridded form (regular lat-lon) of near surface and boundary layer (up to 300 m) parameters from the KNMI...
Read more >
HARMONIE-AROME Cy40 forecasts of last 24 hours Europe ...
Current operational HARMONIE information in gridded form (rotated lat-lon) of selected parameters at all model levels from the KNMI HARMONIE-AROME Cy40 ...
Read more >
HARMONIE KEPS meteorological parameters, NL - Dataset
Current operational HARMONIE ensemble information in gridded form (regular lat-lon) of near surface parameters from the KNMI HARMONIE-AROME Cy40 model.
Read more >
Towards an approved model set-up for HARMONIE - KNMI
Problem statement. For the determination of the HBCs, information on open-water surface winds ... HARMONIE is also known as the AROME model.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found