YF2015的个人博客分享 http://blog.sciencenet.cn/u/YF2015

博文

泰勒图 Taylor Diagrams

已有 28478 次阅读 2016-6-15 16:24 |个人分类:遥感|系统分类:科研笔记| Taylor, diagrams, 绘制, 泰勒图

1.NCL

https://www.ncl.ucar.edu/Applications/taylor.shtml

Special Topics: Taylor Diagrams

Taylor diagrams provide a visual framework for comparing model results to a reference model or, most commonly, to observations. The plotted values are generally derived from monthly or seasonal climatological means of one or more variables. Because the different variables may have widely varying numerical values the model results are normalized by the reference variables. The ratio of the normalized variances indicates the relative amplitude of the model and observed variations. The pertinent statistics are the weighted pattern correlation (pattern_cor) and the normalized root-mean-square (RMS) differences.

A four-page pdf document, "Taylor Diagram Primer", by Karl Taylor, is available. This summarizes the important aspects of these useful plots.

Reference:

Karl E. Taylor Summarizing multiple aspects of model performance in a single diagramJGR, vol 106, no. D7, 7183-7192, April 16, 2001. ==================================================================
The documentation for the taylor diagram function is not complete. ==================================================================

The following examples use taylor_diagram.ncl to generate the background upon which the normalized statistics are plotted. The advantage of using the normalized version of the Taylor diagram is that variables with widely varying variances can be viewed on one figure.

The taylor_diagram function is prototyped as follows:

function taylor_diagram ( wks:graphic          ; pre-created workstation                        , RATIO[*][*]:numeric  ; 2d array: ratios                        , CC[*][*]:numeric      ; 2d array: pattern correlation                        , rOpts:logical)         ; scalar to which attributes                                                  ; are assignedGiven the following, the "taylor_diagram" will create the Taylor diagram. The correlations are assumed to range from 0 to 1 inclusive.

RATIO: ratio of the standardized variances
CC: pattern correlation
rOpts: graphical options

By default, the function can handle up to 10 variable comparisons. Different colors and markers are used to differentiate between different models/cases. The 10 default colors and markers are:

     Markers = (/ 4, 6, 8,  0, 9, 12, 7, 2, 11, 16/) ; Marker Indices       Colors  = (/ "red"      , "blue" , "green" , "cyan"  , "orange"                    , "turquoise", "brown", "yellow", "purple", "black" /)  The markers and colors can readily be changed by the user.

The taylor_diagram plot options are activated by setting the option argument, (say) "opt", to True and setting various attributes. The user specified attribute options include:

     opt   = True                      ; taylor diagram with options       opt@tiMainString  = "......"      ; title       opt@Markers       = (/  ...  /)   ; markers         opt@Colors        = (/  ...  /)   ; colors      opt@caseLabels    = (/  ...  /)   ; case Labels       opt@varLabels     = (/  ...  /)   ; variable Labels       opt@caseLabelsFontHeightF =       ; caseLabels size [default=0.12  ]         opt@varLabelsFontHeightF  =       ; varLabels  size [default=0.013 ]      opt@varLabelsYloc =               ; Move location of variable labels                                         ; [default=0.45]      opt@gsMarkerSizeF =               ; marker size     [default=0.0085]                                        ; BACKGROUND options      opt@stnRad        = (/  ...  /)   ; additional standard radii      opt@ccRays        = (/  ...  /)   ; correlation rays       opt@centerDiffRMS = True          ; RMS 'circles'                                                  opt@ccRays_color  = "LightGray"          ; default is black      opt@centerDiffRMS_color  = "LightGray"   ; default is black                                        ; OTHER recognized options      opt@taylorFrame   = False         ; do not advance frame [default is True]The examples illustrate the use of most of these options.

The procedure for creating the CAM Taylor table is taylor_metrics_table.ncl. This procedure may be rewritten as needs develop.

The taylor_metrics_table procedure is prototyped as follows:

procedure taylor_metrics_table(mfname[1]:string            ; plot name                              ,varNames[*]:string          ; variable names                              ,cases[*]:string            ; case (model) names                              ,seasons[*]:string          ; season names                              ,values[*][*][*]:numeric    ; 3d array w values                              ,opt:logical             )    ; options

