PeterRochford / SkillMetrics

A Python library for calculating and displaying the skill of model predictions against observations.
GNU General Public License v3.0
201 stars 92 forks source link

How can I show normalized std on the diagram? #40

Closed dkobashi closed 1 year ago

dkobashi commented 1 year ago

Hi,

I want to show normalized standard deviation (observed std/predicted std) so that ref value of 1 is where variability matches between observations and prediction. This is useful when I put multiple data sets on the diagram where ref values are different for each data sets unless they are normalized.

I wonder if you could tell me how to show the normalized std.

Thanks in advance,

-DJ

PeterRochford commented 1 year ago

DJ,

I think you actually want the normalized standard deviation to be predicted std/observed std otherwise your normalized values will be inconsistent.

The SkillMetrics package does not support such a capability. You will have to do the preprocessing of the data within your main script and then pass the values of the variables listed below to the target and Taylor diagram functions.

STDs: Standard deviations
RMSs: Centered Root Mean Square Difference 
CORs: Correlation

You need to examine the equation that ties the three statistics together and on which its similarity to the Law of Cosines is the foundation for the Taylor diagram. Refer to the [Target & Taylor Diagrams document](Documents/Target & Taylor Diagrams.docx) on the GitHub site. Divide the equation by the square of the observed std to figure out how the STDs and RMSs need to be calculated and supplied to the taylor_diagram function. It appears to be on cursory inspection to just require the STDs and RMSs to be divided by the observed std. The latter is the value in ['sdev'][0] in the dictionary returned from the taylor_statistics function.

As a reviewer, I question the validity of your analysis approach for the reasons detailed in FAQ Plotting Issues Q9. I would advocate for Taylor diagrams that compare model predictions with respect to a single set of reference observations, with multiple diagrams as needed. If its imperative for reasons of saving space for a journal article, then I would have all model predictions that are compared relative to the same set of observations have markers that are of the same color so as to be clear. This will mean multiple sets of markers of different colors for which it is only meaningful to compare markers of the same color.

I hope this helps.

Peter

PeterRochford commented 1 year ago

I assume my response answered the question.