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

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..

View attachment 16872

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.

View attachment 16873

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
View attachment 16874

Daily total precipitation. GFS ........................................................... ECMWF open data
View attachment 16875

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

Best regards

Mariusz Figurski

@figurski Could you attach your rd_grib2.F file here with your modifications that worked on IFS so we can test it?
 
Mariusz,

I run WPS using your rd_grib2.F and Vtable. All work fine. Thank you!

The met-em file I generated only has 14 pressure levels in the vertical, --- is this what you got?

Thanks again!

Ming
 
Ming,
Yes, the IFS model provided by ECMWF has only 14 pressure levels. I made a simulation with the operational IFS model at 137 hybrid levels, which we have access to at the Institute of Meteorology and Water Management. The results are similar to the results from the IFS model, which is provided as open data. This is good news.
In down two examples from my symulations:
The descriptions on the maps are in Polish.
"Opad calkowity" is "Total Precipitation"
"Temperatura powietrza 2m" is "temperature 2m"
It would be good to introduce the ability to read data from IFS in the next version of the WRF model.

Mariusz
 

Attachments

  • opad.png
    opad.png
    1.5 MB · Views: 14
  • temp2.png
    temp2.png
    1.9 MB · Views: 15
Ming,
Yes, the IFS model provided by ECMWF has only 14 pressure levels. I made a simulation with the operational IFS model at 137 hybrid levels, which we have access to at the Institute of Meteorology and Water Management. The results are similar to the results from the IFS model, which is provided as open data. This is good news.
In down two examples from my symulations:
The descriptions on the maps are in Polish.
"Opad calkowity" is "Total Precipitation"
"Temperatura powietrza 2m" is "temperature 2m"
It would be good to introduce the ability to read data from IFS in the next version of the WRF model.

Mariusz
or a patch
 
Ming,
Yes, the IFS model provided by ECMWF has only 14 pressure levels. I made a simulation with the operational IFS model at 137 hybrid levels, which we have access to at the Institute of Meteorology and Water Management. The results are similar to the results from the IFS model, which is provided as open data. This is good news.
In down two examples from my symulations:
The descriptions on the maps are in Polish.
"Opad calkowity" is "Total Precipitation"
"Temperatura powietrza 2m" is "temperature 2m"
It would be good to introduce the ability to read data from IFS in the next version of the WRF model.

Mariusz
You can make a new pull request:Pull requests · wrf-model/WPS
 
Mariusz,
Many thanks for the clarification. We definitely will incorporate your files to WPS. Just wonder whether you are familiar with github? if so, can you create a PR under github.com/wrf-model/WPS? If not, I will talk to my colleague (Jim Bresch) and we will make a PR.
With warm regards,
Ming
 
Ming,
Unfortunately, I only created an account today and I need to learn how to work with github. I think it will definitely be faster if your colleague helps. I wrote in my calendar that I need to learn how to use github, but it will take some time. That's why your offer to help and create a PR is the best solution.
Mariusz
 
Mariusz,
Thanks for letting me. Please don't worry for the Git issue, and we definitely will be able to create a PR on our site.
Ming
 
I tried to download 6 hours of ecmwf 25km forecast, when I launch the run metgrid it gives me this error:

In metgrid.log.0011 - 2025-01-17 16:55:58.244 --- ERROR: the mandatory field TT was not found in any input data
 
Last edited:
I tried to download 6 hours of ecmwf 25km forecast, when I launch the run metgrid it gives me this error:

In metgrid.log.0011 - 2025-01-17 16:55:58.244 --- ERROR: the mandatory field TT was not found in any input data

It looks like incomplete grib2 files from ECMWF. You need to check if they are complete. Need more information about the simulation and from what date did you get the ECMWF data?
 
in ungrib.exe i have this error

*** Starting program ungrib.exe ***
ERROR STOP IN READ_NAMELIST
INTERVAL must fit evenly between start time and end time:
Start time: 2025-01-17_00:00:00I'm using your vtable
End time: 2025-01-17_01:00:00
INTERVAL : 10800 seconds, 3.000000 hours
ERROR: Change your namelist, and resubmit

PS: I'm using your vtable
 
Top