Re: daily climatology

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 31 2013 - 08:23:09 MDT

It is always best to try on your own. It is the best way to
think thru the steps. If you have issues, the responses will
make more sense.
-----------------------------
You could use 'conform_dims'
   http://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml

   x(time, level, lat), y(time, lat)

   dimx = dimsizes(x)
   ntim = dimx(0)
   klev = dimx(1)
   nlat = dimx(2)
   mlon = 1

   xnew = new( (/ntim,klev,nlat,mlon/), x, 3) ; TLLL
   copy_VarMeta(x, xnew(:,:,:,0))
   printVarSummary(xnew)

   xnew!3 = "lon"
   printVarSummary(xnew)

   dimy = dimsizes(y)
   ntim = dimy(0)
   nlat = dimy(1)
   mlon = 1

   ynew = new( (/ntim,nlat,mlon/), x, 3) ; TLL
   copy_VarMeta(y, ynew(:,:,0))
   printVarSummary(ynew)

   ynew!2 = "lon"
   printVarSummary(ynew)

====
Also ...

You could extract/copy one the functions from contributed.ncl
     and make your own copy. Then edit the code and change the
     function name to prevent conflicts

%> your_editor $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl

http://www.ncl.ucar.edu/Document/Functions/Contributed/clmDayTLL.shtml
http://www.ncl.ucar.edu/Document/Functions/Contributed/clmDayTLLL.shtml

On 10/31/13 8:15 AM, Ahmad Farsyud wrote:
> Thanks Daniel,
>
> could you please to give me an example to use the dummies in this case/
> or is there any another method to handle this issue?
>
> Thanks,
> AF
>
>
> On Thu, Oct 31, 2013 at 3:11 PM, Daniel Barandiaran
> <dbarandiaran@gmail.com>wrote:
>
>> Perhaps you could create a dummy variable with an extra dimension named
>> "longitude" (doesn't have to be very large dimension i.e. two columns,
>> since you will only use one column) then use conform to stretch out your
>> actual data into the dummy, then you could use clmDayTLL or clmDayTLLL as
>> necessary. There might be a more efficient way, but that is the first
>> solution that comes to my mind.
>>
>>
>> On Thu, Oct 31, 2013 at 7:56 AM, Ahmad Farsyud <a.farsyud@gmail.com>wrote:
>>
>>> Hello,
>>>
>>> What an appropriate function that i might apply to calculate daily
>>> climatology from
>>> daily dataset (time, level, lat) or (time,lat) without longitude.
>>>
>>> Thank you
>>>
>>> -- AF
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>> --
>> Danny Barandiaran
>> Department of Plants, Soils, and Climate
>> Utah State University
>>
>>
>>
>
>
>
> _______________________________________________
> 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 Thu Oct 31 08:23:16 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT