Re: wrf model divergence for polar stereographic projection

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 03 2013 - 18:27:43 MST

[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
Received on Tue Dec 3 18:27:49 2013

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