[gradsusr] Making .ctl file of grib2 files

Ling,Alister [Edm] Alister.Ling at EC.gc.ca
Thu Aug 26 10:44:56 EDT 2010


Here is what I do, based on info I dug up in the wgrib2 pages:
 
There is a small bug in the grib2 file system that requires a kludge so
that grads can view it:
 
bash script segment:
 
wgrib2 $downloaded_grib_file -set_flag_table_3.3 48 -grib
$modified_grib_file
g2ctl $modified_grib_file > $CTL_filename
gribmap -1 $CTL_filename
 
 
Of course you may need to point to the full path for wgrib2 g2ctl
gribmap.
In short, take the downloaded grib file , use wgrib2 to adjust the
resolution parameter using "-set_flag_table_3.3 48" output to a new grib
file. 
Then use g2ctl to make the contrl file.
 
This is for files downloaded from NCEP, so presumably should be same as
for NOAA. It has something to do with grid spacing, and my impression
(which may be wrong) is it may only be necessasry for certain grids like
the lambert conformal.
 
Regards,
Alister.

________________________________

From: gradsusr-bounces at gradsusr.org
[mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Joralf Quist
Sent: Thursday, August 26, 2010 8:26 AM
To: gradsusr at gradsusr.org
Subject: [gradsusr] Making .ctl file of grib2 files


Hi all,
 
Another question which is bothering me. I've got grib2files which I
download through a perlscript from the NOAA server. Ofcourse I want to
make a .ctl file, so I can read them into Grads.
 
I've downloaded the latest version of g2ctl and installed wgrib2. I can
read the file with wgrib2, it gives:
 
-bash-3.2$ ./wgrib2 gfs.2010082606-gfs.t06z.pgrbf00.grib2
1:115:d=2010082606:TMP:2 m above ground:anl:
2:35533:d=2010082606:RH:2 m above ground:anl:
3.1:89724:d=2010082606:UGRD:10 m above ground:anl:
3.2:89724:d=2010082606:VGRD:10 m above ground:anl:
4:219680:d=2010082606:TCDC:convective cloud layer:anl:
5:219976:d=2010082606:PRMSL:mean sea level:anl:

But whenever I try to make a ctl file it gives this error message:
 
-bash-3.2$ ./g2ctl.pl gfs.2010082606-gfs.t06z.pgrbf00.grib2>forecast.ctl
*** script needs to be modified ***
*** unknown grid ***

My collegue did manage to make a .ctl file in Windows with the same
perlscript. But I want it to run in Linux.
 
I've looked into the perlscript but couldn't find any information about
this error. As anybody got a clue how to fix this problem?
 
I'm using version 2.0.a5.oga.5 of the Grid Analysis and Display System
(GrADS) on a x86_64 x86_64 x86_64 GNU/Linux OS.

 

Oh, and I see my reply to my last thread was put in a new thread, how do
I correctly reply to the messages on the list?

 

Thanks a lot!

 

Joralf Quist



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100826/a02bdfbc/attachment-0003.html 


More information about the gradsusr mailing list