<div dir="ltr"><div>Hi,</div><div><br></div><div>I am confused by your question/issue: the plot shows two time labels, 9/22 12:00 and 9/23 6:00, which would appear to be a 12 hour interval labelling -- I don't understand your comment "...the output takes 1 hour interval rather than 3 hour interval."</div><div><br></div><div>Rick<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 26, 2019 at 9:19 AM Prasad Kunjeer via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sir,</div><div><br></div><div>I am trying to plot a simple graph from a WRF output. The X axis of the plot is time and i want to print the time table for the same. I am using the function 'time_axis_labels'. I have attached the script:</div><div><br></div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<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>; This file still has to be loaded manually<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl" <br> <br> srcDirName = "/home/prasad/res/"<br> srcFileName = "<a href="http://newdo3.nc" target="_blank">newdo3.nc</a>"<br> srcFilePath = srcDirName + srcFileName<br>;---Retrieve either one level, or all levels. Use '-1' for all.<br> sfile = addfile(srcFilePath,"r")<br><br> ua = wrf_user_getvar(sfile,"ua",-1) ; On mass grid <br> va = wrf_user_getvar(sfile,"va",-1) <br> printVarSummary(ua) ; (Time,bottom_top,south_north,west_east)<br> printVarSummary(va) ; (Time,bottom_top,south_north,west_east)<br><br> Times = sfile->Times<br> Time_0 = wrf_times_c(Times, 0)<br><br> printVarSummary(Times)<br> printVarSummary(Time_0)<br> print(Time_0)<br><br> wks = gsn_open_wks("png","time_labels") ; send graphics to PNG file<br>;--------------------------------------------------<br>; The time_axis_label function adds additional<br>; resources to "res" to produce nicely-formatted <br>; time labels on X axis. This function only works <br>; if you have a time "units" recognized by the <br>; cd_calendar function.<br>;--------------------------------------------------<br> pltres = True<br> restime = True<br> restick = True<br> restick@ttmFormat = "%N/%D %H:%M"<br> time_axis_labels(Time_0,restime,restick)<br><br> contour_vor = wrf_contour(sfile,wks,ua(:,:,100,100),restime)<br> plot = wrf_overlays(sfile,wks,(/contour_vor/),pltres)<br></div><div><br></div><div><br></div><div>The WRF file contains the 25 time steps at 3 hour interval. I have attached the output of printvarSummary and print of the time varibale.</div><div><br></div><div>Variable: Time_0<br>Type: double<br>Total Size: 200 bytes<br> 25 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [Time | 25]<br>Coordinates: <br> Time: [ 0.. 72]<br>Number Of Attributes: 4<br> units : hours since 2018-09-22 12:00:00<br> calendar : standard<br> long_name : Time<br> description : Time<br></div><div><br></div><div>Variable: Time_0<br>Type: double<br>Total Size: 200 bytes<br> 25 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [Time | 25]<br>Coordinates: <br> Time: [ 0.. 72]<br>Number Of Attributes: 4<br> units : hours since 2018-09-22 12:00:00<br> calendar : standard<br> long_name : Time<br> description : Time<br>(0) 0<br>(1) 3<br>(2) 6<br>(3) 9<br>(4) 12 etc.<br></div><div><br></div><div>But when I plot the figure, the output takes 1 hour interval rather than 3 hour interval.</div><div><br></div><div>Please guide in correcting the output of graph</div><br clear="all"><div><div dir="ltr" class="gmail-m_1735994245051029407gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-size:10pt;font-family:"Mangal","serif"" lang="HI">Regards<br>प्रसाद कुंजीर </span><span style="font-size:9pt;font-family:"Arial","sans-serif"">/ </span><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">Prasad Kunjeer<br>
</span><span><span style="font-size:10.5pt;font-family:"Mangal","serif"" lang="HI">वैज्ञानिक -</span></span><span lang="hi"> सी</span><span><span style="font-size:10.5pt;font-family:"Mangal","serif"" lang="HI"> / </span><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">Scientist - C<br>
</span><span style="font-size:10.5pt;font-family:"Mangal","serif"" lang="HI">केन्द्रीय जल और विद्युत
अनुसंधान</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif"" lang="HI"> </span><span style="font-size:10.5pt;font-family:"Mangal","serif"" lang="HI">शाला / </span><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">Central Water and Power Research Station<br>
</span><span style="font-size:10.5pt;font-family:"Mangal","serif"" lang="HI">पुणे </span><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">411 024/ Pune 411 024</span></span></div></div></div></div></div></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></blockquote></div>