[ncl-talk] load scripts in multiple NCLfiles program

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Fri Nov 28 13:41:53 MST 2014


Franz,

I think in your case, the solution may be as simple as loading script2.ncl
before script1.ncl.

My understanding is that in NCL, each function must be defined or "loaded"
before it is referenced.  This is a simplification of what Dennis said.  So
if you have a function in script2.ncl that is called somewhere in
script1.ncl, then script2.ncl must be loaded before script1.ncl.

--Dave

On Fri, Nov 28, 2014 at 8:30 AM, franz <f.trotta at sincem.unibo.it> wrote:

> Dear Ncl,
>     I have written a multi file program in NCL,
>     There is a main script  'main.ncl' which is a entry point of the code
>     in this file I load external scripts (where there are several utility
> function/procdure. lets call script1.ncl and script2.ncl )
>
>      I have a problem when in one of this external script (script1.ncl) I
> call a procedure
>      which is defined in an other external script (scrip2.ncl)
>
>      fatal:syntax error: line 196 in file ./script1.ncl before or near \n
>
> tempe_myOc,saline_myOc,ssh_myOc,glAttr_description)
>
> --------------------------------------------------------------------------------^
>
> fatal:syntax error: possibly an undefined procedure
>
>
>      How can I solve this problem?
>
> thanks
> Francesco T.
> _______________________________________________
> ncl-talk mailing list
> 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/20141128/705a5aea/attachment.html 


More information about the ncl-talk mailing list