Re: systemfunc

From: gibies george <gibiesgeorge_at_nyahnyahspammersnyahnyah>
Date: Sat Jul 10 2010 - 06:22:05 MDT

On 10 July 2010 16:44, gibies george <gibiesgeorge@gmail.com> wrote:

> Hello NCL users,
>
> I came through a requirement to remotely access a set of data files. For
> that I wrote the following script.
> .....................................
> .....................................
>
I have modified the script by adding few things.

  print("Enter the starting year as an integer value:")
  y1 = stringtointeger(systemfunc("read var; echo $var"))
  print(y1)
year1 = sprinti("%2.2i",y1)
print("starting month="+year1)

  print("Enter the ending year as an integer value:")
  yn = stringtointeger(systemfunc("read var; echo $var"))
  print(yn)
yeare = sprinti("%2.2i",yn)
print("ending month="+yeare)

.....................................
> print("Enter the season starting month as an integer value:")
> m1 = stringtointeger(systemfunc("read var; echo $var"))
> print(m1)
> mms = sprinti("%2.2i",m1)
> print("starting month="+mms)
>
> print("Enter the season ending month as an integer value:")
> mn = stringtointeger(systemfunc("read var; echo $var"))
> print(mn)
> mme = sprinti("%2.2i",mn)
> print("ending month="+mme)
>
> fnames = ""
>
do y = y1,yn,1
yyyy = sprinti("%4.4i",y)
do m = m1,mn,1
mm = sprinti("%2.2i",m)
print("mm="+mm)
fnames =fnames + systemfunc("sftp
surya@10.4.5.8:/gpfs2/home/kiran/freerun/t62/monthly/time_mean."+
yyyy + mm + ".nc")
end do
end do

> file1= addfiles(fnames, "r")
> ...............................
> ..............................
> ..............................
>

>
And try it by limiting the number of files
Now I am getting another error message, probably from addfiles()

fatal:_NclCreateFile: Requested file does not exist as (Fetching /path/
time_mean.200005.nc to time_mean.200005.nc.......................
........................................................................
........................................................................),
can't add file
fatal:No valid instance of variable temp found in file list
fatal:Execute: Error occurred at or near line 45 in file climsftp.ncl

> Can anyone point out the reason for the error ?
>
> 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.
>

-- 
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
Received on Sat Jul 10 06:22:13 2010

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