Hi there again,
I have sorted out the PLCHHQ error by copying .hluresfile to my home
directory, but now i am getting another error.
"Working on time: 2006-11-01_12:00:00
fatal:Undefined identifier: (wrf_map_overlays) is undefined, can't continue
fatal:Execute: Error occurred at or near line 122 in file wrf_Surface1.ncl"
Does somebody know what is this error and how to fix it? The ncl script
is attached.
I am on sun unix machine and using NCL version 5.0.0.
Thanks
-- --- Basit A. Khan PhD Candidate Centre for Atmospheric Research Department of Geography University of Canterbury Te Whare Wananga o Waitaha Private Bag 4800 Christchurch 8020, New Zealand Tel: (643) 364 2987 Ext. 7912 Fax: (643) 364 2907 bak41_at_student.canterbury.ac.nz
; Example script to produce plots for a WRF real-data run,
; with the ARW coordinate dynamics option.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("wrfout_d04_2006-11-01_12:00:00.nc","r")
; We generate plots, but what kind do we prefer?
; type = "x11"
; type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks("x11","wrf_Surface1")
; Set some basic resources
res = True
res_at_MainTitle = "REAL-TIME WRF"
pltres = True
mpres = True
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; What times and how many time steps are in the data set?
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do it = 0,ntimes-1,2 ; TIME LOOP
print("Working on time: " + times(it) )
res_at_TimeLabel = times(it) ; Set Valid time to use on plots
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
slp = wrf_user_getvar(a,"slp",it) ; slp
wrf_smooth_2d( slp, 3 ) ; smooth slp
if ( it .eq. 0 ) then
tc = wrf_user_getvar(a,"tc",it) ; 3D tc
td = wrf_user_getvar(a,"td",it) ; 3D td
u = wrf_user_getvar(a,"ua",it) ; 3D U at mass points
v = wrf_user_getvar(a,"va",it) ; 3D V at mass points
tc2 = tc(0,:,:) ; Use lowest T at time zero
td2 = td(0,:,:) ; Use lowest Td at time zero
u10 = u(0,:,:) ; Use lowest level at time 0
v10 = v(0,:,:)
else
tc2 = wrf_user_getvar(a,"T2",it) ; T2 in Kelvin
tc2 = tc2-273.16 ; T2 in C
td2 = wrf_user_getvar(a,"td2",it) ; Td2 in C
u10 = wrf_user_getvar(a,"U10",it) ; u at 10 m, mass point
v10 = wrf_user_getvar(a,"V10",it) ; v at 10 m, mass point
end if
tf2 = 1.8*tc2+32. ; Turn temperature into Fahrenheit
tf2_at_description = "Surface Temperature"
tf2_at_units = "F"
td_f = 1.8*td2+32. ; Turn temperature into Fahrenheit
td_f_at_description = "Surface Dew Point Temp"
td_f_at_units = "F"
u10 = u10*1.94386 ; Turn wind into knots
v10 = v10*1.94386
u10_at_units = "kts"
v10_at_units = "kts"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Plotting options for T
opts = res
opts_at_cnFillOn = True
opts_at_ContourParameters = (/ -20., 90., 5./)
opts_at_gsnSpreadColorEnd = -3 ; End third from the last color in color map
contour_tc = wrf_contour(a,wks,tf2,opts)
delete(opts)
; Plotting options for Td
opts = res
opts_at_cnFillOn = True
opts_at_cnLinesOn = True
opts_at_cnLineLabelsOn = True
opts_at_ContourParameters = (/ -20., 90., 5./)
opts_at_cnLineLabelBackgroundColor = -1
opts_at_gsnSpreadColorEnd = -3 ; End third from the last color in color map
contour_td = wrf_contour(a,wks,td_f,opts)
delete(opts)
; Plotting options for SLP
opts = res
opts_at_cnLineColor = "Blue"
opts_at_cnHighLabelsOn = True
opts_at_cnLowLabelsOn = True
opts_at_ContourParameters = (/ 900., 1100., 4. /)
opts_at_cnLineLabelBackgroundColor = -1
opts_at_gsnContourLineThicknessesScale = 2.0
contour_psl = wrf_contour(a,wks,slp,opts)
delete(opts)
; Plotting options for Wind Vectors
opts = res
opts_at_FieldTitle = "Wind" ; overwrite Field Title
opts_at_NumVectors = 47 ; density of wind barbs
vector = wrf_vector(a,wks,u10,v10,opts)
delete(opts)
; MAKE PLOTS
plot1 = wrf_map_overlays(a,wks,(/contour_tc,contour_psl,vector/),True,True)
plot1 = wrf_map_overlays(a,wks,(/contour_td,vector/),pltres,mpres)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end do ; END OF TIME LOOP
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 23 2008 - 01:20:38 MDT
This archive was generated by hypermail 2.2.0 : Fri May 23 2008 - 11:28:10 MDT