Re: spread color plot in opt@pltColorMap

From: antonio avio <antonioavio_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 18 2012 - 16:06:12 MDT

Dear NCL,
Thanks for the suggestions, yes now everything is good enough,
I will start to play with diagnostics_**cam.ncl and also try to change some
codes inside it esp for wkspace analysis.
Anyway, thanks a lot to Dennis and Marry for your "to-do point" suggestion!

Antonio
University of Lisbon
Portugal
--------------

On Wed, Jul 18, 2012 at 11:33 PM, Dennis Shea <shea@ucar.edu> wrote:

> Also, are you 'double loading' ?
>
> you should not have
>
> load "$NCARG_ROOT/lib/ncarg/**nclscripts/csm/diagnostics_**cam.ncl"
> load "./diagnostics_cam.ncl"
>
> comment or eliminate
> ;load "$NCARG_ROOT/lib/ncarg/**nclscripts/csm/diagnostics_**cam.ncl"
>
>
>
>
>
> On 7/18/12 3:28 PM, Mary Haley wrote:
>
>> 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<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<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>
>>
>>
>
Received on Wed Jul 18 16:06:18 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT