Anomalous White Space in Contour Plot

From: Kevin Reed <kareed_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 15 2010 - 12:26:11 MDT

Hi All,

I am using version 5.1.1. I have noticed an issue in contour
plotting. When I assign an array to a variables dimension those
contour plot has anomalous Whitespace (in random areas depending upon
the file). For example, if I comment out the lines:

;M!0 = "lev"
;M!1 = "lat"
;M!2 = "lon"
;M&lev = lev
;M&lat = lat
;M&lon = lon

The contour plot works great, but when the lines aren't commented out
there is anomalous Whitespace. See attached figure.

Thanks,

Kevin

;========================================================
; TC_cross_and_latlon.ncl: plots the PS, U, V, and T.
;========================================================
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;========================================================
begin
plot_type = "eps" ; plot types: ps,x11
plot_name = "control_low"
;========================================================
gdir = "/nfs/cjablono_ls/kareed/data/cam/fv_aquaplanet_0720x361L26/
Winter_2010/test183_250_20/"
in1 = addfile(gdir+"fv720x361L26.cam2.h0.0005-09-01-00000.nc","r")

;gdir = "/nfs/cjablono_ls/kareed/data/cam/fv_aquaplanet_1440x721L26/
Winter_2010/test01_250_20/"
;in1 = addfile(gdir+"fv1440x721L26.cam2.h0.0005-09-01-00000.nc","r")

lev = in1->lev
lat = in1->lat
lon = in1->lon
U = in1->U(0,:,:,:)
V = in1->V(0,:,:,:)
M = sqrt(U^2.d0+V^2.d0)
;========================================================
; Create plot
;========================================================
plot = new(1,graphic) ; creates 1 panel contour
plot
wks = gsn_open_wks(plot_type,plot_name) ; open a file
gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; choose colormap
;========================================================
;M!0 = "lev"
;M!1 = "lat"
;M!2 = "lon"
;M&lev = lev
;M&lat = lat
;M&lon = lon
;========================================================
; Create plot
;========================================================
cnres2 = True ; turn on contour
resources
cnres2@gsnDraw = False ; don't draw plot
cnres2@gsnFrame = False ; don't advance frame
cnres2@cnFillOn = True ; turn on color
cnres2@cnLinesOn = False ; turn off contour lines
cnres2@cnLineLabelsOn = False ; turn off line labels
cnres2@gsnSpreadColors = True ; use full colormap
cnres2@lbLabelBarOn = False ; turn off indiv.
label bars
cnres2@cnInfoLabelOn = False ; turn off info label
bar

plot = gsn_csm_contour(wks,M(dimsizes(lev)-1,:,:),cnres2)

;-------------------------------------------------------------------
panelres = True
panelres@gsnPaperOrientation = "portriat"
panelres@gsnPanelLabelBar = True
panelres@vpHeightF = 0.05 ; Height of labelbar
panelres@vpWidthF = 0.7 ; Width of labelbar
panelres@lbLabelFontHeightF = 0.012
panelres@lbLabelStride = 4
panelres@cnInfoLabelOn = True
panelres@lbTitleString = "Wind Speed (m/s)"
panelres@lbTitlePosition = "Bottom"
panelres@lbBoxLinesOn = False
panelres@lbAutoManage = False
panelres@lbTitleFontHeightF = 14
panelres@lbTopMarginF = 0.40

gsn_panel(wks,plot, (/1,1/),panelres)

;-----------------------------------------------------------
delete(plot)
delete(cnres2)
delete(panelres)
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Thu Apr 15 12:26:52 2010

This archive was generated by hypermail 2.1.8 : Fri Apr 16 2010 - 16:21:29 MDT