Hi Anil,
The only thing I see is that you have a double / in your first two load
statments:
load "/usr/local//lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "/usr/local//lib/ncarg/nclscripts/csm/gsn_csm.ncl"
Also, make sure you have at least one blank line below the end statement
at the bottom of your script.
Good luck,
Adam
anil rohilla wrote:
> dear users, I am trying to run the NCL on windows using cygwyn . I am
> able to run the scripts which are in ncl directory. But when i am
> trying to change the file name with my file it is giving this error
>
>
> .. Copyright (C) 1995-2006 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 4.2.0.a033
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> fatal:syntax error: line 1 in file c2.ncl before or near {
> {
> ^
>
>
> fatal:error in statement
> fatal:syntax error: line 40 in file c2.ncl before or near res
> res
> ----^
>
>
> fatal:syntax error: line 45 in file c2.ncl before or near end
> end
> --^
>
>
> fatal:error in statement
> fatal:syntax error: line 49 in file c2.ncl before or near
>
> ^
>
>
>
>
> my file c2.ncl is enclosed here
> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "/usr/local//lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/usr/local//lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ;load "gsn_code.ncl"
> ;load "gsn_csm.ncl"
> begin
>
> ;********************************************************
> ; open file
> ;********************************************************
>
> f = addfile("/home/anil
> kumar/bets-new/wrfout_d01_2006-07-01_09_00_00.nc", "r")
>
> ;********************************************************
> ; Read character variable Times
> ; Convert to type string for plotting purposes
> ;********************************************************
> times = chartostring(f->Times) ; built-in function
>
> ;********************************************************
> ; Read Pressure at Time=12, level=0, convert to hPa
> ;********************************************************
> p = f->P(9,0,:,:) ; import data + meta info
> p = p*0.01 ; demo: convert to hPa
> p_at_units = "hPa" ; update units attribute
>
> ;********************************************************
> ; create plots
> ;********************************************************
> wks = gsn_open_wks("X11" ,"WRF_cn") ; ps,pdf,x11,ncgm,eps
> gsn_define_colormap(wks,"BlAqGrYeOrReVi200"); select color map
>
> res = True ; plot mods desired
> res_at_gsnMaximize = True ; uncomment to maximize size
> res_at_tiMainString = times(9) ; main title
> plot = gsn_csm_contour(wks,p,res)
>
> res_at_cnFillOn = True ; turn on color
> res_at_cnLinesOn = False ; turn contour lines
> res_at_gsnSpreadColors = True ; use entire color map
> res_at_lbLabelAutoStride = True ; let NCL determine label
> spacing
> plot = gsn_csm_contour(wks,p,res)
> end
>
> ----------------------------------------------------------------------------------------------------------\
>
>
> What are the possible errors,
> I am trying to run the NCL on windows first timme . Any help is much
> appriciated
>
>
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Aug 21 2006 - 10:04:59 MDT
This archive was generated by hypermail 2.2.0 : Mon Aug 21 2006 - 11:34:40 MDT