[ncl-talk] problem with loadscript

franz f.trotta at sincem.unibo.it
Thu Sep 17 03:03:48 MDT 2015


Dear ncl-team
    I'm using the ncl 6.1.2.
    I'm try to loads theNCL script “setPARFree_surf.ncl”
    in my ncl program with loadscript

    I need to compare different model contained in different folder and 
each one contain my setPARFree_surf.ncl script:
    so I made a loop as in the following example but I got this error:

fatal:syntax error: line 140 in file surfVSctd_multi.ncl before or near 
\n
    
set_Surf(nmod,NAME_RUN,iverbose,scoastline,itype_bathy,lrun_pre,lrun_nemo,lrun_swan)
------------------------------------------------------------------------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 3643 in file surfVSctd_multi.ncl


Any suggestion for this problem, I will apreciate it.
Is there an alternative way to load scripts in NCL

thank you
Franz



begin

    ……

    do idx1=0,4
       idx=idx+1
       print(BASE_DIR+"/"+ID_RUN)
       if(idx.eq.0) then
          
ID_RUN="seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr15th050dz28_turbPP00_spinup4"
       end if
       if(idx.eq.1) then
          
ID_RUN="seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr15th101dz28_turbPP00_spinup4"
       end if
       if(idx.eq.2) then
          
ID_RUN="seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr30th050dz28_turbPP00_spinup4"
       end if
       if(idx.eq.3) then
          
ID_RUN="seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr30th101dz28_turbGLS1_spinup4"
       end if
       if(idx.eq.4) then
          
ID_RUN="seriousGame_1nest_oceMFSs4e_atmECMWF125_20140517_z053cr30th101dz28_turbPP00_spinup4"
       end if

       loadscript(BASE_DIR+"/"+ID_RUN+"/setPARFree_surf.ncl")

       print(" ")
       print("    ===== SET INPUT SURF-PARAMETERs")
       print("       ===== General Param.")

       NAME_RUN    = new(1,string,"")
       nmod        = new(1,integer)
       iverbose    = new(1,integer)
       scoastline  = new(1,string,"")
       itype_bathy = new(1,integer)
       lrun_pre    = new(1,logical)
       lrun_nemo   = new(1,logical)
       lrun_swan   = new(1,logical)
       
set_Surf(nmod,NAME_RUN,iverbose,scoastline,itype_bathy,lrun_pre,lrun_nemo,lrun_swan)

       inforun       = ""
       ;
    end do

end


More information about the ncl-talk mailing list