[gradsusr] Use of basemap and country shape file to maskout land features

See Hai Ooi axl419 at yahoo.com
Sat Feb 23 02:55:08 EST 2013


Dear Jennifer,
 
         Perfect ! You solved my problem.  Please see the figure attached.  Also I do not need to draw the shapefile again as shown in my following script:-
 
  'set grads off'
   'set parea 1.0 10.0 1.0 7.0'
   'set mpdraw off' 
*
    'set lat 4 7.5'
    'set lon 115 120'
*
   'set gxout shp'
   'set gxout shaded'
   'set clevs 0.01 0.03 0.05 0.08 0.1 0.3 0.5 0.8 1 3 10 15 20'
   'set ccolor rainbow'
*
   'set csmooth on'
   'set shpopts 0'
   'd chl'
   'draw shp countries'
   'run cbar'
*
........
 
      Again, thank you very much.
 
Ooi
 
 
 

--- On Sat, 23/2/13, Jennifer Adams <jma at cola.iges.org> wrote:


From: Jennifer Adams <jma at cola.iges.org>
Subject: Re: [gradsusr] Use of basemap and country shape file to maskout land features
To: "GrADS Users Forum" <gradsusr at gradsusr.org>
Date: Saturday, 23 February, 2013, 12:44 AM



You could use a shapefile instead of basemap for your continental outlines. Use 'set shpopts' to control the filling color (default is to draw polygons unfilled). Draw your plot with 'set map draw off', then draw the shapefile with the continental outlines filled using the background color, then draw it again unfilled with the color you desire for the continental outlines.  
--Jennifer 



On Feb 22, 2013, at 4:46 AM, See Hai Ooi wrote:







Dear all,
 
        As shown in the attached figure, I used basemap and country shape file consecutively to maskout the land feature so as to display only the chlorophyll-a concentration portion over the sea.  Unfortunately, the available global map resolution in basemap is only medium.  Is there any alternate solution to clip the land portion perfectly for my stated purpose ?  I use window version of OpenGrADS version 2.0.1.oga.1.
 
       Your help will be greatly appreciated.
 
      Best regards.
 
Ooi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130222/ab186276/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chlorophylla.jpg
Type: image/pjpeg
Size: 47702 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130222/ab186276/attachment-0003.bin 


More information about the gradsusr mailing list