[Thread Prev][Thread Next][Index]

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



Dear Ansley,

Thanks for your quick help and welcome.

It seems that SAMPLEXY is sampling the subset data (from
levitus_climatology) 'along' the path given by the 2nd set of data
(data2.dat), right?

I wanted to know the way to get the levitus subset data 'within' the area
specified by a polygon (lon, lat) path of data2. It's somewhat like
masking out all data outside the particular polygon, and use only the data
within.

I'll appreciate your further guidance.

Many thanks.

Cheers,
Dong-Ha Min


On Thu, 6 Mar 2003, Ansley Manke wrote:
> Hi,
> Welcome to the Ferret community.  You want the SAMPLEXY
> function.  There is an example in the Users Guide that shows how
> to use it.  Look at  "SAMPLEXY, defined" in the Users Guide at
> http://ferret.pmel.noaa.gov/Ferret/Documentation/Users_Guide/current/fer_html.htm
>
> Here are the basic steps:
>
> Open the data set to be sampled.  To read your ascii
> file, you can use the FILE command.
>
>   USE levitus_climatology
>   FILE/VAR="xpts,ypts" data2.dat
>   SHOW data
>
>   ! List the surface temperature at the points
>   LIST/K=1 SAMPLEXY(temp[d=1], xpts, ypts)
>
>   ! Plot the temperature at each depth.  The horizontal
>   ! axis is sample point number, an abstract axis.
>
>   SHADE  SAMPLEXY(temp[d=1], xpts, ypts)
>
> Ansley Manke
>
> Dong-Ha Min wrote:
> > Hello.
> >
> > I want to extract the data from a netCDF-format file for a specific
> > geographic region defined by the irregular-shape polygon paths in a
> > separate ascii file. Can someone guide me step by step how to do this?
> >
> > For example, say, I have a levitus_climatology.cdf (data 1) and want to
> > extract the sea surface temperature from the region given by data 2 (see
> > below).
> >
> > data2 (lon, lat)
> > ---------------
> > 160.5 20.5
> > 160.5 30.5
> > 170.5 30.5
> > 170.5 20.5
> > 160.5 20.5
> >
> > I am a beginner of ferret, so forgive me if this is a trivial task.
> >
> > Many thanks in advance.
> >
> > Cheers,
> > Dong-Ha Min
>
> --
> Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246
>


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement