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

Error while running metgrid.exe with ERA5 winds data

alugulaboyaj

New member
I wanted to run the WRF models with initial and boundary conditions from the NCEP GFS 25 km resolution and only winds (UV) data from the ERA5.

For that, I have completed running ungrib.exe for the NCEP GFS and ERA5 UV winds data. While running ungrib.exe, I used Vtable.GFS for NCEP GFS data and Vtable.ERA-interim.pl for the ERA5 winds data.

Generated below files after running urgrib.exe

FILE:2021-03-30_00
FILE:2021-03-30_06
FILE:2021-03-30_12
FILE:2021-03-30_18

WIND:2021-03-30_00
WIND:2021-03-30_06
WIND:2021-03-30_12
WIND:2021-03-30_18


Then, while running the metgrid.exe using the option fg_name = 'FILE','WIND', it is working for the first time step, but for the second time step, it is showing the error below.

ERROR: Error in ext_pkg_write_field

Can anyone kindly help me resolve this issue?

I have tried WPS-4.0, WPS-4.1, and WPS-4.3.2 but the problem was the same.

Thank you in advance.

Boyaj
 
Hi Boyaj,
This error typically means you are missing surface data. Can you verify that the surface data from GFS is processed and in the FILE* files?
 
Dear Dr. Kwerner,

Thank you for your kind response.

I have verified that the surface data from GFS is processed in the FILE* files. I tested the same FILE* files with U and V winds from the NCEP Reanalysis-II 6-hourly data, and it is working fine, and the met_em* files have been created without any error. However, I noticed differences between the ERA5 and NCEP Reanalysis-II datasets. The units are the same, but the order of pressure levels differs between these two datasets. For ERA5 data, the pressure levels start at 100 Pa, while for NCEP Reanalysis-II, the pressure levels start at 100000 Pa.

The order of ERA5 data pressure levels is as follows:
100, 200, 300, 500, 700, 1000, 2000, 3000, 5000, 7000, 10000, 12500, 15000, 17500, 20000, 22500, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000, 70000, 75000, 77500, 80000, 82500, 85000, 87500, 90000, 92500, 95000, 97500, 100000.

The NCEP Reanalysis winds pressure levels are:
100000, 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000, 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000.

If this order of the pressure levels is a problem, then how is ungrib.exe working? I'm worried if this order of pressure levels might cause any issues or if there is any other issue while running metgrid.exe.

I shall be grateful if you could resolve my issue.

Here is a link for you to see a few of my files.



With regards
Boyaj
 

Attachments

  • metgrid_while_run_with_ERA5_winds.log
    31.8 KB · Views: 5
Last edited:
Boyaj,
Thank you so much for sharing those files. I was able to figure out the issue. The order of levels isn't causing a problem. The issue is the difference in levels between each data type. To get past this, you can use the mod_levs.exe utility (available in the wps/util directory). I found that the two data types have the following levels in common, and this is what I added to my namelist.wps before running the mod_levs.exe:

Code:
&mod_levs
press_pa = 100000, 97500, 95000, 92500, 90000, 85000, 80000, 75000, 70000, 65000, 60000, 55000, 50000, 45000, 40000, 35000, 30000, 25000, 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 700, 500, 300, 200, 100
/

I actually had to run this on both types of intermediate files. For e.g., I ran the following

Code:
./util/mod_levs.exe WIND:2021-03-30_00 ERA5:2021-03-30_00

./util/mod_levs.exe FILE:2021-03-30_00 GFS:2021-03-30_00

and I ran each of those for all times available.

After that, I modified the namelist to change the prefixes in the &metgrid section.

Code:
&metgrid
 fg_name = 'GFS','ERA5'

And then metgrid ran without the previous error. Let me know if this solves your issue.
 
Dear Sir,

Thank you so much for your wonderful help and support in resolving my issue. Now I am able to run the metgrid.exe, and met_em* files have been created.

With best regards
Boyaj
 
Top