Re: error converting GRIB1 to netCDF

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat, 17 May 2008 08:23:09 -0600

Hi Yolande,

I have the file you sent. ncl_convert2nc with the -L option
will handle *files* that are larger than 2GB. However, no
*single variable* can be greater than 2GB. This is due to
the 32-bit addressing used by the current version of NCL.

    856*13*160*320*4 > 2GB [*4 is for bytes]

Using: ncl_filedump e4oper.an.pl.t106.q.1980.grb
----------------------------------------------
filename: e4oper.an.pl.t106.q.1980
path: e4oper.an.pl.t106.q.1980.grb
   file global attributes:
   dimensions:
      initial_time0_hours = 856
      lv_ISBL1 = 13
      g4_lat_2 = 160
      g4_lon_3 = 320
   variables:
      float Q_GDS4_ISBL ( initial_time0_hours, lv_ISBL1, g4_lat_2,
g4_lon_3 )
[snip]
=========================================
The NCL developers are creating a version of NCL that will use
64-bit variable addressing.
=========================================
So, if you want to use NCL to convert the file to netCDF,
one approach would be to read time steps 0:427 and
create a netCDF for the 1st half, then 428:855 for the
2nd have. This would have to be done via NCL rather
than ncl_convert2nc because it lacks the option to
sub-select time steps.

Good luck

Yolande Serra wrote:
> Hi Dennis,
>
> I'm uploading the file now to the incoming directory. Should be done
> by 2:30 or so.
>
> Thanks for your help, Yolande
>
> On May 16, 2008, at 6:39 AM, Dennis Shea wrote:
>
>> Hi Yolande
>>
>> This is offline.
>>
>> Can u pls ftp the file to
>>
>> ftp ftp.cgd.ucar.edu
>> anonymous
>> email
>> cd incoming
>> put ....
>> quit
>>
>> Then send me an email telling me that you have done this.
>>
>> FYI: All NCL development is done on MACs.
>>
>> Not sure if possible but there is an NCL Wkshop July 8-11, 2008
>>
>> http://www.ncl.ucar.edu/Training/Workshops/
>>
>> Regards
>> Dennis Shea
>> Yolande Serra wrote:
>>>
>>> Hi,
>>>
>>> I'm a new user (as of today) to NCL and I am trying to convert some
>>> GRIB1 files (1GB in size) to netCDF files to use with my own
>>> analysis code. I have a PowerMac G5 dual core 64-bit machine running
>>> OS X 10.4.11 and the latest version of NCL/NCAR graphics (installed
>>> today). I've used the netcdf library for several years now and have
>>> no trouble creating large (>2GB) netcdf files using FORTRAN code and
>>> the netcdf library routines. However, when I try to convert my GRIB
>>> files I'm getting this error:
>>>
>>> warning:FileVarAttDef: Variable (time) has no attributes to assign
>>> ncl(22003) malloc: *** vm_allocate(size=2279014400) failed (error
>>> code=3)
>>> ncl(22003) malloc: *** error: can't allocate region
>>> ncl(22003) malloc: *** set a breakpoint in szone_error to debug
>>> fatal:NclMalloc Failed:[errno=12]
>>> Bus error
>>> [cassava:ECMWF/4x/NCAR] serra%
>>>
>>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat May 17 2008 - 08:23:09 MDT

This archive was generated by hypermail 2.2.0 : Tue May 20 2008 - 06:54:53 MDT