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

Some mistakes in ungrib.exe or metgrid.exe

wangchuanyang

New member
I use the Vtable.ERA-interim.pl Vtable to ungrib.exe, and then run metgrid.exe, it will create met_em.d.files, but the files donot have dimension called num_metgrid_levels or num_st_layers and num_sm_layers. If I use these files to run real.exe, there will be an error like:

d01 2020-09-01_00:00:00 input_wrf.F: SIZE MISMATCH: namelist ide,jde,num_metgrid_levels= 80 80 34
d01 2020-09-01_00:00:00 input_wrf.F: SIZE MISMATCH: input file ide,jde,kde = 80 80 1
d01 2020-09-01_00:00:00 ---- ERROR: Mismatch between namelist and input file dimensions
NOTE: 1 namelist vs input data inconsistencies found.

or like:
----------------- ERROR -------------------
namelist : num_metgrid_soil_levels = 4
input files : NUM_METGRID_SOIL_LEVELS = 0 (from met_em files).
d01 2020-09-01_00:00:00 ---- ERROR: Mismatch between namelist and global attribute NUM_METGRID_SOIL_LEVELS
NOTE: 1 namelist vs input data inconsistencies found.
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE: <stdin> LINE: 1254
NOTE: Please check and reset these options
-------------------------------------------

I believe the problem is in ungrib or metgrid, but I donot know how to solve it.
Here are the files: ungrib.log and metgrid.log.
Can anyone help me? Thank you!
 

Attachments

  • 03d6ca762ffd9416c87b2dd638fec3b.png
    03d6ca762ffd9416c87b2dd638fec3b.png
    216.6 KB · Views: 13
  • b9649f341f93311408b0ea01381a409.png
    b9649f341f93311408b0ea01381a409.png
    27.8 KB · Views: 13
  • metgrid.log
    554.3 KB · Views: 1
  • ungrib.log
    187.5 KB · Views: 0
I use the Vtable.ERA-interim.pl Vtable to ungrib.exe, and then run metgrid.exe, it will create met_em.d.files, but the files donot have dimension called num_metgrid_levels or num_st_layers and num_sm_layers. If I use these files to run real.exe, there will be an error like:

d01 2020-09-01_00:00:00 input_wrf.F: SIZE MISMATCH: namelist ide,jde,num_metgrid_levels= 80 80 34
d01 2020-09-01_00:00:00 input_wrf.F: SIZE MISMATCH: input file ide,jde,kde = 80 80 1
d01 2020-09-01_00:00:00 ---- ERROR: Mismatch between namelist and input file dimensions
NOTE: 1 namelist vs input data inconsistencies found.

or like:
----------------- ERROR -------------------
namelist : num_metgrid_soil_levels = 4
input files : NUM_METGRID_SOIL_LEVELS = 0 (from met_em files).
d01 2020-09-01_00:00:00 ---- ERROR: Mismatch between namelist and global attribute NUM_METGRID_SOIL_LEVELS
NOTE: 1 namelist vs input data inconsistencies found.
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE: <stdin> LINE: 1254
NOTE: Please check and reset these options
-------------------------------------------

I believe the problem is in ungrib or metgrid, but I donot know how to solve it.
Here are the files: ungrib.log and metgrid.log.
Can anyone help me? Thank you!
Where are you getting your ERA data?

This link may help you.

 
Thank you for help! I getting my REA5 data from Copernicus Climate Data Store | and Copernicus Climate Data Store |. I believe the data is right, because my senior brother use the same data and he doesnot have the problem. But when I run the ungrib.exe and metgrid.exe, there will be the error. We donnot know why the problem occured.
with Copernicus data you need these variables:

Code:
GRIB | Level| Level| Level| metgrid  |  metgrid | metgrid                                  |
Code | Code |   1  |   2  | Name     |  Units   | Description                              |
-----+------+------+------+----------+----------+------------------------------------------+
 129 | 100  |   *  |      | GEOPT    | m2 s-2   |                                          |
     | 100  |   *  |      | HGT      | m        | Height                                   |
 130 | 100  |   *  |      | TT       | K        | Temperature                              |
 131 | 100  |   *  |      | UU       | m s-1    | U                                        |
 132 | 100  |   *  |      | VV       | m s-1    | V                                        |
 157 | 100  |   *  |      | RH       | %        | Relative Humidity                        |
 165 |  1   |   0  |      | UU       | m s-1    | U                                        | At 10 m
 166 |  1   |   0  |      | VV       | m s-1    | V                                        | At 10 m
 167 |  1   |   0  |      | TT       | K        | Temperature                              | At 2 m
 168 |  1   |   0  |      | DEWPT    | K        |                                          | At 2 m
     |  1   |   0  |      | RH       | %        | Relative Humidity                        | At 2 m
 172 |  1   |   0  |      | LANDSEA  | 0/1 Flag | Land/Sea flag                            |
 129 |  1   |   0  |      | SOILGEO  | m2 s-2   |                                          |
     |  1   |   0  |      | SOILHGT  | m        | Terrain field of source analysis         |
 134 |  1   |   0  |      | PSFC     | Pa       | Surface Pressure                         |
 151 |  1   |   0  |      | PMSL     | Pa       | Sea-level Pressure                       |
 235 |  1   |   0  |      | SKINTEMP | K        | Sea-Surface Temperature                  |
  31 |  1   |   0  |      | SEAICE   | 0/1 Flag | Sea-Ice-Flag                             |
  34 |  1   |   0  |      | SST      | K        | Sea-Surface Temperature                  |
 141 |  1   |   0  |      | SNOW_EC  | m        |                                          |
     |  1   |   0  |      | SNOW     | kg m-2   |Water Equivalent of Accumulated Snow Depth|
 139 | 112  |   0  |   7  | ST000007 | K        | T of 0-7 cm ground layer                 |
 170 | 112  |   7  |  28  | ST007028 | K        | T of 7-28 cm ground layer                |
 183 | 112  |  28  | 100  | ST028100 | K        | T of 28-100 cm ground layer              |
 236 | 112  | 100  | 255  | ST100255 | K        | T of 100-255 cm ground layer             |
  39 | 112  |   0  |   7  | SM000007 | fraction | Soil moisture of 0-7 cm ground layer     |
  40 | 112  |   7  |  28  | SM007028 | fraction | Soil moisture of 7-28 cm ground layer    |
  41 | 112  |  28  | 100  | SM028100 | fraction | Soil moisture of 28-100 cm ground layer  |
  42 | 112  | 100  | 255  | SM100255 | fraction | Soil moisture of 100-255 cm ground layer |
-----+------+------+------+----------+----------+------------------------------------------+
#
#  Grib codes are from Table 128
#  http://www.ecmwf.int/products/data/technical/GRIB_tables/table_128.html
# 
# snow depth is converted to the proper units in rrpr.F

and use the ECMWF vtable

at least that is what worked for me
 
with Copernicus data you need these variables:

Code:
GRIB | Level| Level| Level| metgrid  |  metgrid | metgrid                                  |
Code | Code |   1  |   2  | Name     |  Units   | Description                              |
-----+------+------+------+----------+----------+------------------------------------------+
 129 | 100  |   *  |      | GEOPT    | m2 s-2   |                                          |
     | 100  |   *  |      | HGT      | m        | Height                                   |
 130 | 100  |   *  |      | TT       | K        | Temperature                              |
 131 | 100  |   *  |      | UU       | m s-1    | U                                        |
 132 | 100  |   *  |      | VV       | m s-1    | V                                        |
 157 | 100  |   *  |      | RH       | %        | Relative Humidity                        |
 165 |  1   |   0  |      | UU       | m s-1    | U                                        | At 10 m
 166 |  1   |   0  |      | VV       | m s-1    | V                                        | At 10 m
 167 |  1   |   0  |      | TT       | K        | Temperature                              | At 2 m
 168 |  1   |   0  |      | DEWPT    | K        |                                          | At 2 m
     |  1   |   0  |      | RH       | %        | Relative Humidity                        | At 2 m
 172 |  1   |   0  |      | LANDSEA  | 0/1 Flag | Land/Sea flag                            |
 129 |  1   |   0  |      | SOILGEO  | m2 s-2   |                                          |
     |  1   |   0  |      | SOILHGT  | m        | Terrain field of source analysis         |
 134 |  1   |   0  |      | PSFC     | Pa       | Surface Pressure                         |
 151 |  1   |   0  |      | PMSL     | Pa       | Sea-level Pressure                       |
 235 |  1   |   0  |      | SKINTEMP | K        | Sea-Surface Temperature                  |
  31 |  1   |   0  |      | SEAICE   | 0/1 Flag | Sea-Ice-Flag                             |
  34 |  1   |   0  |      | SST      | K        | Sea-Surface Temperature                  |
 141 |  1   |   0  |      | SNOW_EC  | m        |                                          |
     |  1   |   0  |      | SNOW     | kg m-2   |Water Equivalent of Accumulated Snow Depth|
 139 | 112  |   0  |   7  | ST000007 | K        | T of 0-7 cm ground layer                 |
 170 | 112  |   7  |  28  | ST007028 | K        | T of 7-28 cm ground layer                |
 183 | 112  |  28  | 100  | ST028100 | K        | T of 28-100 cm ground layer              |
 236 | 112  | 100  | 255  | ST100255 | K        | T of 100-255 cm ground layer             |
  39 | 112  |   0  |   7  | SM000007 | fraction | Soil moisture of 0-7 cm ground layer     |
  40 | 112  |   7  |  28  | SM007028 | fraction | Soil moisture of 7-28 cm ground layer    |
  41 | 112  |  28  | 100  | SM028100 | fraction | Soil moisture of 28-100 cm ground layer  |
  42 | 112  | 100  | 255  | SM100255 | fraction | Soil moisture of 100-255 cm ground layer |
-----+------+------+------+----------+----------+------------------------------------------+
#
#  Grib codes are from Table 128
#  http://www.ecmwf.int/products/data/technical/GRIB_tables/table_128.html
#
# snow depth is converted to the proper units in rrpr.F

and use the ECMWF vtable

at least that is what worked for me
I choose the variables like this and use the ECMWF vtable, but also have the problem.
 

Attachments

  • 5f920b102d69cfa8ac22e12a1d6c0e3.png
    5f920b102d69cfa8ac22e12a1d6c0e3.png
    28.4 KB · Views: 12
  • 16f9b03584f4f43e06ecad081e5b05f.png
    16f9b03584f4f43e06ecad081e5b05f.png
    25 KB · Views: 11
Ungrib.exe didn't yield all the required variables for WPS. Although metgrid.exe is bale to run, the data is incomplete for running WRF.

If your data is correct, then the Vtable you used apparently didn't match with your data. You will need to examine the data you downlaod, and create vtable to ungrib the data correctly.

Please take a look at the document here how to create Vtable:
 
Top