Hi,
I think the problem is with these lines:
 undef("l2_norm_a")
 function l2_norma( x[*][*][*][*]:numeric, wy[*], wz )
and:
 undef("l2_norm_b")
 function l2_normb( x[*][*][*][*]:numeric, wy[*], wz )
On the "undef" line, it should read:
 undef("l2_norma")
and
 undef("l2_normb")
I think you are getting these errors because you are including this script twice:
load "NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "./diagnostics_cam.ncl"
Make sure you only load the modified copy.  Meanwhile, I'll fix the undef errors on our end.
--Mary
On Jul 18, 2012, at 3:08 PM, antonio avio wrote:
> Hallo,
> 
> Thanks for the suggestions,
> I change the standard code of diagnostics_cam.ncl, and it worked nice.
> The range of the colors has changed but then i got the errors message: 
> 
> fatal:syntax error: line 1468 in file ./diagnostics_cam.ncl before or near l2_norma 
>  function l2_norma
> -----------------^
> 
> fatal:Function identifier is defined
> fatal:syntax error: line 1469 in file ./diagnostics_cam.ncl before or near local 
>  local
> -----^
> 
> fatal:error in statement
> fatal:Variable (x) is undefined
> fatal:Execute: Error occurred at or near line 1472 in file ./diagnostics_cam.ncl
> 
> fatal:syntax error: line 1510 in file ./diagnostics_cam.ncl before or near l2_normb 
>  function l2_normb
> -----------------^
> 
> fatal:Function identifier is defined
> fatal:syntax error: line 1511 in file ./diagnostics_cam.ncl before or near local 
>  local
> -----^
> 
> fatal:error in statement
> fatal:Variable (x) is undefined
> fatal:Execute: Error occurred at or near line 1514 in file ./diagnostics_cam.ncl
> 
> 
> apart of these errors, the plot was fine, i just worry whether this error message
> influenced the real calculation in analysis?
> Thanks a lot.
> 
> 
> On Wed, Jul 18, 2012 at 10:08 PM, Mary Haley <haley@ucar.edu> wrote:
> Antonio,
> 
> wkSpaceTime is very limited on what plotting resources it allows you to set.  Please see the documentation to see what you can change:
> 
>    http://www.ncl.ucar.edu/Document/Functions/Diagnostics/wkSpaceTime.shtml
> 
> However, as Dennis stated earlier, you can modify the $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl script yourself and set any resources you want.
> 
> To do this, I first suggest copying the "diagnostics_cam.ncl" script into your own directory:
> 
>   cp $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl .
> 
> Then, edit this copy of diagnostics_cam.ncl and search for
> 
> procedure wkSpaceTime
> 
> Then, search for:
> 
>    res = True
> 
> After this line, you can add the gsnSpreadXXX resources you want to set.
> 
> Finally, in your NCL script, instead of loading:
> 
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
> 
> you want to load:
> 
> load "./diagnostics_cam.ncl"
> 
> --Mary
> 
> 
> On Jul 18, 2012, at 1:20 PM, antonio avio wrote:
> 
> > Dear Dennis and Marry,
> >
> > Sorry its offline, i think its better to clarify here first.
> > I have fixed the problem of the errors.
> > I re-run again the script, all is well, but the range of color never change, still standard
> > amwg_blueyellowred from with index from 2-17 from "Purple" to "Magenta", and i also get the black color in the bar.
> > I just want to cut the color from "White to Magenta".
> >
> > This is my big curiosity, why the range of color never changed even though i have changed the command as follow:
> >
> > 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/diagnostics_cam.ncl"
> >
> > [SNIP]
> >
> >   opt      = True
> >   opt@debug       = True
> >   opt@pltType     = "png"        ; create encapsulated postscript
> >   opt@cnLinesOn   = False
> >   opt@pltColorMap = "amwg_blueyellowred"       ; change the default color map
> >   opt@gsnSpreadColors      = True
> >   opt@gsnSpreadColorStart=10
> >   opt@gsnSpreadColorEnd= 17
> >   opt@spdSkip     = 2            ; decimate to two samples per day
> >
> >   wkSpaceTime (omega,  diro, case, VAR             \
> >               ,latN, spd , nDayWin, nDaySkip, opt  )
> >
> >
> > Here is i enclosed the plot:
> > Thanks,
> >
> > Antonio
> > University of Lisbon
> > Portugal
> >
> 
> 
> <diagnostics_cam.ncl>_______________________________________________
> 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 Jul 18 15:28:51 2012
This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT