#515 NCDF_VARPUT does not accept array greater than 4GB

closed-accepted
nobody
None
5
2013-02-25
2013-02-25
Igor
No

GDL version: 0.9.3
Platform: OS Linux CentOS 5.8 x64

Problem:
When one creates a netCDF file with a data variable greater than 4GB GDL fails with the message:
% NCDF_VARPUT: Not enough elements (-1612535296>2682432000)

How to reproduce:
id = ncdf_create('test.nc', /clobber)
xid = ncdf_dimdef(id, 'lon', 720)
yid = ncdf_dimdef(id, 'lat', 200)
tid = ncdf_dimdef(id, 'time', 18628)
did = ncdf_vardef(id, 'data', [xid, yid, tid], /float)
ncdf_control, id, /endef
data = fltarr(720, 200, 18628)
ncdf_varput, id, did, data

How to fix:
diff ncdf_var_cl.cpp.old ncdf_var_cl.cpp
965c965
< int total = 1;
---
> long total = 1;

Thanks!

Discussion

  • Alain C.

    Alain C. - 2013-02-25
    • status: open --> closed-accepted
     
  • Alain C.

    Alain C. - 2013-02-25

    Thanks you for reporting and preparing a solution !

    it is now in the CVS.

    Alain

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks