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

Home » Public Forums » archive » Re: NetCDF and empty variables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: NetCDF and empty variables [message #66138 is a reply to message #66134] Fri, 17 April 2009 08:55 Go to previous messageGo to previous message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
On Apr 17, 8:18 am, renaud.dussur...@gmail.com wrote:
> IDL>ncid = NCDF_OPEN('myFile.nc')
> IDL>varId = NCDF_VARID(ncid,'HISTORY_INSTITUTION')
> IDL>out=NCDF_VARINQ(ncid, VarId)
> IDL>help, out, /str
> ** Structure <a9c098>, 5 tags, length=56, data length=52, refs=1:
>    NAME            STRING    'HISTORY_INSTITUTION'
>    DATATYPE        STRING    'CHAR'
>    NDIMS           LONG                 3
>    NATTS           LONG                 3
>    DIM             LONG      Array[3]
>
> IDL>print, out.dim
>            6           8          12
>
> IDL>NCDF_VARGET, ncid, varId, data, COUNT=cnt
> % Array dimensions must be greater than 0.

Where is the array CNT defined?

Have you tried something like this?

PRO TEST
ncid = ncdf_open('myfile.nc')
varid = ncdf_varid(ncid, 'HISTORY_INSTITUTION')
if (varid eq -1) then message, 'Variable does not exist'
ncdf_varget, ncid, varid, value
help, value
END

If the code gets past the check for (varid eq -1) and it still
crashes, then something very odd is going on, and I think you have a
reason to contact ITTVIS technical support.

Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Computing needs, here's free root account on Solaris10
Next Topic: DEM Volume (voxel_proj)

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

Current Time: Sun Oct 12 05:05:44 PDT 2025

Total time taken to generate the page: 2.08032 seconds