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

Running WRF using GEFS, error in ungrib

syyang

New member
Hello.

I am trying to run a model using GEFS as input data for WRF.

GEFS has gec00 (control forecast), gep01 ~ gep20 (ensemble member forecast), geavg (ensemble average) data, and I want to use geavg, which has an ensemble average.

Based on the post below, if I ungrib the gep01 data to Vtable.GFSENS, the intermediate file is created properly.

However, it seems that Vtable.GFSENS required for ungrib with the same namelist.wps can only be used for gep01 to gep20 files.

When comparing gep01 and geavg with wgrib2, they do not seem to be very different, but geavg generates an error during the ungrib process.

I want to perform WRF by taking advantage of the ensemble model, but instead of using gep01 ~gep20 as input data for each ensemble model of WRF.
I want to find a way to use the already provided geavg file as input data for WRF.

Thanks.

** namelist.wps
&share
wrf_core = 'ARW',
max_dom = 2,
start_date = '2024-10-28_00:00:00','2024-10-28_00:00:00',
end_date = '2024-10-30_06:00:00','2024-10-30_06:00:00',
interval_seconds = 21600
/

&ungrib
out_format = 'WPS',
prefix = 'GEFS_a',
/

&metgrid
fg_name = 'GFS'
/


** Result of "wgrib2 geavg.t00z.pgrb2a.0p50.f000"


1:0:d=2024102800:HGT:10 mb:anl:ens mean
2:224307:d=2024102800:TMP:10 mb:anl:ens mean
3:352796:d=2024102800:RH:10 mb:anl:ens mean
4:420197:d=2024102800:UGRD:10 mb:anl:ens mean
5:574210:d=2024102800:VGRD:10 mb:anl:ens mean
6:714719:d=2024102800:HGT:50 mb:anl:ens mean
7:953981:d=2024102800:TMP:50 mb:anl:ens mean
8:1084631:d=2024102800:RH:50 mb:anl:ens mean
9:1179900:d=2024102800:UGRD:50 mb:anl:ens mean
10:1337149:d=2024102800:VGRD:50 mb:anl:ens mean
11:1487209:d=2024102800:HGT:100 mb:anl:ens mean
12:1722415:d=2024102800:TMP:100 mb:anl:ens mean
13:1848285:d=2024102800:RH:100 mb:anl:ens mean
14:2012539:d=2024102800:UGRD:100 mb:anl:ens mean
15:2277037:d=2024102800:VGRD:100 mb:anl:ens mean
16:2539701:d=2024102800:HGT:200 mb:anl:ens mean
17:2769360:d=2024102800:TMP:200 mb:anl:ens mean
18:2894795:d=2024102800:RH:200 mb:anl:ens mean
19:3118746:d=2024102800:UGRD:200 mb:anl:ens mean
20:3290237:d=2024102800:VGRD:200 mb:anl:ens mean
21:3459511:d=2024102800:HGT:250 mb:anl:ens mean
22:3685648:d=2024102800:TMP:250 mb:anl:ens mean
23:3805782:d=2024102800:RH:250 mb:anl:ens mean
24:4048089:d=2024102800:UGRD:250 mb:anl:ens mean
25:4217865:d=2024102800:VGRD:250 mb:anl:ens mean
26:4391255:d=2024102800:HGT:300 mb:anl:ens mean
27:4614197:d=2024102800:UGRD:300 mb:anl:ens mean
28:4788297:d=2024102800:VGRD:300 mb:anl:ens mean
29:4968212:d=2024102800:UGRD:400 mb:anl:ens mean
30:5137263:d=2024102800:VGRD:400 mb:anl:ens mean
31:5312496:d=2024102800:HGT:500 mb:anl:ens mean
32:5559751:d=2024102800:TMP:500 mb:anl:ens mean
33:5677987:d=2024102800:RH:500 mb:anl:ens mean
34:5925092:d=2024102800:UGRD:500 mb:anl:ens mean
35:6193706:d=2024102800:VGRD:500 mb:anl:ens mean
36:6463951:d=2024102800:HGT:700 mb:anl:ens mean
37:6722359:d=2024102800:TMP:700 mb:anl:ens mean
38:6847359:d=2024102800:RH:700 mb:anl:ens mean
39:7092637:d=2024102800:UGRD:700 mb:anl:ens mean
40:7355103:d=2024102800:VGRD:700 mb:anl:ens mean
41:7618102:d=2024102800:HGT:850 mb:anl:ens mean
42:7884151:d=2024102800:TMP:850 mb:anl:ens mean
43:8022995:d=2024102800:RH:850 mb:anl:ens mean
44:8273247:d=2024102800:VVEL:850 mb:anl:ens mean
45:8591538:d=2024102800:UGRD:850 mb:anl:ens mean
46:8858600:d=2024102800:VGRD:850 mb:anl:ens mean
47:9127940:d=2024102800:HGT:925 mb:anl:ens mean
48:9404224:d=2024102800:TMP:925 mb:anl:ens mean
49:9542975:d=2024102800:RH:925 mb:anl:ens mean
50:9784662:d=2024102800:UGRD:925 mb:anl:ens mean
51:10051289:d=2024102800:VGRD:925 mb:anl:ens mean
52:10319572:d=2024102800:TMP:1000 mb:anl:ens mean
53:10460607:d=2024102800:RH:1000 mb:anl:ens mean
54:10689111:d=2024102800:UGRD:1000 mb:anl:ens mean
55:10959857:d=2024102800:VGRD:1000 mb:anl:ens mean
56:11225247:d=2024102800:HGT:1000 mb:anl:ens mean
57:11513384:d=2024102800:pRES:surface:anl:ens mean
58:11767536:d=2024102800:HGT:surface:anl:ens mean
59:11920049:d=2024102800:TSOIL:0-0.1 m below ground:anl:ens mean
60:12060421:d=2024102800:SOILW:0-0.1 m below ground:anl:ens mean
61:12159456:d=2024102800:WEASD:surface:anl:ens mean
62:12240262:d=2024102800:SNOD:surface:anl:ens mean
63:12316144:d=2024102800:ICETK:surface:anl:ens mean
64:12344817:d=2024102800:TMP:2 m above ground:anl:ens mean
65:12594270:d=2024102800:RH:2 m above ground:anl:ens mean
66:12820695:d=2024102800:UGRD:10 m above ground:anl:ens mean
67:13089887:d=2024102800:VGRD:10 m above ground:anl:ens mean
68:13351619:d=2024102800:pWAT:entire atmosphere (considered as a single layer):anl:ens mean
69:13515136:d=2024102800:CAPE:180-0 mb above ground:anl:ens mean
70:13669177:d=2024102800:CIN:180-0 mb above ground:anl:ens mean
71:13771714:d=2024102800:pRMSL:mean sea level:anl:ens mea

