[ncl-talk] problem with loadscript
Rick Brownrigg
brownrig at ucar.edu
Thu Sep 17 06:18:56 MDT 2015
Hi Franz,
Its very hard to say, particularly without seeing your setPARFree_surf.ncl
file. I'm confused as to why you load 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.
Hope that helps...
Rick
On Thu, Sep 17, 2015 at 3:03 AM, franz <f.trotta at sincem.unibo.it> wrote:
> 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
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150917/b95c4b42/attachment.html
More information about the ncl-talk
mailing list