<div dir="ltr">Hi Mary,<div><br></div><div>thanks a lot for your response. I was able to run both scripts. The gsn script gives a little bit better alignment than</div><div>the wrf version. </div><div><br></div><div>My impression is the wrf* routines simplify aspects of working with wrfout files, but to get that you must compromise</div><div>on some fine tuning -- wrf* doesn't seem to respond to setting Title resources, either. For the time being I'll probably</div><div>use your approach with the gsn* routines.</div><div><br></div><div>Thanks again for the reply and the scripts!</div><div>Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 6:57 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 class="gmail_default" style="font-size:small">Hi Matt,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Yes, it looks like the issue is that "wrf_contour" is trying to customize the location of the labelbar. Unfortunately, I honestly don't understand why the title keeps moving drastically with seemingly little changes that I make.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Here's a test script I was using, and I was able to get the title close, but it's still shifted. I think it has something to do with the "extent" resources. I'm hoping Dave will weigh in here. I think you should be able to run this script yourself, just substitute your own WRF output file.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you continue to have problems with this, then you may want to consider using gsn_csm_contour_map to plot your data instead. I'll include a sample script below, after this one:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</font></div><div class="gmail_default"><font face="monospace, monospace">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">begin</font></div><div class="gmail_default"><font face="monospace, monospace"> filename = "<a href="http://wrfout_d03_2012-04-22_23_00_00.nc" target="_blank">wrfout_d03_2012-04-22_23_00_00.nc</a>"</font></div><div class="gmail_default"><font face="monospace, monospace"> dir = "$NCARGTEST/nclscripts/wrf_files/"</font></div><div class="gmail_default"><font face="monospace, monospace"> a = addfile(dir + filename,"r")</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"> td = wrf_user_getvar(a,"td",0) ; 3D td </font></div><div class="gmail_default"><font face="monospace, monospace"> td2 = td(0,:,:) ; Use lowest Td at time zero </font></div><div class="gmail_default"><font face="monospace, monospace"> td_f = 1.8*td2+32. ; Turn temperature into Fahrenheit </font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"> wks = gsn_open_wks("x11","test")</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"> td_f@description = "Surface Dew Point Temp"</font></div><div class="gmail_default"><font face="monospace, monospace"> td_f@units = "F"</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"> opts = True</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@cnFillOn = True</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@cnLinesOn = False</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@cnLineLabelsOn = False</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@ContourParameters = (/ -20., 90., 5./)</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@lbTitleOn = True</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@lbTitleString = td_f@units</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@lbTitlePosition = "Right"</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@lbTitleDirection = "Across"</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@lbTitleOffsetF = -0.08</font></div><div class="gmail_default"><font face="monospace, monospace"> opts@lbTitleJust = "CenterRight"</font></div><div class="gmail_default"><font face="monospace, monospace">; opts@lbTitleFontHeightF= .015 </font></div><div class="gmail_default"><font face="monospace, monospace">; opts@lbTitleExtentF = 0.55 </font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"> contour_td = wrf_contour(a,wks,td_f,opts)</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"> pltres = True</font></div><div class="gmail_default"><font face="monospace, monospace"> mpres = True</font></div><div class="gmail_default"><font face="monospace, monospace"> plot = wrf_map_overlays(a,wks,(/contour_td/),pltres,mpres)</font></div><div class="gmail_default"><font face="monospace, monospace">end</font></div><div style="font-size:small"><br></div><div style="font-size:small">Here's a similar plot, using gsn_csm_contour_map. We have more examples at:</div><div style="font-size:small"><br></div><div><a href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/wrfgsn.shtml</a><br></div><div><br></div><div style="font-size:small"><br></div><div><div>l<font face="monospace, monospace">oad "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</font></div><div><font face="monospace, monospace">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">begin</font></div><div><font face="monospace, monospace"> filename = "<a href="http://wrfout_d03_2012-04-22_23_00_00.nc" target="_blank">wrfout_d03_2012-04-22_23_00_00.nc</a>"</font></div><div><font face="monospace, monospace"> dir = "$NCARGTEST/nclscripts/wrf_files/"</font></div><div><font face="monospace, monospace"> a = addfile(dir + filename,"r")</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> td = wrf_user_getvar(a,"td",0) ; 3D td </font></div><div><font face="monospace, monospace"> td2 = td(0,:,:) ; Use lowest Td at time zero </font><span style="font-family:monospace,monospace">td_f = 1.8*td2+32. ; Turn temperature into Fahrenheit </span></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> wks = gsn_open_wks("x11","test")</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> td_f@description = "Surface Dew Point Temp"</font></div><div><font face="monospace, monospace"> td_f@units = "F"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> opts = True</font></div><div><font face="monospace, monospace"> opts@cnFillOn = True</font></div><div><font face="monospace, monospace"> opts@cnLinesOn = False</font></div><div><font face="monospace, monospace"> opts@cnLineLabelsOn = False</font></div><div><font face="monospace, monospace"> opts@cnLevelSelectionMode = "ExplicitLevels"</font></div><div><font face="monospace, monospace"> opts@cnLevels = ispan(-20,90,5)</font></div><div><font face="monospace, monospace"> opts@lbTitleOn = True</font></div><div><font face="monospace, monospace"> opts@lbTitleString = td_f@units</font></div><div><font face="monospace, monospace"> opts@lbTitlePosition = "Right"</font></div><div><font face="monospace, monospace"> opts@lbTitleDirection = "Across"</font></div><div><font face="monospace, monospace"> opts@lbTitleOffsetF = -0.09</font></div><div><font face="monospace, monospace"> opts@lbTitleJust = "CenterRight"</font></div><div><font face="monospace, monospace"> opts@lbTitleFontHeightF = 0.015</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">; opts@lbTitleFontHeightF= .015 ; make title smaller </font><span style="font-family:monospace,monospace">; opts@lbTitleExtentF = 0.55 </span></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> opts = wrf_map_resources(a,opts)</font></div><div><font face="monospace, monospace"> opts@tfDoNDCOverlay = True</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> plot = gsn_csm_contour_map(wks,td_f,opts)</font></div><div><font face="monospace, monospace">end</font></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Jun 10, 2015 at 4:30 PM, Matt Masarik <span dir="ltr"><<a href="mailto:mattmasarik@boisestate.edu" target="_blank">mattmasarik@boisestate.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi All, (version 6.3.0)<div><br></div><div>I'm trying to place the title string for a plot label bar, just to the right of it, like in this image:</div><div><br></div><div> <a href="https://www.ncl.ucar.edu/Applications/Images/lb_4_lg.png" target="_blank">https://www.ncl.ucar.edu/Applications/Images/lb_4_lg.png</a></div><div><br></div><div>Though my output looks like (see attached .png). The relevant resources I am setting</div><div>are:</div><div><br></div><div> cnres@lbTitleOn = True</div><div> cnres@lbTitleString = slp@units</div><div> cnres@lbTitlePosition = "Right"</div><div> cnres@lbTitleDirection = "Across"</div><div><br></div><div>The resources are set the same as in the example. Though the example uses</div><div><br></div><div> <span style="color:rgb(0,0,0);white-space:pre-wrap">gsn_csm_contour_map_ce()</span></div><div><br></div><div>and I am using</div><div><br></div><div> wrf_contour() & wf_map_overlays(). </div><div><br></div><div>Is the issue due to using the wrf_... routines vs. the gsn_csm... routine? If so, is there</div><div>a work-around to get the desired positioning?</div><div><br></div><div>Thanks,</div><div>Matt</div><div><br></div></div>
<br></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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>