<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Toni,<div>Yes, there's a few ways you can go about it, but the one that gives you the most control is the tmXBMode/tmXBValues/tmXBLabels resources:</div><div><div> data_00&lon_zones@units = "degrees_east" ; needed to set units of lon_zones to get correct "W" labels</div><div> res@tmXBMode = "Explicit"</div><div> res@tmXBValues = ispan(-105,-95,1)</div><div> res@tmXBLabels = (/"105W","","103W","","101W","","99W","","97W","","95W"/)</div></div><div><br></div><div>See the bottom panel of example #2 here:</div><div><a href="http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex2">http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex2</a><br></div><div><br></div><div>Note that the values input to tmXBValues need to be within the range of the lon_zones coordinate variable values for the above to work. If I would have done this:</div><div>res@tmXBValues = ispan(255,265,1)<br></div><div>the tickmarks would not have been shown.</div><div><br></div><div>Hope that helps. If you have further questions let ncl-talk know.</div><div>Adam</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 31, 2018 at 5:22 PM Toni Klemm <<a href="mailto:toni-klemm@tamu.edu">toni-klemm@tamu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Adam,<div><br></div><div>Thanks a lot for explaining that, it worked!</div><div><br></div><div>Just one more thing. The spacing between numbers on the x axis is now so large that I only get a “100W” in the middle of my plot (which spans from 95 to 105 degrees West). Is there a way to adjust the spacing between numbers and tick marks to, say, 1 degree intervals? I know how to do it on the y axis (<font face="Courier">res@cnLevelSpacingF</font>), but I don’t see how to change it to work for the x axis, too.</div><div><br></div><div>Thank you again for your help!</div><div><br></div><div>Toni</div><div><br><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;line-break:after-white-space"><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br class="m_4004466831260591731Apple-interchange-newline"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><b>Toni Klemm, Ph.D.<br></b>Postdoctoral Research Associate</font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Ecosystem Science and Management</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">College of Agriculture and Life Sciences</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Texas A&M University, College Station, TX</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri">Contributor to the <a href="http://www.eccforum.org" target="_blank">Early Career Climate Forum</a><br><a href="http://www.toni-klemm.de" target="_blank">www.toni-klemm.de</a> | <a href="http://twitter.com/toniklemm" target="_blank">@toniklemm</a></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div></div></div><br class="m_4004466831260591731Apple-interchange-newline"></div><br class="m_4004466831260591731Apple-interchange-newline"></div><br class="m_4004466831260591731Apple-interchange-newline"></div><br class="m_4004466831260591731Apple-interchange-newline"><br class="m_4004466831260591731Apple-interchange-newline">
</div>
<div><br><blockquote type="cite"><div>On Aug 31, 2018, at 4:28 PM, Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>> wrote:</div><br class="m_4004466831260591731Apple-interchange-newline"><div><div dir="ltr" style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr"><div dir="ltr">Hi Toni,<div>Thanks for sending a clean script and the data file as that made diagnosing the issue easier. When you call the gsn_csm_hov plotting function and pass in your data array (in your script named data_00), NCL will look at the coordinate variables attached to the 2 dimensions for information on how to display the data. If NCL does not find any coordinate variables, it will label the corresponding axis starting at 0. Looking at your data_00 array:</div><div><div>Variable: data_00</div><div>Type: float</div><div>Total Size: 6800 bytes</div><div> 1700 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span style="white-space:pre-wrap"> </span>[year | 85] x [lon_zones | 20]</div><div>Coordinates: </div><div> year: [2015..2099]</div><div>Number Of Attributes: 3</div><div> units :<span style="white-space:pre-wrap"> </span>%</div><div> long_name :<span style="white-space:pre-wrap"> </span>Grassland percentage of total area in latitude zone 1</div><div> _FillValue :<span style="white-space:pre-wrap"> </span>9.96921e+36</div></div><div><br></div><div>The 1st dimension is shown as have a coordinate variable (named year), but the 2nd dimension does not. (Note that the second dimension is named lon_zones though.) To solve the problem you need to attach the lon_zones array from the input .nc file as a coordinate variable to your data_00 array:</div><div>data_00&lon_zones = MC2_f->lon_zones<br></div><div><br></div><div>If you have further questions let ncl-talk know.</div><div>Adam</div><div><br></div><div><br></div></div></div></div><br style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote" style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr">On Fri, Aug 31, 2018 at 3:15 PM Toni Klemm <<a href="mailto:toni-klemm@tamu.edu" target="_blank">toni-klemm@tamu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hello all,<div><br></div><div>I'm trying to plot a time series of data in the form of a Hovmueller plot. However, I have trouble adjusting the x axis such that it shows the range of longitudes correctly. Instead of the longitude range, -105 to -95 degrees East in 0.5 degrees increments, it shows a range from 0 to 18 on the x axis of the plot. Longitudes are included in the netCDF file as variable “lon_zones”. I tried to adjust the x axis range manually using <font face="Courier">res@trXMinF</font> and <font face="Courier">res@trXMaxF</font>, but I got this error message: </div><div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(43,102,201)"><span style="font-variant-ligatures:no-common-ligatures">warning:ContourPlotSetValues: X coordinates out of data range: defaulting</span></div></div><div><br></div><div>I used example 5 here (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ncl.ucar.edu_Applications_time-5Flon.shtml&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=VgThLzVijhWf-FblNez_y0LmBqtY9dHaMbJ3o1gCOkU&s=zJwsSMX3x66lHFdgGOdI10naJX7N1ScPJ0Shentz8p0&e=" target="_blank">https://www.ncl.ucar.edu/Applications/time_lon.shtml</a>) as a template, but I didn’t find an explanation for how the x axis shows longitudes there.</div><div><br></div><div>Any help would be much appreciated!<div><div><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div><font face="Calibri"><br></font></div><div><div>I attached the netCDF file, the plot, and my script. </div><div><br></div></div><div><font face="Calibri">Thank you,</font></div><div><font face="Calibri">Toni</font></div><div><font face="Calibri"><br></font></div></div></div></div></div></div></div></div></div><div><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;line-break:after-white-space"><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br class="m_4004466831260591731m_6451855782886598996Apple-interchange-newline"><br></font></div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><b>Toni Klemm, Ph.D.<br></b>Postdoctoral Research Associate</font></div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Ecosystem Science and Management</div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">College of Agriculture and Life Sciences</div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Texas A&M University, College Station, TX</div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri">Contributor to the <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.eccforum.org&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=VgThLzVijhWf-FblNez_y0LmBqtY9dHaMbJ3o1gCOkU&s=gppt_EbRFvdSA4qLiIQEHsei5NxmDtIsC71YGUDfO1k&e=" target="_blank">Early Career Climate Forum</a><br><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=VgThLzVijhWf-FblNez_y0LmBqtY9dHaMbJ3o1gCOkU&s=ESCx1g0uuNZA7maAaz9rjOLwzbRGQ7etUXx2FgDocPo&e=" target="_blank">www.toni-klemm.de</a> | <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_toniklemm&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=VgThLzVijhWf-FblNez_y0LmBqtY9dHaMbJ3o1gCOkU&s=gxXGitckavGUpEA7f8H7ItGPzw5DsZ9CXLsdCWoa7cY&e=" target="_blank">@toniklemm</a></font></div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div><div style="font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div></div></div></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div id="m_4004466831260591731m_6451855782886598996AppleMailSignature"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div id="m_4004466831260591731m_6451855782886598996AppleMailSignature"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"></div><br class="m_4004466831260591731m_6451855782886598996Apple-interchange-newline"></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"></div><br class="m_4004466831260591731m_6451855782886598996Apple-interchange-newline"><br class="m_4004466831260591731m_6451855782886598996Apple-interchange-newline"></div><br></div>_______________________________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=VgThLzVijhWf-FblNez_y0LmBqtY9dHaMbJ3o1gCOkU&s=z0KVxWJGAxDGnpKuj6kbEMjrjt_rO_V3JT3AIs3OR7E&e=" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></blockquote></div><br clear="all" style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br></div><span style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">--<span class="m_4004466831260591731Apple-converted-space"> </span></span><br style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="m_4004466831260591731gmail_signature" data-smartmail="gmail_signature" style="font-family:Calibri;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips<span class="m_4004466831260591731Apple-converted-space"> </span><br></font></span></div><span><font color="#888888">Associate Scientist, <span class="m_4004466831260591731Apple-converted-space"> </span></font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cgd.ucar.edu_staff_asphilli_&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=VgThLzVijhWf-FblNez_y0LmBqtY9dHaMbJ3o1gCOkU&s=DmU_yPWQcHL_D5CCJScnx6lbFU3MBkxpBJfU-MtXVk4&e=" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> <span class="m_4004466831260591731Apple-converted-space"> </span></font></span><span><font color="#888888">303-497-1726<span class="m_4004466831260591731Apple-converted-space"> </span></font></span></div></div></div></div></div></div></div></div></div></div></blockquote></div><br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>