comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL 4.0 bug (netCDF related)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL 4.0 bug (netCDF related) [message #4533] Mon, 12 June 1995 00:00
legler is currently offline  legler
Messages: 11
Registered: July 1991
Junior Member
There seems to be a bug in writing character data to a netCDF file in IDL 4.0.
I have not received confirmation of this from RSI, but I wanted to
alert potential users...

Instead of writing character data, the data are written as type BYTE. Here
is a small
test routine and output of ncdump (dumps contents of newly generated netCDF
file 'test.nc'). Note the dump indicates the CHAR data was written as type
BYTE. Writing character data as type CHAR worked just fine in previous
versions of IDL.


PRO test
new_id = NCDF_CREATE('test.nc', /CLOBBER)
ndim = 1
dim = LONARR(1)
dim(0) = NCDF_DIMDEF(new_id, 'rec', /UNLIMITED)
var_id = NCDF_VARDEF(new_id, 'chrvar', dim(0), /CHAR)
NCDF_CONTROL, new_id, /ENDEF
NCDF_VARPUT, new_id, var_id, 'This is a test'
NCDF_CLOSE, new_id
end
------
ncdump of 'test.nc':
====================

netcdf test {
dimensions:
rec = UNLIMITED ; // (14 currently)

variables:
byte chrvar(rec) ;

data:

chrvar = 84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 116, 101, 115, 116 ;
}

--
Dr. David M. Legler
Center for Ocean Atmosphere Prediction Studies
Florida State University | (904) 644-3797 (Voice)
Room 020 Love Bldg | (904) 644-4841 (fax)
Tallahassee, FL 32306-3041 | Email: legler@coaps.fsu.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Table Output?
Next Topic: IDL & MacX

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:07:45 PDT 2025

Total time taken to generate the page: 0.00369 seconds