Re: Color Mapping: NCL V5 vs V6

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 19 2011 - 10:35:30 MDT

Paul,

There's not really enough information to go on here. You are using two different routines to do the plotting between V5 and V6, so that could be the source of your differences.

Once difference between the wrf_xxxx plotting routines and gsn_csm_xxxxx is that the WRF routines internally set gsnSpreadColors to True, which forces the full colormap to
be spanned when generated colors for the contours. The gsn routines don't do this. I don't think this is your problem, though, as it looks like you might be setting gsnSpreadColors to True.

If you are setting gsnSpreadColorStart and/or gsnSpreadColorEnd, then this will affect how the colors are selected.

It would help if you could include the full code and an image.

--Mary

On Oct 19, 2011, at 5:21 AM, Paul Scorer wrote:

> Hi,
>
> I am attempting to reproduce plots from NCL Version 5 under Version 6
> and I am finding that the colors are different.
>
> I have set the Color Map (in a "create") thus
>
> "wkColorMap" : "BlAqGrYeOrReVi200"
>
> the relevant opts are
>
> opts_cn@cnLevelSelectionMode = "ManualLevels"
> opts_cn@cnMinLevelValF = 5.
> opts_cn@cnMaxLevelValF = 95.
> opts_cn@cnLevelSpacingF = 5.
>
> I then, in V6, use
>
> gsn_csm_contour_map(wks, mag, opts_cn)
>
> In Version 5, the plotting is (based on) wrf_map()
>
> The data span a range of 0 - 100
>
> The plots were visually different - particularly the top color - so I
> measured the RGB Components of each of the 20 colors in the LabelBar for
> both V5 & V6. The results are:
>
> V6 V5
> Level R G B R G B
> 0 0 0 255 0 0 255
> 1 0 77 255 0 77 255
> 2 0 162 255 0 155 255
> 3 0 240 255 0 232 255
> 4 2 234 190 2 238 204
> 5 5 211 117 4 215 131
> 6 7 186 37 6 193 58
> 7 59 195 12 36 187 13
> 8 139 219 7 109 210 8
> 9 211 242 3 182 233 4
> 10 255 241 0 255 255 0
> 11 255 214 0 255 227 0
> 12 255 184 0 255 199 0
> 13 255 150 0 255 172 0
> 14 255 95 0 255 130 0
> 15 255 45 0 255 80 0
> 16 245 0 8 255 30 0
> 17 194 0 49 235 0 16
> 18 138 0 95 184 0 57
> 19 87 0 136 133 0 98
>
> Can you confirm that the color spread algorithm has changed in V6?
>
> Is there a way to achieve a "Version 5" result?
>
> Many Thanks
>
>
> PaulS
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 19 10:35:38 2011

This archive was generated by hypermail 2.1.8 : Wed Oct 19 2011 - 13:36:10 MDT