Re: forcing input type when filename wrong

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Fri, 24 Apr 2009 13:41:56 -0600


The addfile function supports this, though the method is not very
intuitive. Just concatenate the extension for the desired format on
the end of the actual file name, and addfile will do the right
thing. See example 2 on the addfiles page.

   f = addfile (wrongname + ".nc", "r")

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
NOAA/ESRL/PSD, Climate Analysis Branch (CAB) wrote:
> Hi,
> sometimes we have to deal with large quantities of files
> which are wrongly named, for example, netcdffiles not
> ending with the .nc suffix. Is there same way of getting
> around this in NCL without having to call on the system
> command, like creating an internal symbolic link or a
> fake file name pointing to the online one, or using
> something like setfileoptions (which I think only works
> for writing to new files, not reading)?
> Many thanks,
> Mark.
> CSIRO Marine and Atmospheric Research
> Australia.
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Fri Apr 24 2009 - 13:41:56 MDT

This archive was generated by hypermail 2.2.0 : Fri Apr 24 2009 - 14:12:40 MDT