<div dir="ltr"><div dir="ltr">Hi Amit,<div>You can override the behavior of the bottom x-axis tick mark labels by setting:</div><div>res@tmXBMode = "Explicit"</div><div>res@tmXBValues = OLR_DAY&time</div><div>res@tmXBLabels = ispan(1,115,1)</div><div><br></div><div>See tickmarks example #2 here (bottom panel coding):</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>If you have further questions please post them to ncl-talk.</div><div>Adam</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 27, 2018 at 9:51 AM Amit Kumar <<a href="mailto:amitkumar.777@hotmail.com" target="_blank">amitkumar.777@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Dear Rick, <br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Actually these 115 time stamps are for each day. I have concatenated to these individual days into one using cdo. I want to plot time at x axis which will vary from 1 to 115 indicating each day, so that the plot can be ploted as latitude vs time and variation
of olr can be seen over latitude and time . It is on the same lines as the example for sst anamoly in latitude vs time section in ncl examples.<br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Regards<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Amit<br>
<br>
<br>
<br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Get <a href="https://aka.ms/ghei36" target="_blank">Outlook for Android</a></div>
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_8463741168528930665m_6351736424769406360divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
<b>Sent:</b> Monday, August 27, 2018 8:47:24 PM<br>
<b>To:</b> Amit Kumar<br>
<b>Subject:</b> Re: [ncl-talk] Issue with Latitude-Time Plot</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Hi Amit,</div>
<div><br>
</div>
<div>Offhand, given the time variable's coordinate range:</div>
<div><br>
</div>
<div>Variable: time<br>
Type: double<br>
Total Size: 115 values<br>
920 bytes<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [ 115 <time | unlimited> ]<br>
Chunking Info: [ 524288 <time> ]<br>
Coordinates:<br>
time: [9159840..9334080]<br>
</div>
<div><br>
</div>
<div>I'd the plot looks about what I'd expect. In what way do you think the time values are incorrect?</div>
<div><br>
</div>
<div>Rick<br>
</div>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Aug 27, 2018 at 6:02 AM, Amit Kumar <span dir="ltr">
<<a href="mailto:amitkumar.777@hotmail.com" target="_blank">amitkumar.777@hotmail.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">
<div id="m_8463741168528930665m_6351736424769406360m_3906427214880366860divtagdefaultwrapper" dir="ltr" style="font-size:10pt;color:#2672ec;font-family:Arial,Helvetica,sans-serif">
<p style="margin-top:0;margin-bottom:0">Dear All,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm trying to plot Latitude vs Time Plot. It is working fine when I've 30 time instances, but for greater then that (i.e. 115 time steps) the plot is sowing different values in x-axis (time).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm not able to workout why this is happening? I'm attaching the output and my ncl script.
<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">==================================================================================================</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div> var = a->OLR_DLY<br>
dims = dimsizes(var)<br>
print(dims)<br>
lat = a->lat<br>
lon = a->lon<br>
time = a->time<br>
<br>
lon100E = ind(lon.eq.100.) ; subscript at 90E<br>
latS = -20.<br>
latN = 40.<br>
shov = var(lon|lon100E:lon100E,{lat|latS:latN},time|:)<br>
dims = dimsizes(shov) ; shov=3D array=(1,31,127)<br>
sdemo = onedtond(ndtooned(shov), (/dims(1),dims(2)/) )<br>
sdemo!0 = "lat"<br>
sdemo!1 = "time"<br>
sdemo&lat = lat({lat|latS:latN})<br>
sdemo&time= time<br>
<br>
sdemo = smth9 (sdemo,0.5, 0.25, False) ; 2D smoother<br>
<br>
gtPat = 17 ; stiple<br>
ltPat = 3 ; hatch<br>
;*************************<br>
; plotting parameters<br>
;*************************<br>
wks = gsn_open_wks ("png", "Monsoon_2017_lat_time_100_1" ) ; send graphics to PNG file<br>
res = True ; plot mods desired<br>
res@gsnDraw = False ; don't draw yet<br>
res@gsnFrame = False ; don't advance frame yet<br>
<br>
res@tiMainString = "Daily OLR variation at 100E" ; title<br>
<br>
res@vpXF = 0.12 ; default is 0.2 change aspect<br>
res@vpYF = 0.8 ; default is 0.8 ration<br>
res@vpHeightF = 0.4 ; default is 0.6<br>
res@vpWidthF = 0.8 ; default is 0.6<br>
<br>
res@cnLevelSelectionMode = "ManualLevels" ; manual levels<br>
res@cnMinLevelValF = 150. ; min level<br>
res@cnMaxLevelValF = 330. ; max level<br>
res@cnLevelSpacingF = 10 ; contour spacing<br>
<br>
res@cnFillOn = True ; color on<br>
res@lbLabelStride = 4 ; every other label<br>
res@lbOrientation = "Horizontal" ; vertical label bar<br>
res@pmLabelBarOrthogonalPosF = -0.04 ; move label bar closer to axis<br>
res@cnLinesOn = False ; turn off contour lines<br>
res@cnFillPalette = "GMT_wysiwyg" ; set color map<br>
<br>
<br>
plot = gsn_csm_lat_time(wks, sdemo, res )<br>
;opt = True<br>
;opt@gsnShadeFillType = "pattern"<br>
;opt@gsnShadeLow = ltPat<br>
;opt@gsnShadeHigh = gtPat<br>
;plot = gsn_contour_shade(plot, -0.69, 0.25, opt)<br>
;plot = ZeroLineContour (plot)<br>
draw (plot) ; draw the contour object<br>
frame (wks) ; advance frame<br>
end</div>
<div>==================================================================================================</div>
<div>%%%%%%%%%%%%%%%%%%%</div>
<div>################################</div>
<div><br>
</div>
<div>
<div>dimensions:<br>
lon = 1400<br>
lat = 1400<br>
time = 115 // unlimited<br>
<br>
chunk dimensions:<br>
lon = 1400<br>
<br>
variables:<br>
Variable: lon<br>
Type: double<br>
Total Size: 1400 values<br>
11200 bytes<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [ 1400 <lon> ]<br>
Coordinates:<br>
lon: [40..109.95]<br>
Number of Attributes: 4<br>
standard_name : longitude<br>
long_name : longitude<br>
units : degrees_east<br>
axis : X<br>
<br>
Variable: lat<br>
Type: double<br>
Total Size: 1400 values<br>
11200 bytes<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [ 1400 <lat> ]<br>
Coordinates:<br>
lat: [-20..49.95]<br>
Number of Attributes: 4<br>
standard_name : latitude<br>
long_name : latitude<br>
units : degrees_north<br>
axis : Y<br>
<br>
Variable: time<br>
Type: double<br>
Total Size: 115 values<br>
920 bytes<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [ 115 <time | unlimited> ]<br>
Chunking Info: [ 524288 <time> ]<br>
Coordinates:<br>
time: [9159840..9334080]<br>
Number of Attributes: 4<br>
standard_name : time<br>
units : minutes since 2000-1-1 00:00:00<br>
calendar : standard<br>
axis : T<br>
<br>
Variable: OLR_DLY<br>
Type: float<br>
Total Size: 225400000 values<br>
901600000 bytes<br>
Number of Dimensions: 3<br>
Dimensions and sizes: [ 115 <time | unlimited> x 1400 <lat> x 1400 <lon> ]<br>
Chunking Info: [ 1 <time> x 1 <lat> x 1400 <lon> ]<br>
Coordinates:<br>
time: [9159840..9334080]<br>
lat: [-20..49.95]<br>
lon: [40..109.95]<br>
Number of Attributes: 5<br>
standard_name : Outgoing Longwave Radiation<br>
long_name : Out Longwave Radiation(Daily)<br>
units : W.m-2<br>
_FillValue : -999<br>
missing_value : -999<br>
<br>
<br>
</div>
########################################<br>
</div>
<div><br>
</div>
<div>Thanks in advance.</div>
<div><br>
</div>
<div>Regards</div>
<span class="m_8463741168528930665m_6351736424769406360HOEnZb"><font color="#888888">
<div>Amit<br>
</div>
<br>
<p></p>
</font></span></div>
</div>
<br>
_______________________________________________<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>
<br>
</blockquote>
</div>
<br>
</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><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_8463741168528930665gmail_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>