Re: Fwd: point-correlation

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 24 Jun 2009 10:56:18 -0600

** Please do not resend questions sent to ncl-talk **
All questions will be answered when we have the time.

    c = escorc(y(:,:,0),x2) <==== why? time=0

If you
    printVarSummary(y(:,:,0))

What do you see?

===
There is no reason to explicitly create a separate varaible [ y ]

   c = escorc(x1(lat|:,lon|:,time|:),x2) ; temporal correlation
   copy_VarCoords(x1(0,:,:), c) ; associate spatial coords
   printVarSummary(c)

Ibraheem Khan wrote:
> ----- Forwarded Message -----
> From: "Ibraheem Khan" <khan18_at_atmos.uiuc.edu>
> To: "ncl-talk" <ncl-talk_at_ucar.edu>
> Sent: Tuesday, June 23, 2009 10:29:18 PM GMT -06:00 US/Canada Central
> Subject: point-correlation
>
> Hi Everyone,
>
> I am trying to plot a cross co-relation map of point value with gridded data. The following error is troubling.
>
> fatal:Subscript out of range, error in subscript #2
> fatal:An error occurred reading y
>
> and the script is as follows:
>
>
> 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
> ;**********************************************
> ; Reading Data and correlation function
> ;**********************************************
> f1 = addfile("6104_01.nc","r")
> f2 = addfile("tll_6104_01.nc","r")
> x1 = f1->a
> x2 = f2->a
> print(x1)
> print(x2)
> y = x1(lon|:,lat|:,time|:)
> c = escorc(y(:,:,0),x2)
> printVarSummary(c)
>
> ;**********************************************
> ; create plot
> ;*********************************************
> wks = gsn_open_wks ("ps","cor_prcp_01") ; open ps file
>
> gsn_define_colormap(wks,"radar")
> res = True
> res_at_cnFillOn = True
> res_at_cnLinesOn = False
>
> res_at_gsnSpreadColors = True
> res_at_lbAutoLabelStride = True
>
> res_at_cnLevelselectionMode = "ManualLevels" ; manually set cn levels
> res_at_cnMinLevelValF = -1. ; min level
> res_at_cnMaxLevelValF = 1. ; max level
> res_at_tiMainString = ":F25:Prcp Point Corr"
>
> res_at_gsnLeftString = " "
> res_at_tiMainFontHeightF = 0.03
> res_at_gsnAddCyclic = False
> plot = gsn_csm_contour_map_ce(wks,c,res)
> end
>
>
> It will be really great if anyone can help me out.
> Thanks
>
> -Ibraheem
> _______________________________________________
> 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
>

-- 
======================================================
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 Wed Jun 24 2009 - 10:56:18 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 25 2009 - 06:30:15 MDT