<div dir="auto">You can use pressure height vector in this case.<div dir="auto"><br></div><div dir="auto">Hope this may help.</div><div dir="auto"><br></div><div dir="auto">Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 26, 2018, 00:28 MELISSA KAZEMI RAD <<a href="mailto:mk1369@scarletmail.rutgers.edu">mk1369@scarletmail.rutgers.edu</a>> wrote:<br></div><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-family:georgia,serif">Hi,<br><br></div><div class="gmail_default" style="font-family:georgia,serif">I am trying to create a vertical cross_section plot from a wrf output file. I have spent a lot of time looking through all example ncl codes, trying to figure out how to have the y-axis, representing the vertical height show pressure values in pa, rather than the number of eta-levels.<br><br></div><div class="gmail_default" style="font-family:georgia,serif">Here is my NCL code:<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> ; Main code<br> ;----------------------------------------------------------------------<br> begin<br> a = addfile("<a href="http://wrfout_d03_2017-07-17_06_00_00.nc" target="_blank" rel="noreferrer">wrfout_d03_2017-07-17_06_00_00.nc</a>","r")<br><br>; type = "x11"<br>; type = "pdf"<br>; type = "ps"<br> type = "png"<br><br> wks = gsn_open_wks(type,"EQTemp_Press_Cross_166")<br><br> time = 166<br><br> p = wrf_user_getvar(a, "pressure", time) ; Total Pressure<br> P = wrf_user_getvar(a, "P", time)<br> PB = wrf_user_getvar(a, "PB",time)<br> T = wrf_user_getvar(a,"T",time)<br> U = wrf_user_getvar(a, "ua", time)<br> V = wrf_user_getvar(a, "va", time)<br>; z = wrf_user_getvar(a,"z",time)<br> qv = wrf_user_getvar(a, "QVAPOR", time)<br><br><br> T_t = T + 290. ; potential temperature in K.<br> P_t = P + PB<br> tk = wrf_tk(P_t, T_t)<br> eth = wrf_eth(qv, tk, P_t)<br> plane = (/342, 1387/)<br> t_plane = wrf_user_intrp3d(eth,p,"v",plane,50.,False)<br> P_plane = wrf_user_intrp3d(P,p,"v",plane,50.,False)<br><br> printVarSummary(t_plane)<br><br> res = True<br> res@MainTitle = "Vertical Cross-Section of Potential Temperature"<br> res@InitTime = False<br> res@TimePos = "Left"<br> res@Footer = False<br> res@lbTitleOn = True<br> res@lbTitleString = "Temperature"<br> res@tmYLMode = "Explicit"<br> res@tmYLValues = (/1000, 850, 700, 500, 400, 300, 250,\<br> 200, 150, 100, 50, 10/)<br> res@tmYLLabels = "" + res@tmYLValues<br> res@tmXBLabelFontHeightF = 0.015<br> res@tmYLLabelFontHeightF = 0.015<br><br><br> tres = res<br> tres@cnFillOn = True<br> tres@cnFillPalette = "BlWhRe"<br> tres@cnSpreadcolor = True<br><br><br> pres = res<br> pres@cnFillOn = False<br> pres@ContourParameters = (/ 2. /)<br> pres@cnInfoLabelFontHeightF = 0.01<br><br><br><br><br> T_contour = wrf_contour(a,wks,t_plane,tres)<br> P_contour = wrf_contour(a,wks,P_plane,pres)<br><br> pltres = True<br> pltres@gsnMaximize = True<br><br> plot = wrf_overlays(a,wks,(/T_contour, P_contour/), pltres)<br><br></div><div class="gmail_default" style="font-family:georgia,serif">end<br><br></div><div class="gmail_default" style="font-family:georgia,serif">I'd really appreciate your help.<br><br></div><div class="gmail_default" style="font-family:georgia,serif">Bests,<br></div><div class="gmail_default" style="font-family:georgia,serif">Melissa <br></div><div class="gmail_default" style="font-family:georgia,serif"><br><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank" rel="noreferrer">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>