<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">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_signature" data-smartmail="gmail_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>