Re: Nearest land grid cell

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 12 2011 - 13:29:27 MDT

Christian,

We don't have an automatic way to do this. If you have a land mask variable on your file, then you might be able to use this in conjunction with the ind_xxxx function.

If you can describe your problem in more detail, like what you mean by "certain sites", then I might have a different (better?) solution to provide.

Meanwhile, you might want to look at the "gc_inout" function to see if this is appropriate for your purpose:

http://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml

You can see a graphical example at

http://www.ncl.ucar.edu/Applications/mask.shtml#ex9

(Example mask_9.ncl).

--Mary

On Oct 12, 2011, at 12:13 PM, Christian Oehler wrote:

> Hi,
>
> I want to get data from certain sites in a global grid. Therefore I used
> the function "ind_nearest_coord" to get those sites in my T42 grid. But
> it happens that some of the nearest coordinates lie in the ocean, when
> the site is near the coast.
> Is there an easy way to get the nearest grid cell which lies on the land?
>
> Thanks,
> Christian
> _______________________________________________
> 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 Wed Oct 12 13:29:34 2011

This archive was generated by hypermail 2.1.8 : Wed Oct 12 2011 - 15:59:45 MDT