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

Change in soil variables from ECMWF Cycle 49r1

Gabriel Cassol

New member
On Tuesday (November 12), ECMWF released the 49r1 version of the operational IFS. Despite all the improvements, they modified the soil variables (temperature and humidity) which stopped the ECMWF Vtable that had been released in the 4.6.0 version of the WPS.

Based on the new variables made available by cycle 49r1, I tried to update the Vtable, but without success.

Code:
GRIB1| Level| From |  To  | metgrid  | metgrid  | metgrid                                  |GRIB2|GRIB2|GRIB2|GRIB2|
Param| Type |Level1|Level2| Name     | Units    | Description                              |Discp|Catgy|Param|Level|
-----+------+------+------+----------+----------+------------------------------------------+-----------------------+
 129 | 100  |   *  |      | GEOPT    | m2 s-2   |                                          |  0  |  0  |     | 100 |
 156 | 100  |   *  |      | HGT      | m        | Height                                   |  0  |  3  |  5  | 100 |
 130 | 100  |   *  |      | TT       | K        | Temperature                              |  0  |  0  |  0  | 100 |
 131 | 100  |   *  |      | UU       | m s-1    | U                                        |  0  |  2  |  2  | 100 |
 132 | 100  |   *  |      | VV       | m s-1    | V                                        |  0  |  2  |  3  | 100 |
 157 | 100  |   *  |      | RH       | %        | Relative Humidity                        |  0  |  1  |  1  | 100 |
 165 |  1   |   0  |      | UU       | m s-1    | U                    At 10 m             |  0  |  2  |  2  | 103 |
 166 |  1   |   0  |      | VV       | m s-1    | V                    At 10 m             |  0  |  2  |  3  | 103 |
 167 |  1   |   0  |      | TT       | K        | Temperature          At  2 m             |  0  |  0  |  0  | 103 |
 168 |  1   |   0  |      | DEWPT    | K        |                                          |  0  |  0  |  6  | 103 |
     |  1   |   0  |      | RH       | %        | Relative Humidity    At  2 m             |  0  |  0  |     | 103 |
 172 |  1   |   0  |      | LANDSEA  | 0/1 Flag | Land/Sea flag                            |  2  |  0  |  0  |  1  |
 129 |  1   |   0  |      | SOILGEO  | m2 s-2   |                                          |  0  |  0  |     | 103 |
 156 |  1   |   0  |      | SOILHGT  | m        | Terrain field of source analysis         |  0  |  0  |     | 106 |
 134 |  1   |   0  |      | PSFC     | Pa       | Surface Pressure                         |  0  |  3  |  0  |  1  |
 151 |  1   |   0  |      | PMSL     | Pa       | Sea-level Pressure                       |  0  |  3  |  0  | 101 |
 235 |  1   |   0  |      | SKINTEMP | K        | Sea-Surface Temperature                  |  0  |  3  |     | 101 |
  31 |  1   |   0  |      | SEAICE   | 0/1 Flag | Sea-Ice-Flag                             |  0  |  3  |     | 101 |
  34 |  1   |   0  |      | SST      | K        | Sea-Surface Temperature                  |  0  |  3  |     | 101 |
 141 |  1   |   0  |      | SNOW_EC  | m        |                                          |  0  |  3  |     | 101 |
     |  1   |   0  |      | SNOW     | kg m-2   |Water Equivalent of Accumulated Snow Depth|  0  |  3  |     | 101 |
  18 | 112  |   0  |   1  | ST000001 | K        | T of 0-1 m ground layer                  |  2  |  3  |  18 | 151 |
  18 | 112  |   1  |   2  | ST000002 | K        | T of 1-2 m ground layer                  |  2  |  3  |  18 | 151 |
  18 | 112  |   2  |   3  | ST000003 | K        | T of 2-3 m ground layer                  |  2  |  3  |  18 | 151 |
  18 | 112  |   3  |   4  | ST000004 | K        | T of 3-4 m ground layer                  |  2  |  3  |  18 | 151 |
  25 | 112  |   0  |   1  | SM000001 | m3 m-3   | Soil moisture of 0-1 m ground layer      |  2  |  0  |  25 | 151 |
  25 | 112  |   1  |   2  | SM000002 | m3 m-3   | Soil moisture of 1-2 m ground layer      |  2  |  0  |  25 | 151 |
  25 | 112  |   2  |   3  | SM000003 | m3 m-3   | Soil moisture of 2-3 m ground layer      |  2  |  0  |  25 | 151 |
  25 | 112  |   3  |   4  | SM000004 | m3 m-3   | Soil moisture of 3-4 m ground layer      |  2  |  0  |  25 | 151 |
-----+------+------+------+----------+----------+------------------------------------------+-----------------------+

I created the new variables inside the METGRID.TBL.ARW file (attached), but it didn't work either. WPS still can't find the soil temperature and moisture variables.

Does anyone have any idea how to make this work? The raw IFS data is operationally available on the ECMWF server: ECMWF Data Store (ECPDS)

The data is within the following directory: forecasts/YYYYMMDD/HHz/ifs/0p25/oper/
 

Attachments

  • METGRID.TBL.ARW.txt
    46.3 KB · Views: 12
Last edited:
Hello, I have met the same problem. However, part of codes, such as Discp, Catgy, Param and Level, are setting diffrently. WPS ungrib can not read the grib file. Do you solved this problem?
 
Hi,
You may need to contact the group that manages the ECMWF data and ask if they have a vtable that works, or if they at least have the grib codes you could use in the Vtable.
 
On Tuesday (November 12), ECMWF released the 49r1 version of the operational IFS. Despite all the improvements, they modified the soil variables (temperature and humidity) which stopped the ECMWF Vtable that had been released in the 4.6.0 version of the WPS.

Based on the new variables made available by cycle 49r1, I tried to update the Vtable, but without success.

Code:
GRIB1| Level| From |  To  | metgrid  | metgrid  | metgrid                                  |GRIB2|GRIB2|GRIB2|GRIB2|
Param| Type |Level1|Level2| Name     | Units    | Description                              |Discp|Catgy|Param|Level|
-----+------+------+------+----------+----------+------------------------------------------+-----------------------+
 129 | 100  |   *  |      | GEOPT    | m2 s-2   |                                          |  0  |  0  |     | 100 |
 156 | 100  |   *  |      | HGT      | m        | Height                                   |  0  |  3  |  5  | 100 |
 130 | 100  |   *  |      | TT       | K        | Temperature                              |  0  |  0  |  0  | 100 |
 131 | 100  |   *  |      | UU       | m s-1    | U                                        |  0  |  2  |  2  | 100 |
 132 | 100  |   *  |      | VV       | m s-1    | V                                        |  0  |  2  |  3  | 100 |
 157 | 100  |   *  |      | RH       | %        | Relative Humidity                        |  0  |  1  |  1  | 100 |
 165 |  1   |   0  |      | UU       | m s-1    | U                    At 10 m             |  0  |  2  |  2  | 103 |
 166 |  1   |   0  |      | VV       | m s-1    | V                    At 10 m             |  0  |  2  |  3  | 103 |
 167 |  1   |   0  |      | TT       | K        | Temperature          At  2 m             |  0  |  0  |  0  | 103 |
 168 |  1   |   0  |      | DEWPT    | K        |                                          |  0  |  0  |  6  | 103 |
     |  1   |   0  |      | RH       | %        | Relative Humidity    At  2 m             |  0  |  0  |     | 103 |
 172 |  1   |   0  |      | LANDSEA  | 0/1 Flag | Land/Sea flag                            |  2  |  0  |  0  |  1  |
 129 |  1   |   0  |      | SOILGEO  | m2 s-2   |                                          |  0  |  0  |     | 103 |
 156 |  1   |   0  |      | SOILHGT  | m        | Terrain field of source analysis         |  0  |  0  |     | 106 |
 134 |  1   |   0  |      | PSFC     | Pa       | Surface Pressure                         |  0  |  3  |  0  |  1  |
 151 |  1   |   0  |      | PMSL     | Pa       | Sea-level Pressure                       |  0  |  3  |  0  | 101 |
 235 |  1   |   0  |      | SKINTEMP | K        | Sea-Surface Temperature                  |  0  |  3  |     | 101 |
  31 |  1   |   0  |      | SEAICE   | 0/1 Flag | Sea-Ice-Flag                             |  0  |  3  |     | 101 |
  34 |  1   |   0  |      | SST      | K        | Sea-Surface Temperature                  |  0  |  3  |     | 101 |
 141 |  1   |   0  |      | SNOW_EC  | m        |                                          |  0  |  3  |     | 101 |
     |  1   |   0  |      | SNOW     | kg m-2   |Water Equivalent of Accumulated Snow Depth|  0  |  3  |     | 101 |
  18 | 112  |   0  |   1  | ST000001 | K        | T of 0-1 m ground layer                  |  2  |  3  |  18 | 151 |
  18 | 112  |   1  |   2  | ST000002 | K        | T of 1-2 m ground layer                  |  2  |  3  |  18 | 151 |
  18 | 112  |   2  |   3  | ST000003 | K        | T of 2-3 m ground layer                  |  2  |  3  |  18 | 151 |
  18 | 112  |   3  |   4  | ST000004 | K        | T of 3-4 m ground layer                  |  2  |  3  |  18 | 151 |
  25 | 112  |   0  |   1  | SM000001 | m3 m-3   | Soil moisture of 0-1 m ground layer      |  2  |  0  |  25 | 151 |
  25 | 112  |   1  |   2  | SM000002 | m3 m-3   | Soil moisture of 1-2 m ground layer      |  2  |  0  |  25 | 151 |
  25 | 112  |   2  |   3  | SM000003 | m3 m-3   | Soil moisture of 2-3 m ground layer      |  2  |  0  |  25 | 151 |
  25 | 112  |   3  |   4  | SM000004 | m3 m-3   | Soil moisture of 3-4 m ground layer      |  2  |  0  |  25 | 151 |
