[ncl-talk] test if lat-lon point is within gridded model domain

Jared Lee jaredlee at ucar.edu
Mon Nov 20 16:26:45 MST 2017


Hi, I have a WRF domain on a polar stereographic grid (which also happens
to span the dateline), and I want to interpolate model data to MADIS
observation locations that are within my domain. Is there a straightforward
way to evaluate which observation lat/lon points are outside the WRF grid?

Because it's a polar stereographic grid, doing a first pass to eliminate
MADIS stations by comparing to the min/max latitude and longitude of the
WRF grid still leaves a ton of geographic area that would be inside that
lat/lon box but outside the WRF grid (and that's complicated further by the
WRF domain spanning the dateline).

I tried using rcm2points to do horizontal interpolation, but that function
is still interpolating to numerous grid points that are thousands of km
outside my WRF domain. I also tried feeding wrf_user_ll_to_ij some lat/lon
values for points well outside my domain, and it gives me nonsense (but
non-missing) values for nearest grid points.

Anyone have any ideas? Or is there a function that already exists to do
this that I'm apparently not seeing? It seems like a function to return the
(i,j) values of the four surrounding grid points would be an ideal way to
accomplish this and be useful in additional contexts and applications.

Jared

-- 
===============================
Jared A. Lee, Ph.D.
Project Scientist I
Research Applications Laboratory
National Center for Atmospheric Research
Boulder, Colorado, USA

Member, AMS Planning Commission

Email: jaredlee at ucar.edu (w)
Phone: 303.497.8485 (w)
Web: https://staff.ucar.edu/users/jaredlee
===============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171120/09a35e26/attachment.html>


More information about the ncl-talk mailing list