Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Vtable for ICON-eu

ygzylmz

New member
Hi all,

I have tried to use ICON-eu with a regular grid dataset being input for the WRF model. :idea: So, I created a new Vtable and a METGRID.TBL for variables of this dataset. All variables, except only soil variables, are read correctly by ungrib. Soil moisture variables are column-integrated (multilayers) however soil temperature variables are the value that is the middle point of the level. In this context, I tried to convert one of the grib2 parameter types to another. Also, there is no problem in numerical and data types after the conversion process. But still it doesn't work :geek:

Original grib2 attributes:

Column-Integrated Soil Moisture (multilayers) : discipline number - 2, category number - 3, parameter number - 20
Soil Temperature : discipline number - 2, category number - 3, parameter number - 18

After manipulations:

Soil Moisture : discipline number - 2, category number - 3, parameter number - 19
Soil Temperature : discipline number - 2, category number - 3, parameter number - 18

Thanks :roll: :geek:
 
Hi,

I have created a vtable for the icon-eu using pressure levels and model levels. This was mainly based from the way hrrr is ingested through WPS. WRF seems to run fine from it and the soil levels all seem to appear in the wrf out files, although i have not looked fully into the soil data output.

I mainly assumed the soil moisture level was at the upper bound of the layer as this seems to be the way hrrr inputs into wps and they both have the same units. Correct me if i am wrong. Looking at the way the GFS has the soil moisture over a certain layer then does it need to be set up that way with the format of SOILM or SM being upper bound height 27 followed by lower bound height 81 (SM027081).

I used the Vtable initially from this wrfforum post back in 2018, although im not sure if they have updated the ICON-EU output since then. https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=34&t=527

Code:
GRIB1| Level| From |  To  | metgrid  | metgrid | metgrid                                 |GRIB2|GRIB2|GRIB2|GRIB2|
Param| Type |Level1|Level2| Name     | Units   | Description                             |Discp|Catgy|Param|Level|
-----+------+------+------+----------+---------+-----------------------------------------+-----------------------+
  11 | 100  |   *  |      | TT       | K       | Temperature                             |  0  |  0  |  0  | 100 |
  33 | 100  |   *  |      | UU       | m s-1   | U                                       |  0  |  2  |  2  | 100 |
  34 | 100  |   *  |      | VV       | m s-1   | V                                       |  0  |  2  |  3  | 100 |
  52 | 100  |   *  |      | RH       | %       | Relative Humidity                       |  0  |  1  |  1  | 100 |
   7 | 100  |   *  |      | HGT      | m       | Height                                  |  0  |  3  |  4  | 100 |
  11 | 105  |   2  |      | TT       | K       | Temperature       at 2 m                |  0  |  0  |  0  | 103 |
  33 | 105  |  10  |      | UU       | m s-1   | U                 at 10 m               |  0  |  2  |  2  | 103 |
  34 | 105  |  10  |      | VV       | m s-1   | V                 at 10 m               |  0  |  2  |  3  | 103 |
  52 | 105  |   2  |      | RH       | %       | Relative Humidity at 2 m                |  0  |  1  |  1  | 103 |
   1 |   1  |   0  |      | PSFC     | Pa      | Surface Pressure                        |  0  |  3  |  0  |   1 |
   2 | 102  |   0  |      | PMSL     | Pa      | Sea-level Pressure                      |  0  |  3  |  1  | 101 |
 144 | 111  |   0  |      | SOILM000 | kg m-2  | Soil Moist 0 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |   1  |      | SOILM001 | kg m-2  | Soil Moist 1 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |   3  |      | SOILM003 | kg m-2  | Soil Moist 3 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |   9  |      | SOILM009 | kg m-2  | Soil Moist 9 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |  27  |      | SOILM027 | kg m-2  | Soil Moist 27 cm                        |  2  |  3  | 20  | 106 |
 144 | 111  |  81  |      | SOILM081 | kg m-2  | Soil Moist 81 cm                        |  2  |  3  | 20  | 106 |
 144 | 111  | 243  |      | SOILM243 | kg m-2  | Soil Moist 243 cm                       |  2  |  3  | 20  | 106 |
 144 | 111  | 729  |      | SOILM729 | kg m-2  | Soil Moist 729 cm                       |  2  |  3  | 20  | 106 |
  11 | 111  |   0  |      | SOILT000 | K       | Soil Temperature 0 cm                   |  2  |  3  | 18  | 106 |
  11 | 111  |   2  |      | SOILT002 | K       | Soil Temperature 2 cm                   |  2  |  3  | 18  | 106 |
  11 | 111  |   6  |      | SOILT006 | K       | Soil Temperature 6 cm                   |  2  |  3  | 18  | 106 |
  11 | 111  |  18  |      | SOILT018 | K       | Soil Temperature 18 cm                  |  2  |  3  | 18  | 106 |
  11 | 111  |  54  |      | SOILT054 | K       | Soil Temperature 54 cm                  |  2  |  3  | 18  | 106 |
  11 | 111  | 162  |      | SOILT162 | K       | Soil Temperature 162 cm                 |  2  |  3  | 18  | 106 |
  11 | 111  | 486  |      | SOILT486 | K       | Soil Temperature 486 cm                 |  2  |  3  | 18  | 106 |
  11 | 111  |1458  |      | SOILT999 | K       | Soil Temperature 1458 cm                |  2  |  3  | 18  | 106 |
  81 |   1  |   0  |      | LANDSEA  | proprtn | Land/Sea flag (1=land, 0 or 2=sea)      |  2  |  0  |  0  |   1 |
   7 |   1  |   0  |      | SOILHGT  | m       | Terrain field of source analysis        |  0  |  3  |  6  |   1 |
  11 |   1  |   0  |      | SKINTEMP | K       | Skin temperature                        |  0  |  0  |  0  |   1 |
  65 |   1  |   0  |      | SNOW     | kg m-2  | Snow depth water equivalent             |  0  |  1  | 60  |   1 |
     |   1  |   0  |      | SNOWH    | m       | Physical Snow Depth                     |  0  |  1  | 11  |   1 |
