[gradsusr] Making .ctl file of grib2 files

Daniele Gandini daniele.gandini at arpa.piemonte.it
Thu Aug 26 10:52:50 EDT 2010


Joralf,

you can run perl script in a .ksh script, i.e:

perl ./g2ctl.pl gfs.2010082606-gfs.t06z.pgrbf00.grib2>forecast.ctl 

and then you modify forecast.ctl with sed.

For example

cp forecast.ctl forecast.tmp

cat forecast.tmp | sed -e "s/zdef 1 linear 1 1/zdef 2 levels 850 500/g" > forecast.ctl

Bye

Daniele 


----- Messaggio originale -----
Da: "Joralf Quist" <J.Quist at meteovista.nl>
A: gradsusr at gradsusr.org
Inviato: Giovedì, 26 agosto 2010 16:26:26
Oggetto: [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 



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr




More information about the gradsusr mailing list