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

Home » Public Forums » archive » Re: Unable to create netCDF file
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: Unable to create netCDF file [message #75581 is a reply to message #75580] Thu, 31 March 2011 11:06 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Thu, 31 Mar 2011, Kenneth P. Bowman wrote:

> Any idea why I cannot create a netCDF file using tilde expansion?
>
> IDL> id = NCDF_CREATE('~/test.ncd', CLOBBER = clobber)
> % NCDF_CREATE: Unable to create the file, ~/test.ncd. (NC_ERROR=-31)
>
> I thought it was a generic problem with tilde expansion, but it works
> for plain files (the file text.txt exists and contains 'test').
>
> IDL> openw, iunit, '~/test.txt', /get_lun
> IDL> printf, iunit, 'test'
> IDL> free_lun, iunit
>
> NetCDF file creation works if I provide the fully-qualified path.

I think NCDF_CREATE does not expand path names. Your error message
indicates that the ~ directory in ~/test.ncd does not exist:

IDL> id = NCDF_CREATE('~/test.ncd', CLOBBER = clobber)
% Loaded DLM: NCDF.
% NCDF_CREATE: Unable to create the file, ~/test.ncd. (NC_ERROR=-31)
% Execution halted at: $MAIN$
IDL> $mkdir '~'
IDL> id = NCDF_CREATE('~/test.ncd', CLOBBER = clobber)
IDL> help, id
ID LONG = 5

regards,
Lajos
[Message index]
 
Read Message
Read Message
Previous Topic: Unable to create netCDF file
Next Topic: NetCDF tools

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

Current Time: Wed Oct 08 19:57:43 PDT 2025

Total time taken to generate the page: 0.00212 seconds