<div dir="ltr"><div>Please read the two links below.  You have to define the coordinates of the data, as detailed in the first link.  Then overlay the contours on the map, can be done through the function in the 2nd link. </div><div><br></div><div><a href="https://www.ncl.ucar.edu/Document/Graphics/overlays_on_map.shtml">https://www.ncl.ucar.edu/Document/Graphics/overlays_on_map.shtml</a><br></div><div><br></div><a href="https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml">https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml</a><div><br></div><div>Good luck.  <br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 4, 2015 at 12:41 PM, Jiang, Lifen <span dir="ltr">&lt;<a href="mailto:lfjiang@ou.edu" target="_blank">lfjiang@ou.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Times New Roman;color:#000000;font-size:12pt">
Hi Dennis, Rick and Mary,
<div><br>
</div>
<div>Sorry, I was using 6.0.0. I ran it aagin in 6.2.1 and got a figure like in &quot;Plot_Diff&quot;. But I would like to see a figure like in &quot;Map&quot;. Could you please give me more help?</div>
<div><br>
</div>
<div>
<div>Thank you for telling me my mistake.</div>
<div><br>
</div>
<div>Lifen<br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma">
<div style="font-family:Tahoma">
<div style="font-family:Tahoma">
<div>
<div>
<p class="MsoNormal"><span style="color:#a7bce3">______________________________</span></p>
<p class="MsoNormal" style="margin:0in 0in 0pt;font-family:&#39;Times New Roman&#39;;background-color:rgb(255,255,255);text-align:justify">
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>From:</b> Dennis Shea [<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>]<br>
<b>Sent:</b> Wednesday, March 04, 2015 10:48 AM<br>
<b>To:</b> Jiang, Lifen<br>
<b>Cc:</b> Mary Haley; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><div><div class="h5"><br>
<b>Subject:</b> Re: [ncl-talk] White for zero in a map<br>
</div></div></font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">
<div>What version of NCL are you using?<br>
<br>
<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/span_color_indexes.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/span_color_indexes.shtml</a><br>
<br>
</div>
indicates that  this function is &quot;<i>Available in <a href="https://www.ncl.ucar.edu/prev_releases.shtml#6.2.0" target="_blank">
version 6.2.0</a> and later.&quot;<br>
<br>
<br>
</i></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Mar 4, 2015 at 9:38 AM, Jiang, Lifen <span dir="ltr">
&lt;<a href="mailto:lfjiang@ou.edu" target="_blank">lfjiang@ou.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Times New Roman;color:#000000;font-size:12pt">
Hi Mary,
<div><br>
</div>
<div>Thank you very much for writing the script for me! But it showed below error when I ran it. I have attached the script and my data file again. It will be helpful if you or anybody else can help tell the problem.</div>
<div><br>
</div>
<div><span style="font-size:12pt">fatal:Undefined identifier: (span_color_indexes) is undefined, can&#39;t continue</span></div>
<div>
<div>fatal:Execute: Error occurred at or near line 23 in file diff_test.ncl</div>
<div><br>
</div>
<div>Thanks again,</div>
<div><br>
</div>
<div>Lifen </div>
<div>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma">
<div style="font-family:Tahoma">
<div style="font-family:Tahoma">
<div>
<div>
<p class="MsoNormal"><span style="color:#a7bce3">______________________________</span></p>
<p class="MsoNormal" style="margin:0in 0in 0pt;font-family:&#39;Times New Roman&#39;;background-color:rgb(255,255,255);text-align:justify">
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>From:</b> Mary Haley [<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>]<br>
<b>Sent:</b> Tuesday, March 03, 2015 3:29 PM<br>
<b>To:</b> Jiang, Lifen<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] White for zero in a map<br>
</font><br>
</div>
<div>
<div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">There are many ways you can do this.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">I&#39;ve attached a script that does this by using the cnFillColors resource to specify a list of color indexes into the &quot;rainbow&quot; color map, but then I changed the color index that represents level 0.0 to be 0
 (the background color, and therefore white).</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">--Mary</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Mar 1, 2015 at 3:01 PM, Jiang, Lifen <span dir="ltr">
&lt;<a href="mailto:lfjiang@ou.edu" target="_blank">lfjiang@ou.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<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><span style="font-family:宋体">;************************************************<br>
load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;   <br>
load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;  <br>
load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;  <br>
<br>
begin<br>
<br>
  in = addfile(&quot;Diff.nc&quot;,&quot;r&quot;)<br>
  t  = in-&gt;Diff<br>
  t@_FillValue  = -999<br>
  t@missing_value = t@_FillValue<br>
<br>
  printVarSummary(t)<br>
<br>
  wks = gsn_open_wks(&quot;png&quot; ,&quot;Plot_Diff&quot;)                ; <br>
  gsn_define_colormap(wks,&quot;rainbow&quot;)        ; 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 = &quot;Always&quot;; 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=&quot;LatLon&quot; 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 = &quot;ManualLevels&quot;<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>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>
</div>

<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>