Re: False Positives with isfilepresent()

From: Dave Allured - NOAA Affiliate <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 27 2013 - 17:58:14 MST

Dave B,

Would you please consider removing the alternative name logic in
isfilepresent? Just have it perform a simple match for the user supplied
literal file name. I think this would less confusing in the long run, and
avoid even more complicated problem scenarios. The alternative name scheme
is not even mentioned in the current function documentation or the
examples. Thank you.

--Dave A.

On Wed, Nov 27, 2013 at 12:29 PM, David Brown <dbrown@ucar.edu> wrote:
>
> Hi Bill,
> The problem is with NCL's approach of looking for alternative names for
files that could be in a supported format. If you use addfile to open a
file called
> "foo.bar.nc", and it is not found, then NCL looks for a file without the
".nc" extension (i.e. "foo.bar") and tries to open it as a NetCDF file. Of
course, when using addfile, if the file turns out not to be NetCDF, you
would get an error message, but currently isfilepresent does not actually
test to see whether the alternately named file is truly a NetCDF file. Your
scenario suggests that it should. I will create a ticket for this issue.
> -dave
>
>
> On Nov 27, 2013, at 12:12 PM, "Capehart, William J" <
William.Capehart@sdsmt.edu> wrote:
>
> I am running into a problem with the “isfilepresent” function
>
> I have files that MAY need to be converted into netcdf files if their
parent file is there.
>
> For example for the file pair:
>
> foo.bar
> foo.bar.nc
>
> I need the isfilepresent() command to return a FALSE if foo.bar.nc even
if there is a foo.bar
>
> Has anyone else seen this problem and if so, is this bug or a feature?

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 27 17:58:22 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 04 2013 - 20:42:38 MST