[ncl-talk] Syntax and Statement Error

Mary Haley haley at ucar.edu
Wed Oct 21 15:54:15 MDT 2015


For future reference, if you get an NCL error that you don't understand,
you can look it up here:

http://www.ncl.ucar.edu/Document/Language/error_messages.shtml

There are other types of errors, and their fixes, mentioned here as well:

http://www.ncl.ucar.edu/Document/Language/error_messages.shtml


On Wed, Oct 21, 2015 at 12:02 PM, Dennis Shea <shea at ucar.edu> wrote:

> Whenever you encounter:
>
> ===================
> fatal:syntax error: line 142 in file wrf_gsn_5.ncl before or near \n
> end
> ---^
>
> fatal:error in statement
> fatal:syntax error: line -1 before or near
> ===================
>
> it means a block is not properly terminated.
>
> In this case there is a 'do loop' but no 'end do'
>
>  do it = 0,ntimes-1,2             ; TIME LOOP
>
>  end do     ; end 'it' loop
>
> I would also suggest replacing
>
> wks = gsn_open_wks("ps","wrf_gsn")
>
> with
>
> wks = gsn_open_wks("ps","wrf_gsn_"+sprinti("%0.2i", it))
>
> On Wed, Oct 21, 2015 at 10:22 AM, Mansur Ali Jisan
> <jisan.mansur at gmail.com> wrote:
> > Hi,
> >
> > I am trying to run the attached script which I downloaded from NCL's
> > website. While running it, it's showing the following error messages:
> >
> > [mjisan at frisco tmp]$ ncl wrf_gsn_5.ncl
> >  Copyright (C) 1995-2014 - All Rights Reserved
> >  University Corporation for Atmospheric Research
> >  NCAR Command Language Version 6.2.0
> >  The use of this software is governed by a License Agreement.
> >  See http://www.ncl.ucar.edu/ for more details.
> > fatal:syntax error: line 142 in file wrf_gsn_5.ncl before or near \n
> > end
> > ---^
> >
> > fatal:error in statement
> > fatal:syntax error: line -1 before or near
> >
> > ^
> >
> > fatal:error in statement
> >
> > I have tried my best to solve this but as a new user with less
> experiences,
> > I couldn't able to solve that. Looking forward to hear from you.
> >
> > Regards,
> > Mansur.
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> _______________________________________________
> 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/20151021/bdd6cf2a/attachment.html 


More information about the ncl-talk mailing list