[ncl-talk] correlation_query

Kunal Bali kunal.bali9 at gmail.com
Mon Jun 19 01:17:47 MDT 2017


Dear NCL users


I am trying to get the spatial

atal:Number of subscripts do not match number of dimensions of variable,(3)
Subscripts used, (5) Subscripts expected

I have two files with
Ist file have lat, lon, X1, time dimensions
2nd file have lat, lat_bands, lon, lon_bands, Y1, time, time_bands
dimensions

So how to remove the time_bands, lon_bands, and lat_bands so that all the
dimensions of 2nd file will be matched with 1st file.



I used the script

  in1  = addfile("/home/kunal/x1.nc","r")
  in2  = addfile("/home/kunal/y2.nc","r")
   filename = "/home/kunal/IND_adm/india_state.shp"

  tmp2 = int1->X1
  tmp1 = in2->Y2
;************************************************
; reorder to get time as right most dimension
;***********************************************
  ts1 = tmp1(lat|:,lon|:,time|:)
  ts2 = tmp2(lat|:,lon|:,time|:)
;************************************************
; calculate cross correlations
;************************************************
  maxlag = 0                                 ; 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)
  printVarSummary(ccr)

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


please provide some information on that.
Thank You

Regards
Kunal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170619/7814f926/attachment.html 


More information about the ncl-talk mailing list