-----+------+------+------+----------+----------+------------------------------------------+-----------------------+

I created the new variables inside the METGRID.TBL.ARW file (attached), but it didn't work either. WPS still can't find the soil temperature and moisture variables.

Does anyone have any idea how to make this work? The raw IFS data is operationally available on the ECMWF server: ECMWF Data Store (ECPDS)

The data is within the following directory: forecasts/YYYYMMDD/HHz/ifs/0p25/oper/
@Gabriel Cassol @kwerner @pseo_lml

could you download the data set as netcdf and see if the codes are there in the meta data?
 
Hi,
You may need to contact the group that manages the ECMWF data and ask if they have a vtable that works, or if they at least have the grib codes you could use in the Vtable.

@kwerner @Ming Chen I contacted the ECMWF team and they gave me this feedback. It is necessary to make a change within Ungrib, more specifically in the rd_grib2.F code so that it works with the new IFS soil variables.

With 49R1 cycle, encoding of soild parameters changed

1732285198104.png
 
To be honest, I would say forget about this dataset alone. Unless someone of ungrib developers jump in and do that proper way.

In a meantime if you want to use this dataset, then supply soil data from ICON or GFS and problem solved. Yes I know, you would need to download two datasets, but it works as it should.
 
To be honest, I would say forget about this dataset alone. Unless someone of ungrib developers jump in and do that proper way.

In a meantime if you want to use this dataset, then supply soil data from ICON or GFS and problem solved. Yes I know, you would need to download two datasets, but it works as it should.
That's a bandaide for the problem though. Still think it needs to be fixed. Because ECMWF is a major model not to have support for the free data.
 
Hello everyone!
Can someone upload the modified files working with WRF 4.6, that is, the modified rd_grib2.F and if there are any changes in the Vartable?
 
Then how to modify rd_grib2.F for ECMWF IFS data? I tried to change all "106" to "151" in rd_grib2.F. But ungrib still can not find the soil temperature and moisture variables.
 
@All,

Please take a look at this document , which fixes the issues related to the ECMWF 49r1 version of the operational IFS.

ECMWF 49r1 is newly released and we haven't done sufficient tests to make sure it works fine for WRF. Please post any issues you may have, which will be helpful for us to implement this data for WRF modeling study. Thanks in advance.
 
Please download the modified code "rd_grib2.F" from the website update era5/ifs soil field processing by jimbresch · Pull Request #266 · wrf-model/WPS, recompile WPS, then rerun ungrib.exe.
@Ming Chen I downloaded the modified rd_grib2.F file, recompiled my WPS, and tested it with the operational ECMWF IFS 0.25º data using your Vtable.ERA5 and it didn't work. The soil temperature and moisture data still aren't being read. Maybe these contributions work for the ERA5 data, but for the operational IFS data they don't work.

