<div dir="ltr">Hello Arindam, <div><br></div><div>Thank you for the suggestion. I found that converting ts_10&DateTime from "yyyymmddhh" to "hours since 2008-11-01 00:00:00" using <a href="http://www.ncl.ucar.edu/Document/Functions/WRF_contributed/wrf_times_c.shtml">wrf_times_c</a> and option 0 helped the labels to appear correctly on the x-axis. </div>
<div><br></div><div>Cheers, </div><div><br></div><div>Liz.</div><div><br></div>
<div><br>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 5:36 AM, Arindam Chakraborty <span dir="ltr"><<a href="mailto:arch13@gmail.com" target="_blank">arch13@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">HI,<div> Unless ts_10&DateTime has a "units" attribute, time_axis_label cannot convert the YYYYMMDD format to proper time format. You may need to create a time array using cd_inv_calendar() and send that to time_axis_label().</div>
<div><br></div><div>regards,</div><div class="gmail_extra"><div><span style="background-color:rgb(255,255,255)"><font><div><font>--</font></div><b>Arindam Chakraborty</b></font><br><font size="1">CAOS, IISc, Bangalore-12</font></span><b style="color:rgb(51,51,255)"><br>
</b></div>
<br><br><div class="gmail_quote"><div><div class="h5">On Wed, Jul 23, 2014 at 4:13 AM, Elizabeth Burakowski <span dir="ltr"><<a href="mailto:burakows@ucar.edu" target="_blank">burakows@ucar.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">Hello, <div><br></div><div>I am trying to use time_axis_labels to produce x-axis labels in a YYYYMMDD format for the bottom axis of 10 attached plots. I am using <a href="https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml" target="_blank">example 6</a> on the time_axis_labels page. </div>
<div><br></div><div>When I run my script, I do not receive any errors, however, I also do not see any x-axis labels on my plot. The relevant portions of my script are below. I can send along the full script if needed but I believe the below contains the relevant portions for sake of keeping it short. <br>
</div><div><br></div><div>Thanks, </div><div><br></div><div>Liz.</div><div><br></div><div><br></div><div>t = ispan(0,1447,1)</div><div><br></div><div>printVarSummary(ts_10)</div><div><div>Variable: ts_10</div><div>Type: float</div>
<div>Total Size: 23168 bytes</div><div> 5792 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[4] x [DateTime | 1448]</div><div>
Coordinates: </div><div> DateTime: [2008110100..2009043021]</div><div>Number Of Attributes: 1</div><div> _FillValue :<span style="white-space:pre-wrap">        </span>9.96921e+36</div></div><div><br>
</div><div>wks = gsn_open_wks("ps","WRF_ts_CLM")</div><div><br></div><div>res = True</div><div>res@gsnDraw = False</div><div>res@gsnFrame = False</div><div><br></div><div>;----X-Axis formatting</div><div>
res@tmXTOn = False</div><div>res@tmXBOn = True</div><div>res@tmXLabelAngleF = 90</div><div><br></div><div>;----X-Axis labels</div><div>res@tmXBMode = "Manual"</div><div>restick = True</div><div>restick@ttmFormat = "%Y %N %D"</div>
<div>restick@ttmAxis = "XB"</div><div>restick@ttmMajorStride = 181</div><div><br></div><div>time_axis_labels(ts_10&DateTime,res,restick)</div><div><br></div><div>res@tiYAxisString = "Top soil layer"</div>
<div>xy1 = gsn_csm_xy(wks,t,ts_01,res)</div><div><br></div><div>res@tiYAxisString = "Middle soil layer"</div><div>xy2 = gsn_csm_xy(wks,t,ts_02,res)</div><div><br></div><div>....</div><div><br></div><div>res@tiYAxisString = "Bottom soil layer"</div>
<div>xy10 = gsn_csm_xy(wks,t,ts_10,res)</div><div><br></div><div><div>res1 = True</div><div>res2 = True</div><div>res2@gsnAttachPlotsXAxis = True</div></div><div><br></div><div>plot = gsn_attach_plots(xy1,(/xy2,...,xy10/),res1,res2) ; There are 10 plots total, shortened to three in this example.</div>
<div><br></div><div>draw(xy1)</div><div>frame(wks)</div><div><br></div><div><br></div><div>Thanks,</div><div>Liz.</div><div><br></div><div><br></div></div>
<br></div></div>_______________________________________________<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>
</blockquote></div><br></div>