Re: About seasonal averaging

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 13 Oct 2008 08:04:33 -0600 (MDT)

Hi Michel and others,

This is just an FYI: the applications pages do not reference every
possible function in NCL. You can see which functions *are* being
referenced in the suite of applications examples by going to:

    http://www.ncl.ucar.edu/Applications/

and clicking on the "functions/procedures" link at the very top.
Same for the "resources" link, which shows you which resources
are referenced.

If you are trying to find out if a particular type of function exists,
the best place to go is to the main functions page:

   http://www.ncl.ucar.edu/Document/Functions/

>From here you will see a link to "Climatology" and this will contain a
list of all the climatology functions.

--Mary

On Sun, 12 Oct 2008, Michel dos Santos Mesquita wrote:

> Dear Dennis,
>
> Thank you so much for the help!!!
>
> The dimensions of my dataset are (time, lat, lon). And the function
> 'month_to_season' is really useful! Thank you! I guess this function is
> not listed in http://www.ncl.ucar.edu/Applications/index.shtml , under the
> 'climatology' examples.
>
> And now I understand where the dimension 'month', in your example, came
> from! It was from the function 'clmMonTLL'!
>
> Once again, thank you so much!
>
> Have a great day!
>
>
> Michel
>
>
>
>
>> Hello,
>>
>> [1]
>> You say the dimensions are (lat, lon, time).
>> Is that how NCL is 'seeing' the array?
>>
>> Do a "ncdump -h" or, equivalently "ncl_filedump"
>> on the file. What order do you see?
>>
>> You could also do
>>
>> f = addfile(....)
>> sst = f->SST
>> printVarSummary(sst) ; What order do you see?
>>
>> [2]
>> The climo_6 example you refer, the data is ordered (time,lat,lon)
>>
>> The clmMonTLL function created the named dimension "month".
>> http://www.ncl.ucar.edu/Document/Functions/Contributed/clmMonTLL.shtml
>> sstClm = clmMonTLL( sst) ; (month,lat,lon)
>>
>> The subsequent 6-month seasonal average used the "month"
>> dimension name.
>>
>> [3]
>> In your case, I would suggest "month-to-season"
>>
>> http://www.ncl.ucar.edu/Document/Functions/Contributed/month_to_season.shtml
>>
>>
>> Note ... this requires full years of data .... (1948-2007) in
>> your case.
>>
>> xDJF = month_to_season (sst(0:N-1),:,:), "DJF")
>> xJJA = month_to_season (sst(0:N-1),:,:), "JJA")
>>
>> where N is the number of months 60*12
>>
>>
>>
>> Michel dos Santos Mesquita wrote:
>>> Hello,
>>>
>>> I am using some SST data to produce seasonal plots (SKT from NCEP/NCAR
>>> Reanalysis from 1948-2008). I would like to use the function
>>> 'dim_avg_Wrap' for that. I am producing plots for the seasons DJF, MAM,
>>> JJA and SON.
>>>
>>> There is an example from the NCL website that I am using for my plot:
>>> http://www.ncl.ucar.edu/Applications/Scripts/climo_6.ncl
>>>
>>> But I have a question there related to the following lines:
>>> *****
>>> season = (/ (/ 5, 6, 7, 8, 9,10/) \ ; May-Oct [summer]
>>> (/ 1, 2, 3, 4,11,12/) /) ; Nov-Apr [winter]
>>> i_season = season - 1 ; NCL indices
>>> etc...
>>> do ns=0,1 ; 2 seasons seasonal climatology
>>> sstSeaClm = dim_avg_Wrap( sstClm(lat|:,lon|:,month|i_season(ns,:)) )
>>> etc...
>>> *****
>>> The fact that the dimension 'month' was used in the line corresponding
>>> to
>>> 'sstSeaClm' assumes that the dataset has a month dimension. The data set
>>> I
>>> am working with has a dimensions of (lat, lon, time). The time
>>> dimentions
>>> I am splitting into year, month, day, etc... using the ut_calendar
>>> function. Do I need to assign 'month' as a dimension to my dataset to be
>>> able to do seasonal averages using dim_avg_Wrap?
>>>
>>> In my script, I have something like this:
>>> ***
>>> etc...
>>> season = (/1,2,12/) ; DJF
>>> i_season = season-1
>>> djf_clim = dim_avg_Wrap(sst(lat|:,lon|:,time|i_season(:)))
>>> etc...
>>> ***
>>>
>>> Since 'month' is not a dimension in my dataset, I used the variable
>>> 'time'. How does 'dim_avg_Wrap' average my dataset in this case? Does it
>>> use the indices 1, 2 and 12 from the time variable? Or does it try to
>>> look
>>> for the values of 1,2 and 12? Or is it necessary to add the month
>>> dimension to the dataset so that the numbers 1,2 and 12 can be averaged
>>> correctly? If dim_avg_Wrap uses the numbers in the variable 'season' as
>>> indices, and if it averages over those indices for each year, then the
>>> calculation I am doing is correct, since I have monthly data.
>>>
>>> I thank you in advance!
>>>
>>> Regards,
>>>
>>> Michel
>>>
>>
>
>
> --
> Michel Mesquita
> PhD Student
> UAF/IARC
> michel_at_iarc.uaf.edu
>
>
> -----------------------------------------
> This email was sent using SquirrelMail.
> "Webmail for nuts!"
> http://squirrelmail.org/
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 13 2008 - 08:04:33 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 13 2008 - 08:05:48 MDT