Re: Ayman Ghanem's question.

From: Dave Kennison (kennison@XXXXXX)
Date: Wed Jan 11 1995 - 16:30:43 MST


Ayman Ghanem writes:

> I'm sorry if a question like this was posted before. I'm new to the group
> and to the NCAR graphics.
> I'm using a graphics package called 'pltgks' which uses the NCAR graphics
> routines for non-rectangular projections. When I select the projection type
> to be 'ST' for polar projection, I can only use one of four outlines;
> 'CO','PO','PS','US'. My understanding is that these outlines are read from
> a data file called EZMAP.
> What I need to do is use my own model map outline which is 4x5. I have a
> map for my model wich only specifies land and ocean points in terms of
> surface types (0 and 1's) but not in real longitude and latitude.
>
> What I'd like to know is how do I inlcude my model map in the EZMAP data
> outlines?, or , if there is an alternative way that allows me to project
> the gridded model map on polar map.

I don't know what "pltgks" is or what version of NCAR Graphics it uses,
which may have bearing on the following observations:

The outline datasets 'CO', 'PO', 'PS', and 'US' (for "Continental Outlines",
"World Political Outlines", "Political and State Outlines", and "United
States Outlines", respectively) are used by a package of NCAR Graphics
routines collectively referred to as EZMAP; each of the datasets contains
the longitudes and latitudes required to define a particular group of
boundary lines . You should also be able to select the outline dataset
"NO" (for "No Outlines"), in which case the map will consist of, at most,
a perimeter, a limb line (for certain projections, like the orthographic),
parallels and meridians, and a few labels (like "NP" for "North Pole", "SP"
for "South Pole", "EQ" for "EQuator", and "ID" for "International Dateline").
EZMAP includes other routines allowing you to draw arbitrary lines on a map,
as long as you have the latitudes and longitudes of the points defining them.
In this case, you appear not to have such points. Instead, you appear to
have something like an array of 0s and 1s, with 0s over ocean and 1s over
land. I can't tell from what you say whether the array is a rectangular
grid or not and, if so, whether the indices of the array are linear functions
of latitude and longitude or linear functions of the X and Y coordinates
on a particular projection, which changes the way you would have to proceed.
If you do have a rectangular grid, though, two different general techniques
come to mind: 1) you could draw the .5 contour line of the 0/1 array to
get "coastlines", or 2) you could use calls to the GKS routine GFA to fill
the grid boxes in such a way as to differentiate "land" from "ocean". The
first of these will be easier if you have the NCAR Graphics routine CONPACK
available.



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:31 MDT