Re: Problem calculating pattern correlation...

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 16 2010 - 13:32:29 MDT

Wtthout the data it is hard to know but
I suggest that you use printVarSummary to monitor
a variable's overall structure.

EG: after

copy_VarCoords(JASob1,diffob)

add
printVarSummary(JASob1)

printVarSummary(diffob)

===
Good luck

On 08/16/2010 12:27 PM, Rashed Mahmood wrote:
> 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 <http://f1.nc>","r")
>
> in2=addfile("f2.nc <http://f2.nc>","r")
>
> in3=addfile("f3.nc <http://f3.nc>","r")
>
> in4=addfile("f4.nc <http://f4.nc>","r")
>
> in5=addfile("f5.nc <http://f5.nc>","r")
>
> in6=addfile("f6.nc <http://f6.nc>","r")
>
> in7=addfile("f7.nc <http://f7.nc>","r")
>
> in8=addfile("f8.nc <http://f8.nc>","r")
>
> in9=addfile("f9.nc <http://f9.nc>","r")
>
> in10=addfile("f10.nc <http://f10.nc>","r")
>
> inob=addfile("cp.mean.mon.nc <http://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
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 16 13:32:40 2010

This archive was generated by hypermail 2.1.8 : Tue Aug 17 2010 - 15:33:24 MDT