[ncl-talk] Issue reading grib in 6.3.0?

Alan Brammer abrammer at albany.edu
Thu Apr 9 08:40:36 MDT 2015


As an ignorant user of various types of grib without worrying about which
type it is. Does this sentence no longer apply then, from the addfile doc
page.
" *Also note, in the case of GRIB, that you do not need to indicate whether
the file is GRIB 1 or GRIB 2. NCL treats all the acceptable GRIB extensions
as meaning the same thing. The GRIB version is determined internally.*"

Is there a way to determine which extension is needed then? If this isn't a
bug, this seems like a step backwards in my uneducated opinion.

On 9 April 2015 at 10:27, Carl Schreck <cjschrec at ncsu.edu> wrote:

> Aha! I was adding ".grib", which worked in the previous version, but not
> now. The addfile documentation
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>lists
> these as possible grib extensions:
> ".gr", ".gr1", ".grb", ".grib", ".grb1", ".grib1", ".gr2", "grb2", ".grib2"
>
> I get errors in 6.3.0 if I use ".gr1:, ".gr2", or ".grib" for this
> particular file. I see there were significant changes to the handling of
> grib files, but I can't tell whether this change was either intentional or
> documented.
>
>     Carl
>
> On Thu, Apr 9, 2015 at 10:11 AM, Dennis Shea <shea at ucar.edu> wrote:
>
>> Hi Carl,
>>
>> In the following, the file name is:  nam.t06z.awip1203
>>
>> You must add the '.grb' extension
>>
>> %> ncl_filedump nam.t06z.awip1203.grb
>>
>> NCL will look for a file named "nam.t06z.awip1203.grb" on the disk.
>> If it does not find it, NCL will look for "nam.t06z.awip1203" and
>> 'remember' to treat it as a grib file.
>>
>> One file
>>
>>   f = addfile("nam.t06z.awip1203.grb","r")
>>
>>
>> For multiple files
>>
>>
>>    diri = "./"
>>    fili = systemfunc("cd "+diri+" ; ls nam.t06z.awip*")
>>    f   = addfiles(diri+fili+".grb")
>>     ListSetType (f, "join")
>>
>> HTH
>> D
>>
>>  Copyright (C) 1995-2015 - All Rights Reserved
>>  University Corporation for Atmospheric Research
>>  NCAR Command Language Version 6.3.0
>>  The use of this software is governed by a License Agreement.
>>  See http://www.ncl.ucar.edu/ for more details.
>>
>> Variable: f
>> Type: file
>> filename:       nam.t06z.awip1203
>> path:   nam.t06z.awip1203
>>    file global attributes:
>>    dimensions:
>>       ygrid_0 = 428
>>       xgrid_0 = 614
>>       lv_ISBL0 = 4
>>       lv_SIGL1 = 5
>>       lv_SPDL2 = 6
>>       lv_HTGL3 = 2
>>       lv_SPDL4 = 5
>>       lv_ISBL5 = 2
>>       lv_ISBL6 = 5
>>       lv_SPDL7 = 3
>>       lv_HTGL8 = 2
>>       lv_HTGL9 = 2
>>       lv_DBLL10 = 4
>>    variables:
>>       float TMP_P0_L1_GLC0 ( ygrid_0, xgrid_0 )
>>          center :       US National Weather Service - NCEP (WMC)
>>          production_status :    Operational products
>>          long_name :    Temperature
>>          units :        K
>>          _FillValue :   1e+20
>>          coordinates :  gridlat_0 gridlon_0
>>          grid_type :    Lambert Conformal can be secant or tangent,
>> conical or bipolar
>>          parameter_discipline_and_category :    Meteorological products,
>> Temperature
>>          parameter_template_discipline_category_number :        ( 0, 0,
>> 0, 0 )
>>          level_type :   Ground or water surface
>>          level :         0
>>          forecast_time :        3
>>          forecast_time_units :  hours
>>          initial_time : 04/09/2015 (06:00)
>>
>> [SNIPu
>>
>>
>>
>>
>> On Thu, Apr 9, 2015 at 7:54 AM, Carl Schreck <cjschrec at ncsu.edu> wrote:
>>
>>> I'm having a strange issue where NAM forecast grib files from ldm are
>>> not able to be read in 6.3.0. A sample file is:
>>> ftp://filsrv.cicsnc.org/carl/temp/nam.t06z.awip1203
>>>
>>> The error I get is:
>>> --
>>> fatal:["FileSupport.c":4159]:(/home/carl/ftp/temp/nam.t06z.awip1203.grib)
>>> has no file extension, can't determine type of file to open
>>>
>>> Variable: f
>>> Type: file
>>> (0) File Missing Value : -1
>>> --
>>> Renaming the file to have a .grib extension makes no difference. It does
>>> work if I roll back to 6.2.1, however.
>>>
>>> The binaries I downloaded are:
>>> ncl_ncarg-6.2.1.Linux_SL6.5_x86_64_gcc447.tar.gz
>>> ncl_ncarg-6.3.0.Linux_RHEL6.4_x86_64_gcc447.tar.gz
>>>
>>> Thanks!
>>>
>>>     Carl
>>> --
>>>
>>> <http://www.cicsnc.org/>
>>> <http://www.researcherid.com/rid/B-8711-2011>
>>> * Cyclone <http://www.cyclonecenter.org/>*Center.org
>>> <http://www.cyclonecenter.org/>  *Carl J. Schreck III, PhD*
>>> *Research Associate*
>>> North Carolina Institute for Climate Studies (NCICS) /
>>> Cooperative Institute for Climate and Satellites NC (CICS-NC)
>>> <http://www.cicsnc.org/>
>>> North Carolina State University <http://ncsu.edu/>
>>> NOAA National Centers for Environmental Information (NCEI)
>>> <http://ncdc.noaa.gov/>
>>> 151 Patton Ave, Asheville, NC 28801
>>> e: cjschrec at ncsu.edu
>>> o: +1 828 257 3140
>>> Publications
>>> <http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
>>> monitor.cicsnc.org/mjo
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
>
> <http://www.cicsnc.org/>
> <http://www.researcherid.com/rid/B-8711-2011>
> * Cyclone <http://www.cyclonecenter.org/>*Center.org
> <http://www.cyclonecenter.org/>  *Carl J. Schreck III, PhD*
> *Research Associate*
> North Carolina Institute for Climate Studies (NCICS) /
> Cooperative Institute for Climate and Satellites NC (CICS-NC)
> <http://www.cicsnc.org/>
> North Carolina State University <http://ncsu.edu/>
> NOAA National Centers for Environmental Information (NCEI)
> <http://ncdc.noaa.gov/>
> 151 Patton Ave, Asheville, NC 28801
> e: cjschrec at ncsu.edu
> o: +1 828 257 3140
> Publications
> <http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
> monitor.cicsnc.org/mjo
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150409/024fce4f/attachment.html 


More information about the ncl-talk mailing list