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