[ncl-talk] Syntax and Statement Error

Dennis Shea shea at ucar.edu
Wed Oct 21 12:02:40 MDT 2015


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
>


More information about the ncl-talk mailing list