isfilepresent? really?

From: Prince K XAVIER <prince.xavier_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 27 2012 - 09:10:28 MDT

Hi All,

I think I am a bit confused about this. I am executing the following bit of
code to do something (print blah for example) if the file is missing. But
this behaves very oddly (see the output below). It takes the wrong branch
of the if statement for some reason. Any guesses on what I am possibly
doing wrong?

if (.not.isfilepresent(ncfile)) then
   print("blah")
else
   system("ls "+ncfile)
   print("Skipping NetCDF conversion...")
end if

ls: cannot access xxxx/yyyy/30404.199101.pp.nc: No such file or directory
(0) Skipping NetCDF conversion...

Thanks
Prince

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 27 17:10:43 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 02 2012 - 13:38:41 MDT