to separate land and ocean points

Prince K. Xavier xavier at CAOS.IISC.ERNET.IN
Mon Feb 21 00:27:31 EST 2005


Hello Sahai,

basemap does not really mask the data. It is an indirect way to mask the
land/ocean by plotting filled polygons over the continental borders.

Your problem may be approached in a slightly different way. Instead of
finding out what is the color at each point, you can find out whether the
values over land is 1 or over the ocean is 0, from a suitable mask file
(downloadable in many resolutions, in which all ocean points are marked as
0 and all land points as 1). Then translate this information to color as
you require. For example,

.....
.....
'set lat 20.625'
'set lon 110.75'
'd variable'
val = subwrd(result,4)
if(val=1)
color = 3
else
color = 4
endif
.....
.....



On Mon, 21 Feb 2005, Dr. A. K. Sahai wrote:

>
> Dear Grads Users,
> This is second time I am posting this problem.
>                 Suppose I have masked ocean (in blue color) and land (in
> green color) with basemap.gs.
> Now I want to know what is the color filled at a particular point. Since
> I have to determine it for sevaral
> thousand points, it has to be done automatically in a grads script. How
> can I do it. For example I have
> a point with latitude 20.625 and longitude 110.75. Then I have to do
> 'set lat 20.625'
> 'set lon 110.75'
> then what querry should I ask to know the filled color at that point.
>
> Hope someone will give some clue.
>
> Regards
> Sahai
>
> --
> ===============================================================================
> Dr. Atul Kumar Sahai
> Scientist-D
> Climate & Global Modelling Division
> Indian Institute of Tropical Meteorology
> Homi Bhabha Road, Pune 411 008, India
>
> Phone: +91-20-2589-3600 ext 302 (Off);  +91-20-2588-3821 (Res)
> Fax:   +91-20-2589-3825
> email: sahai at tropmet.res.in
> ===============================================================================
>
>
>

--
Prince K XAVIER
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
Bangalore - 560 012
INDIA
http://caos.iisc.ernet.in/hpg/students/prince.html
__________________________________________________
Phone No.
+91-80-2293 2505(Office)
+91 98808 19172 (Mobile)



More information about the gradsusr mailing list