Re: Remote file access

From: gibies george <gibiesgeorge_at_nyahnyahspammersnyahnyah>
Date: Mon Jul 12 2010 - 04:38:47 MDT

Thank you Dennis for your suggestions (through public as well as personal
discussions).

Now I have tried the other way.

I kept the data file at the server. After doing the analysis at the server,
the final output is uploaded to the client pc. For this I have added the
following things at the end of my ncl script.

print(" Uploading the output file ")
print("***************************")
print("Enter the filename : ")
 fname = systemfunc("read var; echo $var")
print("Enter the userID : ")
 usr = systemfunc("read var; echo $var")
print("Enter the IP address : ")
 ip = systemfunc("read var; echo $var")
print("Enter the path : ")
 path = systemfunc("read var; echo $var")

system("scp ./"+fname+" "+usr+"@"+ip+":"+path+"/"+fname)

Once again thanks to all, who tried to find a solution to my question.

Gibies George,CSIR-RF,
Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.

http://sites.google.com/site/gibiesge/

Think about the environment. Please don't print this e-mail unless it is
necessary.

On 24 June 2010 19:21, Dennis Shea <shea@ucar.edu> wrote:

> fname = systemfunc("sftp....usrid....@
> ....ipaddress....:/.....path....../.......filename.nc")
>
> f = addfile(fname, "r")
>
> See The Mini-Language manual at
> http://www.ncl.ucar.edu/Document/Manuals/
>
>
> On 6/24/10 4:38 AM, gibies george wrote:
>
>> Hello NCL users.
>>
>> I have a dataset kept in a remote server. I would like to access it
>> using NCL in my pc and get the output plot saved at a folder in my pc. I
>> tried the following script.
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>> begin
>>
>> file1= addfile("sftp
>> ....usrid....@....ipaddress....:/.....path....../.......filename.nc
>> <http://filename.nc>", "r")
>>
>>
>> ......................................................................
>> ...............analysis script .........................
>> ......................................................................
>>
>> end
>>
>> But it shows an error message as follows.
>>
>> fatal:_NclCreateFile: Requested file does not exist as (sftp
>> ....usrid....@....ipaddress....:/.....path....../.......filename.nc
>> <http://filename.nc>) or as (sftp
>>
>> ....usrid....@....ipaddress....:/.....path....../.......filename), can't
>> add file
>>
>> Can anybody suggest a solution for this problem ?
>>
>> Thanking you in Advance.
>>
>> Gibies George,CSIR-RF,
>> Climate and Global Modelling Division,
>> Indian Institute of Tropical Meteorology,
>> Dr. Homi Bhabha Road,
>> NCL (P. O.), Pashan,
>> Pune 411008, India.
>>
>> http://sites.google.com/site/gibiesge/
>>
>> Think about the environment. Please don't print this e-mail unless it is
>> necessary.
>>
>>
>>
>> _______________________________________________
>> 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 Jul 12 04:38:59 2010

This archive was generated by hypermail 2.1.8 : Mon Jul 19 2010 - 09:39:02 MDT