Re: PSA script

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed May 22 2013 - 12:04:29 MDT

I think you need to use the conform function:

zonal_conform = conform(str,zonal,(/0,2/))
dif = str - zonal_conform

or just:
dif = str - conform(str,zonal,(/0,2/))

 -dave

On May 22, 2013, at 11:39 AM, Renata Tedeschi <rgtedeschi@gmail.com> wrote:

> Hi everyone,
>
> To calculate of the PSA pattern is necessary to remove the zonal mean on streamfunction data. Then I did:
>
> str = fstr->psi(tStrt:tLast,{levP},:,:)
> printVarSummary(str)
>
> zonal = dim_median_n(str,1)
> printVarSummary(zonal)
>
> dif = str-zonal
> printVarSummary(dif)
>
> But str(time, lat, lon) and zonal(time,lon). Because of that, I cannot do the difference (dif=str-zonal).
>
> How can I do to transforming zonal(time,lon) in zonal(time,lat,lon) [where, for all latitudes we have the same vector] ?
>
> Renata
>
>
> 2013/5/22 Dennis Shea <shea@ucar.edu>
> No PSA script but ...
>
> Did you look at the climatology functions? They handle leap years
>
> http://www.ncl.ucar.edu/Document/Functions/climo.shtml
>
> Specifically: clmDayTLL, clmDayTLLL, smthClmDayTLL
>
> Also, there are (as yet) undocumented functions in contributed.ncl
> That will determine the daily anomalies.
>
> calcDayAnomTLL , calcDayAnomTLLL
>
> Usage: xAnom = calcDayAnomTLL (x, yyyyddd, clmDay)
> xAnom = calcDayAnomTLLL(x, yyyyddd, clmDay)
>
> You can see the code via:
>
> %> less contributed.ncl
>
> search for the above function names.
>
>
>
>
> On 5/22/13 7:44 AM, Renata Tedeschi wrote:
> Hi everyone.
>
> Does anyone have a script that calculates the PSA patterns? I'm trying to
> do it but I'm having a lot of difficulty.
>
> The main difficulty is to calculate the daily climatology whereas daily
> data have leap years.
>
> Renata
>
>
>
> _______________________________________________
> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 22 12:04:42 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT