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

(RESOLVED) Ungrib Not Reading Newly Added variables to GFS Vtable

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.

lmadaus

New member
Hello wrfhelp,

I'm trying to use the WPS sequence (v4.0) to unpack GFS grib2 files and extract necessary fields to run the WRF/Hydro model. These are not the same fields as are required for WRF atmopshere, but there is some overlap.

While I recognize that I have to modify the METGRID.TBL file to use these new variables, I'm stuck at the Ungrib phase. I modified the Vtable.GFS included with v4.0 of WPS to only extract the variables needed (attached; Vtable.txt). Ungrib successfully extracts the fields corresponding to 2m temperature, 2m RH, 10m U wind, 10m V wind, and PSFC (all of which were in the original Vtable.GFS) but it cannot find any of the three variables I've added (SWDOWN, LWDOWN and PRATE).

I've populated the GRIB2 parameters in the Vtable based on the output from the g2print.exe utility, which is able to successfully find all three of these fields in my test GFS grib2 file. As far as I can tell, these parameters are correct, but ungrib continues to say it cannot find any of these fields (see attached ungrib.log file for the output).

I'm also attaching the namelist I'm using (namelist.wps), the gzipped GRIB2 file I've been testing on, and the output of g2print.exe (g2out.txt, the corresponding variables to look for in that output are DSWRF, LSWRF, and PRATE).

Any suggestions as to why this isn't working?

Thanks,

Luke
 

Attachments

  • ungrib.log
    2.3 KB · Views: 59
  • namelist.wps
    853 bytes · Views: 51
  • g2out.txt
    40.5 KB · Views: 58
  • Vtable.txt
    2.7 KB · Views: 67
  • gfs.t00z.pgrb2.0p25.f003.gz
    183 MB · Views: 46
Hi,

It looks like the 3 variables that ungrib is unable to locate have a time stamp of 2018-08-25_00:00:00. If you look at the g2print log you can see that the other variables have a forecast hour of 03, while these have a forecast hour of 00. Since your namelist.wps file starts at 2018-08-25_03:00:00, then the ungrib program is not including any dates/times before that. If you want to use these new data, you'll need to try to find those that correspond to the time you're interested in, or you can start your run a bit earlier.
 
Thanks for the suggestion about the model times!

I've gone through and used the Python pygrib utility to edit the forecast hour for the specific additional fields I'm interested in to make it match the correct validTime. Now when I run the g2print.exe utility, it correctly gives the time for these fields, e.g., for PRATE:

ungrib - grib edition num 2
reading from grib file = gfs/fields_3hour/gfs_modified_Precipitationrate_f003.grb
NCEP GFS Model
---------------------------------------------------------------------------------------
rec Prod Cat Param Lvl Lvl Lvl Prod Name Time Fcst
num Disc num code one two Templ hour
---------------------------------------------------------------------------------------
1 0 1 7 1 0 0 8 PRATE 2018-09-01_00:00:00 03 PDT4.8


Successful completion of g2print

Yet when I run ungrib on this file with my modified Vtable in the previous post, it still finds nothing.

I've attached my namelist, Vtable, output from ungrib.log and the new grib2 file. Any additional suggestions?

Thanks,

Luke
 

Attachments

  • ungrib.log
    2.3 KB · Views: 54
  • namelist.wps
    853 bytes · Views: 46
  • Vtable.txt
    2.7 KB · Views: 58
  • gfs_modified_Precipitationrate_f003.grb.gz
    235.7 KB · Views: 43
Hi,

Okay, the reason why it is unable to detect the data is that this particular field is a PDT4.8 field (which you can see when you use the g2print.exe utility). You can also see that the "Prod Templ" type is 8. So for this particular type, it will be necessary to add an extra column in the Vtable, with an 8 for this variable. I'm attaching an updated Vtable that should work. Let me know!
 

Attachments

  • Vtable.txt
    2.7 KB · Views: 98
Thanks for that update! Adding the additional column did indeed appear to do the trick. Thanks for your help!
 
Top