-----+------+------+------+----------+---------+--------------------------------------
#
#
#  Vtable for Icon-EU pressure levels from the dwd server.
#
# https://opendata.dwd.de/weather/nwp/
#
# Variables from server come as individual files per variable and timestep so need to merge them together.
# Some variable only come for initial time so need to be added for each timestep being ingested into wps.
#
# Height (HGT) needs to be converted from m2 s-2 in grib file to m before ungrib stage
#

I have attached the metgrid file.

If would be good if these files could be added to WPS so that anyone could run wrf with ICON-eu and give the model an identifier in the WPS code.

Adam
 

Attachments

  • METGRID.TBL.ARW
    38.1 KB · Views: 114
Adam,
Thank you so much for doing this, and for posting this to help this user, and our WRF support team! If you and @ ygzylmz test this Vtable out and it seems to be working okay, and if you are familiar with GitHub, please feel free to submit a PR to have this added to the WPS released code. You can find the WPS GitHub page here: https://github.com/wrf-model/WPS

If you aren't familiar with GitHub, you could just submit this as an "issue," here:https://github.com/wrf-model/WPS/issues
 
After looking further into the soil moisture in the wrfout files i realized wrf itself was not reading the soil moisture correctly using that last vtable i supplied.

ygzylmz there is a few things going on here which are voiced in other forum threads but there doesn't seem to be a definite answer to it.

Firstly the output from icon is kg m-2 but wps does not like this and it expects the units to be in soil fraction. I am not 100% sure how to do his conversion but this nasa website seems to suggest dividing by soil layer thickness in mm and then dividing by porosity. https://ldas.gsfc.nasa.gov/faq/nca-ldas
This conversion will have to be done before ungrib. i have provided my download script if that helps show the conversion.

One bug in this conversion is the porosity as i think this might vary per grid point and searching online the porosity is a range for each soil type rather than a set value. For the moment i have just assumed the porosity to be 0.5. I am not 100% sure if we need to do this porosity conversion because this pushes the soil fraction above 1.

Can anyone from WRF or the WPS team shine any light on this conversion. I have seen on other forum threads WPS needs the data in volumetric soil moisture but all the vtables say fraction?

Secondly the soil levels in the icon output are different for the soil variables. I think this is what you are struggling with. From what i can see ungrib is reading the depth from soil temperature but the Level1 (upper bound) for the soil moisture. This seems to be due to the soil temperature not having any upper or lower bound but the soil moisture does. To get around this i told ungrib the depth for soil temperature and Level1 for soil moisture. I then used metgrid to put these onto a consistent depth scale for both Soil temperature and Soil moisture.

The main question now is what depth scale we should use to properly put the data through wrf. So we use the soil lay mid value, or the upper or lower bound of the soil layer. The hrrr seems to use the lower bound but not 100% sure why.

