<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi all!</div>
<div> </div>
<div>I am trying to make as scatter plot. I have monthly data, the dimensions of the variables x and y are time,lat,lon.</div>
<div>I would like to have scatter plots for different regions and to have monthly data de-seasonalized.</div>
<div>The script is working, but it seems like I have annual means.</div>
<div>Here is my script:</div>
<div> </div>
<div>
<div>in_x = addfile("~/DATA/x.nc","r")<br/>
x = in_x->x(:,{-10:-20},{180:190})</div>
<div>in_y = addfile("~/DATA/y.nc","r")<br/>
y = in_y->y(:,{-10:-20},{180:190})</div>
<div> </div>
;*********************************************************************************
<div>; remove annual cycle<br/>
;*********************************************************************************</div>
<div>x_ave = rmMonAnnCycTLL(x)<br/>
y = rmMonAnnCycTLL(y)</div>
<div> </div>
<div>;********************************************************************************<br/>
; calculate average LON LAT<br/>
;********************************************************************************</div>
<div>x_ave_new = dim_avg_n(x_ave,(/1,2/))</div>
<div>y_ave_new = dim_avg_n(y_ave,(/1,2/))</div>
<div> </div>
<div>;********************************************************************************<br/>
; regression line<br/>
;********************************************************************************</div>
<div>rc = regline(x_ave_new,y_ave_new)</div>
<div>print(rc)</div>
<div> </div>
<div>;********************************************************************************<br/>
; create array<br/>
;********************************************************************************</div>
<div>x = x_ave_new<br/>
y = y_ave_new</div>
<div>data1 = new((/2,dimsizes(y)/), typeof(y))</div>
<div><br/>
data1(0,:) = y</div>
<div>data1(1,:) = rc*(x-rc@xave) + rc@yave</div>
<div> </div>
<div> </div>
<div><br/>
;*********************************************************************************<br/>
; plotting parameters<br/>
;*********************************************************************************</div>
<div>wks = gsn_open_wks("pdf","scatter")</div>
<div>res = True<br/>
;res@gsnMinimize = True</div>
<div>...</div>
<div> </div>
<div>plot = gsn_csm_xy (wks,x,data1,res)</div>
<div> </div>
<div>end</div>
<div>;********************************************************************</div>
<div> </div>
<div> </div>
<div>Thanks.</div>
<div>Best regards,</div>
<div>Lena</div>
</div></div></body></html>