Re: (no subject)

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri, 27 Mar 2009 11:56:40 -0600

Hi Moti,
When running a NCL script, you should type:
ncl scriptname.ncl

Or in your case:
ncl exam1

If that doesn't fix your issue let us know.
Best regards,
Adam

Mittal, Moti wrote:
> I am a new user of NCL and is at the learning stage.
> I have installed ncl 5.1.0 successfully and have checked with ng4ex gsun01n.
> I am trying to learn to use NCL for WRF output.
> I tried to use the following script:
>
> 1 ;********************************************************
> 2 ; WRF: simple plane view of the pressure field
> 3 ; at a specific time and level. No map background.
> 4 ;********************************************************
> 5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> 6 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> 7 begin
> 8 ;********************************************************
> 9 ; open file
> 10 ;********************************************************
> 11 f = addfile ("wrfout_d01_2007-01-31_12.nc", "r")
> 12
> 13 ;********************************************************
> 14 ; Read character variable Times
> 15 ; Convert to type string for plotting purposes
> 16 ;********************************************************
> 17 times = chartostring(f->Times) ; built-in function
> 18
> 19 ;********************************************************
> 20 ; Read Pressure at Time=12, level=0, convert to hPa
> 21 ;********************************************************
> 22 p = f->P(12,0,:,:) ; import data + meta info
> 23 p = p*0.01 ; demo: convert to hPa
> 24 p_at_units = "hPa" ; update units attribute
> 25
> 26 ;********************************************************
> 27 ; create plots
> 28 ;********************************************************
> 29 wks = gsn_open_wks("ps" ,"WRF_cn") ; ps,pdf,x11,ncgm,eps
> 30 gsn_define_colormap(wks,"BlAqGrYeOrReVi200"); select color map
> 31
> 32 res = True ; plot mods desired
> 33 ;;res_at_gsnMaximize = True ; uncomment to maximize
> 34 size
> 35 res_at_tiMainString = times(12) ; main title
> 36 plot = gsn_csm_contour(wks,p,res)
> 37
> 38 res_at_cnFillOn = True ; turn on color
> 39 res_at_cnLinesOn = False ; turn contour lines
> 40 res_at_gsnSpreadColors = True ; use entire color map
> 41 res_at_lbLabelAutoStride = True ; let NCL determine label
> 42 spacing
> 43 plot = gsn_csm_contour(wks,p,res)
> 44 end
> 45
>
> but I am getting the error
> [mmittal_at_localhost ~/NCL]$ ./exam1
> ./exam1: line 1: syntax error near unexpected token `;'
> ./exam1: line 1: `;********************************************************'
>
> I am using cshell. Script is the file exam1 and does not have line numbers.
>
> What am I missing?
>
> Thank you for your help.
>
> Moti Mittal
> Professor, Department of Environment and Occupational Health
> College of Public Health
> University of South Florida
> 13201 Bruce B. Downs Blvd., MDC56
> Tampa, Fl 33612-3805
>
> Tel: (813) 974-9571
> Fax: (813) 974-4986
> Email: mmittal_at_health.usf.edu
> ________________________________________
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
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
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 27 2009 - 11:56:40 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 06 2009 - 10:23:30 MDT