[ncl-talk] RATIO in Taylor Diagram
Vanúcia Schumacher
vanucia-schumacher at hotmail.com
Mon Sep 21 12:34:53 MDT 2015
Thanks for the help. But I'm still finding errors in the script and I need help.
The error:
fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can't continue
In the line:
if (rankw.eq.2 .and. .not.all(dimx.eq.dimw)) then print("taylor_diagram_stats: Fatal: weight[*][*] must have the same dimensions as x[*][*]") print(" dimx: "+dimx+" dimw="+dimw) exit
I do not know if the problem is in the code or the size of the dimensions of the variables:
; variables dimx = dimsizes(x) dimy = dimsizes(y) dimw = dimsizes(weight) rankw = dimsizes(dimw)
printVarSummary(rankw) ;[1]printVarSummary(dimw) ;[2]printVarSummary(dimx) ;[3]
my script is attached, any help will be appreciated.
Thanks
> Date: Mon, 21 Sep 2015 08:21:04 -0600
> Subject: Re: [ncl-talk] RATIO in Taylor Diagram
> From: shea at ucar.edu
> To: vanucia-schumacher at hotmail.com
> CC: ncl-talk at ucar.edu
>
>
> lat(lat)
>
> x(time,lat,lon)
>
> rad = 4*atan(1.0)/180
> wgt = cos(rad*lat) ; wgt(:)
>
> ; x(0,:,:) ==> x(lat,lon)
> wgt2d = conform(x(0,:,:), wgt, 0)
>
> printVarSummary(wgt2d)
>
> On Fri, Sep 18, 2015 at 2:04 PM, Vanúcia Schumacher
> <vanucia-schumacher at hotmail.com> wrote:
> > I'm confused on how to calculate weight,
> > this way that I'm calculating the weight, it's has 3 dimensions
> > what i doing wrong in this calculation? I understand that should have 2
> > dimensions, but I can not do this.
> >
> > ; weight: commonly cosine(latitude)
> >
> > lat = f->lat
> > rad = 4*atan(1.)/180
> >
> > wgt = cos(rad*lat)
> >
> >
> > dims = dimsizes(x) ;[time][lat][lon]
> > ntim = dims(0)
> > rank = dimsizes(dims)
> >
> > weight = conform(x, wgt , rank-2)
> >
> >
> >> Date: Thu, 17 Sep 2015 12:33:54 -0600
> >> Subject: Re: [ncl-talk] RATIO in Taylor Diagram
> >> From: shea at ucar.edu
> >> To: vanucia-schumacher at hotmail.com
> >> CC: ncl-talk at ucar.edu
> >
> >>
> >> See attached: Hopefully that will answer your question.
> >>
> >> ---
> >>
> >> Please do not send repeat questions to ncl-talk
> >> All questions are flagged and will be answered. Many of us are on
> >> travel or vacation.
> >>
> >> Good Luck
> >> D,
> >>
> >>
> >> On Mon, Sep 14, 2015 at 8:14 PM, Vanúcia Schumacher
> >> <vanucia-schumacher at hotmail.com> wrote:
> >> > Dear users,
> >> >
> >> > I'm confused with the calculation of RATIO (normalized root-mean-saquare
> >> > (RMS) differences), relation to Taylor Diagram, the comments that I have
> >> > read here in the group, it was suggested calculated in 3 ways:
> >> >
> >> > 1) Use of the function: dim_rmsd
> >> >
> >> > or
> >> >
> >> > 2) RATIO
> >> > ; temporal variance at each grid point [local]
> >> >
> >> > ; vref_var_T = dim_variance_n(rdata, 0 ) ; (lat,lon)
> >> > ; vcase_var_T = dim_variance_n(cdata, 0 )
> >> >
> >> > ; ; wgted areal *local* temporal variance
> >> >
> >> > ; wvar_ref_T = sum(wgt_S*vref_var_T)/sumwgt_S
> >> > ; wvar_case_T = sum(wgt_S*vcase_var_T)/sumwgt_S
> >> >
> >> > ; sqrt of ratio of spatially weighted variances
> >> >
> >> > ; wvar_ratio_T = (wvar_case_T/wvar_ref_T)^0.5
> >> >
> >> > I did not understand what would that sumwgt_S ?
> >> >
> >> > or 3) more explicitly, for xc and xo on the same grid: wgtc=wgto
> >> >
> >> > ; wgtc = conform_dims(dimsizes(xc), gw, 0) ; make 2d for gw[*]
> >> > ; xavgc = sum(wgtc*xc)/sum(wgtc) ; control centered
> >> > mean
> >> > ; xavgo = sum(wgtc*xo)/sum(wgtc)
> >> >
> >> > ; (b) compute the sum of the centered area weighted variances.
> >> >
> >> > ; dc2 = sum(wgtc*(xc-xavgc)^2) ; control ; centered
> >> > about xavgc
> >> > ; do2 = sum(wgtc*(xo-xavgo)^2)
> >> > ; rat = sqrt(do2/dc2)
> >> >
> >> > xc and xo is the variance or datasets?
> >> >
> >> >
> >> > I would like to know the step by step to correct this calculation RATIO,
> >> > if
> >> > someone can help me, please.
> >> >
> >> > Thanks
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > ncl-talk mailing list
> >> > ncl-talk at ucar.edu
> >> > List instructions, subscriber options, unsubscribe:
> >> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150921/cf1eb923/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: taylor.stats.ncl
Type: application/octet-stream
Size: 3106 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150921/cf1eb923/attachment.obj
More information about the ncl-talk
mailing list