<div dir="ltr"><div class="gmail_default" style="font-size:small">If you are trying to use the wrf_xxxx plotting functions but with a lot of customizations, like turning off titles, changing the labelbar, etc, then I recommend using gsn_csm_xxxx scripts for plotting instead of wrf_xxxxx.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The wrf_xxxx plotting routines are nice because they figure out all the correct map resources you need to set in order to correctly plot the data in the native WRF map projection. However, they are really tailored to be drawn to an 8.5 " x 11 " piece of paper (hence all the titles and the white space).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">With just a few changes, you can easily use the gsn_csm_xxxx scripts, and not have to worry about all those titles. Please see this page for more information:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml">http://www.ncl.ucar.edu/Applications/wrfgsn.shtml</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">You may also want to see examples 3, 4, and 10 on this page:</div><div class="gmail_default" style=""><br></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml">http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">I noticed that in your original script, you are doing things like this:</div><div class="gmail_default" style=""><br></div><div class="gmail_default" style=""><span style="font-size:12.8px"> hgt@lat2d = wrf_user_getvar(a, "XLAT", it)</span><br style="font-size:12.8px"><span style="font-size:12.8px"> hgt@lon2d = wrf_user_getvar(a, "XLONG", it)</span><br></div><div class="gmail_default" style=""><span style="font-size:12.8px"> spd@lon2d = hgt@lon2d</span><br style="font-size:12.8px"><span style="font-size:12.8px"> spd@lat2d = hgt@lat2d</span><br></div><div class="gmail_default" style=""><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style=""><span style="font-size:12.8px">You generally do *not* want to do this when calling the wrf_xxxxx plotting scripts, because they use the map projection on the file and don't need the lat/lon coordinates. If you try to do both lat2d/lon2d *and* use the wrf map projection, you may confuse things.</span></div><div class="gmail_default" style=""><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style=""><span style="font-size:12.8px">The lat2d/lon2d stuff is for when you are plotting using gsn_csm_contour_map, gsn_csm_vector_map, etc. So, you are already part of the way there if you switch from wrf_xxx to gsn_csm_xxxx.</span></div><div class="gmail_default" style=""><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style=""><span style="font-size:12.8px">--Mary</span></div><div class="gmail_default" style=""><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 6, 2016 at 3:57 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@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><div><div><div><div>(Sorry about the previous incomplete note)<br><br>Hi,<br><br></div><span class="">With regard to the field titles, both
wrf_contour and wrf_vector take special resources FieldTitle,
SubFieldTitle and UnitLabel that have default behaviors if not
explicitly set; perhaps you can what you want by overriding their
defaults:<br><br><a href="http://ncl.ucar.edu/Document/Functions/WRF_arw/wrf_contour.shtml" target="_blank">http://ncl.ucar.edu/Document/Functions/WRF_arw/wrf_contour.shtml</a><br><br></span></div><span class="">I'm wondering if this line isn't causing the problem with the axis labeling (perhaps remove it?)<br><br></span>res@pmTickMarkDisplayMode = "Always"<br><br></div>How is it you want to adject the contours.<br><br></div>I don't know about centering the labelbar.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Rick<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 6, 2016 at 3:54 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@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><div>Hi,<br><br></div>With regard to the field titles, both wrf_contour and wrf_vector take special resources FieldTitle, SubFieldTitle and UnitLabel that have default behaviors if not explicitly set; perhaps you can what you want by overriding their defaults:<br><br><a href="http://ncl.ucar.edu/Document/Functions/WRF_arw/wrf_contour.shtml" target="_blank">http://ncl.ucar.edu/Document/Functions/WRF_arw/wrf_contour.shtml</a><br><br></div>I'm wondering if this line isn't causing the problem with the axis labeling (perhaps remove it?)<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Jun 29, 2016 at 1:51 PM, Kerwyn Texeira <span dir="ltr"><<a href="mailto:ktish86@gmail.com" target="_blank">ktish86@gmail.com</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><div dir="ltr"><div><div><div><div><div><div><div><div>Hi ncl-talk,<br><br></div>I four question about wrf_contour <br><br></div>1. How to remove the field titles?<br></div>2. How to fix the longitude and latitude axis<br></div>3. How do I adjust the contours<br></div>4. How do I fix the vertical bar title where it is centered?<br><br></div>I tried using my code for a few days now and I had no luck. I'm not getting any errors but it just will not plot right. It's like it's not obeying the script. I have attached the figure. Could anyone help me please. It would be greatly appreciated.<br><br></div>Thanks<br><br></div>Script:<br><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/wrf/WRFUserARW.ncl"<br><br>;-----------------------------------------------------------------------<br> <br>begin<br><br> a = addfile("./<a href="http://wrfout_d02_2014-01-11_16_00_00.nc" target="_blank">wrfout_d02_2014-01-11_16_00_00.nc</a>","r")<br><br> it = 0<br> hgt = wrf_user_getvar(a, "HGT", it)<br> hgt@lat2d = wrf_user_getvar(a, "XLAT", it)<br> hgt@lon2d = wrf_user_getvar(a, "XLONG", it)<br> u = wrf_user_getvar(a, "ua", it)<br> v = wrf_user_getvar(a, "va", it)<br> p = wrf_user_getvar(a, "pressure", it)<br> z = wrf_user_getvar(a, "z", it)<br> tc = wrf_user_getvar(a, "tc", it)<br><br> u_wind = wrf_user_intrp3d(u, p, "h", 700., 0.0, False)<br> v_wind = wrf_user_intrp3d(v, p, "h", 700., 0.0, False)<br> z_plane = wrf_user_intrp3d(z, p, "h", 700., 0.0, False)<br> tc_plane = wrf_user_intrp3d(tc, p, "h", 700., 0.0, False)<br><br> spd = (u_wind*u_wind + v_wind*v_wind)^(0.5) ;m/s<br> u_wind = u_wind*1.94384449<br> v_wind = v_wind*1.94384449<br> <br> u_wind@lon2d = hgt@lon2d<br> u_wind@lat2d = hgt@lat2d<br><br> v_wind@lon2d = hgt@lon2d<br> v_wind@lat2d = hgt@lat2d<br><br> z_plane@lon2d = hgt@lon2d<br> z_plane@lat2d = hgt@lat2d <br><br> tc_plane@lon2d = hgt@lon2d<br> tc_plane@lat2d = hgt@lat2d<br> <br><br> spd = spd*1.94384449<br><br> spd@lon2d = hgt@lon2d<br> spd@lat2d = hgt@lat2d<br><br> ; spd@units = "Wind Speed"<br> ; spd@units = "kts"<br><br>;-----------------------------------------------------------------------------<br> <br> wks_type = "png"<br> wks_type@wkWidth = 2500.<br> wks_type@wkHeight = 2500.<br><br> wks = gsn_open_wks(wks_type, "temp")<br> gsn_define_colormap(wks,"matlab_jet") <br> <br>;-----------------------------------------------------------------------------<br> <br> res = True<br> res@InitTime = False<br> res@FieldTitle = ""<br> res@Footer = False<br> ;res@gsnDraw = False ; do not draw the plot<br> ;res@gsnFrame = False ; do not advance the frame<br> res@cnLineLabelsOn = False ; do not use line labels<br> res@cnFillOn = True ; color fill<br> res@cnLinesOn = False ; do not draw contour lines<br> res@tiMainString = "Winds (kts) at 700hpa on Jan 11 at 16:00UTC"<br> res@tiMainFont = "helvetica"<br> res@tiMainFontHeightF = 0.025<br> res@pmTickMarkDisplayMode = "Always" <br> ;res@mpOutlineOn = True<br> res@lbOrientation = "Vertical"<br> res@tiMainOffsetYF = -0.03<br> ;res@mpFillOn = False<br> ;res@mpOutlineOn = True ; turn the map outline on<br> res@lbTitleString = "Temperature (C)"<br> res@lbOrientation = "vertical"<br> res@pmLabelBarSide = "right"<br> res@cnLevelSelectionMode = "EqualSpacedLevels"<br> res@cnInfoLabelOn = False<br>;-----------------------------------------------------------------------------<br>; For zooming in... don't need<br><br> ;res@mpMinLatF = 34.5 ; 37.85 ; Zoomed in Lat and Lon<br> ;res@mpMaxLatF = 35.2 ; 38.50<br> ;res@mpMinLonF = -123. ; -120.0<br> ;res@mpMaxLonF = -115.5 ; -119.35<br><br>;-----------------------------------------------------------------------------<br><br> ;res@gsnLeftString = ""<br><br> ;res@gsnLeftString = "Geopotential Height (m) and Temperature (C)"<br> ;res@gsnStringFontHeightF = 0.020<br><br> ;res@gsnRightString = ""<br><br> res@lbTitleString = "Temperature (C)"<br> res@lbTitlePosition = "Right"<br> res@lbTitleDirection = "Across"<br> res@lbTitleAngleF = 90.<br> ;res@lbTitleFontHeightF = 0.020<br><br> ;res@gsnAddCyclic = False<br> res@cnLevelSelectionMode= "ManualLevels" <br> res@cnMinLevelValF = -7<br> res@cnMaxLevelValF = 4<br> res@cnLevelSpacingF = 1<br><br>;------wind vectors<br> res2 = True<br> ;res2@gsnDraw = False<br> ;res2@gsnFrame = False<br> res2@vcWindBarbLineThicknessF= 4.0<br> res2@vcRefLengthF= 0.018<br> res2@vcRefMagnitudeF= 10<br> res2@vcMinDistanceF = 0.05<br> ;res2@vcGlyphStyle = "WindBarb"<br> <br> res2@FieldTitle = "Wind" ; overwrite Field Title<br> res2@NumVectors = 47 ; wind barb density<br><br>;-------Temps<br><br><br>;------Geopotential Height<br> res3 = True<br><br> res3@cnLineColor = "Black"<br> res3@cnLineThicknessF = 5.0<br><br> ;res3@cnInfoLabelOn = False<br> res3@cnLevelSpacingF = 2<br> res3@cnLineLabelBackgroundColor = "white"<br> ;res3@cnLineLabelDensityF = 0.5<br><br>;----------------------------------<br> pltres = True<br> mpres = True<br><br> mpres@mpGeophysicalLineColor = "Black"<br> mpres@mpNationalLineColor = "Black"<br> mpres@mpUSStateLineColor = "Black"<br> mpres@mpGridLineColor = "Black"<br> mpres@mpLimbLineColor = "Black"<br> mpres@mpPerimLineColor = "Black"<br> mpres@mpGeophysicalLineThicknessF = 3.0<br> pltres@gsnMaximize = True <br><br><br>;-----contours/vectors<br> winds = wrf_vector(a, wks, u_wind, v_wind, res2)<br> temps = wrf_contour(a, wks, tc_plane, res)<br> geoPz = wrf_contour(a, wks, z_plane, res3)<br><br> plot = wrf_map_overlays(a, wks, (/ winds, temps, geoPz /), mpres, pltres)<br> ;draw(plot)<br> ;frame(wks)<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br><br><br>end<br> <br><br><br><br><br><br><br></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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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>