[ncl-talk] help
afwande juliet
afwandej965 at gmail.com
Tue Sep 8 07:42:23 MDT 2015
Hello
I am doing timeseries for Warm years for sst and CMAP data.
how do i make the left and right dimension be same especilly here........ *
y = sst(ind_warm*).........see it in main script.
it complains about left and right dimension not same. my data is
sst(time.lat,lon) and am plotting only warm years
thanks
below is script
begin
;************************************************
; Read in data
;************************************************
f = addfile ("sst.mnmean.nc","r")
time = f->time ; access date
sst = (f->sst)*0.1 ; scale sst anomalies
;************************************************
; extract warm years from data
;************************************************
warm_yrs = (/1951,1953,1957,1963,1965,1969,1972,1976,1982,1987,1991/)
warm_time_yrs = warm_yrs * 100 + 01 ; match format of date
array
nwarm = dimsizes(warm_yrs) ; how many warm years
ind_warm = new(nwarm,integer) ; create array
do n=0,nwarm-1
ind_warm(n) = ind(warm_time_yrs(n).eq.time)
end do
* y = sst(ind_warm)*
x = ispan(0,nwarm-1,1)
;************************************************
; create plot
;************************************************
wks = gsn_open_wks ("x11","xy") ; open ps file
res = True ; plot mods desired
res at tmXBMode = "Explicit" ; explicit labels
res at tmXBValues = x ; location of labels
res at tmXBLabels = warm_yrs ; labels themselves
res at tmLabelAutoStride = True ; nice stride on labels
res at tiMainString = "Explicit axis labeling"; title
plot = gsn_csm_xy(wks,x,y,res)
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150908/11f413db/attachment.html
More information about the ncl-talk
mailing list