<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Times New Roman;color: #000000;font-size: 12pt;">
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div>
<div class="gmail_extra">Hello, </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">I was trying to create a map of the attached variable. The min and and max are -14 and 18, respectively.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">I would like to set white for zero, but could not work out how to make it. Script is at the end of this email.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Could anybody help with my issue?</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">I appreciate your time and help!</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Thanks,</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Lifen</div>
<div class="gmail_extra"><br>
</div>
<p class="MsoPlainText"><span style="font-family:宋体;mso-bidi-font-family:宋体">;************************************************<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" <br>
<br>
begin<br>
<br>
in = addfile("Diff.nc","r")<br>
t = in->Diff<br>
t@_FillValue = -999<br>
t@missing_value = t@_FillValue<br>
<br>
printVarSummary(t)<br>
<br>
wks = gsn_open_wks("png" ,"Plot_Diff") ; <br>
gsn_define_colormap(wks,"rainbow") ; choose colormap<br>
<br>
res = True ; plot mods desired<br>
<br>
res@cnFillOn = True ; turn on color fill<br>
res@cnLinesOn = False ; turn off contour lines<br>
res@cnLevelSpacingF = 3 ; contour spacing<br>
<br>
;---This resource not needed in NCL V6.1.0<br>
res@gsnSpreadColors = True ; use full range of color map<br>
<br>
res@lbLabelStride = 1<br>
<br>
res@pmTickMarkDisplayMode = "Always"; use NCL default lat/lon labels<br>
<br>
res@gsnAddCyclic = False ; data already has cyclic point<br>
; this must also be set for any zoom<br>
<br>
; note that the gsn_csm_*map_ce templates automatically set <br>
; res@mpLimitMode="LatLon" for you. If you are plotting a different projection,<br>
; you may have to set this resource.<br>
<br>
res@mpMinLatF = -90 ; range to zoom in on<br>
res@mpMaxLatF = 90<br>
res@mpMinLonF = -180<br>
res@mpMaxLonF = 180<br>
<br>
res@cnLevelSelectionMode = "ManualLevels"<br>
res@cnMinLevelValF = -15<br>
res@cnMaxLevelValF = 20<br>
<br>
plot = gsn_csm_contour_map_ce(wks,t({-90:90},{-180:180}), res)<br>
<br>
</span></p>
<div class="gmail_extra"><span style="font-family: 宋体;">end</span> </div>
</div>
</div>
</div>
</body>
</html>