Syntax error at end of NCL script

From: A.J. Eiserloh <arthur.eiserloh_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 25 2014 - 11:29:18 MST

Hi,

I am getting a strange syntax error at the end of my NCL script that I have
never gotten before. It will not allow me to move forward with the script
no matter how many times I try to modify it.

I get the errors:

fatal:syntax error: line 45 in file test1.ncl before or near \n
end
---^

fatal:error in statement
fatal:syntax error: line -1 before or near

^

fatal:error in statement

Here is my script:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin

runs = (/"ctrl","sn1","n2","n3","3dvar_t1","3dvar_t2","3dvar_t3"/)
nr = dimsizes(runs)

; 0 1 2 3 4 5 6 7 8 9 10
   11 12
sites = (/"czc","hld","lsn","rod","sth","str","ptv","wls"/)
           ;NORTH COAST
;
;sites =
(/"ata","bbd","blu","cfx","cmn","cnh","fhl","gks","hys","ndn","ocr","ovl","spd"/)
;windward sierra (13)

ns = dimsizes(sites)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; GET REAL PRECIP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

pp_real=new((/ns,139/),"float")
s=0

  if (sites(s).eq. "ata".or."cmn".or."cnh".or."ocr") then
    col = 8
  else if (sites(s) .eq. "hld".or."lsn".or."ndn".or."wls") then
    col = 9
  else if (sites(s) .eq. "gks") then
    col = 11
  else if (sites(s) .eq. "sth".or."str") then
    col = 13
  else if (sites(s) .eq. "blu".or."spd") then
    col = 14
  else if (sites(s) .eq. "bbd".or."czc".or."fhl") then
    col = 15
  end if

  jd=333
  h=0
  filename =
"/home/eiserloh/Research/AR/PSD/metar/"+sites(s)+"/"+sites(s)+"12"+tostring(jd)+"."+sprinti("%0.2i",h)+".m"
  data = readAsciiTable(filename,1,"string",0)
  print(data)
  dims = dimsizes(data)
  print(dims)
end

The end of my script looks fine. Would anyone happen know why it is telling
me this?

-- 
Arthur J. Eiserloh, Jr.
San Jose State University
Graduate Student
Dept. of Meteorology and Climate Science

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 25 11:29:31 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST