Re: Finding out a file's path

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 Feb 2008 06:33:50 -0700

To my knowledge, the answer is "no".
You can not determine the path/file to which "file" is pointing.

[1] Since "file" is an NCL reserved keyword, I am surprised you
      did not get and error message.

[2] I always recommend:

       diri = "/some/path/"
        fili = "wrfout_d02_2007-01-06_00:00:00"
        f = addfile (diri+fili, "r")

[3] Also, you may want to look at: get_file_suffix

http://www.ncl.ucar.edu/Document/Functions/Contributed/get_file_suffix.shtml

sometimes this can come in handy.

Good luck

 

Jan Ploski wrote:
> Hello,
>
> Is there a way to find out the path of a file from a file variable? So far
> I tried
>
> file = addfile("/some/path/wrfout_d02_2007-01-06_00:00:00", "r")
> print(file!path)
> print(file_at_path)
> print(file->path)
>
> all without success...
>
> Best regards,
> Jan Ploski
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 12 2008 - 06:33:50 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 12 2008 - 14:45:27 MST