Re: About seasonal averaging

From: Michel dos Santos Mesquita <michel_at_nyahnyahspammersnyahnyah>
Date: Tue, 14 Oct 2008 03:34:47 -0800 (AKDT)

Hi Mary and Dennis,

Thank you so much for the information!
The Functions -> Climatology page is great! The functions are listed by
category! Thank you so much for sending the info email!

Have a great day!

Michel

>
> 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
>>
>

-- 
Michel Mesquita
PhD Student
UAF/IARC
michel_at_iarc.uaf.edu
-----------------------------------------
This email was sent using SquirrelMail.
   "Webmail for nuts!"
http://squirrelmail.org/
Received on Tue Oct 14 2008 - 05:34:47 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 17 2008 - 10:06:33 MDT