There are some options but as of now, they are limited. The taylor_metrics_table plot options are activated by setting the option argument, (say) "opt", to True and setting various attributes. The user specified attribute options include:

     opt   = True                      ; taylor metric table with options       opt@tiMainString  = "......"      ; title [default="CAM METRICS"]                                        ; make roughly the same length       opt@color0 =                      ; this will have to be improved.                                        ; see example.=====================================================================
If a "bug" is suspected in "taylor_diagram" or "taylor_metrics_table", create:
[a] a concise description of the problem
[b] a clean test script
[c] make data available
=====================================================================
taylor_1.ncl: Default Taylor diagram.
taylor_2.ncl: Set background options.
taylor_3.ncl: Add labeling to the default Taylor background.
taylor_4.ncl: Create a taylor plot and a table displaying the CAM metrics.
taylor_5.ncl: Create sample tables displaying the CAM metrics.
taylor_6.ncl: Requires NCL 4.2.0.a034 or newer: This demonstration script illustrates paneling multiple Taylor plots. Obviously, paneling figures can make the features small. To make the figures less 'busy' the opt@varLabels and opt@caseLabels could be deleted after the first plot.

The panel's component figures need not have the same number of variables or cases. Each figure is independent of the others.
taylor_7.ncl: A sample processing script for calculating the required Taylor quantities. This compares a control run versus one or more test cases. It includes the methods for calculating the required statistics for scalar and vector quantities. Since all cases are generated from the same model but with (say) different physics, the script does not check for different grid sizes. The source files contain the 12 monthly climatologies. The annual [ANN] and seasonal [eg: JJA, DJF] quantities are derived from the monthly climatologies.

NOTE: The user need only be exposed to the very top of the script. The script takes advantage of NCL's scoping rules to create "global" variables which are recognized by all subsequent code. By NCL convention, these global variables are all capital letters.
taylor_8.ncl: The following example uses taylor_diagram_cam.ncl to plot thepercent bias of each case for each variable (nv). Further, it plots negative correlations and standard deviations > 1.65 as text at the bottom of the figure.

If mean_case represents the weighted areal mean for each case (nc) and each variable (nv) and mean_ref(nv) is the areal mean of the reference case variable, then the percent bias is calculated via

  bias = new(nCase,nVar), "double", 1d20)   . . .   bias(nc,nv)  = mean_case(nc,nv) - mean_ref(nv)                 if (mean_ref(nv).ne.0) then       bias(nc,nv) = abs(bias(nc,nv))/mean_ref(nv))*100    ; bias [%]   end ifThe percent bias is indicated by different symbols. The taylor_diagram_cam.ncl also handles negative pattern correlation coefficients by adding text information.




function taylor_diagram_cam (wks:graphic                    ,RATIO[*][*]:numeric                     ,   CC[*][*]:numeric                    , BIAS[*][*]:numeric                    ,rOpts:logical)
Erik_taylor_panel_Example_1.ncl and Erik_taylor_panel_Example_2.ncl: The following two taylor diagram panel examples were contributed by Erik Noble of NASA.

They are mostly identical, except the second one adds additional labels to the diagram using gsn_add_text.

They differ from the above examples in that they do not use labels and show how one could use the plot for many models. Erik is using it to look at 64 model results at once.

These scripts require that you load taylor_diagram_enoble.ncl.

The following is a slightly modified taylor_diagram function, with less hard-coding of axis limits etc. Also, i have passed the very many variables to local (would be nice if someone double-checked). The drawing of RMS "semi-circles" is automated provided there is enough space for a "full semi-circle". Need to figure out a nice way to make the RMS circles end nicely on the "outer arc" where is there not enough space, but i have no time, and maybe someone else can automate that? There are ample comments of my changes at the start of the script.

For more info, and any improvements or bugs, please contact Jatin Kala (Jatin.Kala.JK *AT* gmail.com)

The script is taylor_diagram_less_hardcoded.ncl.


2.MATLAB

http://www.mathworks.com/matlabcentral/fileexchange/?utf8=✓&term=Taylor+Diagram


3、IDL

https://www.idlcoyote.com/index.html




https://blog.sciencenet.cn/blog-2637373-984846.html

上一篇:土壤湿度等值线Contourf
下一篇:气象百帕对应的地面的高度
收藏 IP: 117.140.192.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-23 19:50

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部