[ncl-talk] Vertical interpolation to a 2d array instead of a constant pressure/height
Bill Ladwig
ladwig at ucar.edu
Wed Oct 5 11:01:19 MDT 2016
Hi Michael,
There is nothing in the WRF routines that will do this out of the box, but
you can manually construct this yourself using wrf_interp_1d. See
http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_interp_1d.shtml.
Assuming I'm completely understanding what you are trying to do, you would
have to iterate over the nx x ny horizontal grid, then supply the vertical
column values for each grid point and run the wrf_interp_1d routine to get
the interpolated value. So, at each horizontal grid point, v_in would be
the vertical column for your variable of interest, z_in would be the
vertical coordinates for the v_in column, and z_out would be the desired
surface pressure value (as an array with one element).
This will probably take a while to run, so plan accordingly.
Hope this helps,
Bill
On Tue, Oct 4, 2016 at 11:59 PM, Michael Weston <mjweston at masdar.ac.ae>
wrote:
> Folks,
>
> I am looking for an ncl function that can do vertical interpolation in 3d,
> but instead of using a constant level to interpolate to, I want to use an
> array variable to interpolate to.
>
> e.g. from existing function wrf_interp_3d_z
>
> function wrf_interp_3d_z (
> v3d : numeric,
> vert : numeric,
> loc [1] : numeric
> )
>
> loc is a constant pressure or constant height.
> I want to use "surface pressure -x" to get variables at the top of the
> surface layer, so loc would be a 2d array with ny x nx.
>
> Does such a function exist?
>
> Thanks
>
> --
>
> *Michael* *Weston*
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161005/a7f0d0da/attachment.html
More information about the ncl-talk
mailing list