<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font face="Calibri,sans-serif" color="#000000"><div><span style="font-size: 21.3333339691162px;">I'm confused on how to calculate <b>weight</b>,</span></div><div><span style="font-size: 21.3333339691162px;">this way that I'm calculating the weight, it's has 3 dimensions</span></div><div><span style="font-size: 21.3333339691162px;">what i doing wrong in this calculation? I understand that should have 2 dimensions, but I can not do this.</span></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><div><span style="font-size: 21.3333339691162px;">; weight: commonly cosine(latitude)</span></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><span style="font-size: 21.3333339691162px;"> lat = f->lat</span></div><div><span style="font-size: 21.3333339691162px;"> rad = 4*atan(1.)/180</span></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><span style="font-size: 21.3333339691162px;"> wgt = cos(rad*lat)</span></div><div><span style="font-size: 21.3333339691162px;"> </span></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><span style="font-size: 21.3333339691162px;"> dims = dimsizes(x) ;[time][lat][lon]</span></div><div><span style="font-size: 21.3333339691162px;"> ntim = dims(0) </span></div><div><span style="font-size: 21.3333339691162px;"> rank = dimsizes(dims) </span></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><span style="font-size: 21.3333339691162px;"> weight = conform(x, wgt , rank-2) </span></div></div></font><br><br><div>> Date: Thu, 17 Sep 2015 12:33:54 -0600<br>> Subject: Re: [ncl-talk] RATIO in Taylor Diagram<br>> From: shea@ucar.edu<br>> To: vanucia-schumacher@hotmail.com<br>> CC: ncl-talk@ucar.edu<br>> <br>> See attached: Hopefully that will answer your question.<br>> <br>> ---<br>> <br>> Please do not send repeat questions to ncl-talk<br>> All questions are flagged and will be answered. Many of us are on<br>> travel or vacation.<br>> <br>> Good Luck<br>> D,<br>> <br>> <br>> On Mon, Sep 14, 2015 at 8:14 PM, Vanúcia Schumacher<br>> <vanucia-schumacher@hotmail.com> wrote:<br>> > Dear users,<br>> ><br>> > I'm confused with the calculation of RATIO (normalized root-mean-saquare<br>> > (RMS) differences), relation to Taylor Diagram, the comments that I have<br>> > read here in the group, it was suggested calculated in 3 ways:<br>> ><br>> > 1) Use of the function: dim_rmsd<br>> ><br>> > or<br>> ><br>> > 2) RATIO<br>> > ; temporal variance at each grid point [local]<br>> ><br>> > ; vref_var_T = dim_variance_n(rdata, 0 ) ; (lat,lon)<br>> > ; vcase_var_T = dim_variance_n(cdata, 0 )<br>> ><br>> > ; ; wgted areal *local* temporal variance<br>> ><br>> > ; wvar_ref_T = sum(wgt_S*vref_var_T)/sumwgt_S<br>> > ; wvar_case_T = sum(wgt_S*vcase_var_T)/sumwgt_S<br>> ><br>> > ; sqrt of ratio of spatially weighted variances<br>> ><br>> > ; wvar_ratio_T = (wvar_case_T/wvar_ref_T)^0.5<br>> ><br>> > I did not understand what would that sumwgt_S ?<br>> ><br>> > or 3) more explicitly, for xc and xo on the same grid: wgtc=wgto<br>> ><br>> > ; wgtc = conform_dims(dimsizes(xc), gw, 0) ; make 2d for gw[*]<br>> > ; xavgc = sum(wgtc*xc)/sum(wgtc) ; control centered<br>> > mean<br>> > ; xavgo = sum(wgtc*xo)/sum(wgtc)<br>> ><br>> > ; (b) compute the sum of the centered area weighted variances.<br>> ><br>> > ; dc2 = sum(wgtc*(xc-xavgc)^2) ; control ; centered<br>> > about xavgc<br>> > ; do2 = sum(wgtc*(xo-xavgo)^2)<br>> > ; rat = sqrt(do2/dc2)<br>> ><br>> > xc and xo is the variance or datasets?<br>> ><br>> ><br>> > I would like to know the step by step to correct this calculation RATIO, if<br>> > someone can help me, please.<br>> ><br>> > Thanks<br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > ncl-talk mailing list<br>> > ncl-talk@ucar.edu<br>> > List instructions, subscriber options, unsubscribe:<br>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br>> ><br></div>                                            </div></body>
</html>