<div dir="ltr"><div><div><div>As noted by Karin, the dimensionality of the arguments you are passing is not acceptable.<br><br>[1]<br>u = f->u({150:165},{15:18},:,:)<br>v = f->v({150:165},{15:18},:,:)<br><br></div>printVarSummary(u) ; **look** at this. <br><br>The variable is 4-dimensional<br><br>[2]<br></div>You use these and speed in<br><br> contours = gsn_csm_contour(wks,speed,cnres)<br> vectors = gsn_csm_vector(wks,u,v,vcres)<br><br></div>Please *read* the documentation for functions you are using:<br><br><a href="http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour.shtml">http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour.shtml</a><br><div><div><br><div>Note what it shows for the 'dat' argument<br><br><em>data</em>
<p class="">The data to contour; ****must be one or two-dimensional.****</p><p class="">You are using 4D arrays. That is what the error message is telling you<br></p><p class="">[3]</p><p class=""> do nt=...</p><p class=""> do kl=...</p><p class=""><br></p><p class=""> contours = gsn_csm_contour(wks,speed(nt,kl,:,:),cnres)<br> vectors = gsn_csm_vector(wks,u(nt,kl,:,:),v(nt,kl,:,:),vcres)<br><br>;---Overlay vectors and contours on map<br> overlay(map,contours)<br> overlay(map,vectors)<br><br>;---Drawing the map will draw contours and vectors too.<br> draw(map)<br> frame(wks)<br><br></p></div><div> end do<br></div><div>end do<br></div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 15, 2015 at 8:23 AM, Karin Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
the error message is telling you what is wrong. Your speed, u and v
variable<br>
have more than 2 dimensions. Do a printVarSummary to get variable
information.<br>
<br>
Bye,<br>
Karin<br>
<br>
<div>Am 15.06.15 um 16:01 schrieb saeed
bayat:<br>
</div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>Dear NCL users<br>
</div>
I want to plot a map which includes contour and vector (or
streamline) overlay. I prepared a ncl script that has error.: <br clear="all">
<div>
<div>gsn_csm_contour: Fatal: the input data array must be 1D
or 2D<br>
fatal:Illegal right-hand side type for assignment<br>
fatal:["Execute.c":8575]:Execute: Error occurred at or near
line 45 in file cn_vc.ncl<br>
<br>
</div>
<div>Please find attached script to find more about the script
and help me to solve the problem.<br>
<br>
</div>
<div>Best Regards<br>
</div>
<div>-- <br>
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Abdolhalim Bayat
<div>Ph.D Candidate of Synoptic Climatology</div>
<div>University of Tehran (Iran)<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
ncl-talk mailing list
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Dipl. Geophys. Karin Meier-Fleischer
Visualization
Application Support
Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany
Phone: <a href="tel:%2B49%20%280%2940%20460094%20126" value="+4940460094126" target="_blank">+49 (0)40 460094 126</a>
Fax: <a href="tel:%2B49%20%280%2940%20460094%20270" value="+4940460094270" target="_blank">+49 (0)40 460094 270</a>
E-Mail: <a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>
URL: <a href="http://www.dkrz.de" target="_blank">www.dkrz.de</a>
Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784
</pre>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>