Re: filled contour over filled map with transparent missing values

From: Xanthe Papadakis <xpapadak_at_nyahnyahspammersnyahnyah>
Date: Thu, 06 Jul 2006 17:47:02 -0400

Thanks Adam!

I was setting res_at_cnFillMode="RasterFill", which I just read won't
accomodate transparent values. I changed back to the default of
"AreaFill" and it is working ok now.

I had wanted to use RasterFill so that I could reduce cnLevelSpacingF,
because with AreaFill I would have had to increase the wsMaximumSize and
the plotting took too long. But AreaFill will be adequate. I also
tried CellFill and I didn't like the look of having cell boundaries and
I didn't know if there was a way to just make them the same color as the
cell.

Thanks again,
Xanthe

Adam Phillips wrote:
> 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_at_mpMinLatF = 20.
> res_at_mpFillOn=True
> res_at_mpFillBoundarySets="Geophysical"
> res_at_mpOutlineOn="True"
> res_at_mpLandFillColor="Green"
> res_at_mpInlandWaterFillColor="Blue"
> res_at_mpOceanFillColor="Blue"
> res_at_cnMissingValFillColor=-1
> res_at_cnFillOn = True
> res_at_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_at_mpFillOn=True
>> res_at_mpFillBoundarySets="Geophysical"
>> res_at_mpOutlineOn="True"
>> res_at_mpLandFillColor="Green"
>> res_at_mpInlandWaterFillColor="Blue"
>> res_at_mpOceanFillColor="Blue"
>>
>> clddata@_FillValue = -999
>> res_at_cnMissingValFillColor=-1
>>
>> res_at_cnFillOn = True
>> res_at_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
>
>
>
> ------------------------------------------------------------------------
>

-- 
Xanthe Papadakis
AER
131 Hartwell Ave
Lexington, MA 02421
781-761-2252
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 06 2006 - 15:47:02 MDT

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