<div dir="ltr">Hi Franz,<div><br></div><div>Its very hard to say, particularly without seeing your <span style="font-size:13px">setPARFree_surf.ncl file.  I&#39;m confused as to why you load </span><span style="font-size:13px">setPARFree_surf.ncl each time through the do-loop, and I suspect that is the source of the problem.  I would suggest loading that script only once, prior to th do-loop, and pass in as arguments any folder-specific parameters.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Hope that helps...</span></div><div><span style="font-size:13px">Rick</span></div><div><span style="font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 17, 2015 at 3:03 AM, franz <span dir="ltr">&lt;<a href="mailto:f.trotta@sincem.unibo.it" target="_blank">f.trotta@sincem.unibo.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear ncl-team<br>
    I&#39;m using the ncl 6.1.2.<br>
    I&#39;m try to loads theNCL script “setPARFree_surf.ncl”<br>
    in my ncl program with loadscript<br>
<br>
    I need to compare different model contained in different folder and<br>
each one contain my setPARFree_surf.ncl script:<br>
    so I made a loop as in the following example but I got this error:<br>
<br>
fatal:syntax error: line 140 in file surfVSctd_multi.ncl before or near<br>
\n<br>
<br>
set_Surf(nmod,NAME_RUN,iverbose,scoastline,itype_bathy,lrun_pre,lrun_nemo,lrun_swan)<br>
------------------------------------------------------------------------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure<br>
fatal:Syntax Error in block, block not executed<br>
fatal:error at line 3643 in file surfVSctd_multi.ncl<br>
<br>
<br>
Any suggestion for this problem, I will apreciate it.<br>
Is there an alternative way to load scripts in NCL<br>
<br>
thank you<br>
Franz<br>
<br>
<br>
<br>
begin<br>
<br>
    ……<br>
<br>
    do idx1=0,4<br>
       idx=idx+1<br>
       print(BASE_DIR+&quot;/&quot;+ID_RUN)<br>
       if(idx.eq.0) then<br>
<br>
ID_RUN=&quot;seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr15th050dz28_turbPP00_spinup4&quot;<br>
       end if<br>
       if(idx.eq.1) then<br>
<br>
ID_RUN=&quot;seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr15th101dz28_turbPP00_spinup4&quot;<br>
       end if<br>
       if(idx.eq.2) then<br>
<br>
ID_RUN=&quot;seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr30th050dz28_turbPP00_spinup4&quot;<br>
       end if<br>
       if(idx.eq.3) then<br>
<br>
ID_RUN=&quot;seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr30th101dz28_turbGLS1_spinup4&quot;<br>
       end if<br>
       if(idx.eq.4) then<br>
<br>
ID_RUN=&quot;seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr30th101dz28_turbPP00_spinup4&quot;<br>
       end if<br>
<br>
       loadscript(BASE_DIR+&quot;/&quot;+ID_RUN+&quot;/setPARFree_surf.ncl&quot;)<br>
<br>
       print(&quot; &quot;)<br>
       print(&quot;    ===== SET INPUT SURF-PARAMETERs&quot;)<br>
       print(&quot;       ===== General Param.&quot;)<br>
<br>
       NAME_RUN    = new(1,string,&quot;&quot;)<br>
       nmod        = new(1,integer)<br>
       iverbose    = new(1,integer)<br>
       scoastline  = new(1,string,&quot;&quot;)<br>
       itype_bathy = new(1,integer)<br>
       lrun_pre    = new(1,logical)<br>
       lrun_nemo   = new(1,logical)<br>
       lrun_swan   = new(1,logical)<br>
<br>
set_Surf(nmod,NAME_RUN,iverbose,scoastline,itype_bathy,lrun_pre,lrun_nemo,lrun_swan)<br>
<br>
       inforun       = &quot;&quot;<br>
       ;<br>
    end do<br>
<br>
end<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>
</blockquote></div><br></div>