Re: How to read GRIB files without explicit file format extension

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 12 Oct 2009 13:17:47 -0600 (MDT)

Hi Zhuming,

The file itself doesn't physically need to have the ".grb" extension,
but "addfile" *must* have the extension so that it knows how to open
the file.

For example, if you have a file called "ruc", and you run
NCL with:

   f = addfile("ruc.grb","r")

then NCL will first look for a "ruc.grb" file, and if it doesn't find
this, it will look for a "ruc" file, and try to open it as a GRIB
file.

--Mary

On Mon, 12 Oct 2009 zhuming_at_ucar.edu wrote:

> Hi,
>
> Does anyone know how to read GRIB files without explicitly specifying
> their file format extension, i.e. *.grb?
>
> It seems that "addfile" needs 'file' with extension, e.g., 'file.grb'.
> Could use 'ln -s file file.grb' before using "addfile", but are there
> better/easier ways?
>
> Thanks.
>
> Zhuming
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 12 2009 - 13:17:47 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 15 2009 - 09:30:48 MDT