Re: wrf model divergence for polar stereographic projection

From: Matthew Fearon <Matthew.Fearon_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 04 2013 - 13:57:51 MST

Hi Dennis, Thanks for your note and for pointing me to example 29 under EMSF. I've got everything working for WRF regridding and divergence over the Pole. Attached is a png output plot. Appreciate your help. Matt ________________________________________ From: Dennis Shea [shea_at_ucar.edu] Sent: Tuesday, December 03, 2013 5:27 PM To: Matthew Fearon; ncl-talk_at_ucar.edu Subject: Re: wrf model divergence for polar stereographic projection [2] and [3] definitely will not work. As noted in the function documentation, the spherical harmonic functions *require* a global grid. === The rcm2rgrid and rgrid2rcm are simple (slow) regrid functions. === Try using Example 29 at http://www.ncl.ucar.edu/Applications/ESMF.shtml Good luck On 12/2/13 12:48 PM, Matthew Fearon wrote: > Dear NCL Users: > > I've been attempting to compute WRF model horizontal divergence on a polar stereographic projection (subarea, not Global) with only partial success. Although I've seen a few examples online and in the help, the polar stereographic projection appears put a wrench in those examples. I've tried the following 3 things with only partial success. Any suggestions and or help would be greatly appreciated. Thanks, Matt > > Tried examples: > > 1. uv2dv_cfd, finite centered differences after regridding curvilinear WRF lat/lon2d to rectilinear lat/lon 1d and then going back to curvilinear. This is probably the most preferred method, but in the end, my data only cover a subregion of my original area. I believe this trouble might be related to my computed rectilinear lat/lon 1d values and choosing cyclic correctly, although I tinkered with this too. Result image attached as 1.png. > > -------snip > u = wrf_user_getvar(ff,"ua",0) > v = wrf_user_getvar(ff,"va",0) > > latm2d=ff->XLAT(0,:,:) > lonm2d=ff->XLONG(0,:,:) > fstart=min(latm2d) > fend=max(latm2d) > dims=dimsizes(latm2d) > lat = fspan(fstart, fend, dims(0)) > fstart=min(lonm2d) > fend=max(lonm2d) > lon = fspan(fstart, fend, dims(1)) > > u_grid = rcm2rgrid(latm2d,lonm2d,u,lat,lon,0) > u_grid!0="lev" > u_grid!1="lat" > u_grid!2="lon" > u_grid&lat=lat > u_grid&lon=lon > v_grid = rcm2rgrid(latm2d,lonm2d,v,lat,lon,0) > v_grid!0="lev" > v_grid!1="lat" > v_grid!2="lon" > v_grid&lat=lat > v_grid&lon=lon > div_grid = uv2dv_cfd (u_grid, v_grid, lat, lon, 1) > div = rgrid2rcm (lat, lon, div_grid, latm2d, lonm2d, 0) > fdiv = wrf_interp_3d_z(div, p, plevel) > ------- > > 2. Tried using global function uv2dvF > div = uv2dvF(u,v) > div = div * rho > This works, but gives incorrect values at and near the grid boundaries; likely because my data are not global; perhaps this is expected? Result image attached as 2.png. > > 3. Tried using global function, gradsf. Yields the same results as 2. > udx = u > udy = u > gradsf(u,udx,udy) > vdx = v > vdy = v > gradsf(v,vdx,vdy) > div = udx + vdy > > <http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2dv_cfd.shtml> > > > > _______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk >

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

wrfpolardiv.png
Received on Wed Dec 4 13:58:14 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 04 2013 - 20:42:38 MST