Here is the revised v table.
Code:
GRIB1| Level| From |  To  | metgrid  | metgrid | metgrid                                 |GRIB2|GRIB2|GRIB2|GRIB2|
Param| Type |Level1|Level2| Name     | Units   | Description                             |Discp|Catgy|Param|Level|
-----+------+------+------+----------+---------+-----------------------------------------+-----------------------+
  11 | 100  |   *  |      | TT       | K       | Temperature                             |  0  |  0  |  0  | 100 |
  33 | 100  |   *  |      | UU       | m s-1   | U                                       |  0  |  2  |  2  | 100 |
  34 | 100  |   *  |      | VV       | m s-1   | V                                       |  0  |  2  |  3  | 100 |
  52 | 100  |   *  |      | RH       | %       | Relative Humidity                       |  0  |  1  |  1  | 100 |
   7 | 100  |   *  |      | HGT      | m       | Height                                  |  0  |  3  |  4  | 100 |
  11 | 105  |   2  |      | TT       | K       | Temperature       at 2 m                |  0  |  0  |  0  | 103 |
  33 | 105  |  10  |      | UU       | m s-1   | U                 at 10 m               |  0  |  2  |  2  | 103 |
  34 | 105  |  10  |      | VV       | m s-1   | V                 at 10 m               |  0  |  2  |  3  | 103 |
  52 | 105  |   2  |      | RH       | %       | Relative Humidity at 2 m                |  0  |  1  |  1  | 103 |
   1 |   1  |   0  |      | PSFC     | Pa      | Surface Pressure                        |  0  |  3  |  0  |   1 |
   2 | 102  |   0  |      | PMSL     | Pa      | Sea-level Pressure                      |  0  |  3  |  1  | 101 |
 144 | 111  |   0  |      | SOILM000 | Fraction| Soil Moist 0 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |   1  |      | SOILM002 | Fraction| Soil Moist 2 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |   3  |      | SOILM006 | Fraction| Soil Moist 6 cm                         |  2  |  3  | 20  | 106 |
 144 | 111  |  9   |      | SOILM018 | Fraction| Soil Moist 18 cm                        |  2  |  3  | 20  | 106 |
 144 | 111  |  27  |      | SOILM054 | Fraction| Soil Moist 54 cm                        |  2  |  3  | 20  | 106 |
 144 | 111  |  81  |      | SOILM162 | Fraction| Soil Moist 162 cm                       |  2  |  3  | 20  | 106 |
 144 | 111  | 243  |      | SOILM486 | Fraction| Soil Moist 486 cm                       |  2  |  3  | 20  | 106 |
 144 | 111  | 729  |      | SOILM999 | Fraction| Soil Moist 1458 cm                      |  2  |  3  | 20  | 106 |
  11 | 111  |   0  |      | SOILT000 | K       | Soil Temperature 0 cm                   |  2  |  3  | 18  | 106 |
  11 | 111  |   2  |      | SOILT002 | K       | Soil Temperature 2 cm                   |  2  |  3  | 18  | 106 |
  11 | 111  |   6  |      | SOILT006 | K       | Soil Temperature 6 cm                   |  2  |  3  | 18  | 106 |
  11 | 111  |  18  |      | SOILT018 | K       | Soil Temperature 18 cm                  |  2  |  3  | 18  | 106 |
  11 | 111  |  54  |      | SOILT054 | K       | Soil Temperature 54 cm                  |  2  |  3  | 18  | 106 |
  11 | 111  | 162  |      | SOILT162 | K       | Soil Temperature 162 cm                 |  2  |  3  | 18  | 106 |
  11 | 111  | 486  |      | SOILT486 | K       | Soil Temperature 486 cm                 |  2  |  3  | 18  | 106 |
  11 | 111  |1458  |      | SOILT999 | K       | Soil Temperature 1458 cm                |  2  |  3  | 18  | 106 |
  81 |   1  |   0  |      | LANDSEA  | proprtn | Land/Sea flag (1=land, 0 or 2=sea)      |  2  |  0  |  0  |   1 |
   7 |   1  |   0  |      | SOILHGT  | m       | Terrain field of source analysis        |  0  |  3  |  6  |   1 |
  11 |   1  |   0  |      | SKINTEMP | K       | Skin temperature                        |  0  |  0  |  0  |   1 |
  65 |   1  |   0  |      | SNOW     | kg m-2  | Snow depth water equivalent             |  0  |  1  | 60  |   1 |
     |   1  |   0  |      | SNOWH    | m       | Physical Snow Depth                     |  0  |  1  | 11  |   1 |
-----+------+------+------+----------+---------+--------------------------------------
#
#
#  Vtable for Icon-EU pressure levels from the dwd server.
#
# https://opendata.dwd.de/weather/nwp/
#
# Variables from server come as individual files per variable and timestep so need to merge them together.
# Some variable only come for initial time so need to be added for each timestep being ingested into wps.
#
# Height (HGT) needs to be converted from m2 s-2 in the grib file to m before ungrib stage.
# Needs to convert Soil moisture from kg m-2 in icon output files to soil fraction before ungrib stage.
#
 

Attachments

  • METGRID.TBL.ARW
    40.1 KB · Views: 157
  • icon_download_pres.txt
    6.8 KB · Views: 178
Hello everyone,
I have read the question regarding the use of ICON-EU data in the WRF model. In my opinion, I solved the problem. Especially in the field of soil field modification. Enclosed is my Vtable.ICON file and grib2 download script with procedures for converting soil temperature and moisture fields.
View attachment Vtable.ICON.txt

The ICON-EU model is similar to the COSMO model, soil temperature is given for the middle of the layer. In my solution, using the cdo software, I added the upper and lower layer limits for a given temperature in the grib files. The soil moisture in the ICON-EU model has the upper and lower boundaries of the layers, but the values are given in kg m-2, and the WRF model only reads in m3 m-3 (soil fraction). In this case, in grib files, each layer should be divided by its thickness in mm. Details are in the get_ion-eu.sh script.

View attachment get_ion-eu.sh.txt

For 10 months I have been testing the WRF forecasts with the initial data from GFS and ICON-EU and the results are practically very similar. There are times when the ICON model gives better results than the GFS, especially for rainfall.

The solution I presented is not the only one. Modifying grib files can be transferred directly to ungrib.exe and then there will be no need to modify grib files before loading into ungrib.exe. Another issue is the use of ICON-EU data at model levels (60 levels), while there are only 20 pressure levels.

Regards
Mariusz
 
Hi Mariusz,

As you say there area multiple ways to read in the soil moisture and temperatures. I am not sure what is the right way but would be nice to get a unified way to read it in. That has answered my question about the soil moisture perfectly as nowhere seems to suggest the units for soil moisture fraction and taking the porosity assumption out gets values i would expect.

I see you have no grib 2 values for Height but are reading in geopotential. I tried to read in geopotential but my wps did not like it. I converted this to Height though (m) by diving the geopotential by gravity.

That is an interesting comment you make about the GFS and Icon wrfs being very similar. May i ask what resolution you are running it at and over where?
I look at a 4km wrf run over the UK using the gfs and since the gfs update to fv3 it has been very poor and by far the worse model out of a selection that cover the UK.

Have you been running the wrf with icon model levels? i have a download script and vtable for that. This has its issues aswell due to the icon model levels being on 1.5,2.5 etc so used cdo to change these levels to 1,2 etc and WPS liked it.

Regards

Adam
 
Hi Adam,

I am currently having the same problem as you mentioned :
"I see you have no grib 2 values for Height but are reading in geopotential. I tried to read in geopotential but my wps did not like it. I converted this to Height though (m) by diving the geopotential by gravity."

Would you be so kind to tell me how you fixed this? I am quite new to wrf and creating Vtables, and I am currently stuck with this problem.
I also get the problem for other fields as well.

Thank you
 

Attachments

  • metgrid.log
    28.1 KB · Views: 47
Hi wrf_1993

I currently have an issue with looking at my wrf files due to a computer dieing on me so waiting to get another one so i can access my hardrive.
Anyway, from looking ay my past posts think i download hgt directly from the icon servers which is the variable FI. To get it into units wrf likes then i just coverted it to height by dividing it by gravity using cdo which you can see in my download script a couple of posts up.

Be careful aswell with the soil levels as they need tweaking, plus extra levels written into metgrid. I believe the metgrid files are above in a post so you can see what fields to add.

Mariusz i believe has changed the fortran code in wps which will likely convert geopotential to height when ungribing so might be best to contact him if you would like that code but my fix using cdo seems to works alright.

Adam
 
Thank you so much for the reply,

it seems to be working so far until I reach the end of the real.exe.
the rsl.out.0000 or rsl.error.0000 says that it was a success, but unfortunately the wrfbdy_d01 is missing, so wrf.exe fails.

Do you know what would cause such a thing?

Thank you in advance
Jana
 

Attachments

  • rsl.out.0000.txt
    9.3 KB · Views: 43
  • rsl.error.0000.txt
    1.9 KB · Views: 44
  • namelist.input
    3.5 KB · Views: 49
I haven’t come across this error before but from what your rsl error says is that it’s only doing 1 timestep so real might not be producing a wrf body because it doesn’t need to with no boundary conditions. I would try multiple timesteps as I have never tried to run real with 1 timestep. If that doesn’t work then might be worth looking on other forum posts to see if people have had issues with real.see not producing a wrf body.

Regards
Adam
 
Hi all, I'm trying to run wrf with data icon, the problem is in real.exe

I always get this error that freezes the simulation:

-------------- CALLED FATAL ---------------
FATAL CALLED FROM FILE: <stdin> LINE: 1233
p_top_requested <grid% p_top possible from the data
--------------------------------------------
application named MPI_Abort (MPI_COMM_WORLD, 1) - process 0
[not set]: write_line error; fd = -1 buf =: cmd = abort exit code = 1
:
System msg for write_line failure: Wrong file descriptor
 
Could someone pass me a good vtable for ICON and the METGRID.TBL.ARW for metgrid?

I keep getting errors when I run ungrib and metegrid

this is ungrib log

https://pastebin.com/cBffSwJk
 
Top