[ncl-talk] Getting error while converting .grib file to netcdf format.

Guido Cioni guidocioni at gmail.com
Wed Nov 2 07:33:10 MDT 2016


The error is exactly telling what the problem is :) In order to work with grib2 files you have to configure and compile CDO (and any other command line tool) with grib2 libraries (--with-grib-api). However, I don't understand what the problem is: Dennis already provided you with a converted NETCDF file... 

Guido Cioni
http://guidocioni.altervista <http://guidocioni.altervista/>.org

> On 02 Nov 2016, at 14:26, Arunima Singh <arunima at vassarlabs.com> wrote:
> 
> Hi,
> 
> Getting following error : 
> 
> cdo copy: Open failed on >_mars-atls18-95e2cf679cd58ee9b4db4dd119a05a8d-azDkQn.grib<
> Unsupported file type (library support not compiled in)
> To create a CDO application with GRIB2 support use: ./configure --with-grib_api=<GRIB_API root directory> ...
> 
> Regards.
> Arunima Singh
> 
> On Wed, Nov 2, 2016 at 1:39 AM, Guido Cioni <guidocioni at gmail.com <mailto:guidocioni at gmail.com>> wrote:
> Or more simply cdo -f nc copy in.grb out.nc <http://out.nc/>? :)
> 
> Guido Cioni
> http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 
> 
> 
> 
> 
>> Il giorno 01 nov 2016, alle ore 20:27, Dennis Shea <shea at ucar.edu <mailto:shea at ucar.edu>> ha scritto:
>> 
>> 
>> The 6.1.2 version 3.5 years old:   February 4, 2013
>> ===
>> NCL 6.3.0 does not read this file.
>> ===
>> However, the 6.4.0 version does ....
>> 
>> %> ncl_filedump _mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-ZU3Mkg.grib 
>> 
>> yields
>> 
>> 
>> ====
>> Variable: f
>> Type: file
>> filename:       _mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-ZU3Mkg
>> path:   _mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-ZU3Mkg.grib
>>    file global attributes:
>>    dimensions:
>>       forecast_time0 = 61
>>       lat_0 = 361
>>       lon_0 = 720
>>    variables:
>>       float tp_P11_L1_GLL0_acc ( forecast_time0, lat_0, lon_0 )
>>          center :       European Center for Medium-Range Weather Forecasts
>>          production_status :    TIGGE Operational products
>>          long_name :    total precipitation
>>          units :        kg/m^2
>>          _FillValue :   1e+20
>>          grid_type :    Latitude/longitude
>>          parameter_discipline_and_category :    Meteorological products, Moisture
>>          parameter_template_discipline_category_number :        ( 11, 0, 1, 52 )
>>          level_type :   Ground or water surface
>>          type_of_statistical_processing :       Accumulation
>>          statistical_process_duration : initial time to forecast time
>>          initial_time : 10/29/2016 (00:00)
>> 
>>       float lat_0 ( lat_0 )
>>          long_name :    latitude
>>          grid_type :    Latitude/Longitude
>>          units :        degrees_north
>>          Dj :   0.5
>>          Di :   0.5
>>          Lo2 :  359.5
>>          La2 :  -90
>>          Lo1 :   0
>>          La1 :  90
>> 
>>       float lon_0 ( lon_0 )
>>          long_name :    longitude
>>          grid_type :    Latitude/Longitude
>>          units :        degrees_east
>>          Dj :   0.5
>>          Di :   0.5
>>          Lo2 :  359.5
>>          La2 :  -90
>>          Lo1 :   0
>>          La1 :  90
>> 
>>       integer forecast_time0 ( forecast_time0 )
>>          long_name :    Forecast offset from initial time
>>          units :        hours
>> 
>> ====
>> I used  
>> ncl_convert2nc _mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-ZU3Mkg.grib
>> 
>> to create a netCDF
>> =====
>> 
>> Maybe you can use it ...
>> 
>> ftp ftp.cgd.ucar.edu <http://ftp.cgd.ucar.edu/>
>> anonymous
>> your_email
>> cd pub/shea
>> prompt
>> ls
>> get _mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-ZU3Mkg.nc
>> quit
>> 
>> Good Luck
>> 
>> On Tue, Nov 1, 2016 at 1:01 PM, Arunima Singh <arunima at vassarlabs.com <mailto:arunima at vassarlabs.com>> wrote:
>> Hi,
>> 
>> ncl version is 6.1.2.
>> 
>> Thanks and Regards.
>> Arunima Singh
>> 
>> On Wed, Nov 2, 2016 at 12:27 AM, Arunima Singh <arunima at vassarlabs.com <mailto:arunima at vassarlabs.com>> wrote:
>> Hi,
>> 
>> I am trying to convert .grib file to nc format but i am getting following error - 
>> 
>> fatal:NclGRIB2: Invalid Product Definition Template.
>> fatal:Could not open (./_mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-ZU3Mkg.grib)
>> Segmentation fault (core dumped)
>> 
>> PFA 
>> grib file , 
>> screenshot of - error , uname -a ,ncargpath root, ncargpath grib2_codetables.
>> 
>> 
>> Thanks and Regards.​​
>> Arunima Singh
>> 
>> 
>>>>  _mars-atls19-95e2cf679cd58ee9b4db4dd119a05a8d-Z... <https://drive.google.com/a/vassarlabs.com/file/d/0Bx7xJNSDBbVrN3ZXNWdRRnI1bmc/view?usp=drive_web>​
>> 
>> 
>> 
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>> 
>> 
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161102/a729cfb6/attachment-0001.html 


More information about the ncl-talk mailing list