Hi,Every one
I'd like to creat a file namelist in my directory, but I don't know what
the type of the file name namelist, I have tried 'character','string',
' byte',
all of them don't work. I got the error message like:
fatal:Assignment type mismatch, right hand side can't be coerced to type of
left hand side
fatal:Execute: Error occurred at or near line 26 in file ght.time.ncl
I want to use the type attribute from file_list1, I think they are the same,
how can I do that?
Thanks.
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
file_home ="./"
file_list1 = systemfunc("cd " + file_home+ " ; ls ta_A6.*nc ;")
print(file_list1)
file_list2 = systemfunc("cd " + file_home+ " ; ls hus_A6.*nc ;")
print(file_list2)
nfiles = dimsizes(file_list1)
year = new(nfiles,integer)
year
=(/1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069/)
file_list3 =new(nfiles,byte)
nf = nfiles-1
do fil = 0, nf ; files numbers !from 1985
a =addfile(file_home+file_list1(fil),"r")
b =addfile(file_home+file_list2(fil),"r")
file_list3(fil) ="ght_A6."+year+"010100-"+year+"123123.nc"
print(file_list3(fil))
end do
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 08 2009 - 08:50:33 MDT
This archive was generated by hypermail 2.2.0 : Wed Jul 08 2009 - 14:48:16 MDT