<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"><span style="font-size: 21.3333339691162px;">Thanks for the help. But I'm still finding errors in the script and I need help.</span></font><div><font face="Calibri,sans-serif" color="#000000"><span style="font-size: 21.3333339691162px;"><br></span></font></div><div><font face="Calibri,sans-serif" color="#000000"><span style="font-size: 21.3333339691162px;">The error:</span></font></div><div><font face="Calibri,sans-serif" color="#000000"><span style="font-size: 21.3333339691162px;"><br></span></font></div><div><font face="Calibri,sans-serif" color="#000000"><div><span style="font-size: 21.3333339691162px;">fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can't continue</span></div><div style="font-size: 21.3333339691162px;"><br></div><div style="font-size: 21.3333339691162px;">In the line:</div><div style="font-size: 21.3333339691162px;"><br></div><div><div style="font-size: 21.3333339691162px;"> if (rankw.eq.2 .and. .not.all(dimx.eq.dimw)) then</div><div style="font-size: 21.3333339691162px;"> print("taylor_diagram_stats: Fatal: weight[*][*] must have the same dimensions as x[*][*]")</div><div style="font-size: 21.3333339691162px;"> print(" dimx: "+dimx+" dimw="+dimw)</div><div style="font-size: 21.3333339691162px;"> exit</div><div style="font-size: 21.3333339691162px;"><br></div><div><span style="font-size: 21.3333339691162px;">I do not know if the problem is in the code or the size of the dimensions of the variables:</span></div></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><div><span style="font-size: 21.3333339691162px;">; variables</span></div><div><span style="font-size: 21.3333339691162px;"> </span></div><div><span style="font-size: 21.3333339691162px;"> dimx = dimsizes(x)</span></div><div><span style="font-size: 21.3333339691162px;"> dimy = dimsizes(y)</span></div><div><span style="font-size: 21.3333339691162px;"> dimw = dimsizes(weight) </span></div><div><span style="font-size: 21.3333339691162px;"> rankw = dimsizes(dimw)</span></div><div><span style="font-size: 21.3333339691162px;"><br></span></div><div><span style="font-size: 21.3333339691162px;">printVarSummary(rankw) ;[1]</span></div><div><span style="font-size: 21.3333339691162px;">printVarSummary(dimw) ;[2]</span></div><div><span style="font-size: 21.3333339691162px;">printVarSummary(dimx) ;[3]</span></div></div></font><div><br></div><div><br></div>my script is attached, any help will be appreciated.</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div><div><br><br><div>> Date: Mon, 21 Sep 2015 08:21:04 -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>> <br>> lat(lat)<br>> <br>> x(time,lat,lon)<br>> <br>> rad = 4*atan(1.0)/180<br>> wgt = cos(rad*lat) ; wgt(:)<br>> <br>> ; x(0,:,:) ==> x(lat,lon)<br>> wgt2d = conform(x(0,:,:), wgt, 0)<br>> <br>> printVarSummary(wgt2d)<br>> <br>> On Fri, Sep 18, 2015 at 2:04 PM, Vanúcia Schumacher<br>> <vanucia-schumacher@hotmail.com> wrote:<br>> > I'm confused on how to calculate weight,<br>> > this way that I'm calculating the weight, it's has 3 dimensions<br>> > what i doing wrong in this calculation? I understand that should have 2<br>> > dimensions, but I can not do this.<br>> ><br>> > ; weight: commonly cosine(latitude)<br>> ><br>> > lat = f->lat<br>> > rad = 4*atan(1.)/180<br>> ><br>> > wgt = cos(rad*lat)<br>> ><br>> ><br>> > dims = dimsizes(x) ;[time][lat][lon]<br>> > ntim = dims(0)<br>> > rank = dimsizes(dims)<br>> ><br>> > weight = conform(x, wgt , rank-2)<br>> ><br>> ><br>> >> 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>> >><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,<br>> >> > 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>                                            </div></body>
</html>