To read your lon_lat.txt data,
yes? file/var='xvert,yvert' lon_lat_txtThen there is a Ferret function, PT_IN_POLY,
yes? show function pt_in_polywhich returns a mask which is -1 outside of the described polygon and 1 inside. I'm not sure from your question whether your netcdf files contain gridded data. If the data is on a grid, or if it is on a "degenerate" grid of a single xy location then the function should work.
Return -1 outside, 0 if on edge, 1 if inside polygon
A: Variable on the XY grid and region to be tested
XVERT: X-coordinates of vertices of polygon
YVERT: Y-coordinates of vertices of polygon
Maybe this will get you started.
On 4/3/2014 7:56 PM, nhacoceano . wrote:
I'm relatively new in Ferret. I have a collection of netcdf data, 5 different files each one within a particular domain with lon,lat coordinates. I will collect temporal series from a lon, lat spot. And I need to delimit the area of each domain to get the temporal data from the right domain (netcdf file).
For this I have the polygon of each domain. For example, one polygon.
~$ cat lon_lat.txt
-51.5694966551446 -27.25074563697085-51.9358954273831 -34.45036737205019-44.12361781657283 -34.25415718650989-44.75504598711086 -26.95605841341487-51.5694966551446 -27.25074563697085
How can I start to do that in ferret?
Thanks in advance for any help.
Adriano Wiermann Barroso
OceanólogoUniversidade Federal do Rio Grande - FURG/RSCurrículo Lattes: http://lattes.cnpq.br/5176193025210848