[ncl-talk] taylor_diagram question

Adam Phillips asphilli at ucar.edu
Mon Apr 3 16:01:11 MDT 2023


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/

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


More information about the ncl-talk mailing list