<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font face="Helvetica, Arial, sans-serif">Hello everyone,</font></p>
<p><font face="Helvetica, Arial, sans-serif">I am doing a simple
calculation on monthly means data e.g. temp from 1850-2000.</font></p>
<p style="margin-bottom: 0in; line-height: 100%" lang="x-none"><font
face="Helvetica, Arial, sans-serif">I would like to calculate
the mean, standard deviation (e.g temp<font style="font-size:
11pt" size="2"><span lang="en-US"> from
1986-2006). For this </span></font><font style="font-size:
11pt" size="2"><span lang="en-US">the
seasonal cycles of the respective periods should be removed
otherwise
its probably not Gaussian so i want to extract the seasonal
cycle out of my data.<br>
</span></font></font></p>
<p style="margin-bottom: 0in; line-height: 100%" lang="x-none"><font
style="font-size: 11pt" size="2" face="Helvetica, Arial,
sans-serif"><span lang="en-US">Are the below steps the correct
way to do this? My script is successful in retrieving the
anomalies.<br>
</span></font></p>
<p style="margin-bottom: 0in; line-height: 100%" lang="x-none"><font
style="font-size: 11pt" size="2" face="Helvetica, Arial,
sans-serif"><span lang="en-US">;=================================================================<br>
; Concepts illustrated:<br>
; - Calculates long term monthly means (monthly climatology)
from monthly data: (time,lev,lat,lon) version <br>
; - Compute monthly anomalies using monthly climatology<br>
; - Calculates climatological anomalies by subtracting the
long term mean from each point. <br>
; - Assumes monthly data. If the input data contains
metadata (e.g. coordinate variables and attributes), these
will be retained. <br>
;==================================================================<br>
yrStrt = 1986<br>
yrLast = 2006<br>
<br>
f = addfile("zo_hist_1850-2005_ens_1-100.nc","r")<br>
TIME = f->time<br>
TIME = TIME-31<br>
YYYY = cd_calendar(TIME,-1)/100 ; entire
file<br>
iYYYY = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast) ;this is
from 1 Jan 1986 to 1 Dec 2006<br>
<br>
zo =
f->zo(iYYYY,:,:,:,:)
; [time | 240] x [ens:100] x [depth:1] x [lat | 192] x [lon |
288]<br>
zo@_FillValue = 9.96921e+36<br>
printVarSummary(zo)<br>
printMinMax(zo,0)<br>
<br>
zo1 = dim_avg_n_Wrap( zo,
2) ;[time | 240] x
[ens:100] x [lat | 192] x [lon | 288]<br>
printVarSummary(zo1)<br>
<br>
;==================================================================<br>
; Compute monthly climatology<br>
;==================================================================<br>
<br>
zo2 = clmMonTLLL( zo1
) ; [month | 12] x
[ens | 100] x [lat | 45] x [lon | 90]<br>
printVarSummary(zo2) <br>
<br>
;==================================================================<br>
; Compute monthly anomalies from the above climatology to
remove seasonal cycle<br>
;==================================================================<br>
<br>
zAnom = calcMonAnomTLLL (zo1,zo2)<br>
printVarSummary(zAnom)
;[time | 240] x [ens | 100] x [lat | 45] x [lon | 90]<br>
<br>
zAnom@long_name = "Anomalies from monthly Climatology"<br>
printVarSummary(zAnom)<br>
printMinMax(zAnom, 0)<br>
<br>
</span></font></p>
<p style="margin-bottom: 0in; line-height: 100%" lang="x-none"><font
style="font-size: 11pt" size="2" face="Helvetica, Arial,
sans-serif"><span lang="en-US"><br>
</span></font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Or should i be
using rmMonAnnCycLLLT (removes the annual cycle from the monthly
data) instead?</font></p>
<p><font size="2">Would be grateful for some guidance on this!</font></p>
<p><font size="2">Sri<br>
</font></p>
</body>
</html>