Fill value problem?

From: Luo, Chao <chao.luo_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 28 2012 - 16:59:14 MDT

Hi,

I am trying to make contour plot. The variable range is from 1-10. Fillvalue=1e+20. Nothing was shown up over the plot except gray background. If I change Fillvalue = 0, still noth shown up, except white background. It seems the problem may be related with Fillvalue, but don't know how to fix it, any helps are very appreciated!

CL

Here is my simple script:

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
f = addfile("/data11/cluo/GAfire/NOAA_HMS/march_april/grib2/burned_area_20120316_18_23_12km.grib2","r")
x1 = f->VAR_2_4_3_P31_GLC0
; x1@_FillValue = 0.
x2 = x1
x2 = x1 * 12.
printMinMax (x2, True)

;*************create plots*******************
wks = gsn_open_wks ("ps", "ttt") ; open workstation
; gsn_define_colormap (wks,"gui_default") ; choose color map
gsn_define_colormap(wks,"BlAqGrYeOrRe") ; choose colormap
plot = new(4,graphic)

res = True ; plot mods desired for original grid
res@gsnDraw = False
res@gsnFrame = False

res@cnFillOn = True ; color fill
res@cnLinesOn = False ; no contour lines
res@gsnSpreadColors = True ; use total colormap
res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks
res@tmXTOn = False
res@gsnAddCyclic = False ; regional data
res@mpOutlineBoundarySets = "GeophysicalAndUSStates"
res@cnFillColors = (/ 0,5,10,20,30,40,50,65,75,85,96/)
res@tiMainString = "March 2012"
res@gsnLeftString = "correct fire count"
res@gsnRightString = "Aqua "
res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
res@cnLevels = (/1.,5.,10.,15.,20.,25.,30.,35,40/)

;res@mpLimitMode = "LatLon"
res@mpMinLonF = -135
res@mpMaxLonF = -60
res@mpMinLatF = 20
res@mpMaxLatF = 50
res@mpPerimOn = True
res@mpCenterLonF =-100
res@mpCenterLatF = 35

plot(0) = gsn_csm_contour_map_ce(wks,x2(::-1,:),res) ; Draw original grid on map

resP = True
resP@gsnPanelYWhiteSpacePercent = 5
resP@gsnPanelXWhiteSpacePercent = 5
resP@cnFillColors = (/ 0,5,10,20,30,40,50,65,75,85,96/)
resP@gsnMaximize = True
resP@lbLabelBarOn = True
resP@gsnPaperOrientation = "portrait"
resP@lbOrientation = "horizontal"
resP@lbLabelAutoStride = True ; nice label bar labels
resP@lbTitleOn = True
resP@lbLabelFont = "helvetica"
resP@lbTitlePosition = "Bottom"
resP@lbTitleFontHeightF = .012
resP@lbTitleDirection = "Across"
gsn_panel(wks,plot,(/2,2/),resP)
; frame(wks)
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Sep 29 00:59:23 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 02 2012 - 13:38:41 MDT