[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19990727: Using NAGRIB to convert GRIB file to GEMPAK file



Li-Chuan,

If NAGRIB failed to write the output into a gempak gridded data file,
then its possible that you had previously created a gempak file that contained 
invalid projection information. If a gempak output file already exists,
remove this file and let NAGRIB create the new file.

Try the following:

1) Try setting GDOUTF=list, then run nagrib to verify what projection
   is defined in the gds. I was presuming that since you obtained the data 
   from COMET, that the NMCGRD# would be 212, such as:
 GEMPAK-NAGRIB>gdoutf = list
 GEMPAK-NAGRIB>r

 MESG# NMCGRD# PRM#   VCD#    GEMPAK_TIME       LEVL1 LEVL2  VCRD PARM 
    1   212      7    100    990802/1800F012      975        PRES HGHT        
    2   212      7    100    990802/1800F012     1000        PRES HGHT        
    3   212      7    100    990802/1800F012      950        PRES HGHT        
...etc.


At this point, as long as the NMC grid number is defined- eg, not #255,
you should be able to create the output data file when you set 
GDOUTF to the disk file you desire.

If you still can't create the output file, please send me the listing
of what is included in the grib file.

2) since you have access to NAWIPS 5.4, you have the program dcgrib.

You can convert the grib data to Gempak format with:

% cat 96071712f12_eta.grib | dcgrib -v -d - 96071712f12_eta.gem


If both of these methods fail, then it would indicate that your $GEMTBL
environmantal variable is not correctly pointing to $NAWIPS/gempak5.4/tables
or that you do not have read or write permission for either the
grib parameter files, or the output file in your work directory.

Steve Chiswell


>From: Li-Chuan Chen <address@hidden>
>Organization: Iowa Institute of Hydraulic Research
>Keywords: 199907291713.LAA07191

>Steve,
>
>       I followed your instruction and tried to run NAGRIB on GEMPAK 5.4.  My
>setup is in the following:
>
> GBFILE    GRIB data file name               96071712f12_eta.grib
> INDXFL    GRIB index file name              
> GDOUTF    Output grid file                  96071712f12_eta.gem
> PROJ      Map projection/angles/margins|dr  
> GRDAREA   Area covered by grid              
> KXKY      Number of grid points in x;y      
> MAXGRD    Maximum number of grids           250
> CPYFIL    File to be copied                 gds
> GAREA     Graphics area                     
> OUTPUT    Output device/filename            t
> GBTBLS    Input GRIB decoding tables        
> GBDIAG    GRIB Diagnostic Elements          
>
>       But after I ran the program, it didn't write out the grid data.  The
>output message is in the following:
> 
> Changing center table to cntrgrib1.tbl
> Changing vertical coord table to vcrdgrib1.tbl
> Changing WMO parameter table to wmogrib1.tbl
> Changing center parameter table to ncepgrib1.tbl
> Opening the GEMPAK grid file
> GEMPAK grid file is ready...
>
>
>       218 GRIB messages were read or scanned from the GRIB file:
>    
>96071712f12_eta.grib                                                   
>
>         0 grids were written to the GEMPAK file:
>     96071712f12_eta.gem   
>
>       Do you have any idea what the problem is?
>       Thanks for your help
>
>
>Li
>
>
>       
>Unidata Support wrote:
>> 
>> >From: Li-Chuan Chen <address@hidden>
>> >Organization: Iowa Institute of Hydraulic Research
>> >Keywords: 199907271524.JAA28895
>> 
>> >Dear Sir,
>> >
>> >       I tried to use NAGRIB to conver an Eta model output GRIB file which 
> I
>> >obtain from the COMET web (96071712f12_eta.grib) to a GEMPAK file, but I
>> >didn't succeed.  The error message (NAGRIB 3 & -11) said the program
>> >can't find the valid parameter and open GEMPAK grid file.  Do you know
>> >what' wrong?  Could you give me an example about how to use NAGRIB in
>> >GEMPAK 5.2 and how to set up the values for the variables (for example:
>> >INDXFL, KXKY,MAXGRD and so on), or where I can find some reference?
>> >
>> >       Thanks for your assistance.
>> >
>> >--
>> >
>> >
>> >Li
>> >
>> >*****************************************
>> >Li-Chuan Chen
>> >
>> >Iowa Institute of Hydraulic Research
>> >The University of Iowa
>> >300 S. Riverside Dr.
>> >Iowa City, IA52242
>> >
>> >tel: (319)335-6168
>> >fax: (319)335-5238
>> >e-mail: address@hidden
>> >http://www.icaen.uiowa.edu/~lchen
>> >*****************************************
>> >
>> 
>> Li,
>> 
>> The current version of Gempak we support is Gempak 5.4. Its possible that
>> iether you don't have the GEMTBL environmental variable set in your
>> environment, or that the parameters in use for the model identifiers
>> during the time of your data set (1996) were not available when Gempak 5.2
>> was produced.
>> 
>> To run NAGRIB, check that $GEMTBL in your csh environment is pointing
>> to the gempak tables directory. In Gempak 5.4, the general way to decode
>> a grib file using the grib GDS to create the output file is:
>> 
>> GBFILE   = 96071712f12_eta.grib
>> INDXFL   =
>> GDOUTF   = 96071712_eta.gem
>> PROJ     =
>> GRDAREA  =
>> KXKY     =
>> MAXGRD   = 2000
>> CPYFIL   = gds
>> GAREA    =
>> OUTPUT   =
>> GBTBLS   =
>> GBDIAG   =
>> GEMPAK-NAGRIB> r
>> 
>> Using CPYFIL=gds will allow nagrib to determing the projection and garea
>> information from the grib data itself. MAXGRD defines the amount of space
>> to be set asside for grids in the Gempak file. In this case, we would have
>> space for 2000 grids to be written.
>> 
>> When NAGRIB is run, it uses the tables in $GEMTBL to define the vertical
>> coordinates, parameters, and model center. These must be found, so you
>> should double check all your Gempak environmental variable settings.
>> 
>> Steve Chiswell
>> 
>> ****************************************************************************
>> Unidata User Support                                    UCAR Unidata Program
>> (303)497-8644                                                  P.O. Box 3000
>> address@hidden                                   Boulder, CO 80307
>> ----------------------------------------------------------------------------
>> Unidata WWW Service                        http://www.unidata.ucar.edu/     
>> ****************************************************************************
>
>-- 
>
>
>Li     
>
>*****************************************
>Li-Chuan Chen
>
>Iowa Institute of Hydraulic Research
>The University of Iowa
>300 S. Riverside Dr.
>Iowa City, IA52242
>
>tel: (319)335-6168
>fax: (319)335-5238
>e-mail: address@hidden
>http://www.icaen.uiowa.edu/~lchen
>*****************************************
>