Re: spread color plot in opt@pltColorMap

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 18 2012 - 10:59:14 MDT

You can always look at the code. The loaded libraries are
NCL scripts.

%> less $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl

line 636 and the lines around it are commented.

  634 ;;work = x($dNam(1)$|:,$dNam(2)$|:,$dNam(0)$|:) ; reorder
(lat,lon,time)
  635 ;;work = dtrend( work , False ) ; remove mean + overall long
term temporal trend
  636 ;;work = dtrend_msg(ispan(0,ntim-1,1)*1.0, work, False, False) ;
remove just trend
  637 ;;if (isatt(work,"_FillValue")) then
  638 ;; delete(work@_FillValue) ; dtrend_msg adds
this att
  639 ;;end if

So ... what version of NCL are you using?

%> ncl -V

On 7/18/12 10:44 AM, antonio avio wrote:
> Dear NCL and Dennis,
>
> Sory for the typos in previous email. I did use "" after
> command opt@pltColorMap
> and I also called load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>
> The error that i got by compiling this command is:
> *fatal:["NclVar.c":1376]:Assignment type mismatch, right hand side can't
> be coerced to type of left hand side*
> *fatal:Execute: Error occurred at or near line 626 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl*
>
> fatal:Execute: Error occurred at or near line 39
>
> Herewith i enclosed the script that i used to accomplish this purpose.
> Thanks,
> Antonio
>
>
> On Wed, Jul 18, 2012 at 4:36 PM, Dennis Shea <shea@ucar.edu
> <mailto:shea@ucar.edu>> wrote:
>
> Another person me the following ...
>
>
> -------- Original Message --------
> Subject: Re: spread color plot in opt@pltColorMap
> Date: Wed, 18 Jul 2012 08:34:27 -0600
>
>
> I think he needs to load the color map though with
> gsn_define_colormap... Also, when he sets opt@pltColorMap, the
> colormap on the right hand side should be in " "...
>
>
> On Jul 18, 2012, at 7:53 AM, Dennis Shea <shea@ucar.edu
> <mailto:shea@ucar.edu>> wrote:
>
> opt@gsnSpreadColors = False
>
> should be
> opt@gsnSpreadColors = True
>
> The opt@gsnSpreadColorStart, opt@gsnSpreadColorEnd
> have no effect if gsnSpreadColors = False
>
> On 7/17/12 11:59 PM, antonio avio wrote:
>
> Hello,
> I wonder is it possible to set the colors that appears in
> the plot if
> let say, I use the command :
>
> ---------diagnostic_cam.ncl"--__--------
> pltColorMap = "amwg_blueyellowred"
> if (opt .and. isatt(opt, "pltColorMap") ) then
> pltColorMap = opt@pltColorMap
> end if
> ------------------------------__------------------------
> thus, i implemented the procedure like this:
>
> opt = True
> *opt@pltColorMap=amwg___blueyellowred ; spreading from 2
> until 17 index*
> opt@gsnSpreadColors = False
> *opt@gsnSpreadColorStart=10*
> * opt@gsnSpreadColorEnd= 17*
>
> However, the results is still the same, nothing changed.
> Any idea?
> Thanks for your help.
>
> Antonio.
>
>
>
> _________________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/__mailman/listinfo/ncl-talk
> <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
> <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 Jul 18 10:59:25 2012

This archive was generated by hypermail 2.1.8 : Wed Jul 18 2012 - 14:33:00 MDT