<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi;<div><br></div><div>I am trying to detrend a monthly time series, month by month:</div><div><br></div><div>nmos = 12</div><div>ntim &nbsp;= dimsizes(x) &nbsp;</div><div><br></div><div>&nbsp; do n = 0,ntim-1,nmos</div><div>x_dtrnd = dtrend(x,False)<br>&nbsp; end do</div><div><br></div><div>print(<span style="font-size: 10pt; ">x_dtrnd(0:11)</span><span style="font-size: 10pt; ">)</span></div><div><span style="font-size: 10pt; "><br></span></div><div><span style="font-size: 10pt; ">But the result doesn't look correct, looks like deviations from annual mean. What could be wrong?</span></div><div><span style="font-size: 10pt; "><br></span></div><div><span style="font-size: 10pt; ">Hyacinth</span></div><div><span style="font-size: 10pt; "><br></span></div><div><br></div><div><br><div><div id="SkyDrivePlaceholder"></div><br></div><embed type="application/x-dap-background" id="DAPPlugin" style="visibility: collapse"></div>                                               </div></body>
</html>