<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Thanks Mary, it works...</span></div><div><br><span></span></div><div><span>Have a nice weekend...:)</span></div><div><span>Juky</span></div><div><span><br></span></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Mary Haley &lt;haley@ucar.edu&gt;<br> <b><span style="font-weight: bold;">To:</span></b> juki juki &lt;juky_emc2@yahoo.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> "ncl-talk@ucar.edu" &lt;ncl-talk@ucar.edu&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, December 23, 2011 2:47 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [ncl-talk] Use
 our own setting for Ythicklabel for Hovmoller diagram<br> </font> <br>
<div id="yiv325304306"><div>Juky,<div><font class="yiv325304306Apple-style-span" face="Arial"><br></font></div><div><font class="yiv325304306Apple-style-span" face="Arial">I misread your email before. I thought you were doing a height, but you have a time v.s. longitude plot.</font></div><div><font class="yiv325304306Apple-style-span" face="Arial"><br></font></div><div><font class="yiv325304306Apple-style-span" face="Arial">I think you simply need to use tmYLValues and tmYLLabels:</font></div><div><font class="yiv325304306Apple-style-span" face="Arial"><br></font></div><div><font class="yiv325304306Apple-style-span" face="Arial">&nbsp; res@tmYLMode = "Explicit"</font></div><div><font class="yiv325304306Apple-style-span" face="Arial">&nbsp; res@tmYLValues = ispan(0,48,8)</font></div><div><font class="yiv325304306Apple-style-span" face="Arial">&nbsp; res@tmYLLabels = (/"00","08","16","24","8","16","24"/)</font></div><div><br></div><div>If this still
 doesn't work, it would help if I could see your full script and data.</div><div><br></div><div>--Mary</div><div><br></div><div>On Dec 22, 2011, at 2:29 AM, juki juki wrote:</div><div><div><div><br class="yiv325304306Apple-interchange-newline"><blockquote type="cite"><div><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:arial, helvetica, sans-serif;font-size:12pt;"><div><span>Hi Mary !</span></div><div><br><span></span></div><div><span>Thanks for nice reply..</span></div><div><br><span></span></div><div>&gt;You have a typo in your code. These resources should be "tmYRValues" and "tmYRLabels". The "YR" stands for "Right Y axis".</div><div><br></div><div>&gt;However, this still probably won't work. <br><br>Yes it does not work..:)<br><br>&gt;Your Y axis values are probably in values of pressure, not height, so when you&nbsp;</div><div>&gt;provide the list of values for tmYRValues, these need to be pressure values, not height
 values. &nbsp; I don't understand</div><div>&gt;why
 &nbsp;you have the same height value multiple times 
("00","08","16","24","8","16","24"), but you will need to map your 
height values &gt;into corresponding<br><br>This plot is daily-meridionally-averaged data. Therefore, I have 24 hours data (24 rows) for each longitude (401 coulumn). But to clarify some diurnal characteritics the diurnal cycle is repeated so that the&nbsp; data become 24 x 2 (48 rows) with the same longitude (401 coulumn). Thus, I have the same value multiple times. I read this data from Ascii file, and I add the time and longitude as:<br><br>&nbsp; lon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp; fspan( 80,160, ncols)<br>&nbsp;&nbsp; lon!0&nbsp;&nbsp;&nbsp;&nbsp; = "lon"<br>&nbsp;&nbsp; lon@units = "degrees_east"<br><br><br>&nbsp;&nbsp; time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp; fspan(1, 48, nrows)<br>&nbsp;&nbsp; time!0&nbsp;&nbsp;&nbsp;&nbsp; = "time"<br>&nbsp;&nbsp; time@units = "UTC"<br><br>&nbsp;&nbsp; data!0&nbsp;&nbsp;&nbsp; = "time"<br>&nbsp;&nbsp; data!1&nbsp;&nbsp;&nbsp; = "lon"<br>&nbsp;&nbsp; data&amp;time&nbsp; =&nbsp;
 time<br>&nbsp;&nbsp; data&amp;lon&nbsp; =&nbsp; lon<br><br>But I need to set the Ythick lable, if not, the Ythick will be like "0, 8, 16, 24, 32, 40, 48" or others, and they do not reflect the time because time must be repeated ("0, 8, 16, 24, 8, 16, 24")..I hope you understand what I mean, please see my rough-plot result to make clear it..<br><br>thanks again for best help..<br><br>Regards,<br>Juky<br><br><br><br></div><div><br></div>  <div style="font-family:arial, helvetica, sans-serif;font-size:12pt;"> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Mary Haley &lt;<a rel="nofollow" ymailto="mailto:haley@ucar.edu" target="_blank" href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt;<br> <b><span style="font-weight:bold;">To:</span></b> juki juki &lt;<a rel="nofollow" ymailto="mailto:juky_emc2@yahoo.com" target="_blank"
 href="mailto:juky_emc2@yahoo.com">juky_emc2@yahoo.com</a>&gt; <br> <b><span style="font-weight:bold;">Sent:</span></b> Wednesday, December 21, 2011 9:58 PM<br> <b><span style="
