[ncl-talk] question about get locations

Dennis Shea shea at ucar.edu
Wed Oct 12 15:34:48 MDT 2016


Is there an **NCL supported**  "method to get the locations of a threshold
value?"

IE: threshold value => contour level? To my knowledge, the short answer is
"no".

I know of no way to retrieve the lat/lon locations of a specific or an
arbitrary contour level.

====

This is a task that is conceptually easy to address. One simple method is
to use linear interpolation. (see attached)  However, in practice, there
are issues.

Look at the main plot for zonal wind:
      http://www.ncl.ucar.edu/Applications/cylineq.shtml

Say, your threshold value is 12.3 m/s.

At each longitude, there are one or more '12.3' values looking pole_to_pole.

Choose -8.0 .... at some longitudes there is no such value while at others,
there are multiple values (closed contours). What to do? How to return
reasonable values?

I am attaching a simple scrip and function that uses the uv300.nc file
distributed with NCL.
You can play with this. Currently, it returns the locations of the 1st
encountered threshold value.

If you are looking at (say) the northern hemisphere and there is one
5880gpm contour, it may work for you.

Good luck

On Sun, Oct 9, 2016 at 10:57 PM, 陈婕 <chenj2014 at lzu.edu.cn> wrote:

> Dear Mr/Mrs,
>
>  I want to get locations of a threshold value. For example, I want to know
> the locations of 5880gpm contour line at 500hpa. Actually,I only can find
> the approximate values and their locations from the original grid data. Is
> there a function for interpolation or a method to get the locations of a
> threshold value?
>
>
> Best regards,
> Jie Chen
> _______________________________________________
> 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/20161012/38e34ecf/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_contour_locations.ncl
Type: text/x-ncl
Size: 2520 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161012/38e34ecf/attachment.bin 


More information about the ncl-talk mailing list