Re: deseasoned monthly meridional wind

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Sun Jun 30 2013 - 16:45:10 MDT

Hi AF,
I took your question to mean you wanted to calculate the monthly means,
not remove them from your data (=remove the annual cycle). If you want
to remove them (as clmMonTLLL/calcMonAnomLLLT and rmMonAnnCycTLL do),
then the coding would be something like this:

; (untested)
arr_sc = arr ; set up array to store seasonal cycle. arr is
dimensioned time x lon. time starts in January
arr_sc = arr_sc@_FillValue ; just in case, set arr_sc to _FillValue
do gg = 0,11
      arr_sc(gg,:) = (/ dim_avg_n(arr(gg::12,:),0) /) ; for gg = 0,
grab all January's, and average.
      arr(gg::12,:) = (/ arr(gg::12,:) -
conform(arr(gg::12,:),arr_sc(gg,:),1) /) ; conform arr_sc to same
size as arr(gg::12,:) and subtract it out
end do
delete(arr_sc)

Check that the above does what you expect it to be doing, and take a
look at the conform documentation if you are not familiar with it here:
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml

Hope that helps. If not, please respond to ncl-talk.
Adam

On 6/30/13 6:24 AM, Ahmad Farsyud wrote:
> Dear NCL,
>
> Thank you Adam!
>
> If I use the function of ClmMonTLLL then substract the anomalies
> via calcMonAnomLLLT
> can it be called as deaseasoned monthly data? because as far as i
> understand your recommended
> trick also do the same
>
> arr_sc(gg,:) = (/ dim_avg_n(arr(gg::12,:),0) /)
>
> thank you for clarification.
>
> AF,
>
>
>
>
>
> On Wed, Jun 12, 2013 at 12:49 AM, Adam Phillips <asphilli@ucar.edu
> <mailto:asphilli@ucar.edu>> wrote:
>
> Hi AF,
> As a function doesn't exist to extract the seasonal cycle out of a
> 2-D array, you can code it yourself:
> arr_sc = arr(:11,:) ; set up array to store seasonal cycle. arr
> is dimensioned time x lon. time starts in January
> arr_sc = arr_sc@_FillValue ; just in case, set arr_sc to _FillValue
> do gg = 0,11
> arr_sc(gg,:) = (/ dim_avg_n(arr(gg::12,:),0) /) ; for gg = 0,
> grab all January's, and average.
> end do
> delete(arr)
>
> dim_avg_n documentation:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_avg_n.shtml
>
> If you are not familiar with the subscripting used in the coding
> above, see the NCL reference manual here:
> http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#StandardSubscripts
>
> Hope that helps. If not, please respond to ncl-talk.
> Adam
>
>
> On 06/11/2013 06:46 AM, Ahmad Farsyud wrote:
>> Hallo everyone,
>>
>> A simple question, I have monthly meridional wind data, I want to
>> extract the
>> seasonal cycle out from my data. Anybody knows how to do that?
>>
>> regards,
>> --AF
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> ______________________________________________________________
> Adam Phillipsasphilli@ucar.edu <mailto:asphilli@ucar.edu>
> NCAR/Climate and Global Dynamics Division(303) 497-1726 <tel:%28303%29%20497-1726>
> P.O. Box 3000
> Boulder, CO 80307-3000http://www.cgd.ucar.edu/cas/asphilli
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jun 30 16:45:21 2013

This archive was generated by hypermail 2.1.8 : Mon Jul 01 2013 - 12:35:42 MDT