[ncl-talk] Problematic when changing color palette in the wrf_contour function

Lisi Pei lisipei at msu.edu
Tue Jan 20 12:06:27 MST 2015


Hi There,

I tried a couple of hours already on changing the color table in the wrf_contour function. It seems that other than the default color map it is problematic to apply any other color maps.
What I really want to apply is the symmetrical color tables like BlWhRe. I scaled my data contour parameter as (/-10.,10.,10./) for example to check if this color table displays the white color. It is not. I want to have the white color displaying the 0s in the data, would you show me how? And also the main problem in applying this color table in the wrf_contour is that the offset is significant which means the white color never centers at the 0.
Part of my codes are here:

  cmap = read_colormap_file("BlWhRe")
  cmap_r = cmap(::-1,:)

        ;opts at gsnSpreadColors = True
        opts at cnFillColors = cmap_r
        delete(opts at ContourParameters)
        opts at ContourParameters = (/ -150., 150., 10. /)
        contour_pbl_diff = wrf_contour(pbl_irri,wks,pbl_ir-pbl_no,opts)
        plot(2) = wrf_map_overlays(wrf,wks,(/contour_pbl_diff/),pltres,mpres)

I even tried subset the BlWhRe to select the range centered at the white color (36:68,37:67,38:66...) but the offset is still there.

Thanks..


L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150120/37e8d865/attachment.html 


More information about the ncl-talk mailing list