Re: Function similar to python "try"

From: Marston Johnston <shejo284_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 05 2013 - 09:25:54 MDT

Hi Mary,

That sounds like a good idea, but instead of a new function, you could
also modify the "addfile" to either throw up a warning if the file cannot
be open, or fatal if not present. Perhaps this can be controlled by an
additional "Opt" argument to the addfile function. I cannot edit my NCL
codes and I'm not a great programmer, but if I were, that would be my first


On Mon, Aug 5, 2013 at 4:26 PM, Mary Haley <> wrote:

> Marston,
> Perhaps we can add an "isvalidfile" function. I actually thought
> "isfilepresent" did this, but apparently it just checks for the existence.
> Wei or Dave (Brown), would it be possible to have an "isvalidfile" type of
> function? I know it's not always obvious what type of file you are
> opening, so what about an "isvalid_netcdf_file"?
> --Mary
> On Aug 5, 2013, at 2:34 AM, Marston Johnston wrote:
> > Hi guys,
> >
> > Thanks for the interesting solutions Mary's suggestion, the
> file is present but corrupted so checking if the file is present is not a
> viable solution. Dave's solution is advance, using shell commands and
> making system calls, but he's right, it is not very fast and needs to read
> all files, all 8000 files, twice. The problem here is that my files are
> hdf-eos files and not netcdf. There is no h4dump, or equivalent program,
> installed on the server. Nevertheless, I'll keep these suggestions in my
> archive of NCL code tidbits.
> >
> > Appreciate the help guys,
> > I'll just have to delete the files when the program crashes.
> >
> > /M
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> >

Only the fruitful thing is true!

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Aug 5 09:26:56 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 07 2013 - 13:59:00 MDT