Skip to content
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

Add the Hersbach CRPS and CRPSS statistics to the ECNT line type. #1450

Closed
10 of 18 tasks
JohnHalleyGotway opened this issue Aug 7, 2020 · 11 comments · Fixed by #1662 or #1669
Closed
10 of 18 tasks

Add the Hersbach CRPS and CRPSS statistics to the ECNT line type. #1450

JohnHalleyGotway opened this issue Aug 7, 2020 · 11 comments · Fixed by #1662 or #1669

Comments

@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Aug 7, 2020

Describe the New Feature

There are two methods for computing the continuous ranked probability score (CRPS) and corresponding skill score (CRPSS), the Gneiting and Hersbach methods (see references below). The ECNT line type (written by Ensemble-Stat for ensembles and Point-Stat for HiRA) includes CRPS and CRPSS as of met-9.1, computed using the Gneiting method.

The US Air Force has been using the Hersbach method and the statisticians on our team have confirmed that it's a worthwhile statistic to compute. It is also the method used to compute CRPS for the WMO-CBS scores.

This task is to add support to MET for the Hersbach version of CRPS and CRPSS. Many questions will arise in its computation:
(1) Is it suitable to compute for HiRA in Point-Stat? [Answer: Based on Marion - it's necessary for HiRA to match their statistics]
(2) Can it be aggregated over multiple cases in Stat-Analysis and METviewer? How should that be done?
(3) What should the new output columns be named?
(4) How should this work be funded? - Answer: Funding it through Met Office - key listed below

References:
Gneiting, T., A. Westveld, A. Raferty, and T. Goldman, 2004: Calibrated Probabilistic Forecasting Using Ensemble Model Output Statistics and Minimum CRPS Estimation. Technical Report no. 449, Department of Statistics, University of Washington. [Available online at http://www.stat.washington. edu/www/research/reports/ ]

Hersbach, H., 2000: Decomposition of the continuous ranked probability
score for ensemble prediction systems. Wea. Forecasting, 15, 559-570.

Acceptance Testing

List input data types and sources.
Describe tests required for new functionality.

Time Estimate

2 days.

Sub-Issues

Consider breaking the new feature down into sub-issues.
No sub-issues required. But this is related to MET #1451.

Relevant Deadlines

Must be in MET-10.0.0

Funding Source

2799991 - Met Office

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required: John HG
  • Select scientist(s) or no scientist required: John O

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones
  • Select milestone

Define Related Issue(s)

Consider the impact to the other METplus components.

New Feature Checklist

See the METplus Workflow for details.

  • Complete the issue definition above.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added component: library code type: new feature Make it do something new priority: medium Medium Priority alert: NEED MORE DEFINITION Not yet actionable, additional definition required alert: NEED ACCOUNT KEY Need to assign an account key to this issue labels Aug 7, 2020
@JohnHalleyGotway JohnHalleyGotway added this to the MET 10.0 milestone Aug 7, 2020
@JohnHalleyGotway
Copy link
Collaborator Author

Relevant email from Eric G about this:

I haven't had a chance to read through the references yet, but here is
what Chris Ferro said, which makes sense to me (should use the regular
CRPS instead of the normal approximation unless you have a small
sample size, which you probably don't).

"Usual practice would be to use the crps for the ensemble edf (or the
'fair' version of this) rather than using the crps for a fitted normal
distribution. If the underlying distribution were non-normal then
using a fitted normal might give misleading results. Your colleagues
might like to know that the crps can be calculated for quite a lot of
different types of distribution: see
https://cran.r-project.org/web/packages/scoringRules/vignettes/article.pdf

I suppose that if the ensemble is small then it might be the case that
a score based on just the ensemble mean and variance (like the crps
for a fitted normal) is less noisy than a score based on the ensemble
edf. The most common score based on the mean and variance is the
Dawid-Sebastiani score (which is equivalent to the log score for a
normal distribution) rather than the crps for normal. If the mean and
variance are estimated from an ensemble then the DS score is quite
sensitive to estimation error in the variance, so noise is a problem.
I don't know of any work looking at how sensitive the crps for a
fitted normal is to estimation error, though."

@JohnHalleyGotway JohnHalleyGotway added the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Sep 10, 2020
@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Nov 5, 2020
@TaraJensen TaraJensen added requestor: UK Met Office United Kingdom Met Office and removed alert: NEED ACCOUNT KEY Need to assign an account key to this issue labels Nov 25, 2020
@RogerHar
Copy link

RogerHar commented Dec 7, 2020

In response to your question 2 above:

Yes, the ensemble CRPS calculated using Hersbach's method can be aggregated over multiple cases. However, it can also be decomposed into 'reliability' and 'potential' components, similar to the decomposition of the Brier score into reliability, resolution and uncertainty, and we have found this decomposition useful. To do this it's necessary to store the 'alpha' and 'beta' values rather than (or as well as) the CRPS values themselves - see pages 563-564 of Hersbach (2000). We therefore store the alpha and beta values for each case (ensemble forecast - observation pair) in our database. The CRPS and its reliability and potential components can then be calculated from these over a particular set of cases, i.e. time period plus area / set of stations (Hersbach eqs 30-37).

@JohnHalleyGotway
Copy link
Collaborator Author

For #1451 and #1450, CRPS and CRPSS are existing columns in met-9.1. Propose adding several additional columns, as described below.

Is HB a good abbreviation for Hersbach?

For Gneiting Method, add 1 new CRPSCL column between the existing CRPS and CRPSS columns:
CRPS CRPSCL CRPSS

For Hersbach Method, add 7 new columns for:
CRPS_HB, CRPS_HB_REL (reliability), CRPS_HB_POT (potential), CRPS_HB_ALPHA, CRPS_HB_BETA, CRPSCL_HB, CRPSS_HB

Will also need to enhance Stat-Analysis to aggregate CRPS_HB over multiple cases using the CRPS_HB_ALPHA and CRPHS_HB_BETA values.

Will need to define issues for METviewer and METdatadb to handle new columns that are NOT at the end of the ECNT line type.

@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED MORE DEFINITION Not yet actionable, additional definition required label Feb 2, 2021
@RogerHar
Copy link

RogerHar commented Feb 5, 2021

On column naming: The distinction between the 'Hersbach' and 'Gneiting' methods is that the 'Gneiting' method fits a normal distribution whereas the 'Hersbach' method uses the empirical distribution function of the ensemble without assuming a parametric form. However there are two other formulae due to other authors that are equivalent to the 'Hersbach' CRPS - see p11-12 of this report by Thorarinsdottir & Schuhen (a preprint of their chapter on verification in a 2018 book on statistical postprocessing). For that reason I think it may be preferable to label with some abbreviation for 'Empirical (distribution function)', e.g. EMP or EDF, rather than HB, giving e.g. CRPS_EMP, CRPSS_EMP, CRPSCL_EMP. (If we could start from scratch it might be better if the 'Gneiting' CRPS were labelled CRPS_NORM to stress it assumes a normal distribution and 'CRPS' was the version that doesn't assume a distribution but I guess it's a bit late for that...)

The CRPS decomposition into reliability and potential and the alpha and beta values are due to Hersbach alone though so including HB in their names seems more appropriate, or would simply CRPS_REL, CRPS_POT, CRPS_ALPHA, CRPS_BETA work ?

All this is a detail though, it's more important to us to get them in than worry about what they're called!

JohnHalleyGotway added a commit that referenced this issue Feb 10, 2021
…yet sorted. And check for bad data when computing the standard deviation.
@JohnHalleyGotway
Copy link
Collaborator Author

@j-opatz and @RogerHar, I made some progress in coding up Hersbach CRPS.

I lifted some python code to compute the empirical CRPS for a single obs and group of ensemble members:

double compute_crps_emp(double obs, const NumArray &ens_na) {

And I'm getting the same results as python. So that's good.

But this method does NOT decompose into reliability and potential. I did find that code written up in the "verification" package in R:
https://rdrr.io/cran/verification/man/crpsDecompostion.html

I'm trying to work through that code but it's confusing. I'm trying to determine exactly what I need to write to enable the empirical CRPS to be aggregated across multiple cases. I was hoping that writing a single alpha and beta value  for each verification task would suffice. But looking at the R code, I suspect I'd need to write separate alpha and beta values for each ensemble member. So for 30 member ensemble, instead of 1 alpha and beta column, we'd have 30 for each!?

@RogerHar, can you please look at what the MetOffice stores for alpha and beta? Is it one alpha and beta value per case... or is it one alpha and beta values for each ensemble member and case?

@RogerHar
Copy link

Sorry @JohnHalleyGotway, you're essentially correct I'm afraid. The alphas and betas have N + 1 separate values for an N-member ensemble. To compute the CRPS reliability and potential you also need the frequencies of the two outliers obar_0 and obar_N defined in Hersbach equation 33. VER has a separate CRPS table type to hold these, similar to that for rank histograms. So as MET has an output line type for RHIST, you may need a separate output line type for these CRPS coefficients. (Alternatively it might be possible to add alpha and beta to the RHIST line type?? I've no idea of the repercussions that would have, but in principle it's kind of neat as there's an alpha and a beta for each possible rank, and the obar_0 and obar_N are the first and last counts of observation ranks so already in RHIST).

My apologies, I'm really not sure how I managed to overlook this before.

@JohnHalleyGotway
Copy link
Collaborator Author

JohnHalleyGotway commented Feb 12, 2021 via email

JohnHalleyGotway added a commit that referenced this issue Feb 12, 2021
…order to aggregate decomposed empirical CRPS reliability and potential correctly, we'd need to write (n+1)*2 additional columns. While the empirical crps can be aggregated as a weighted mean, the decomposition cannot. It just isn't feasible to do this in the ECNT line type. If this reliability and potential really are required, recommend that we add an entirely new CRPS line type instead of tacking onto ECNT. These changes simply remove reliabilit and potential from the output.
@JohnHalleyGotway
Copy link
Collaborator Author

@RogerHar, @j-opatz and I met to discuss these issues and potential options. Wanted to put this on the radar of @TaraJensen as well.

The short question is this:
Is it worth writing CRPS reliability and potential if we don't provide a way to aggregate across multiple cases?

The longer set of details are:

Option (1) Add a new CRPS line type:
Writing 2*(N_ENS+1) extra alpha/beta columns to the existing ECNT line type is not feasible. If we need to do that, we would define a new line empirical CRPS line type instead. But of course that would come with many impacts to the processing and aggregation logic, documentation, testing, and loading/processing by METviewer.

Option (2) Write reliability and potential, but don't aggregate it:
We could enhance Ensemble-Stat to decompose the empirical CRPS into reliability and potential and write them for each case. But when running Stat-Analysis to aggregate across cases, just report reliability = potential = NA. Also recommend that users NOT plot the mean of reliability and potential either!

Option (3) Do not write reliability and potential:
Of course this is the simplest option. If we aren't providing a robust way to aggregate these stats, don't write them at all.

Option (1) is pretty involved and time consuming. When weighed against other MetOffice priorities, is this what we should spend time/funding on?

Option (2) would be fine, but might frustrate users if we fail to provide a good aggregation method.

Perhaps option (3) is fine because while having the CRPS decomposition is nice, maybe it isn't mandatory?

@RogerHar, what's your advice?

JohnHalleyGotway added a commit that referenced this issue Feb 12, 2021
@RogerHar
Copy link

I'd say that Option (2) is not worth pursuing as the reliability and potential aren't very useful unless they're aggregated across many cases (you can't meaningfully judge whether a forecast is reliable based on a single case).

Option (3) is certainly useful to us, as we don't use the decomposition with HiRA (as far as I'm aware). Several R and python packages compute the ensemble CRPS but not the decomposition.

Option (1) to include the decomposition will be needed eventually before we retire VER if we're to replicate all its functionality. We have found the CRPS decomposition to be useful in the detailed evaluation of our post-processing system.

So I think Option (3) is the initial priority and the CRPS decomposition could be left as a separate lower-priority issue. (I wouldn't like to put a date / milestone on that myself though).

@JohnHalleyGotway JohnHalleyGotway linked a pull request Feb 15, 2021 that will close this issue
10 tasks
JohnHalleyGotway added a commit that referenced this issue Feb 17, 2021
* Per #1450, add new ECNT columns for Hersback CRPS. Still need to actually compute the stats though.

* Per #1450, update NumArray functions to only sort if the data is not yet sorted. And check for bad data when computing the standard deviation.

* Per #1450, add code to compute the empirical CRPS value.

* Per #1450, large change to the new output for the empirical CRPS. In order to aggregate decomposed empirical CRPS reliability and potential correctly, we'd need to write (n+1)*2 additional columns. While the empirical crps can be aggregated as a weighted mean, the decomposition cannot. It just isn't feasible to do this in the ECNT line type. If this reliability and potential really are required, recommend that we add an entirely new CRPS line type instead of tacking onto ECNT. These changes simply remove reliabilit and potential from the output.

* Per #1450 and #1451, replacing single CRPS_CLIMO column with CRPSCL and CRPSCL_EMP which will be needed for #1451.

* Per #1450, delete temp files I'd accidentally committed.

* Per #1450, update the user's guide with CRPS updates.

* Fix bug replacing crpss_emp with crpss_gaus.
@JohnHalleyGotway JohnHalleyGotway linked a pull request Feb 17, 2021 that will close this issue
10 tasks
JohnHalleyGotway added a commit that referenced this issue Feb 18, 2021
* Per 1646, one line fix for cut-and-paste error. (#1647)

* Per #1644, no actual code changes here. Just formatting and spacing. For example, replace double ;; with single ;'

* Per #1644, FOUND THE BUG! It's a copy/paste error. We had var_name_map.end() that should be def_var_name_map.end(). Fixing that gets rid of the runtime hang.'

* Per #1643, redefine the contents of the existing AREA_RATIO output column from MODE. Define it as FCST/OBS object area instead of min/max. Update the User's Guide to note the change and also clarify that the MTD VOLUME_RATIO output really is FCST/OBS. (#1650)

* Feature 1644 ps_log (#1651)

* Per #1644, write rejection reason codes at verbosity 2 when there are 0 matched pairs.

* Per #1644, add a few sentences to Point-Stat, Practical Information chapter about debugging 0 matched pairs.

* The mode_conv.pl logic was slightly broken. MET PR #1650 should have broken the NB but it did not. Turns out the diffing logic is NOT properly distinguishing between single and pair object lines. It does this by looking for an underscore in the OBJECT_ID column. When we added FCST_UNITS and OBS_UNITS, that shifted OBJECT_ID up 2 spots, but the code was still checking the (0-based) 20th column instead of the 22nd. Fixing this now and will rerun NB20210202 to confirm it works again.

* The diffing logic for MODE pair lines still was not correct. We'd added the ASPECT_DIFF and CURVATURE_RATIO columns a while ago, but they were missing from the diff logic. This logic really is not good. We need to make it more robust, reading the version-specific header columns from a table file instead of hard-coding them!

* Feature 1653 rscripts (#1654)

* Per #1653, update plot_cnt.R and plot_mpr.R to remove the version-specific header columns.

* Per #1653, nice enhancments to these Rscripts to make them more independent of the MET version number.

* Per #1653, more tweaks

* Per #1653, if no input files are provided, error out with a useful message.

* Per #1653, while the scripts ran fine using R 4.0.2 on my Mac, they fail on eyewall using R 3.4.0. Adding as.character() to get past that error.

* Feature 1655 nc_log (#1656)

* #1630 Display a warning instead of error message with invalid variable if the input data is empty

* Feature 1658 grib_tables (#1659)

* Per #1658, update MXUPHL entries.

* Per #1658, updating long name for MAXREF, MAXUVV, and MAXDVV.

* Modified format of release notes

* Feature 1450 hersbach (#1662)

* Per #1450, add new ECNT columns for Hersback CRPS. Still need to actually compute the stats though.

* Per #1450, update NumArray functions to only sort if the data is not yet sorted. And check for bad data when computing the standard deviation.

* Per #1450, add code to compute the empirical CRPS value.

* Per #1450, large change to the new output for the empirical CRPS. In order to aggregate decomposed empirical CRPS reliability and potential correctly, we'd need to write (n+1)*2 additional columns. While the empirical crps can be aggregated as a weighted mean, the decomposition cannot. It just isn't feasible to do this in the ECNT line type. If this reliability and potential really are required, recommend that we add an entirely new CRPS line type instead of tacking onto ECNT. These changes simply remove reliabilit and potential from the output.

* Per #1450 and #1451, replacing single CRPS_CLIMO column with CRPSCL and CRPSCL_EMP which will be needed for #1451.

* Per #1450, delete temp files I'd accidentally committed.

* Per #1450, update the user's guide with CRPS updates.

* Fix bug replacing crpss_emp with crpss_gaus.

Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Co-authored-by: Julie.Prestopnik <[email protected]>
JohnHalleyGotway added a commit that referenced this issue Feb 22, 2021
…g how climo mean/stdev are used in the computation of the skill scores.
JohnHalleyGotway added a commit that referenced this issue Feb 24, 2021
* Per #1450, add new ECNT columns for Hersback CRPS. Still need to actually compute the stats though.

* Per #1450, update NumArray functions to only sort if the data is not yet sorted. And check for bad data when computing the standard deviation.

* Per #1450, add code to compute the empirical CRPS value.

* Per #1450, large change to the new output for the empirical CRPS. In order to aggregate decomposed empirical CRPS reliability and potential correctly, we'd need to write (n+1)*2 additional columns. While the empirical crps can be aggregated as a weighted mean, the decomposition cannot. It just isn't feasible to do this in the ECNT line type. If this reliability and potential really are required, recommend that we add an entirely new CRPS line type instead of tacking onto ECNT. These changes simply remove reliabilit and potential from the output.

* Per #1450 and #1451, replacing single CRPS_CLIMO column with CRPSCL and CRPSCL_EMP which will be needed for #1451.

* Per #1450, delete temp files I'd accidentally committed.

* Per #1450, update the user's guide with CRPS updates.

* Per #1451, instead of computing the climo crps on the fly, compute and store it separately for each point.

* Per #1451, the ECNT line type will no longer be written separately for each CDF bin. Removing the bin-related arguments from the write_ecnt functions.

* Per #1451, the climo_cdf.write_bins option no longer applies. Since Ensemble-Stat will no longer compute stats separately for each climo bin, I'm removing the reference to write_bins from the Ensemble-Stat config files.

* Per #1451, compute and store the climo CRPS for each point. Also, break apart the normal climo computation into separate functions for crps, ign, and pit.

* Per #1451, update Ensemble-Stat logic to no longer subset pairs into climo CDF bins. We had done this to be consistent with the use of climo data in point and grid-stat. But this change to the handling of climo data is consitent with the NOAA/EMC approach.

* Per #1451, split out the setting of climo CDF thresholds into a separate function so that it can also be called by stat-analysis.

* Per #1451, in the Ensemble-Stat ORANK line type, rename CLIMO to CLIMO_MEAN and add a CLIMO_STDEV column.

* Per #1451, also need to update gsidens2orank to write a climo_stdev column.

* Per #1451, switch from constant pointer to ClimoCDFInfo object to a copy to make the logic of doing this in Stat-Analysis a little easier.

* Per #1451, the HiRA method in Point-Stat computes an ECNT output line type. Needed to call set_climo_cdf() there so that we know how many climo values to use when computing the empirical climo CRPS.

* Per #1451, need to store climo_cdf for both grid and point verification.

* Per #1451, update to write the CLIMO_STDEV header column for the ORANK line type.

* Per #1451, in Ensemble-Stat when doing point verification, check for empty OBS_UNIT string and write NA instead.

* Per #1451, update unit tests by enhancing the climatology call to Ensemble-Stat to also include point verification. Tweak the Ensemble-Stat cofiguration for that and also add a call to pb2nc to prepare the point observations for use.

* Per #1450, added a new section to the Ensemble-Stat chapter describing how climo mean/stdev are used in the computation of the skill scores.

* Update ensemble-stat.rst

Co-authored-by: j-opatz <[email protected]>
JohnHalleyGotway added a commit that referenced this issue Feb 25, 2021
* Per 1646, one line fix for cut-and-paste error. (#1647)

* Per #1644, no actual code changes here. Just formatting and spacing. For example, replace double ;; with single ;'

* Per #1644, FOUND THE BUG! It's a copy/paste error. We had var_name_map.end() that should be def_var_name_map.end(). Fixing that gets rid of the runtime hang.'

* Per #1643, redefine the contents of the existing AREA_RATIO output column from MODE. Define it as FCST/OBS object area instead of min/max. Update the User's Guide to note the change and also clarify that the MTD VOLUME_RATIO output really is FCST/OBS. (#1650)

* Feature 1644 ps_log (#1651)

* Per #1644, write rejection reason codes at verbosity 2 when there are 0 matched pairs.

* Per #1644, add a few sentences to Point-Stat, Practical Information chapter about debugging 0 matched pairs.

* The mode_conv.pl logic was slightly broken. MET PR #1650 should have broken the NB but it did not. Turns out the diffing logic is NOT properly distinguishing between single and pair object lines. It does this by looking for an underscore in the OBJECT_ID column. When we added FCST_UNITS and OBS_UNITS, that shifted OBJECT_ID up 2 spots, but the code was still checking the (0-based) 20th column instead of the 22nd. Fixing this now and will rerun NB20210202 to confirm it works again.

* The diffing logic for MODE pair lines still was not correct. We'd added the ASPECT_DIFF and CURVATURE_RATIO columns a while ago, but they were missing from the diff logic. This logic really is not good. We need to make it more robust, reading the version-specific header columns from a table file instead of hard-coding them!

* Feature 1653 rscripts (#1654)

* Per #1653, update plot_cnt.R and plot_mpr.R to remove the version-specific header columns.

* Per #1653, nice enhancments to these Rscripts to make them more independent of the MET version number.

* Per #1653, more tweaks

* Per #1653, if no input files are provided, error out with a useful message.

* Per #1653, while the scripts ran fine using R 4.0.2 on my Mac, they fail on eyewall using R 3.4.0. Adding as.character() to get past that error.

* Feature 1655 nc_log (#1656)

* #1630 Display a warning instead of error message with invalid variable if the input data is empty

* Feature 1658 grib_tables (#1659)

* Per #1658, update MXUPHL entries.

* Per #1658, updating long name for MAXREF, MAXUVV, and MAXDVV.

* Modified format of release notes

* Feature 1450 hersbach (#1662)

* Per #1450, add new ECNT columns for Hersback CRPS. Still need to actually compute the stats though.

* Per #1450, update NumArray functions to only sort if the data is not yet sorted. And check for bad data when computing the standard deviation.

* Per #1450, add code to compute the empirical CRPS value.

* Per #1450, large change to the new output for the empirical CRPS. In order to aggregate decomposed empirical CRPS reliability and potential correctly, we'd need to write (n+1)*2 additional columns. While the empirical crps can be aggregated as a weighted mean, the decomposition cannot. It just isn't feasible to do this in the ECNT line type. If this reliability and potential really are required, recommend that we add an entirely new CRPS line type instead of tacking onto ECNT. These changes simply remove reliabilit and potential from the output.

* Per #1450 and #1451, replacing single CRPS_CLIMO column with CRPSCL and CRPSCL_EMP which will be needed for #1451.

* Per #1450, delete temp files I'd accidentally committed.

* Per #1450, update the user's guide with CRPS updates.

* Fix bug replacing crpss_emp with crpss_gaus.

* #1657 Added TIME_EPSILON

* #1657 Corrected 1 second offset by the precision error

* #1657 Added AccumTime

* #1657 Read the time from "bounds" attribute and set the max value from the bounds time variable

* #1657 Corrected 1 second offset by the precision error

* Per #1439, add check_mask_names() utility function which errors out if the list of masking region names is non-unique. Update Point-Stat and Grid-Stat to call it. (#1679)

* Feature 1451 crpss (#1676)

* Per #1450, add new ECNT columns for Hersback CRPS. Still need to actually compute the stats though.

* Per #1450, update NumArray functions to only sort if the data is not yet sorted. And check for bad data when computing the standard deviation.

* Per #1450, add code to compute the empirical CRPS value.

* Per #1450, large change to the new output for the empirical CRPS. In order to aggregate decomposed empirical CRPS reliability and potential correctly, we'd need to write (n+1)*2 additional columns. While the empirical crps can be aggregated as a weighted mean, the decomposition cannot. It just isn't feasible to do this in the ECNT line type. If this reliability and potential really are required, recommend that we add an entirely new CRPS line type instead of tacking onto ECNT. These changes simply remove reliabilit and potential from the output.

* Per #1450 and #1451, replacing single CRPS_CLIMO column with CRPSCL and CRPSCL_EMP which will be needed for #1451.

* Per #1450, delete temp files I'd accidentally committed.

* Per #1450, update the user's guide with CRPS updates.

* Per #1451, instead of computing the climo crps on the fly, compute and store it separately for each point.

* Per #1451, the ECNT line type will no longer be written separately for each CDF bin. Removing the bin-related arguments from the write_ecnt functions.

* Per #1451, the climo_cdf.write_bins option no longer applies. Since Ensemble-Stat will no longer compute stats separately for each climo bin, I'm removing the reference to write_bins from the Ensemble-Stat config files.

* Per #1451, compute and store the climo CRPS for each point. Also, break apart the normal climo computation into separate functions for crps, ign, and pit.

* Per #1451, update Ensemble-Stat logic to no longer subset pairs into climo CDF bins. We had done this to be consistent with the use of climo data in point and grid-stat. But this change to the handling of climo data is consitent with the NOAA/EMC approach.

* Per #1451, split out the setting of climo CDF thresholds into a separate function so that it can also be called by stat-analysis.

* Per #1451, in the Ensemble-Stat ORANK line type, rename CLIMO to CLIMO_MEAN and add a CLIMO_STDEV column.

* Per #1451, also need to update gsidens2orank to write a climo_stdev column.

* Per #1451, switch from constant pointer to ClimoCDFInfo object to a copy to make the logic of doing this in Stat-Analysis a little easier.

* Per #1451, the HiRA method in Point-Stat computes an ECNT output line type. Needed to call set_climo_cdf() there so that we know how many climo values to use when computing the empirical climo CRPS.

* Per #1451, need to store climo_cdf for both grid and point verification.

* Per #1451, update to write the CLIMO_STDEV header column for the ORANK line type.

* Per #1451, in Ensemble-Stat when doing point verification, check for empty OBS_UNIT string and write NA instead.

* Per #1451, update unit tests by enhancing the climatology call to Ensemble-Stat to also include point verification. Tweak the Ensemble-Stat cofiguration for that and also add a call to pb2nc to prepare the point observations for use.

* Per #1450, added a new section to the Ensemble-Stat chapter describing how climo mean/stdev are used in the computation of the skill scores.

* Update ensemble-stat.rst

Co-authored-by: j-opatz <[email protected]>

* #1677 Update the refence time (from time_bnds variable) (#1680)

Co-authored-by: Howard Soh <[email protected]>

* Feature 1135 stat_analysis (#1681)

* Per #1135, add fcst/obs_init/valid_inc/exc options for STAT-Analysis jobs.

* Per #1135, update all the STATAnalysis config files to include entries for the new fcst/obs_init/valid_inc/exc options.

* Per #1135, add documentation for fcst/obs_init/valid_inc/exc options to the STAT-Analysis chapter. Also, clarify the description for the existing options.

* Per #1135, adding another call to stat_analysis to check the time filtering options.

* Per #1135, just renaming stat_analysis output file.

* Apply suggestions from code review

Co-authored-by: jprestop <[email protected]>

Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: jprestop <[email protected]>

Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Co-authored-by: Julie.Prestopnik <[email protected]>
Co-authored-by: j-opatz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants