Dear NCL developers.
The return value from isfilepresent is wrong when using relative paths. In
my
case I am trying to see if a certain file is present in the parent
directory, for e.g
isfilepresent.
An example
$ touch ../test
Copyright (C) 1995-2013 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.2
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
ncl 0> print(isfilepresent("../test"))
(0) True
ncl 1> print(isfilepresent("../test2"))
(0) True
ncl 2> exit
The file "../test2" does not really exist. The following from the linux
command line
returns the correct answers.
$ test -f ../test ; echo $?
0
$ test -f ../test2 ; echo $?
1
The function isfilepresent returns correct answers if I use the full path.
Here are the NCL and system details
NCL version 6.1.2
$ uname -a
Linux enformtk 2.6.32-41-server #90-Ubuntu SMP Tue May 22 12:41:40 UTC 2012
x86_64 GNU/Linux
saji
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 15 19:47:57 2014
This archive was generated by hypermail 2.1.8 : Tue May 27 2014 - 15:45:08 MDT