[gradsusr] create control file for grib file

Wesley Ebisuzaki - NOAA Federal wesley.ebisuzaki at noaa.gov
Wed Jul 20 13:24:44 EDT 2016


Bimal,

Ok, your error message has changed.  When I try your file, I get

ebis at linux-landing:~/Downloads$ grib2ctl.pl GLDAS_NOAH025_M.A200201.001.grb
>GLDAS_NOAH025_M.A200201.001.ctl

Undefined parameter table (center 221-221 table 1), using NCEP-opn
ebis at linux-landing:~/Downloads$ gribmap -0 -i
GLDAS_NOAH025_M.A200201.001.ctl
 grib1map:  opening GRIB file: GLDAS_NOAH025_M.A200201.001.grb
 grib1map:  reached end of files
 grib1map:  writing the map...

-------------------------------------------------------------------------------------------------

Now the error message

    "Undefined parameter table (center 221-221 table 1), using NCEP-opn"

means that the file was produced by center 221/subcenter 221 and
wgrib does not have a grib table for center 221.  Now center 221,
as defined by the WMO, is Zagreb which is the capital of Croatia.
So the file was produced by the Croatian Meteorological and
Hydrological Service in Zagreb.

   http://www.nco.ncep.noaa.gov/pmb/docs/on388/table0.html

For grib, you need to know the grib parameter table in order to
identify the variable such a zonal wind, temperature, etc.  Usually
you can identify it by the center/parameter table number
Usually the center will make the table available.
Since this is not a legal grib file (unless the Croatian Weather
Service produced the file), you are stuck.  Perhaps you can
deduce the grib table from *.xml file.  Then you can edit
the GLDAS_NOAH025_M.A200201.001.ctl with the correct
variable names.

You should be able to plot the fields with Grads.  The names in
the *.ctl may or may not be correct.  You won't know until you compare
the table with the NCEP-operational table.  You might be able
to convert the xml file into a table that wgrib can read.

Wesley


On Wed, Jul 20, 2016 at 12:22 PM, Bimal Gyawali <bml.gya at gmail.com> wrote:

> Hello Wesley,
>
> Thank you very much for your email.
>
> I am using linux and the version of perl is v5.8.8. I have used new
> grib2ctl.p <http://grib2ctl.pl>l with full path
>
> when I do this:
>
> ./grib2ctl.pl  GLDAS_NOAH025_M.A200201.001.grb
> >GLDAS_NOAH025_M.A200201.001.grb.ctl
>
> gives following error: Undefined parameter table (center 221-221 table
> 1), using NCEP-opn
>
> Still it creates control file. But when I try to open control file the
> following error occurs
>
> Open Error:  Can't open Station/Index map file
> GLDAS_NOAH025_M.A200201.001.grb.idx  The data file was not opened
>
> I have downloaded data from
> http://hydro1.gesdisc.eosdis.nasa.gov/data/GLDAS_V1/GLDAS_NOAH025_M/. and
> I did not find GLDAS_NOAH025_M.A200201.001.grb.idx file. Could you please
> tell me from where and how I can get the .idx file?
>
> Thank you
>
> *Bimal Gyawali*
>
>
>
>
>
>
> * Graduate Research Assistant Department of Physical and Environment
> Science Natural Resources Center Texas A&M University-Corpus Christi Corpus
> Christi, TX 78412 Tel: 435-881-3603 <435-881-3603>*
>
> On Tue, Jul 19, 2016 at 12:28 PM, Wesley Ebisuzaki - NOAA Federal <
> wesley.ebisuzaki at noaa.gov> wrote:
>
>> Bimal,
>>
>> Some questions:
>>
>> (1) What operating system and version of perl?   Try perl --version.
>> (2) Did you use a full path name when running grib2ctl.pl?   (Are you
>> running an old old version by mistake?)
>> (3) Did you get the same error message when using the full pathname of
>> grib2ctl.pl and with no argument?
>> (4) Is wgrib installed and on your path?
>>
>> Grib2ctl.pl on the web site was last changed March 2014, so there hasn't
>> been any recent changes.
>>
>> Wesley
>>
>>
>> On Tue, Jul 19, 2016 at 11:24 AM, Bimal Gyawali <bml.gya at gmail.com>
>> wrote:
>>
>>> I downloaded grib2ctl.pl using wget. But still it shows same error.
>>>
>>> *Bimal Gyawali*
>>>
>>>
>>>
>>>
>>>
>>> * Graduate Research Assistant Department of Physical and Environment
>>> Science Natural Resources Center Texas A&M University-Corpus Christi Corpus
>>> Christi, TX 78412 Tel: 435-881-3603 <435-881-3603>*
>>>
>>> On Tue, Jul 19, 2016 at 10:13 AM, Bimal Gyawali <bml.gya at gmail.com>
>>> wrote:
>>>
>>>> Jeff,
>>>> I just did copy and paste. I will try the way you said. I hope the
>>>> error will not occur.
>>>> Thank you.
>>>>
>>>> *Bimal Gyawali*
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> * Graduate Research Assistant Department of Physical and Environment
>>>> Science Natural Resources Center Texas A&M University-Corpus Christi Corpus
>>>> Christi, TX 78412 Tel: 435-881-3603 <435-881-3603>*
>>>>
>>>> On Tue, Jul 19, 2016 at 10:08 AM, Jeff Duda <jeffduda319 at gmail.com>
>>>> wrote:
>>>>
>>>>> Bimal,
>>>>> There must be a bug in the current version of that code, or you copied
>>>>> it incorrectly. If you used copy+paste to obtain the code, I would instead
>>>>> try simply using wget or right clicking and selecting "save link as" to
>>>>> make sure you copied the code correctly. If you did that, then the code has
>>>>> a bug. I am not knowledgeable with PERL and so I may not be able to figure
>>>>> out the bug in such a script, but the person who writes/manages that
>>>>> utility, Wesley Ebisuzaki, visits this forum regularly, and his contact
>>>>> information can be found online. I might suggest contacting him for further
>>>>> assistance.
>>>>>
>>>>> Good luck.
>>>>>
>>>>> Jeff
>>>>>
>>>>> On Tue, Jul 19, 2016 at 9:09 AM, Bimal Gyawali <bml.gya at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hello Jeff,
>>>>>> Thank you for your email. I tried to create control file using the
>>>>>> following command:
>>>>>> grib2ctl.pl grib_file >grib_file.ctl
>>>>>> but it gives the following error:
>>>>>>
>>>>>> Unexpected else.  Incorrect if block nesting.
>>>>>>
>>>>>>   Error occurred scanning line 258.
>>>>>>
>>>>>> I dont know why the error is occurred. would you please help me to
>>>>>> figure it out?
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *Bimal Gyawali*
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> * Graduate Research Assistant Department of Physical and Environment
>>>>>> Science Natural Resources Center Texas A&M University-Corpus Christi Corpus
>>>>>> Christi, TX 78412 Tel: 435-881-3603 <435-881-3603>*
>>>>>>
>>>>>> On Mon, Jul 18, 2016 at 3:46 PM, Jeff Duda <jeffduda319 at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Use the grib2ctl.pl script available at this link:
>>>>>>> ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib.scripts/grib2ctl.pl. You
>>>>>>> must have the wgrib utility installed to use it.
>>>>>>>
>>>>>>> There is a similar script for GRIB2 data called g2ctl as well. It
>>>>>>> requires wgrib2 to be installed.
>>>>>>>
>>>>>>> Jeff Duda
>>>>>>>
>>>>>>> On Mon, Jul 18, 2016 at 3:38 PM, Bimal Gyawali <bml.gya at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hello All,
>>>>>>>> How can I create control file for grib file using grads? Please let
>>>>>>>> me know.
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>> *Bimal Gyawali*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> * Graduate Research Assistant Department of Physical and
>>>>>>>> Environment Science Natural Resources Center Texas A&M University-Corpus
>>>>>>>> Christi Corpus Christi, TX 78412 Tel: 435-881-3603 <435-881-3603>*
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> gradsusr mailing list
>>>>>>>> gradsusr at gradsusr.org
>>>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jeff Duda
>>>>>>> Post-doctoral research associate
>>>>>>> University of Oklahoma School of Meteorology
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gradsusr mailing list
>>>>>>> gradsusr at gradsusr.org
>>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> gradsusr mailing list
>>>>>> gradsusr at gradsusr.org
>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jeff Duda
>>>>> Post-doctoral research associate
>>>>> University of Oklahoma School of Meteorology
>>>>>
>>>>> _______________________________________________
>>>>> gradsusr mailing list
>>>>> gradsusr at gradsusr.org
>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160720/68eebb78/attachment-0001.html 


More information about the gradsusr mailing list