** Result of "wgrib2 gep01.t00z.pgrb2b.0p50.f000"


1:0:d=2024102800:pRES:mean sea level:anl:ENS=+1
2:284286:d=2024102800:pRES:1 hybrid level:anl:ENS=+1
3:552569:d=2024102800:HGT:1 hybrid level:anl:ENS=+1
4:728284:d=2024102800:TMP:1 hybrid level:anl:ENS=+1
5:974100:d=2024102800:RH:1 hybrid level:anl:ENS=+1
6:1308234:d=2024102800:UGRD:1 hybrid level:anl:ENS=+1
7:1574110:d=2024102800:VGRD:1 hybrid level:anl:ENS=+1
8:1835567:d=2024102800:pRES:2 hybrid level:anl:ENS=+1
9:2099855:d=2024102800:HGT:2 hybrid level:anl:ENS=+1
10:2272642:d=2024102800:TMP:2 hybrid level:anl:ENS=+1
11:2516855:d=2024102800:RH:2 hybrid level:anl:ENS=+1
12:2850344:d=2024102800:UGRD:2 hybrid level:anl:ENS=+1
13:3119102:d=2024102800:VGRD:2 hybrid level:anl:ENS=+1
14:3384274:d=2024102800:pRES:3 hybrid level:anl:ENS=+1
15:3646377:d=2024102800:HGT:3 hybrid level:anl:ENS=+1
16:3816804:d=2024102800:TMP:3 hybrid level:anl:ENS=+1
17:4059444:d=2024102800:RH:3 hybrid level:anl:ENS=+1
18:4392741:d=2024102800:UGRD:3 hybrid level:anl:ENS=+1
19:4662128:d=2024102800:VGRD:3 hybrid level:anl:ENS=+1
20:4928886:d=2024102800:pRES:4 hybrid level:anl:ENS=+1
21:5222330:d=2024102800:HGT:4 hybrid level:anl:ENS=+1
22:5392480:d=2024102800:TMP:4 hybrid level:anl:ENS=+1
23:5632723:d=2024102800:RH:4 hybrid level:anl:ENS=+1
24:5968203:d=2024102800:UGRD:4 hybrid level:anl:ENS=+1
25:6238086:d=2024102800:VGRD:4 hybrid level:anl:ENS=+1
26:6505495:d=2024102800:VIS:surface:anl:ENS=+1
27:6628722:d=2024102800:UGRD:planetary boundary layer:anl:ENS=+1
28:6800897:d=2024102800:VGRD:planetary boundary layer:anl:ENS=+1
29:6971658:d=2024102800:VRATE:planetary boundary layer:anl:ENS=+1
30:7140840:d=2024102800:GUST:surface:anl:ENS=+1
31:7318314:d=2024102800:HGT:1 mb:anl:ENS=+1
32:7557345:d=2024102800:TMP:1 mb:anl:ENS=+1
33:7666872:d=2024102800:SPFH:1 mb:anl:ENS=+1
34:7885847:d=2024102800:VVEL:1 mb:anl:ENS=+1
35:8245695:d=2024102800:UGRD:1 mb:anl:ENS=+1
36:8472805:d=2024102800:VGRD:1 mb:anl:ENS=+1
37:8666513:d=2024102800:O3MR:1 mb:anl:ENS=+1
38:8952070:d=2024102800:HGT:2 mb:anl:ENS=+1
39:9180187:d=2024102800:TMP:2 mb:anl:ENS=+1
40:9294802:d=2024102800:SPFH:2 mb:anl:ENS=+1

** Result of ./ungrib.exe of geavg.t00z.pgrb2a.0p50.f000


*** Starting program ungrib.exe ***
Start_date = 2024-10-28_00:00:00 , End_date = 2024-10-30_06:00:00
output format is WPS
Path to intermediate files is ./

###############################################################################

Inventory for date = 2024-10-28 00:00:00

PRES TT UU VV RH HGT PSFC PMSL SM000010 SM010040 SM040100 SM100200 SM010200 ST000010 ST010040 ST040100 ST100200 ST010200 SEAICE LANDSEA SOILHGT SKINTEMP SNOW
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

###############################################################################

Inventory for date = 2024-10-28 03:00:00

PRES TT UU VV RH HGT PSFC PMSL SM000010 SM010040 SM040100 SM100200 SM010200 ST000010 ST010040 ST040100 ST100200 ST010200 SEAICE LANDSEA SOILHGT SKINTEMP SNOW
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

###############################################################################

Inventory for date = 2024-10-28 06:00:00

PRES TT UU VV RH HGT PSFC PMSL SM000010 SM010040 SM040100 SM100200 SM010200 ST000010 ST010040 ST040100 ST100200 ST010200 SEAICE LANDSEA SOILHGT SKINTEMP SNOW
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

###############################################################################

Inventory for date = 2024-10-28 09:00:00

PRES TT UU VV RH HGT PSFC PMSL SM000010 SM010040 SM040100 SM100200 SM010200 ST000010 ST010040 ST040100 ST100200 ST010200 SEAICE LANDSEA SOILHGT SKINTEMP SNOW
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

###############################################################################

Inventory for date = 2024-10-28 12:00:00

PRES TT UU VV RH HGT PSFC PMSL SM000010 SM010040 SM040100 SM100200 SM010200 ST000010 ST010040 ST040100 ST100200 ST010200 SEAICE LANDSEA SOILHGT SKINTEMP SNOW
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

###############################################################################
 
Last edited:
Hi,
When you compare the two data types (geavg vs. gep*), is it the codes that are so different? If that's the case, you'll need to use Vtable.GFSENS as a template to modify for the geavg input. Keep the same format, but modify the codes so that ungrib will be able to read the data.
 
Hi,
When you compare the two data types (geavg vs. gep*), is it the codes that are so different? If that's the case, you'll need to use Vtable.GFSENS as a template to modify for the geavg input. Keep the same format, but modify the codes so that ungrib will be able to read the data.

