Re: filled contour over filled map with transparent missing values

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 06 Jul 2006 11:35:57 -0600

Hi Xanthe,

I tried using the following code to reproduce your issue:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
a = addfile("trenberth.slp.189901-200612.nc","r")
slp = a->SLP({200512},:,:)
slp({40:70},{:60}) = slp@_FillValue
wks = gsn_open_wks("ps","color")
gsn_define_colormap(wks,"BlWhRe")
        
res = True
res@mpMinLatF = 20.
res@mpFillOn=True
res@mpFillBoundarySets="Geophysical"
res@mpOutlineOn="True"
res@mpLandFillColor="Green"
res@mpInlandWaterFillColor="Blue"
res@mpOceanFillColor="Blue"
res@cnMissingValFillColor=-1
res@cnFillOn = True
res@gsnSpreadColors=True
plot=gsn_csm_contour_map_polar(wks,slp,res);
end
        
I attached the resulting image. (Converted to .gif from .ps.)
I think this is what you wanted. Are you using other resources besides
the ones you included in your email?
Adam

Xanthe Papadakis wrote:
> Hello,
>
> Does anyone know if it's possible to display a filled contour plot with
> "transparent" missing values, over a filled map plot, so that the filled
> map and it's colors show through where the data has missing values?
> (e.g. Display just clouds over a filled map so that clear areas don't
> cover the map). The transparent values don't seem to be truly transparent.
>
> This works fine if the map plot is not filled, or if the contour plot
> uses just contour lines instead of contour fill, but not if both
> cnFillOn=True and mpFillOn=True
>
> Below is a snippet of the code:
>
> res@mpFillOn=True
> res@mpFillBoundarySets="Geophysical"
> res@mpOutlineOn="True"
> res@mpLandFillColor="Green"
> res@mpInlandWaterFillColor="Blue"
> res@mpOceanFillColor="Blue"
>
> clddata@_FillValue = -999
> res@cnMissingValFillColor=-1
>
> res@cnFillOn = True
> res@gsnSpreadColors=True
>
> plot=gsn_csm_contour_map(wks,clddata,res);
>
>
> Thanks!
> Xanthe
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli


_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

color.gif
Received on Thu Jul 06 2006 - 11:35:57 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 10 2006 - 09:18:19 MDT