Re: Problem using WhiteGreen colorbar

From: Madeleine Patterson <madeleine.patterson77_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 14 2012 - 11:40:15 MDT

Thanks so much for your help diagnosing my problem!

MP

On Wed, Mar 14, 2012 at 6:41 AM, Mary Haley <haley@ucar.edu> wrote:

> It looks like you have an older version of NCL that doesn't have this
> color map.
>
> You can go to:
>
> http://www.ncl.ucar.edu/current_release.shtml#NewColorTables6.0.0
>
> and download the color table from there.
>
> Then, go to:
>
>
> http://www.ncl.ucar.edu/Document/Graphics/create_color_table.shtml#MoveColorTableFile
>
> for information on where to put the color table.
>
> --Mary
>
>
> On Mar 13, 2012, at 8:01 AM, Madeleine Patterson wrote:
>
> > Hi,
> >
> > I got a multicolored table. I'm using NCL version 6.0.0.
> >
> > However I did get a couple of messages:
> >
> > fatal: cvtStringToMap unable to convert string "WhiteGreen" to ColorMap
> > warning: error retrieving resource wkColorMap fom args - Ignoring Arg.
> >
> > Thanks,
> > M
> >
> > On Wed, Mar 14, 2012 at 4:28 AM, Rick Brownrigg <brownrig@ucar.edu>
> wrote:
> > Wow, I don't see anything in your script. Can you run that little
> colormap-plot script I sent, and do you get a white-green colormap, or
> something multi colored?
> >
> >
> > On Mar 13, 2012, at 11:15 AM, Madeleine Patterson wrote:
> >
> >> Hi,
> >>
> >> Below is the basic script I'm using (that works with the YellowGreen
> and testcmap colorbars). Attached is an example of the output. I'm not
> getting error messages at all.
> >>
> >> Thanks,
> >> M
> >>
> >> ****************************************
> >> begin
> >>
> >> ; loading libraries
> >>
> >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> >>
> >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> >>
> >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> >>
> >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> >> ;*******
> >>
> >> setfileoption("nc","SuppressClose",False)
> >>
> >> in1 = addfile("pctpft.nc","r")
> >> pctpft = in1->PCT_PFT
> >>
> >> wks1 =gsn_open_wks("newpdf","pctpft")
> >> gsn_define_colormap(wks1,"WhiteGreen")
> >> ;gsn_define_colormap(wks1,"GreenYellow")
> >> gsnMaximize = True
> >>
> >> plot = new(16,graphic)
> >> res1 = True
> >>
> >> res1@gsnDraw = False ; Do not draw plot
> >> res1@gsnFrame = False ; Do not advance frome
> >>
> >> res1@cnLinesOn = False
> >> res1@cnFillOn = True ; turn color on
> >> res1@gsnSpreadColors = True
> >> ;res1@cnFillColors = (/2,40,63,95,127,159,191,223,255,255/)
> >> res1@cnLevelSelectionMode = "ManualLevels" ; set manual contour
> >> res1@cnMinLevelValF = 10.0 ; set min contour level
> >> res1@cnMaxLevelValF = 90.0 ; set max contour level
> >> res1@cnLevelSpacingF = 10.0 ; set contour spacing
> >> res1@tiMainString = "% PFT"
> >> res1@tiDeltaF = 1.0
> >>
> >> res1@lbLabelBarOn = False ; turn off individual color bars
> >>
> >> res1@mpLandFillColor = 0
> >> res1@tmYLMajorLengthF = 0. ; set tickmarks
> >> res1@tmYRMajorLengthF = 0. ; set tickmarks
> >> res1@tmXBMajorLengthF = 0. ; set tickmarks
> >> res1@tmXTMajorLengthF = 0. ; set tickmarks
> >> res1@tmYLMinorLengthF = 0. ; set tickmarks
> >> res1@tmYRMinorLengthF = 0. ; set tickmarks
> >> res1@tmXBMinorLengthF = 0. ; set tickmarks
> >> res1@tmXTMinorLengthF = 0. ; set tickmarks
> >> res1@tiXAxisOn = False
> >> res1@tmXBLabelsOn = False
> >> res1@tiYAxisOn = False
> >> res1@tmYLLabelsOn = False
> >>
> >> res1@tiMainFontHeightF = 0.024
> >>
> >> res1@tiMainString = "PFT 1: Bare ground"
> >> plot(0) = gsn_csm_contour_map_ce(wks1,pctpft(0,:,:),res1)
> >>
> >> res1@tiMainString = "PFT 2: NET-temperate"
> >> plot(1) = gsn_csm_contour_map_ce(wks1,pctpft(1,:,:),res1)
> >>
> >> ... etc for 17 plots...
> >>
> >> pres = True
> >> pres@gsnMaximize = True
> >> pres@gsnFrame = False
> >> pres@lbLabelStride = 2
> >> pres@gsnPanelYWhiteSpacePercent = 5
> >> pres@gsnPanelXWhiteSpacePercent = 5
> >> pres@gsnPanelLabelBar = True ; add common colorbar
> >> pres@pmLabelBarHeightF = 0.06
> >> pres@pmLabelBarWidthF = 0.5
> >> pres@lbLabelFontHeightF = 0.012
> >>
> >> gsn_panel(wks1,plot,(/6,3/),pres) ; now draw as one plot
> >>
> >> txres = True ; text mods desired
> >> txres@txJust = "CenterLeft"
> >> txres@txFontHeightF = 0.014 ; font smaller.
> default big
> >>
> >> frame(wks1)
> >>
> >> end
> >>
> >> *************************************
> >>
> >>
> >> On Wed, Mar 14, 2012 at 3:50 AM, Rick Brownrigg <brownrig@ucar.edu>
> wrote:
> >> Appears to look OK here: Can you provide a bit more context?
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Mar 13, 2012, at 10:41 AM, Madeleine Patterson wrote:
> >>
> >> > Hi,
> >> >
> >> > I am trying to redo some plots using the WhiteGreen colorbar but it
> doesn't seem to be working. I'm getting everything other than white or
> green (blues, reds etc):
> >> >
> >> > gsn_define_colormap(wks1, "WhiteGreen")
> >> >
> >> > When I substitute 'testcmap' or 'GreenYellow" my script works just
> fine.
> >> >
> >> > Is there a problem with the WhiteGreen colormap?
> >> >
> >> > Thanks
> >> >
> >> > Madeleine
> >> > _______________________________________________
> >> > ncl-talk mailing list
> >> > List instructions, subscriber options, unsubscribe:
> >> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >>
> >>
> >> <example_WhiteGreen_output.pdf>
> >
> >
> > _______________________________________________
> > 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 Mar 14 11:40:32 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 20 2012 - 15:27:15 MDT