<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Try the following.<br><br></div><div>-DO NOT turn off the grid; you&#39;ll need to count the lines later.<br></div>-Set the plotting area to some fixed value using &#39;set parea&#39; before each display command, i.e., &#39;set parea 1 10 1 7.5&#39;<br></div>-Use the &#39;set vrange&#39; command to control the y-axis range for the PBL height 1D plot.<br></div>-Display PBLH.<br></div>-After displayed, count the number of horizontal grid lines on the 1D plot, including top and bottom edges.<br></div>-Set your vertical dimension to span a size equal to the number of lines. In an ideal situation, your vertical dimension would be in the same units as your PBL height variable. It probably won&#39;t be, but in that case, it&#39;ll be harder for you to do.<br></div>-Enter &#39;set ylpos 0 r&#39; to set second axis labels offset to the right.<br></div>-Display vertical motion.<br><br></div>I&#39;ll admit that probably won&#39;t give you exactly what you want. Here&#39;s another thing you can try, but you have to trick GrADS. You can use the maskout function to just display vertical motion ONLY in the region below the PBL height. To do this:<br></div>-Set the GrADS dimension environment to a 4D domain that covers the region you want to plot. So you might want to try &#39;set lat 41 42&#39;, &#39;set lon -89 -87&#39;, &#39;set lev 0.1 4.5&#39;<br></div>-Define a new vertical motion variable using maskout: &#39;define neww = maskout(W,PBLH-height)&#39;<br></div>-Set the dimension environment back to what you want to display<br></div>-Display neww<br></div>In this case, a field will be displayed that only exists at vertical levels that are below the PBL height, which is what I assume you&#39;re trying to plot (PBL vertical motion). If I&#39;m wrong, you can negate the logical expression in the second argument of the maskout function.<br><br></div>There may still be issues with the axis labeling (again, if your data file&#39;s vertical dimension is in a different unit than the PBL height variable). However, you can still carefully plan where the axis tick marks are for the grid, then use the &#39;set ylpos 0 r&#39;, &#39;set vrange&#39;, and &#39;set ylint&#39; expressions to get the consistent vertical dimension to plot on the other side.<br><br></div>Let me know if you have more questions.<br><br></div>Jeff Duda<br><div><div><div><div><div><div><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 30, 2015 at 1:28 PM, Ashish Sharma <span dir="ltr">&lt;<a href="mailto:asharma7@nd.edu" target="_blank">asharma7@nd.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello,<div><br></div><div>I am a new GRADS user. </div><div>I would like to overlay 2D contour plot with a 1-D plot. </div><div>Example: vertical wind (w) with pbl height. </div><div><br></div><div>I think I am having problem controlling x-y axis. 2-D plot </div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">open WRF_FILE.ctl</div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">set lat 41 42</div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">set lon -88 </div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">set t 15</div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">set grid off</div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">d pblh</div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)">set grid off</div><div style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(253,225,154)"><div style="margin:0px">set lev 0.2 2.8</div><div>d W</div></div></div><div><br></div><div>I tried using y-axis and x-axis “labs”, but it didn’t help. </div><div><span style="font-family:Menlo;font-size:11px;background-color:rgb(253,225,154)">set yaxis 200 2800 200 </span></div><div><span style="font-family:Menlo;font-size:11px;background-color:rgb(253,225,154)">set ylabs 200 | 0.5 | 1.0</span><span style="font-family:Menlo;font-size:11px;background-color:rgb(253,225,154)">  </span><span style="font-family:Menlo;font-size:11px;background-color:rgb(253,225,154)">1.5 | 2.0 |</span><span style="font-family:Menlo;font-size:11px;background-color:rgb(253,225,154)">  </span><span style="font-family:Menlo;font-size:11px;background-color:rgb(253,225,154)">2.5 | 3.0</span></div><div><div><br></div></div><div>I have uploaded the plot here for reference. This might be a simple fix, but I need some guidance.</div><div><a href="http://www3.nd.edu/~asharma7/overlay_W_PBLH.pdf" target="_blank">http://www3.nd.edu/~asharma7/overlay_W_PBLH.pdf</a></div><div><br></div><div>thanks,</div><div>Ashish</div><div><br></div><div><br></div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br></div>
</div>