<div dir="ltr"><div>I don&#39;t know!<br><br>==<br></div>Try<br><br>load          &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>begin<br><br>tStrt =   11  <br>tLast = 2492<br>pltType = &quot;pdf&quot;<br><br>do a=1,6<br><br>  fname   = &quot;/home/theomar/Documents/Theomar/GobleATTO15/2015110&quot;+a+&quot;1100.txt&quot;<br>  data   := asciiread(fname,-1,&quot;string&quot;)<br> <br>  nfields = str_fields_count(data(11),&quot; &quot;)<br>  print(&quot;number of fields = &quot; + nfields)<br><br>  time := tofloat(str_get_field(data(tStrt:tLast:), 1,&quot; &quot;)) ;Time[min:sec]<br>  Geo  := tofloat(str_get_field(data(tStrt:tLast:), 2,&quot; &quot;))    ;P[hPa]       <br>  T    := tofloat(str_get_field(data(tStrt:tLast:), 3,&quot; &quot;))    ;T[C]     <br>  U    := tofloat(str_get_field(data(tStrt:tLast:), 4,&quot; &quot;))    ;U[%]    <br> <br> ; wks = gsn_open_wks(pltType,&quot;perfil_110215&quot;)         ; Open an ps workstation.<br>  wks = gsn_open_wks(pltType,&quot;perfil_110&quot;+a+&quot;15&quot;)         ; Open an ps workstation.<br>  a1 = gsn_xy(wks,T(:1100),Geo(:1100),False)               ; Draw an XY plot with 1 curve.<br>  a2 = gsn_xy(wks,U(:1100),Geo(:1100),False)               ; Draw an XY plot with 1 curve.<br> <br>  plot=(/a1,a2/)<br>  dims=(/1,2/)<br> <br>  gsn_panel(wks,plot,dims,False)<br>end do<br><br>  delete([/data, fname /]) <br> <br>  end <br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 10, 2016 at 11:46 AM, Theomar Trindade <span dir="ltr">&lt;<a href="mailto:theomar_trindade@hotmail.com" target="_blank">theomar_trindade@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Dear NCL users fellows,<br><br>I&#39;m trying to play a loop in my scipt:<br><br>----------------------------------------------------------------------------------------------------------------------------<br><i>load          &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br><br>begin<br><br>do a=1,6<br><br>  fname = &quot;/home/theomar/Documents/Theomar/GobleATTO15/2015110&quot;+a+&quot;1100.txt&quot;<br>  data  = asciiread(fname,-1,&quot;string&quot;)<br>  <br>  nfields = str_fields_count(data(11),&quot; &quot;)<br>  print(&quot;number of fields = &quot; + nfields)<br><br>  time = stringtofloat(str_get_field(data(11:2492:), 1,&quot; &quot;)) ;Time[min:sec] <br>  Geo = stringtofloat(str_get_field(data(11:2492:), 2,&quot; &quot;))    ;P[hPa]        <br>  T = stringtofloat(str_get_field(data(11:2492:), 3,&quot; &quot;))    ;T[C]          <br>  U = stringtofloat(str_get_field(data(11:2492:), 4,&quot; &quot;))    ;U[%]          <br> <br> ; wks = gsn_open_wks(&quot;pdf&quot;,&quot;perfil_110215&quot;)         ; Open an ps workstation.<br>  wks = gsn_open_wks(&quot;pdf&quot;,&quot;perfil_110&quot;+a+&quot;15&quot;)         ; Open an ps workstation.<br>  a1 = gsn_xy(wks,T(:1100),Geo(:1100),False)               ; Draw an XY plot with 1 curve.<br>  a2 = gsn_xy(wks,U(:1100),Geo(:1100),False)               ; Draw an XY plot with 1 curve. <br>  <br>  plot=(/a1,a2/)<br>  dims=(/1,2/)<br>  <br>  gsn_panel(wks,plot,dims,False)<br>  <br>  end do<br><br>  delete(data)<br>  delete(fname)<br>  <br>  end </i><br>----------------------------------------------------------------------------------------------------------------------------<br><br>As answer it gives to me the file <i>perfil_110&quot;+a+&quot;15 </i>with a=1 and the follow error:<br><br>fatal:Dimension sizes of left hand side and right hand side of assignment do not match<br>fatal:[&quot;Execute.c&quot;:8567]:Execute: Error occurred at or near line 12 in file perfil_v2.ncl<br><br>What am I doing wrong? If I write 2 instead <i>a</i> it runs normally.<br><br>Thanks,<br><a href="mailto:theomar.neves@cptec.inpe.br" target="_blank"></a>                                               </div></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>