<div dir="ltr"><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">    </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">        </span>%</div><div>  long_name :<span style="white-space:pre">       </span>Grassland percentage of total area in latitude zone 1</div><div>  _FillValue :<span style="white-space:pre">  </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><div class="gmail_quote"><div dir="ltr">On Fri, Aug 31, 2018 at 3:15 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">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://www.ncl.ucar.edu/Applications/time_lon.shtml" 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="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_6451855782886598996Apple-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></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div id="m_6451855782886598996AppleMailSignature"><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></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div id="m_6451855782886598996AppleMailSignature"><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><br class="m_6451855782886598996Apple-interchange-newline"></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><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><br class="m_6451855782886598996Apple-interchange-newline"><br class="m_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="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</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>