Hi all
I am trying to calculate pattern correlation however I am receiving an error
that I can not manage to correct.
below is my script and the corresponding error message. Can anybody help in
this regard?
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
in1=addfile("f1.nc","r")
in2=addfile("f2.nc","r")
in3=addfile("f3.nc","r")
in4=addfile("f4.nc","r")
in5=addfile("f5.nc","r")
in6=addfile("f6.nc","r")
in7=addfile("f7.nc","r")
in8=addfile("f8.nc","r")
in9=addfile("f9.nc","r")
in10=addfile("f10.nc","r")
inob=addfile("cp.mean.mon.nc","r")
;===========================================
ob1=short2flt(inob->cp(35:274,:,:))
ob2=short2flt(inob->cp(276:515,:,:))
p1=in1->precip(120:359,:,:)
p2=in2->precip(120:359,:,:)
p3=in3->precip(120:359,:,:)
p4=in4->precip(120:359,:,:)
p5=in5->precip(120:359,:,:)
p6=in6->precip(120:359,:,:)
p7=in7->precip(120:359,:,:)
p8=in8->precip(120:359,:,:)
p9=in9->precip(120:359,:,:)
p10=in10->precip(120:359,:,:)
out1=(p1+p2+p3+p4+p5)/5
out2=(p6+p7+p8+p9+p10)/5 ; ( time,lat,lon)
copy_VarCoords(p1,out1)
copy_VarCoords(p6,out2)
JAS1=month_to_season(out1,"JAS")
JAS2=month_to_season(out2,"JAS")
JASob1=month_to_season(ob1,"JAS")
JASob2=month_to_season(ob2,"JAS")
diff=(JAS1-JAS2)*86400
copy_VarCoords(JAS1,diff)
diffob=(JASob2-JASob1) ;*86400
copy_VarCoords(JASob1,diffob)
xtmp=diff(lon|:,lat|:,time|:)
xtmpob=diffob(lon|:,lat|:,time|:)
;================================================================================
wks=gsn_open_wks("pdf","/mnt/storage-space/disk1/lshl/khan/JAS_precip_corel_ncep_japs_71-00")
gsn_define_colormap(wks,"BlWhRe")
res=True
maxlag = 2 ; set lag
ccr = esccr(xtmp,xtmpob,maxlag) ; calc cross correlations
copy_VarCoords(xtmp,ccr)
res@cnFillOn=True
res@lbLabelAutoStride=True
res@gsnSpreadColors=True
res@mpOutlineBoundarySets="National"
plot=gsn_csm_contour_map_ce(wks,ccr(:,:,lag),res)
end
The error message is:
Copyright (C) 1995-2010 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.2.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
*fatal:(lat) is not a dimension name in variable (diffob), could not
determine dimension number
fatal:Execute: Error occurred at or near line 48 in file
corel_precip_japs.ncl*
**
*Thanks*
*Rashed*
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 16 12:27:58 2010
This archive was generated by hypermail 2.1.8 : Tue Aug 17 2010 - 15:33:24 MDT