<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Trebuchet MS","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>Hi all,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>I’m trying to get a lower atmosphere vertical profile from some WRF output data I have (I only want the first 200 meters of the atmosphere) and for some reason, when I use the wrf_user_intrp3d function, and then plot the data, it removes the lowest 100 m of the atmosphere from the data! I know there is data there, because I have model layers starting as low as 8m, and if I plot horizontal data, I have no problem getting the data from the layers below 100 m. Has anyone else experienced this? Any guidance would be appreciated! The code is below.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>Joe Brodie<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>-------- NCL CODE<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; WRF windfarm output processesing - VERTICAL CROSS SECTION<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; J. F. Brodie<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; University of Delaware<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; 8 August 2012<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>begin<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> a = addfile("wrfout_farm1_newlays.nc","r")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; a = addfile("wrfout_d01_0001-01-03_00:00:00.nc","r")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> type = "x11" ; X11 visual output<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; type = "pdf" ; PDF output<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> plane = (/ 17.0, 17.0/) ; x,y coordinate for vertical cross<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> angle = 90.0 ; 90 degrees = W-E cross section<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> FirstTime = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> wks = gsn_open_wks(type,"WRF_AWEA_farm1")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> gsn_define_colormap(wks,"precip3_16lev")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> gsn_reverse_colormap(wks)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; plot options<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> res = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> res@MainTitle = "WRF WINDFARM - AWEA"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> pltres = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> height = 200. ; maximum height I would like displayed, meters<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; let's get all the times<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> times = wrf_user_getvar(a,"times",-1)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> ntimes = dimsizes(times)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> do it = 0,ntimes-1,1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> print("Working on time " + times(it) )<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> res@TimeLabel = times(it)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> u = wrf_user_getvar(a,"ua",it)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> v = wrf_user_getvar(a,"va",it) ; U and V velocities averaged to mass pts<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> z = wrf_user_getvar(a, "z",it) ; grid point height <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> if ( FirstTime ) then<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> zz = wrf_user_intrp3d(z,z,"v",plane,angle,False)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> b = ind(zz(:,0) .gt. height )<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> zmax_pos = b(0) - 1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> if ( abs(zz(zmax_pos,0)-height) .lt. abs(zz(zmax_pos+1,0)-height) ) then<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> zspan = b(0) - 1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> else<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> zspan = b(0)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> end if<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(zz)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(b)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> FirstTime = False<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> end if<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> u_plane = wrf_user_intrp3d(u,z,"v",plane,angle,False)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> v_plane = wrf_user_intrp3d(v,z,"v",plane,angle,False)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> u_plane@units = "m/s"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> v_plane@units = "m/s"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> spd = (u_plane*u_plane + v_plane*v_plane)^(0.5) ; convert to speed<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> spd@description = "Wind Speed"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> spd@units = "m/s"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; contour of speed<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> opts = res<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> opts@cnFillOn = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> opts@trYMinF = 0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> opts@trYMaxF = zspan<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; contour = wrf_contour(a,wks,u_plane(0:zmax_pos,:),opts)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> contour = wrf_contour(a,wks,spd(0:zmax_pos,:),opts)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(opts)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>; overlay plots together<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> plot = wrf_overlays(a,wks,(/contour/),pltres)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(u)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(u_plane)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(v)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(v_plane)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(z)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> delete(spd)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'> end do<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>end<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>--<br>Joseph F. Brodie<br>Graduate Research Assistant, Center for Carbon-free Power Integration<br>School of Marine Science and Policy<br>College of Earth, Ocean, and Environment<br>University of Delaware<br>007A Robinson Hall<br>Newark, DE 19716 USA<br>Phone: +1 302-831-0694<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"'>Fax: +1 302-831-6838<br>Email: jbrodie@udel.edu<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>