Re: Function similar to python "try"

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 05 2013 - 08:26:52 MDT

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 but...in 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:
> 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 Aug 5 08:27:02 2013

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