<div dir="ltr"><div><div>Hi, <br></div>I'm running one of the idealized cases - hill2d simulations in WRF. <br></div><div>I'm looking at gravity waves produces by a mountain in the domain and trying to plot both the mountain and the wave on the same plot. When I do this there are W values inside the mountain which is obviously not correct. <br><br></div><div>I should probably interpolate the W as well as Z to height levels ? I m trying to do that but my fields are all 2D ( NTxNZxNX) and the NCL-Wrf functions are asking for an at least 3D field. <br></div><div>Is there any function I could use to interpolate the output from an idealized simulation to height/pressure levels ? <br></div><div><br></div><div>My code and a printout of the code is below: <br><br> a = addfile("wrfout_d01_0001-01-01_00:00:00","r")<br> type = "pdf"<br> times = wrf_user_list_times(a) ; get times in the file<br> ntimes = dimsizes(times) ; number of times in the file<br> time = -1<br> u_in = wrf_user_getvar(a,"ua",time) ; ua is u averaged to mass points<br> v_in = wrf_user_getvar(a,"va",time) ; va is v averaged to mass points<br> w_in = wrf_user_getvar(a,"wa",time) ; vertical velocity<br> th_in = wrf_user_getvar(a,"th",time) ; get temperature (C)<br> z_in = wrf_user_getvar(a, "z",time) ; grid point height<br> ter_in = wrf_user_getvar(a,"HGT",time) ; need terrain height sometimes<br> printVarSummary(ter_in)<br><br> u = u_in(:,:,0,:)<br> v = v_in(:,:,0,:)<br> w = w_in(:,:,0,:)<br> th = th_in(:,:,0,:)<br> z = z_in(:,:,0,:)<br>; ter = ter_in(:,:,0,:)<br> dimsrh=dimsizes(w)<br> printVarSummary(w)<br> printVarSummary(z)<br> printVarSummary(ter_in)<br>;; shold interpolate terrain and w to the same z or pressure coordinates<br> w!1="height"<br> w&height=z(0,:,0)<br><br>; printVarSummary(z)<br>; printVarSummary(ter)<br>; printVarSummary(w)<br>;<br>; w_plane = wrf_user_vert_interp(a,w(0,:,:),"ght_msl",z(0,:,0),False)<br>;; printVarSummary(w_plane)<br><br><br></div><div>Printout: <br></div><div><br>Variable: ter_in<br>Type: float<br>Total Size: 11256 bytes<br> 2814 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [Time | 7] x [south_north | 2] x [west_east | 201]<br>Coordinates: <br>Number Of Attributes: 6<br> FieldType : 104<br> MemoryOrder : XY <br> description : Terrain Height<br> units : m<br> stagger : <br> coordinates : XLONG XLAT XTIME<br><br>Variable: w<br>Type: float<br>Total Size: 337680 bytes<br> 84420 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [Time | 7] x [bottom_top | 60] x [west_east | 201]<br>Coordinates: <br>Number Of Attributes: 6<br> FieldType : 104<br> MemoryOrder : XYZ<br> description : z-wind component<br> units : m s-1<br> stagger : <br> coordinates : XLONG XLAT<br><br>Variable: z<br>Type: float<br>Total Size: 337680 bytes<br> 84420 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [Time | 7] x [bottom_top | 60] x [west_east | 201]<br>Coordinates: <br>Number Of Attributes: 6<br> FieldType : 104<br> MemoryOrder : XYZ<br> description : Height<br> units : m<br> stagger : <br> coordinates : XLONG XLAT<br><br>Variable: ter_in<br>Type: float<br>Total Size: 11256 bytes<br> 2814 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [Time | 7] x [south_north | 2] x [west_east | 201]<br>Coordinates: <br>Number Of Attributes: 6<br> FieldType : 104<br> MemoryOrder : XY <br> description : Terrain Height<br> units : m<br> stagger : <br> coordinates : XLONG XLAT XTIME<br></div><div><br>Thanks, <br></div><div>Ioana <br></div><div><br></div><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(61,133,198)"><span style="font-family:georgia,serif"><span><b>Ioana Colfescu </b><br></span></span></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(61,133,198)"><span style="font-family:georgia,serif"><span>Research Scientist <br></span></span></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(61,133,198)"><span style="font-family:georgia,serif"><span>National Centre for Atmospheric Science <br></span></span></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(61,133,198)"><span style="font-family:georgia,serif"><span>School of Earth and Environment <br></span></span></span></span></div><div><span style="background-color:rgb(243,243,243)"><span style="color:rgb(159,197,232)"><span><span style="font-family:georgia,serif"><span><span style="background-color:rgb(255,255,255)"><span style="color:rgb(61,133,198)">University of Leeds </span></span><br></span></span></span></span></span></div><div dir="ltr"><span style="color:rgb(159,197,232)"><span><span style="font-family:georgia,serif"><span><br></span></span></span></span></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div>