<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'>Dear NCL users fellows,<br><br>I'm trying to play a loop in my scipt:<br><br>----------------------------------------------------------------------------------------------------------------------------<br><i>load&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br><br>begin<br><br>do a=1,6<br><br>&nbsp; fname = "/home/theomar/Documents/Theomar/GobleATTO15/2015110"+a+"1100.txt"<br>&nbsp; data&nbsp; = asciiread(fname,-1,"string")<br>&nbsp; <br>&nbsp; nfields = str_fields_count(data(11)," ")<br>&nbsp; print("number of fields = " + nfields)<br><br>&nbsp; time = stringtofloat(str_get_field(data(11:2492:), 1," ")) ;Time[min:sec] <br>&nbsp; Geo = stringtofloat(str_get_field(data(11:2492:), 2," "))&nbsp;&nbsp;&nbsp; ;P[hPa]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp; T = stringtofloat(str_get_field(data(11:2492:), 3," "))&nbsp;&nbsp;&nbsp; ;T[C]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp; U = stringtofloat(str_get_field(data(11:2492:), 4," "))&nbsp;&nbsp;&nbsp; ;U[%]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;<br>&nbsp;; wks = gsn_open_wks("pdf","perfil_110215")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Open an ps workstation.<br>&nbsp; wks = gsn_open_wks("pdf","perfil_110"+a+"15")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Open an ps workstation.<br>&nbsp; a1 = gsn_xy(wks,T(:1100),Geo(:1100),False)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Draw an XY plot with 1 curve.<br>&nbsp; a2 = gsn_xy(wks,U(:1100),Geo(:1100),False)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Draw an XY plot with 1 curve. <br>&nbsp; <br>&nbsp; plot=(/a1,a2/)<br>&nbsp; dims=(/1,2/)<br>&nbsp; <br>&nbsp; gsn_panel(wks,plot,dims,False)<br>&nbsp; <br>&nbsp; end do<br><br>&nbsp; delete(data)<br>&nbsp; delete(fname)<br>&nbsp; <br>&nbsp; end </i><br>----------------------------------------------------------------------------------------------------------------------------<br><br>As answer it gives to me the file <i>perfil_110"+a+"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:["Execute.c":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"></a>                                               </div></body>
</html>