[Thread Prev][Thread Next][Index]

Re: extracting the netCDF data within the polygon path (ascii)



On Tue, 11 Mar 2003, Dong-Ha Min wrote:
> Should I always find a proper equation using the [lon,lat] polygon points
> to mask some region? It will be quite challenging for me to do so, because
> I need to use somewhat complex polygon paths for different country
> boundaries for my application.

The hand-coding method I outlined in my previous email is only practical
for simple polygons -- more general "polygon clipping" is fairly
complicated and I'm not aware of an automatic way to do it in Ferret.  A
Google search turned up some NCAR Graphics routines (Fortran) that might
be helpful in writing an external function to create a mask:

   http://ngwww.ucar.edu/ngdoc/ng/supplements/polypack

Or you could use GMT, as you did before, to output your USA mask to an
ASCII or NetCDF file that you then could read into Ferret.

Anyone have any better ideas?


> (ps) Is the \ sign new feature? I got an error with the line
>      "let/title.....  sst_snowcone = \".

The backslash (\) is a line-continuation character -- it was introduced in
Ferret version 5.3.

Cheers,

Andrew

+--------------------------------------------------------+
|   Dr. Andrew T. Wittenberg   |        GFDL/NOAA        |
|      atw@gfdl.noaa.gov       |      Princeton, NJ      |
+--------------------------------------------------------+




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement