Hi,
We are trying to make a lidar figure by plotting the data in x and z
coordinates (given by sfXArray and sfYArray). But we are facing some
problems, and we were wondering whether you could help us:
1) If we use 'gsn_csm_contour', it doesn't plot.
2) If we use 'gsn_contour', it plots, but without the axis, just the
contours and nothing else
I have attached the netcdf file here and the ncl script is below.
We thank you in advance!
Regards,
Michel
;*************************************************
; lidar_dataDLR.ncl
;************************************************
load "/usr/share/ncarg/nclscripts/csm/gsn_code.ncl"
load "/usr/share/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/usr/share/ncarg/nclscripts/csm/contributed.ncl"
;************************************************
begin
;************************************************
; read in netCDF file
;************************************************
a = addfile("LidarDLR_gap.nc","r")
;************************************************
; read in wind speed and direction
;************************************************
speed = a ->speed(:,:)
h_dist = a ->h_dist(:,:)
v_dist = a ->v_dist(:,:)
; printVarSummary(speed)
; printVarSummary(h_dist)
; printVarSummary(v_dist)
if (any(isnan_ieee(speed))) then
value = -999.
replace_ieeenan (speed, value, 0)
speed@_FillValue = value
end if
;speed!0 = "h_dist";
;speed!1 = "v_dist";
; printVarSummary(speed)
wks = gsn_open_wks("X11","GAP-flow") ; open a ps file
gsn_define_colormap(wks,"rainbow") ; choose a colormap
res = True ; plot mods desired
; res_at_gsnDraw = False ; don't draw yet
; res_at_gsnFrame = False ; don't advance frame yet
res_at_cnFillOn = True ; turn on color
res_at_gsnSpreadColors = True ; use full range of colormap
res_at_sfXArray = v_dist ; assign lat/lon
res_at_sfYArray = h_dist
; res_at_vpXF = 0.15 ; x location
; res_at_vpYF = 0.90 ; y location
; res_at_vpWidthF = 0.7 ; width
; res_at_vpHeightF = 0.40 ; height
; res_at_gsnSpreadColors = True ; use full range of colors
plot = gsn_csm_contour(wks,speed,res) ; contour the variable
;draw(plot)
;frame(wks)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Thu Jun 11 2009 - 14:54:53 MDT