<div dir="ltr"><div><div><div><div>Hi,<br><br></div>Its a bit hard to tell (for me at least) from the
information given. But in your expression for calculating speed, are
you using only a subrange of the available lat/lon values;, e..g, with
the {lat|-40:10},{lon-10:70} notation? If so, it seems that when you
attach coordinates to "speed", they should be the same subranges, of the same dimensions as speed itself. I'm not sure of the exact notation, but something like:<br><br></div>speed&lat = lat({-40:10})<br></div>speed&lon = lon({-10:70})<br><br></div>Hope that helps...<br>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 10, 2015 at 11:01 AM, Melissa Lazenby <span dir="ltr"><<a href="mailto:M.Lazenby@sussex.ac.uk" target="_blank">M.Lazenby@sussex.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi All
<br>
<br>
I am trying to draw the magnitude of moisture flux vectors as shaded contours and I cant seem to get the scripting correct when calculating the magnitude.<br>
Any advice of the error below would be appreciated.<br>
<br>
Error:<br>
Variable: speed<br>
Type: float<br>
Total Size: 7208 bytes<br>
1802 values<br>
Number of Dimensions: 2<br>
Dimensions and sizes: [34] x [53]<br>
Coordinates: <br>
Number Of Attributes: 1<br>
_FillValue : 1e+20<br>
fatal:Coordinate variables must be the same dimension as their dimension<br>
fatal:No coordinate variable exists for dimension (lat) in variable (speed)<br>
fatal:Execute: Error occurred at or near line 123 in file Obs_pr_qflux_qfluxmag.ncl<br>
<br>
<br>
Script:<br>
u_avg = dim_avg_n_Wrap(u1,0) ;<br>
v_avg = dim_avg_n_Wrap(v1,0) ;<br>
<br>
u_avg = u_avg/5<br>
v_avg = v_avg/5<br>
<br>
u = u/5<br>
v = v/5<br>
<br>
speed = sqrt(u_avg({lat|-40:10},{lon|-10:70})^2+v_avg({lat|-40:10}, {lon|-10:70})^2)<br>
<br>
printVarSummary(speed)<br>
<br>
speed!0 = "lat"<br>
speed!1 = "lon"<br>
speed&lat = lat<br>
speed&lon = lon<br>
speed@long_name = "Wind Speed"<br>
speed@units = "m/s"<br>
<br>
<br>
printVarSummary(speed)<br>
<br>
Many thanks!<br>
<br>
Kindest Regards<span class="HOEnZb"><font color="#888888"><br>
Melissa<br>
</font></span></div>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>