Vtable for ICON-eu

Topics related to running the ungrib.exe program
Post Reply
ygzylmz
Posts: 2
Joined: Sat Jul 25, 2020 8:41 am

Vtable for ICON-eu

Post by ygzylmz » Sat Jul 25, 2020 8:49 am

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:

Adam Dury
Posts: 4
Joined: Mon Jul 27, 2020 11:56 am

Re: Vtable for ICON-eu

Post by Adam Dury » Tue Jul 28, 2020 3:03 pm

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/viewt ... f=34&t=527

Code: Select all

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 KiB) Downloaded 20 times

kwerner
Posts: 1926
Joined: Wed Feb 14, 2018 9:21 pm

Re: Vtable for ICON-eu

Post by kwerner » Tue Jul 28, 2020 3:43 pm

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
NCAR/MMM

Adam Dury
Posts: 4
Joined: Mon Jul 27, 2020 11:56 am

Re: Vtable for ICON-eu

Post by Adam Dury » Wed Jul 29, 2020 12:08 pm

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: Select all

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
icon_download_pres.txt
(6.76 KiB) Downloaded 27 times
METGRID.TBL.ARW
(40.12 KiB) Downloaded 24 times

figurski
Posts: 12
Joined: Fri Oct 12, 2018 6:38 am
Location: Gdansk University of Technology
Contact:

Re: Vtable for ICON-eu

Post by figurski » Wed Jul 29, 2020 6:09 pm

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.
Vtable.ICON.txt
(3.77 KiB) Downloaded 28 times
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.
get_ion-eu.sh.txt
(6.36 KiB) Downloaded 30 times
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

Adam Dury
Posts: 4
Joined: Mon Jul 27, 2020 11:56 am

Re: Vtable for ICON-eu

Post by Adam Dury » Thu Jul 30, 2020 8:17 am

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

Post Reply

Return to “ungrib”