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

metgrid.exe Fails with - NOAA/CIRES Twentieth Century Global Reanalysis Version 2c Data

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
Hello Everyone,

I've been trying to run a WRFv4.2.2 simulation from 1938 using the, 'NOAA/CIRES Twentieth Century Global Reanalysis Version 2c' dataset, however, I can't run metgrid.exe successfully.

This is my process:
1. Go to the UCAR website for ds131.2, then select the 'Data Access' tab.
2. Select 'Web File Listing' for the 'Yearly Time Series Analysis Fields...' product.
3. Select 'Faceted Browse' and enter 1938-01-01 to 1938-12-31 for the 'Temporal Selection.' Select 'Continue.'
4. Select 'All available' for the 'Parameter(s)' and 'Vertical Level(s)' fields then select 'UNWTD_MEAN' for the 'Ensemble field.' Select 'Update the List' tab then download ALL FILES.
5. Repeat the same procedure for the 'Yearly Time Series First Guess Forecast Fields.'
6. Use the normal ARW GEOGRID.TBL for geogrid.exe (no issues here). I added the '30s', and 'varsso+30s' files in namelist.wps (attached) for d01 and d02.
7. Link ALL analysis and forecast files to the WPS folder.
8. Use Vtable.TCRP for ungrib.exe (it finishes successfully) - ***I'm running WPSv4.0 w/intel compilers***
9. Use the normal ARW METGRID.TBL for metgrid.exe - This is where I'm running into problems. After partially finishing the first metgrid file, metgrid.exe fails with the following error (metgrid.log):
"2021-06-02 10:55:07.765 --- Initializing output module.
2021-06-02 10:55:07.776 --- ERROR: Error in ext_pkg_write_field"

I think ungrib.exe didn't process a mandatory field, however, it appears all fields were extracted based on my metgrid.log. I attached metgrid.log to this thread as well as my namelist.wps.

Note: I tried running WPS for the 'subset' tab from the UCAR website, however, ungrib.exe would fail immediately with those files... This is why I manually downloaded the files from steps 1-5.

Thanks in advance, everyone!


  • metgrid.log
    59.1 KB · Views: 33
  • namelist.wps
    1.3 KB · Views: 36
This error typically indicates that you're missing some mandatory surface data. Take a look at this FAQ that states the mandatory fields, and make sure you have them for the surface and soil.
Thank you very much for your reply!

So by process of elimination (according to my previously attached metgrid.log file):
3D Data (for data on constant pressure levels)
Temperature (TT) | 100000 to 1000 [CHECK]
U and V components of wind (UU & VV) | 100000 to 1000 [CHECK]
Geopotential height (GHT) | 100000 to 1000 [CHECK]
Relative humidity (RH) | 100000 to 1000 [CHECK]

2D Data
Surface pressure (PSFC) | 200100 [CHECK]
Mean sea-level pressure (PMSL) | 201300 [CHECK]
Skin temperature/SST (SKINTEMP) | 200100 [CHECK]
2 meter temperature (TT) | 200100 [CHECK]
2 meter relative humidity (RH) | 200100 [CHECK]
10 meter U and V components of wind (UU & VV) | 200100 [CHECK]
Soil temperature (ST100200-ST040100-ST010040-ST000010) | 200100 [CHECK]
Soil moisture (SM100200-SM040100-SM010040-SM000010) | 200100 [CHECK]
Soil height (or terrain height) | ???I don't see this in metgrid.log???

So I need soil height to run metgrid.exe successfully? I thought I processed everything from the 20CR database. How else can I implement soil height/terrain height from a different data source (if possible - namelist.wps, perhaps)? I attached a list of all .grib files I linked to WPS... I don't think other .grib files for the 20CR dataset exists.


  • list.txt
    3.1 KB · Views: 38
Yes, you will need terrain height (or geopotential height). If you're not able to obtain it from the data source you're using, you can use another source. You can read about how to use multiple datasets in this section of the Users Guide. It may be worth trying to contact the data group first, though, to see if they can help you obtain that data. It seems odd that they wouldn't have it available.
Thanks again! :D

I asked UCAR for a soil height field and they provided me with the following link:

I downloaded the .grib file then I processed ungrib.exe for the static, soil height .grib file with the prefix "FIX:". This generated one file titled, "FIX:1854-01-01_12." According to ungrib.log (attached), "SOILHGT" was processed by ungrib.exe, however, metgrid.exe still returned the following error:
"2021-06-04 13:49:56.261 --- Initializing output module.
2021-06-04 13:49:56.269 --- ERROR: Error in ext_pkg_write_field"

Unfortunately, SOILHGT wasn't processed in metgrid.log (not attached... it's the same as before).

I presume METGRID.TBL must be altered?


  • ungrib.log
    5.2 KB · Views: 39
Just an update,

I wasn't able to figure out how to process soil data w/the analysis dataset. I had to do some patch work instead...

I simply used ERA20c soil data instead (everything else came from NCTCGRV).

I strongly believe that METGRID.TBL has to be altered to process soil data from the NCTCGRV dataset. If someone figures this out, please post the solution to this thread!
I first would like to apologize for the long delay in response. I've been traveling for the past few weeks and am just now trying to catch up with forum inquiries. Thank you for your patience. Can you send the namelist you used to process metgrid with the UCAR soil field, along with the metgrid log? Thanks!