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

Home » Public Forums » archive » Re: NC_check_name error when using NCDF_VARDEF
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: NC_check_name error when using NCDF_VARDEF [message #79913 is a reply to message #79912] Mon, 16 April 2012 10:55 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <6dc97299-d161-46ec-b50d-b4ffd25e6154@z38g2000vbu.googlegroups.com>,
Jason Webster <jason.r.webster@gmail.com> wrote:

> 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)

Is "variable" a function?

>
> 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)

Should be?

varvid=NCDF_VARDEF(fid,variable[i],[lonid,latid,timid,memid] ,/FLOAT)

>
> 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



Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: An IsoContour Question
Next Topic: Re: An IsoContour Question

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

Current Time: Wed Oct 08 20:14:00 PDT 2025

Total time taken to generate the page: 0.82018 seconds