Codebase list ruby-netcdf / upstream/0.6.6
Imported Upstream version 0.6.6 Youhei SASAKI 12 years ago
3 changed file(s) with 11 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 Sun Feb 19 2011 T Horinouchi
1 * ruby-netcdf-0.6.6 released (relase tag: ruby-netcdf-0_6_6)
2 * lib/netcdf.rb: method pack: debug of enbug made
3 when 1.1 -> 1.2 (cvs tag) commited in Jan 2010.
4 * netcdfraw.c: Added macro NC_RAISE2. Enhanced error
5 messaging in NetCDF_open and NetCDF_create to show file name.
6
07 Thu Feb 17 2011 T Horinouchi
18 * ruby-netcdf-0.6.5 released (relase tag: ruby-netcdf-0_6_5)
29 Thu Feb 17 2011 T Horinouchi
317317 if self.typecode <= NArray::LINT
318318 packed = packed.round
319319 end
320 packed
320321 end
321322 end
322323
202202 }
203203
204204 #define NC_RAISE(status) rb_raise(err_status2class(status),(nc_strerror(status)))
205 #define NC_RAISE2(status, str) rb_raise(err_status2class(status),"%s (%s)",nc_strerror(status),(str) )
205206
206207 static VALUE mNumRu = 0;
207208 static VALUE cNetCDF;
10321033 c_omode=NUM2INT(omode);
10331034
10341035 status = nc_open(c_filename,c_omode,&ncid);
1035 if(status !=NC_NOERR){NC_RAISE(status);}
1036 if(status !=NC_NOERR){NC_RAISE2(status,c_filename);}
10361037
10371038 ncfile = NetCDF_init(ncid,c_filename);
10381039 retval = Data_Wrap_Struct(cNetCDF,0,NetCDF_free,ncfile);
10551056 c_cmode=NUM2INT(cmode);
10561057
10571058 status = nc_create(c_filename,c_cmode,&ncid);
1058 if(status != NC_NOERR) NC_RAISE(status);
1059 if(status != NC_NOERR) NC_RAISE2(status, c_filename);
10591060
10601061 ncfile = NetCDF_init(ncid,c_filename);
10611062 return( Data_Wrap_Struct(cNetCDF,0,NetCDF_free,ncfile) );