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

Home » Public Forums » archive » Re: netCDF 3.6.0.
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
Re: netCDF 3.6.0. [message #46662] Wed, 07 December 2005 14:17
carlos.badenes is currently offline  carlos.badenes
Messages: 2
Registered: December 2005
Junior Member
You are absolutely correct, of course. The ~ is 'understood' by IDLWAVE
in the sense that it will expand filenames from it by using the TAB
key, but then the string containing ~ is not recognized by the
interpreter.

If I am making this kind of mistake, it means it's time to go home and
get some rest. Thanks!
Re: netCDF 3.6.0. [message #46663 is a reply to message #46662] Wed, 07 December 2005 13:41 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1133986409.672216.119350@z14g2000cwz.googlegroups.com>,
carlos.badenes@gmail.com wrote:

> Hi,
>
> I am having problems opening netCDF files with the NETCDF suite of
> routines included in IDL 6.2:
>
> IDL> id = ncdf_open('~/Desktop/sresa1b_ncar_ccsm3_0_run1_200001.nc')
> % NCDF_OPEN: Unable to open the file
> "~/Desktop/sresa1b_ncar_ccsm3_0_run1_20000
> 1.nc". (NC_ERROR=-31)
> % Execution halted at: $MAIN$
>
> This is an example file downloaded from the netCDF web site, so I'm
> pretty sure that the file is OK. Yet, IDL does not seem to recognize it
> as a netCDF file.
>
> Can anyone confirm whether the netCDF routines in IDL are compatible
> with netCDF 3.6.0? If the answer is no, does anybody know how to make a
> 3.6.0 file '3.5.1. compatible'? I'd rather avoid downgrading the netCDF
> installation.
>
> Thanks!
>
> Carles

This generally means that it is not finding the file. Try dragging the file
into a terminal window. That will cause the full path to the file to appear in
the terminal window.


For other OS X users, I keep this little AppleScript on my desktop as a compiled
script named ncdump.

on open (list_of_aliases)
tell application "Terminal"
activate
set macfile to (first item of list_of_aliases) as string (* extract first
alias *)
set unixfile to POSIX path of macfile (* convert to Unix path *)
do script with command �
"/usr/local/bin/ncdump " & unixfile & " | less" (* run ncdump command *)
end tell
end open


Dragging a netCDF file onto automatically opens a new terminal window and does
an ncdump.

Ken Bowman
Re: netCDF 3.6.0. [message #46664 is a reply to message #46663] Wed, 07 December 2005 14:04 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
Perhaps the '~' is not being expanded properly in your filename.
Try moving the file elsewhere, and putting in the exact full filepath.


I can read it.

IDL> ncdf_cat,filename

% Compiled module: NCDF_CAT.

% Loaded DLM: NCDF.

Dimensions 5

lat 128

lon 256

bnds 2

plev 17

time 1(Unlimited dim)

.... etc ....

Cheers,
bob




<carlos.badenes@gmail.com> wrote in message
news:1133986409.672216.119350@z14g2000cwz.googlegroups.com.. .
> Hi,
>
> I am having problems opening netCDF files with the NETCDF suite of
> routines included in IDL 6.2:
>
> IDL> id = ncdf_open('~/Desktop/sresa1b_ncar_ccsm3_0_run1_200001.nc')
> % NCDF_OPEN: Unable to open the file
> "~/Desktop/sresa1b_ncar_ccsm3_0_run1_20000
> 1.nc". (NC_ERROR=-31)
> % Execution halted at: $MAIN$
>
> This is an example file downloaded from the netCDF web site, so I'm
> pretty sure that the file is OK. Yet, IDL does not seem to recognize it
> as a netCDF file.
>
> Can anyone confirm whether the netCDF routines in IDL are compatible
> with netCDF 3.6.0? If the answer is no, does anybody know how to make a
> 3.6.0 file '3.5.1. compatible'? I'd rather avoid downgrading the netCDF
> installation.
>
> Thanks!
>
> Carles
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: netCDF 3.6.0.
Next Topic: IDL Application Development

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

Current Time: Wed Oct 08 15:47:28 PDT 2025

Total time taken to generate the page: 0.00418 seconds