[ncl-talk] taylor_diagram question

Adam Phillips asphilli at ucar.edu
Tue Apr 4 15:04:40 MDT 2023


Hi Tao,
1 - Dennis is correct. The Y-axis is hard coded for normalized standard
deviations. You can pass in whatever values you want to the taylor_diagram
function, but the Y-axis will stay the same. You can alter this in the
function code, but, you will also have to alter the coding for the drawing
of the concentric rings, and that might be difficult.
2 - You cannot precisely positionally set the ring labels using the method
I detailed. If you want to exactly specify where the labels appear, you
would abandon the approach I recommended (with modifying the respl resource
list) and instead add 4 new gsn_add_text calls (one for each green ring).
As to why the 0.25 label does not appear: I am guessing that your value of
gsLineDashSegLenF is too large. If you set that resource to a smaller value
I would gather that the 0.25 label will appear, but also additional labels
will appear on the other rings. You can alter the setting of this resource
for each iteration of the do loop (similar to how you are altering the
setting of gsLineLabelString).
Adam

On Tue, Apr 4, 2023 at 12:30 PM Tao Zhang <tao.zhang at colorado.edu> wrote:

> Hi Adam,
>
>  Thanks for your great recommendations.
>
>  1) Dennis Shea mentioned that the Taylor diagram listed in NCL website is
> hard-coded for normalized standard deviation, not for standard deviation
>  as shown in previous link I provided, right?
>
>  2) How to remove the "0.75" "1" labels close to correlation value? I just
> want to keep one. Is possible to
>    add "0.25"?  see attached plot.
>
>  Thanks
>  Tao
>
>
> On 4/3/23 4:01 PM, Adam Phillips wrote:
>
> Hi Tao,
> I believe you corresponded with someone offline about this. I have some
> experience modifying the taylor_diagram function, but I have not done what
> you are looking for so I can only offer recommendations. You will likely
> need to make several attempts getting all the resources set the way you
> want; hopefully your test script runs quickly!
>
> To answer your 3 questions:
> 1 - Yes.
> 2 - I believe this is possible. Steps required:
>    - Copy the taylor_diagram.ncl
> <https://www.ncl.ucar.edu/Applications/Scripts/taylor_diagram.ncl> code,
> and saving it as (say) taylor_diagram_2.ncl.
>    - Alter the function name at the top to taylor_diagram_2 (at line one
> of taylor_diagram_2.ncl).
>    - In your new function, go to the section entitled "Part 3". You will
> see a resource list that is initiated 5 lines beneath "Part 3" named respl.
> I would try adding the following resource settings *beneath* the current
> respl resource settings:
>      respl at gsLineDashSegLenF = 0.30.   ; Controls spacing between line
> labels; this setting will require some trial and error.
>      respl at gsLineLabelFontColor = respl at gsLineColor
>      respl at gsLineLabelFontHeightF = 0.0125.   ; this font height setting
> might need adjustment
>
>   - Then, within the "do n-1,ncon" do loop, you will need to tell NCL how
> to label the lines, so try this:
>       do n=1,ncon
>            rr  = n*dx
>            res at gsLineLabelString = rr.   ; add this line
>
> That should do it. As I stated in the comments above, you will likely need
> to adjust the setting for gsLineDashSegLenF and gsLineLabelFontHeightF.
>
> 3 - Yes. Search within the function for the resource "gsLineColor". You
> can adjust these as needed.
>
> Hope that helps!
> Adam
>
> On Sat, Mar 25, 2023 at 3:00 PM Tao Zhang via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi,
>>
>>   I can reproduce the taylor_4 figure using the sample script in
>>
>> https://www.ncl.ucar.edu/Applications/Images/taylor_4_1_lg.png
>>
>> https://www.ncl.ucar.edu/Applications/Scripts/taylor_4.ncl
>>
>> But I want  Figure 1 in
>>
>>
>> https://en.wikipedia.org/wiki/Taylor_diagram#:~:text=Taylor%20diagrams%20are%20mathematical%20diagrams,comparative%20assessment%20of%20different%20models
>>
>> Which shows the standard deviation (0~4 mm/day), not the standardized
>> deviations (normalized) (0-1.5).
>>
>> 1) May I only change the taylor_4.ncl for my purpose, but keep the
>> loaded "taylor_diagram.ncl" unchanged?
>>
>> 2) How to add "observed value" in the Taylor diagram as shown in Figure
>> 1 in above link?
>>
>> 3) How to change the color in 3 lines of standard deviation,
>> correlation, and RMS?
>>
>> Thanks
>>
>> Tao
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> --
> Adam Phillips
> Associate Scientist IV, Climate Analysis Section
> Climate and Global Dynamics Laboratory
> National Center for Atmospheric Research
> www.cgd.ucar.edu/staff/asphilli/
>
>
>

-- 
Adam Phillips
Associate Scientist IV, Climate Analysis Section
Climate and Global Dynamics Laboratory
National Center for Atmospheric Research
www.cgd.ucar.edu/staff/asphilli/

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230404/5be72246/attachment.htm>


More information about the ncl-talk mailing list