1736779078335.png
 
Hello.

I think I found a solution. Starting from the beginning. The grib2 files from ECMWF should be uncompressed. If we use the g2print.exe program, we get a list of grib2 codes of all fields in the file. Let's limit ourselves to the codes of the soil moisture and temperature fields that interest us. Below is a list of these fields.

1 2 3 18 151 0 1 0 UNKNOWN 2025-01-10_00:00:00 03
23 2 3 18 151 1 2 0 UNKNOWN 2025-01-10_00:00:00 03
40 2 3 18 151 3 4 0 UNKNOWN 2025-01-10_00:00:00 03
62 2 0 25 151 0 1 0 UNKNOWN 2025-01-10_00:00:00 03
67 2 0 25 151 1 2 0 UNKNOWN 2025-01-10_00:00:00 03
74 2 0 25 151 2 3 0 UNKNOWN 2025-01-10_00:00:00 03
76 2 3 18 151 2 3 0 UNKNOWN 2025-01-10_00:00:00 03
80 2 0 25 151 3 4 0 UNKNOWN 2025-01-10_00:00:00 03

Please note that the code of these fields is "151". And such a code should be read by ungrib. But that's not all. The levels of the soil temperature and visibility fields have not changed and are the same as before. The values are decoded for some reason as
0-1
1-2
2-3
3-4
which corresponds to
0-7
7-28
28-100
100-289
In my opinion, the data must be expressed in centimeters. Here's what my solution looks like now.
First, the Vtable file that I prepared..

1736787308683.png

The second, more difficult step is to change the rd_grib2.F file. At this point I will add that you need to add support for parameter 151, which is missing in the original file.
First change
from
! if ( gfld%ipdtmpl(10) .eq. 106 ) then
to
if (( gfld%ipdtmpl(10) .eq. 106 ) .or.
& ( gfld%ipdtmpl(10) .eq. 151 )) then. !! Added by Prof. Mariusz Figurski, 20250110


Next step:

if (((g2code(4,j) .eq. 106) .or.
& (g2code(4,j) .eq. 151)) .and. !! Added by Prof. Mariusz Figurski, 20250110
& (gfld%ipdtmpl(1) .eq. g2code(2,j)) .and. !! Added by Dr. Haiqing SONG, 20181201
& (gfld%ipdtmpl(2) .eq. g2code(3,j)) .and.
& (glevel1 .eq. level1(j)) .and.
& ((glevel2 .eq. level2(j)) .or.
& (level2(j) .le. -88))) then


In the third step you need to improve the reading of soil moisture and temperature levels from the grib2 file.

1736788198104.png

If we make the corrections as I wrote above, the WRF model will start reading and calculating. As proof, I am sending my results.

Two examples of visualization of temperature and precipitation forecast for the area of Poland with initial data from the GFS model and an implementation that I developed of the IFS model from the ECMWF open repository.

Daily temperature 2m. GFS ............................................................................. ECMWF open data
1736788651243.png

Daily total precipitation. GFS ........................................................... ECMWF open data
1736788849991.png

@Ming Chen @dudhia can I ask you to verify my solution?

Best regards

Mariusz Figurski
 
Last edited:
Mariusz,
Many thanks for the kind information !
Would you please let me know where you download the data? What files did you download?
Thanks again!
 
Mariusz,
Many thanks for the kind information !
Would you please let me know where you download the data? What files did you download?
Thanks again!
@Ming Chen I wrote about everything, but forgot about the data. I downloaded the data from the ECMWF open repository.


example:
....

IFS operational model data in the ECMWF open data repository are only available for the last 4 days.
I downloaded the operational grib2 files from the IFS model. Then you have to decompress them, e.g. with the grib_set program, but someone wrote about that earlier. I did the tests for a few days. I downloaded the data for 4 days of the forecast. As usual, I performed the simulations with an interval of every 180 minutes.

There was a mistake in the description I posted above. The last layer in the IFS soil model has a value of 289 centimeters. I mistakenly entered 255 centimeters in the description.
I hope this explains the data problem. I ran the model on several forecast dates and everything seems to work fine.
I hope that users of the WRF model will benefit from my solution.

If you have any further questions, I will be happy to answer them as soon as I know them.

Mariusz
 
Top