Re: About climo_1.ncl

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 17 2012 - 07:26:24 MDT

Did you read the 'runave' documentation?
It is a running average (convolution).
http://www.ncl.ucar.edu/Document/Functions/Built-in/runave.shtml

Try the following

---
  x   = ispan(1,12,1)*1.0
  x30 = runave(x,3,0)
  x31 = runace(x,3,1)
  print(x+"  "+x30+"  "+x31)
  x30@_FillValue = 9.96921e+36
Now try,
---
slp_ts = runave (slp_ts, 3, 0)
slp_ts(:,:,0) = missing                    ; since 197812 is missing
slp_ts(:,:,1) = (197901+ 197902 +197903)/3 ; (0,1,2)/3
slp_ts(:,:,2) = (197902+ 197903 +197904)/3 ; (1,2,3)/3
If you want the 4 main seasons then use NCL syntax after runave
slp_ts_season = slp_ts(:,:,::3)
printVarSummary(slp_ts_season)
If you are new to NCL, please read some basic documentation at
    http://www.ncl.ucar.edu/Document/Manuals/
Specifically, the Mini-Language (pdf).
---
On 8/16/12 8:23 PM, 김인원 wrote:
> Hello
>
> I tried to run climo_1.ncl for t-test.
>
> I don't understand the ncl script (especially  runave function)
>
> script
> ===============================================
> slp_ts = runave (slp_ts, 3, 0) ; (lat,lon,time) 3-mo run ave, start
> date: 197901, monthly data
>
> ==> slp_ts(:,:,0) = (197901+ 197902 +197903)/3
> slp_ts(:,:,1) = (197904+ 197905 +197906)/3
> slp_ts(:,:,2) = (197907+ 197908 +197909)/3
> slp_ts(:,:,3) = (197910+ 197911 +197912)/3
>
> Is it right?
>
>
> --
> --
> In-Won Kim
> Intergrated Climate System Modeling Lab.
> Department of Environmental Atmospheric Sciences
> 599-1 Daeyeon-dong, Nam-gu
> Pukyong National University,
> Busan, S.Korea
>
> Tel. +82-51-629-6643
> Fax +82-51-629-7991
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 17 07:26:42 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 23 2012 - 16:16:15 MDT