<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-forward-container">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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.</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">however i want which function
            is correct? (rmvmean or </span></font><font
          style="font-size: 11pt" size="2" face="Helvetica, Arial,
          sans-serif"><span lang="en-US">calcMonAnomTLLL)</span></font><br>
        <font style="font-size: 11pt" size="2" face="Helvetica, Arial,
          sans-serif"><span lang="en-US"><span style="left: 40.7659px;
              top: 86.6875px; font-size: 16.4773px; font-family:
              sans-serif; transform: scaleX(0.972916);">rmvmean</span><span
              style="left: 112.79px; top: 86.6875px; font-size:
              16.4773px; font-family: sans-serif; transform:
              scaleX(0.963621);">(x)</span><span style="left: 133.99px;
              top: 86.6875px; font-size: 16.4773px; font-family:
              sans-serif; transform: scaleX(0.989226);">: remove mean
              (and </span><span style="left: 40.7659px; top: 105.911px;
              font-size: 16.4773px; font-family: sans-serif; transform:
              scaleX(0.998481);">returns deviation from mean) <br>
            </span></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"><span style="left: 40.7659px;
              top: 105.911px; font-size: 16.4773px; font-family:
              sans-serif; transform: scaleX(0.998481);"> </span></span></font><font
          style="font-size: 11pt" size="2" face="Helvetica, Arial,
          sans-serif"><span lang="en-US"><span style="left: 40.7659px;
              top: 105.911px; font-size: 16.4773px; font-family:
              sans-serif; transform: scaleX(0.998481);"><font
                style="font-size: 11pt" size="2" face="Helvetica, Arial,
                sans-serif"><span lang="en-US"></span></font><font
                style="font-size: 11pt" size="2" face="Helvetica, Arial,
                sans-serif"><span lang="en-US">calcMonAnomTLLL(x): </span></font>Anomalies
              from Annual Cycle: calcMonAnomTLL: contributed.ncl<br>
              <br>
            </span> </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>
    </div>
  </body>
</html>