[ncl-talk] significance_percent_at_90

Kunal Bali kunal.bali9 at gmail.com
Tue May 2 12:36:30 MDT 2017


Dear NCL user,

I have plotted the lag correlation between 2 variables. I also want to
highlight those parts which are significance at 95 % with black lines, over
the attached plot (or as an overlay plot). So it can easily be vizulise
that which part of the given region is more significant with black lines or
dot points.

please provide some suggestion on that.

I have data of one month with 31 days for each variables. The scipt I used
is given below


​

;***********************************************
  in1  = addfile("/home/kunal/anomaly_du.nc","r")
  in2  = addfile("/home/kunal/anomaly_ch.nc","r")


  tmp2 = in1->DUDP001
  tmp1 = in2->ch
;************************************************
; reorder to get time as right most dimension
;***********************************************
  ts1 = tmp1(lat|:,lon|:,time|:)
  ts2 = tmp2(lat|:,lon|:,time|:)
;************************************************
; calculate cross correlations
;************************************************
  maxlag = 4                                 ; set lag
; note, the max lag should not be more than N/4

  ccr = esccr(ts2,ts1,maxlag)                   ; calc cross correlations

; copy meta data and coordinate variables using contributed functions
  copy_VarAtts(ts1, ccr)
  copy_VarCoords_1(ts2,ccr)
;************************************************
; plot the correlations
;************************************************
;************************************************
 ;---Open workstation and change color map
  wks_type = "png"
  wks        = gsn_open_wks(wks_type, "du-ch")
;************************************************

  res at mpMinLonF = 59.5
  res at mpMaxLonF = 69.8
  res at mpMinLatF = 16.5
  res at mpMaxLatF = 25.0

 plot = gsn_csm_contour_map(wks,ccr(:,:,lag),res)

Thank You.

Regards
Kunal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170503/120e0f03/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dust-chl_lag4.png
Type: image/png
Size: 866280 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170503/120e0f03/attachment-0001.png 


More information about the ncl-talk mailing list