font-weight:bold;">Subject:</span></b> Re: [ncl-talk] Use our own setting for Ythicklabel for Hovmoller diagram<br> </font> <br>
<div id="yiv325304306"><div>Dear Juky,<div><br></div><div><div><div><div>You have a typo in your code. These resources should be "tmYRValues" and "tmYRLabels". The "YR" stands for "Right Y axis".</div><div><br></div><div>However, this still probably won't work. Your Y axis values are probably in values of pressure, not height, so when you&nbsp;</div><div>provide the list of values for tmYRValues, these need to be pressure values, not height values. &nbsp; I don't understand</div><div>why &nbsp;you have the same height value multiple times ("00","08","16","24","8","16","24"), but you will need to map your height values into corresponding</div><div>pressure values</div><div><br></div><div><blockquote type="cite"><div></div></blockquote></div><div>The way the code for this works internally is that a set of height values are calculated based on pressure values:</div><div><br></div><div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp;
 &nbsp; hgt &nbsp; &nbsp;= gsn_geop_hgt(ptmp) &nbsp; &nbsp; ; Calculate heights as a function of pressure &nbsp; &nbsp; &nbsp; &nbsp;</font></div></div><div><br></div><div>And then these height values, which are floating point numbers, are turned into "nice" height values via:</div><div><font class="yiv325304306Apple-style-span" face="Courier"><br></font></div><div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; hrange = fabs(hgt(0)-hgt(dimsizes(hgt)-1))</font></div><div><font class="yiv325304306Apple-style-span" face="Courier"><br></font></div><div><font class="yiv325304306Apple-style-span" face="Courier">;---Figure out a "nice" spacing to use for the tickmarks</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; if(hrange.le.35) then</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; step = 4</font></div><div><font
 class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; else</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; if(hrange.le.70) then</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; step = 7</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; else</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; step = 10</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; end if</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; end if</font></div></div><div><font class="yiv325304306Apple-style-span" face="Courier"><br></font></div><div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; step = tointeger(step)</font></div><div><font
 class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Set range of "nice" hgt values. &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; hnice = tofloat(ispan(tointeger(floor(hgt(0))), tointeger(ceil(hgt(dimsizes(hgt)-1))),step))</font></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; pnice = ftcurv(hgt,ptmp,hnice) &nbsp;; Get pres vals at nice hgt vals. &nbsp; &nbsp; </font>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><br></div></div><div>Finally, you can use the hnice and pnice values with the tmYRLabels and tmYRValues resources:</div><div><br></div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; res@tmYRMode &nbsp; =
 "Explicit"</font></div><div><div><font class="yiv325304306Apple-style-span" face="Courier">&nbsp;&nbsp; &nbsp;res@tmYRLabels =&nbsp;</font><span class="yiv325304306Apple-style-span" style="font-family:Courier;">hnice</span></div><div><span class="yiv325304306Apple-style-span" style="font-family:Courier;"><div style="font-family:Helvetica;"><font class="yiv325304306Apple-style-span" face="Courier">&nbsp; &nbsp; res@tmYRValues = p</font><span class="yiv325304306Apple-style-span" style="font-family:Courier;">nice</span></div><div><br></div></span></div></div><div>You will need to figure out what pressure values match with the height values you want, and use them in place of "pnice" above.</div><div><br></div><div>--Mary</div><div><br></div><div>On Dec 21, 2011, at 2:01 AM, juki juki wrote:</div><br class="yiv325304306Apple-interchange-newline"><blockquote type="cite"><div><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:arial,
 helvetica, sans-serif;font-size:12pt;"><div>Hi all,</div><div><br></div><div>I am plotting a daily longitude-hovmoller diagram, 24 hours, to clarify the result the data were plotted twice. I want to set the Ythicklable (time) as follow:</div><div><br></div><div>&nbsp;res@trYReverse = True&nbsp;&nbsp;&nbsp; <br>&nbsp;<br>&nbsp;res@tmYBValues = (/0,8,16,24,32,40,48/)<br>&nbsp;res@tmYBLabels = (/"00","08","16","24","8","16","24"/)</div><div><br></div><div>Time is generated as:</div><div><br></div><div>&nbsp;&nbsp; time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp; fspan(1, 48, nrows); nrows = 48<br>&nbsp;&nbsp; time!0&nbsp;&nbsp;&nbsp;&nbsp; = "time"<br>&nbsp;&nbsp; time@units = "UTC"<br><br>&nbsp;&nbsp; data!0&nbsp;&nbsp;&nbsp; = "time"; data contain hourly data which are written twice.<br>&nbsp;&nbsp; data!1&nbsp;&nbsp;&nbsp; = "lon"<br>&nbsp;&nbsp; data&amp;time&nbsp; =&nbsp; time<br>&nbsp;&nbsp; data&amp;lon&nbsp; =&nbsp;
 lon</div><div><br></div><div>Problem, some errors said that the above comment (res@tmYBValues ...) can not be used for hovmoller case. Are there any suggestion to deal with this kind of problem ?</div><div><br></div><div>Thanks again for help...</div><div><br></div><div>Regards,</div><div>JuKy</div></div></div>_______________________________________________<br>ncl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a rel="nofollow" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></blockquote></div><br></div></div></div></div><br><br> </div> </div>  </div></div><span>&lt;hov.000001.png&gt;</span>_______________________________________________<br>ncl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a rel="nofollow" target="_blank"
 href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></blockquote></div><br></div></div></div></div><br><br> </div> </div>  </div></body></html>