As attached to the original post, when comparing gep01 and geavg files with the wgrib2 command, there doesn't seem to be much difference, so I tried to modify the Vtable.GFSENS and ungrib geavg.
However, I tried modifying it in various ways, but it seems that ungrib.exe and Vtable are not able to understand the contents of the geavg file.
Can you help me with this?
 
What format at the geavg files? Are they GRIB files?
Yes, "geavg" file is GRIB2 format.
So I was able to check the metadata of the files with the "wgrib2" command.

I downloaded these files (gep01 and geavg) from this path. "s3://noaa-gefs-pds/gefs.20241028/00/atmos/pgrb2ap5/~"
 
Can you share a couple of the 'geavg' GRIB files with me? If they are too large to attach here, see the home page of this forum for information on sharing large files.

Can you also please attach your namelist.wps file, and the modified Vtable you're using? Thanks!
 
Can you share a couple of the 'geavg' GRIB files with me? If they are too large to attach here, see the home page of this forum for information on sharing large files.

Can you also please attach your namelist.wps file, and the modified Vtable you're using? Thanks!
I uploaded the geavg file and gep01 file you mentioned to nextcloud.
--> https://nextcloud.mmm.ucar.edu/index.php/s/n8in8C8PAAaYqAy/download?path=/&files=GEFS_data.zip

And I attached the "namelist.wps" file I used and the Vtable.GFSENS file in WRF.
When I read the geavg file using "Vtable.GFSENS", the file is not read, so I think I need to make some modifications, but I am not successful.

Thanks
 

Attachments

  • namelist.wps
    744 bytes · Views: 2
  • Vtable.GFSENS.txt
    4.6 KB · Views: 2
Thanks for sharing those. I *think* the problem is with the "GB2 PDT" column in the Vtable. The default Vtable.GFSENS has all "1s" in the column. Can you change those all to "2" and see if it works for you?
 
Thanks for sharing those. I *think* the problem is with the "GB2 PDT" column in the Vtable. The default Vtable.GFSENS has all "1s" in the column. Can you change those all to "2" and see if it works for you?
Thanks to you, I was able to modify the Vtable and successfully ungrib "geavg" files!

Since the variable itself in geavg is not enough, I can't use it as a single input data for WRF, but thanks to the information you provided, I was able to successfully ungrib and metgrid it.

I have another question. Can you tell me how you figured out that the PDT of Vtable is the problem?

Thanks.
 
I'm glad to hear that fixed the issue!

Can you tell me how you figured out that the PDT of Vtable is the problem?
I used the util/g2print.exe program to print out the content of the geavg file and got the following (plus more - only showing the top of the print out):

Code:
ungrib - grib edition num           2
 reading from grib file =
 GRIBFILE.AAA                                                                   

      NCEP GEFS
---------------------------------------------------------------------------------------
 rec Prod Cat Param  Lvl    Lvl      Lvl     Prod    Name            Time          Fcst
 num Disc     num    code   one      two     Templ                                 hour
---------------------------------------------------------------------------------------
   1   0    3   5     100    1000       0       2     HGT      2024-10-28_00:00:00   00
   2   0    0   0     100    1000       0       2     TMP      2024-10-28_00:00:00   00
   3   0    1   1     100    1000       0       2     RH       2024-10-28_00:00:00   00
   4   0    2   2     100    1000       0       2     UGRD     2024-10-28_00:00:00   00
   5   0    2   3     100    1000       0       2     VGRD     2024-10-28_00:00:00   00
   6   0    3   5     100    5000       0       2     HGT      2024-10-28_00:00:00   00
   7   0    0   0     100    5000       0       2     TMP      2024-10-28_00:00:00   00
   8   0    1   1     100    5000       0       2     RH       2024-10-28_00:00:00   00
   9   0    2   2     100    5000       0       2     UGRD     2024-10-28_00:00:00   00
  10   0    2   3     100    5000       0       2     VGRD     2024-10-28_00:00:00   00
  11   0    3   5     100   10000       0       2     HGT      2024-10-28_00:00:00   00
  12   0    0   0     100   10000       0       2     TMP      2024-10-28_00:00:00   00

I saw that the column for "Prod Templ" was "2" for these data, and was "1" for the other files you shared. I suspected that had to do with the PDT, so I just tried setting it to 2 for these data, and it worked!
 
Top