-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Calculate Total Spread #15
Comments
Thanks @icastorm great request, currently totalspread is missing. Here is how I was thinking about it with rmse and bias (I was focusing only on these for a demo of the plots!): The column is single observation calculation, so squared error and bias are created as columns when we create the dataframe pyDARTdiags/src/pydartdiags/obs_sequence/obs_sequence.py Lines 86 to 89 in 7d1b167
sq_err = (mean-obs)**2 For rmse, this is over a group of observations, so you select the group of observations and get the rmse and bias for that group of obs. pyDARTdiags/src/pydartdiags/plots/plots.py Lines 133 to 137 in 7d1b167
I think you're correct that we can treat totalspread in the same way. The function to calculate totalspread is the way to go. obs_err_var is there as a column in the dataframe. There may be something funky going on if you are not seeing an 'obs_err_var' column Longer term, I think we might want to split the diagnostic calculations into their own module - I'm guessing someone might want the calculations without necessarily making the plot. |
Sorry for the radio silence, its been a busy couple of weeks and I've been on a bit of a time crunch. I will hopefully be back to working on this next week though... |
Thinking on this more I feel that while for now simply adding to the calculations done in the plots.py script will work, but we should definitely consider moving the diagnostics to their own module that the plots script can draw on as needed. |
Because I built this on top of the plotting changes in this pull request, I went ahead and put the commits adding the totalspread calculation and plot there. |
total spread added in #24 |
Issue
An important function of the DART diagnostic toolkit is to compare the RMSE to the "total spread", which is defined in src/pydartdiags/obs_sequence/obs_sequence.py as the sqrt(sum(sd+obs_err_var)). Given the usefulness of the total spread value in a variety of contexts (temporal evolution, comparisons between observation types, vertical distribution, etc.), it seem appropriate to add a function that calculates the "total spread" of some set of observations to the plots.py script. Total spread plots could be added later as well.
Solution(s)
Testing
The text was updated successfully, but these errors were encountered: