[gradsusr] updating gribtab.dat not working?

Wesley Ebisuzaki Wesley.Ebisuzaki at noaa.gov
Fri Jun 24 17:05:15 EDT 2011


Alister,

    This is a forum of GrADS and not for wgrib2 development.

    If peole want to add an additional gribtable to wgrib2, they have to
include the new gribtable.dat in gribtab.c.   If Environment Canada wants
to add a local table to wgrib2, fine -- send me the table.

    The missing perl script just changes the grib table from tabular format
to a C-language format.  Pretty trivial program.
> bash-3.2$ cat mk_gribtab_dat.pl
> #!/usr/bin/perl
>
> open(IN,"gribtab");
> open(OUT,">gribtab.dat");
>
> while (<IN>) {
>     chomp;
>     ($Fld1,$Fld2,$Fld3,$Fld4,$Fld5,$Fld6,$Fld7,$desc,$units) = 
> split(':', $_, 9999);
>        $desc =~ s/[*]*$//;
>     printf OUT "{ %d, %d, %d, %d, %d, %d, \"%s\", \"%s\", \"%s\"},\n", 
> $Fld1,
>       $Fld2, $Fld3, $Fld4, $Fld5, $Fld6, $Fld7, $desc, $units;
> }
        Wesley



Ling,Alister [Edm] wrote:
> I am trying to modify the gribtab tables to add some new variables 
> from locally created gribfiles.
>  
> I manually edited the gribtab and gribtab.dat files, but it appears I 
> need to do more than that. In the update_gribtable.txt it mentions run 
> mk_gribtab_dat.pl, but I can't find that anywhere, not even with 
> googling.
>  
> Any help is appreciated.
> Regards,
> Alister.
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   




More information about the gradsusr mailing list