Re: clmMonTLL () function in library

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon May 10 2010 - 12:27:51 MDT

You need to load "gsn_code.ncl" before "gsn_csm.ncl"

--Mary

On May 9, 2010, at 6:24 AM, gibies george wrote:

> Hello NCL users,
>
> I am new in NCL.
>
> I got some error messages while running my script.
>
> Script
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ;load "./csm/gsn_csm.ncl"
> ;load "./csm/gsn_code.ncl"
> ;load "./csm/contributed.ncl"
>
> begin
>
>
> fpath = systemfunc ("ls /gpfs2/home/kiran/freerun/t62/monthly/time_mean.*.nc")
>
> infile1= addfiles(fpath,"r")
>
> t=infile1[:]->temp(:,0,:,:)
>
> ;**************************
> ; use functions in contributed.ncl
> ;**************************
> clm = clmMonTLL (t) ; monthly climatology (12,nlat,mlon)
> std = stdMonTLL (t) ; stDev monthly means (12,nlat,mlon)
>
> ;**************************
> wks = gsn_open_wks("x11","proj")
> gsn_define_colormap(wks,"gui_default")
> res = True
> res@mpProjection = "CylindricalEquidistant"
> res@mpGridAndLimbOn = True ; turn on lat/lon lines
> res@mpPerimOn = False ; turn off box around plot
> res@mpGridLatSpacingF = 30. ; spacing for lat lines
> res@mpGridLonSpacingF = 30. ; spacing for lon lines
> res@mpFillOn = False
>
> res@cnFillOn = True ; color plot desired
> res@cnLineLabelsOn = False ; turn off contour lines
> res@txFontHeightF = 0.015
>
> res@vpXF = 0.1 ; make plot bigger
> res@vpYF = 0.9
> res@vpWidthF = 0.8
> res@vpHeightF = 0.8
>
> res@gsnSpreadColors = True ; use full range of color map
> res@gsnSpreadColorStart = 2
> res@gsnSpreadColorEnd = -3
> res@lbLabelFontHeightF = 0.015 ; label bar font height
>
> res@tiMainString = "CFS 100 year freerun output in IITM"
> res@tiMainFontHeightF = .018 ; font height
>
> contour = gsn_csm_contour_map(wks,clm,res)
>
> end
>
>
> I got a series of error messages as follows
>
> .............................
> ............................
> ...........................
> fatal:syntax error: possibly an undefined procedure
> fatal:Syntax Error in block, block not executed
> fatal:error at line 9455 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>
> fatal:syntax error: line 9507 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl before or near \n
> gsnp_write_debug_info(u,v,data,"gsn_csm_vector_scalar_map_other",res2,3)
> ....................................
> ....................................
> .....................................
>
> Can anybody please point out the reason for the error message.
>
>
>
> The following script (using gsn_csm_contour_map()) is working Properly
>
> 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
>
>
> fpath = systemfunc ("ls /gpfs2/home/kiran/freerun/t62/monthly/time_mean.200001.n
> c")
>
> infile1= addfiles(fpath,"r")
>
> t=infile1[:]->temp(0,0,:,:)
>
> wks = gsn_open_wks("x11","proj")
> gsn_define_colormap(wks,"gui_default")
> res = True
> res@mpProjection = "CylindricalEquidistant"
> res@mpGridAndLimbOn = True ; turn on lat/lon lines
> res@mpPerimOn = False ; turn off box around plot
> res@mpGridLatSpacingF = 30. ; spacing for lat lines
> res@mpGridLonSpacingF = 30. ; spacing for lon lines
> res@mpFillOn = False
>
> res@cnFillOn = True ; color plot desired
> res@cnLineLabelsOn = False ; turn off contour lines
> res@txFontHeightF = 0.015
>
> res@vpXF = 0.1 ; make plot bigger
> res@vpYF = 0.9
> res@vpWidthF = 0.8
> res@vpHeightF = 0.8
>
> res@gsnSpreadColors = True ; use full range of color map
> res@gsnSpreadColorStart = 2
> res@gsnSpreadColorEnd = -3
> res@lbLabelFontHeightF = 0.015 ; label bar font height
>
> res@tiMainString = "CFS 100 year freerun output in IITM"
> res@tiMainFontHeightF = .018 ; font height
>
> contour = gsn_csm_contour_map(wks,t,res)
>
> end
>
>
> Thanking you in advance,
>
>
> Gibies George,CSIR-RF,
> Climate and Global Modelling Division,
> Indian Institute of Tropical Meteorology,
> Dr. Homi Bhabha Road,
> NCL (P. O.), Pashan,
> Pune 411008
>
> http://sites.google.com/site/gibiesge/
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 10 12:28:00 2010

This archive was generated by hypermail 2.1.8 : Thu May 13 2010 - 10:03:00 MDT