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

Home » Public Forums » archive » NC_check_name error when using NCDF_VARDEF
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
NC_check_name error when using NCDF_VARDEF [message #79914] Mon, 16 April 2012 10:42
Jason Webster is currently offline  Jason Webster
Messages: 2
Registered: April 2012
Junior Member
Hello All,

I am trying to write out some data in IDL 8.0.1 and keep encountering
the following error:

idl: string.c:177: NC_check_name: Assertion `name != ((void *)0)'
failed.

which results in IDL aborting. I have checked to ensure my dimensions
are the correct sizes and I have not mistyped anything. The error is
occurring when the program reaches "varvid=NCDF_VARDEF(fnid,variable,
[lonid,latid,timid,memid],/FLOAT)". Here is the code for writing out
the file:

fid=NCDF_CREATE('/Volumes/Disk2/Data/Volcanic_Impact/
atmos_'+variable(i)+'_el_chichon.nc',/CLOBBER)

lonid=NCDF_DIMDEF(fid,'longitude',nx)
latid=NCDF_DIMDEF(fid,'latitude',ny)
timid=NCDF_DIMDEF(fid,'time',48)
memid=NCDF_DIMDEF(fid,'member',17)

lonvid=NCDF_VARDEF(fid,'longitude',[lonid],/FLOAT)
latvid=NCDF_VARDEF(fid,'latitude',[latid],/FLOAT)
timvid=NCDF_VARDEF(fid,'time',[timid],/FLOAT)
memvid=NCDF_VARDEF(fid,'member',[memid],/FLOAT)

varvid=NCDF_VARDEF(fid,variable,[lonid,latid,timid,memid],/F LOAT)

NCDF_CONTROL,fid,/ENDEF

NCDF_VARPUT,fid,lonvid,lon
NCDF_VARPUT,fid,latvid,lat
NCDF_VARPUT,fid,timvid,vtime
NCDF_VARPUT,fid,memvid,INDGEN(17)
NCDF_VARPUT,fid,varvid,vimpact

NCDF_CLOSE,fid

I would greatly appreciate any assistance or insight.

Sincerely,

Jason
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Classification with ENVI
Next Topic: Interesting Filled Contour Problem

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

Current Time: Wed Oct 08 13:40:14 PDT 2025

Total time taken to generate the page: 0.00455 seconds