comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Masking of land/sea
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Masking of land/sea [message #13592] Wed, 25 November 1998 00:00 Go to next message
Ole Bossing Christens is currently offline  Ole Bossing Christens
Messages: 12
Registered: January 1998
Junior Member
Dear all of you,

I hope this is a simple question:

I am using IDL 5.1 for IRIX at an O2.

I have an irregular grid of land-based observations, which I want to
plot on a map using CONTOUR,/irregular,/cell_fill. I will show map and
grid using (MAP_SET), MAP_CONTINENTS, and MAP_GRID. Is there a way to
avoid contour colors over sea, where they do not have a physical
meaning? Something reciprocal to MAP_CONTINENTS,/fill_continents , may
be?

Thanks in advance! /Ole
--
Ole B�ssing Christensen, Ph.D. E-mail: bossing@dmi.dk
Climate Research Div. Phone : (+45) 39 15 74 26
Danish Meteorological Institute Fax: (+45) 39 15 74 60
Lyngbyvej 100, DK-2100 Copenhagen �, Denmark
Re: Masking of land/sea [message #13768 is a reply to message #13592] Fri, 27 November 1998 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Ole Bossing Christensen wrote:

> Dear all of you,
>
> I hope this is a simple question:
>
> I am using IDL 5.1 for IRIX at an O2.
>
> I have an irregular grid of land-based observations, which I want to
> plot on a map using CONTOUR,/irregular,/cell_fill. I will show map and
> grid using (MAP_SET), MAP_CONTINENTS, and MAP_GRID. Is there a way to
> avoid contour colors over sea, where they do not have a physical
> meaning? Something reciprocal to MAP_CONTINENTS,/fill_continents , may
> be?
>
> Thanks in advance! /Ole
> --
> Ole B�ssing Christensen, Ph.D. E-mail: bossing@dmi.dk
> Climate Research Div. Phone : (+45) 39 15 74 26
> Danish Meteorological Institute Fax: (+45) 39 15 74 60
> Lyngbyvej 100, DK-2100 Copenhagen �, Denmark

if you are only looking for a solution in screen resolution, you could
(1) plot you rmap with filled continents
(2) read the image with tvread()
(3) extract all "ocean" points with where(image eq 0) ; or whatever
your background color is
(4) draw your contours
(5) read your image again with tvread()
(5) put the oceans back in: image2[ocindex] = background_color
(6) display the result with tv,image2

for a somewhat better resolution you could do all of the above in a big
pixmap, but if you are looking for a "generic" postscript resolution
capable way... I don't know...

Hope this helps,
Martin.

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Curious FindFile behavior
Next Topic: Bug in XYOUTS?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:51:09 PDT 2025

Total time taken to generate the page: 0.00881 seconds