Skip to content

Commit

Permalink
Update develop-ref after #1893 (#1896)
Browse files Browse the repository at this point in the history
* Update install_met_env.kiowa

Commented out items and added text to description

* #1817 Added to_north argument at two_to_one()

* #1817 Calls two_to_one() with false for the third argument, to_north, if latitude moves north to south

* Feature 1819 automation doc warnings (#1836)

* Removing "/lib" that should not be there.

* #1508 checking stat() methoid returns no error before looking at FILE flag

* Enable PDF creation

* Modify inputenc, fontenc latex_elements

* Fix typo in conf.py

* Replace unicode with ascii

* Replace unicode exponent with math mode

* Change eqnarray to align

* Replace gif images with png for PDF

* Fix png file names

* Escape underscore in variable name in math mode

* Escape underscore in variable name in math mode

* Remove underscores from variables in math mode

* Replace bar with overline in some equations

* Test derefencing underscores in tables

* Test math changes in grid stat

* Test math formatting

* Test math formatting

* #1838 Added log message for lat/lon values

* #1838 Give warning if the first and lat lat/lon is same

* #1838 Support the double data type variable on reading float type values

* Feature 1833 develop discussions (#1849)

* Per #1833, changed references to met_help to Discussions.

* Per #1833, fixed typo and removed an unnecessary word

* #1852 Removed unused nc_buf_size. Make cur and dim to the same size (called API handles 2D or 3D)

* #1852 Check the start and count before calling NetCDF API

* Feature 1746 wavelet stat (#1851)

* For issue #1746 modified code to allow users to pass in an empty list (or NA) for forecast and observation thresholds in order to skip applying the threhsolds, but it will still compute stats with the raw fields. SL

* For issue #1746, added new unit test that uses a config file that has empty lists for the forecast and observation thresholds. SL

* For issue #1746 Added some content related to allowing users to set forecast and observation cat thresholds to an empty list in order to skip the binary masking (and consider all grid-points for stats). SL

* Per #1746, cleaning up for consistent indentation.

* Per #1746, cleaning up for consistent indentation.

* Per #1746, add a revision history note, update the plotting range in the postscript output to be [-n,n] where n is the maximum value of the maximum absolute difference and 1.0, and also fix a bug. When the NA threshold comes AFTER a real threshold, the resulting data and difference values were not being updated.

* Per #1746, change the Wavelet-Stat config file values in the the wvlt_plot dictionary by setting plot_min = plot_max = 0.0. That enables the default logic of the tool to take effect. Choose the plotting range of the wavelet plots as [-n,n], where n is the maximum of 1.0 and the maximum absolute difference.

* Per #1746, used apply_fcst_thresh where it should have been apply_obs_thresh.

* Per issue #1746, modified some content related to users being able to skip applying the categorical threhsolds by putting an empty list or NA in the configuration file. SL

* Per issue #1746 Added some warnings if the forecast threshold is set to NA but the observation threshold is not NA (a numeric threshold) and vice versa. SL

* Per #1746, fix a couple of typos and tweak wording in the wavelet-stat chapter.

* Per #1746, loop over each pair of fcst/obs thresholds to check for inconsistent use of the NA threshold type.

* Per #1746, a bit of code cleanup replacing calls to n_elements() with n() to make the code more concise.

* Per #1746, need to reinitialize apply_fcst_thresh and apply_obs_thresh to true inside the loop since the NA threshold can appear anywhere in the list of thresholds.

Co-authored-by: Seth Linden <linden@kiowa.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Add sphinx.ext.pngmath to conf.py

* Fix typo in conf.py

* Add sphinx.ext.mathjax to conf.py

* Add sphinx.ext.imgmath to conf.py

* Fix typo in conf.py

* Change math formatting in Appendix C

* Temporarily disable equations with errors in Appendix C

* Remove sphinx.ext.imgmath in conf.py

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Add sphinx.ext.imgmath to conf.py

* Modify math formatting in Appendix C

* Temporarily disable equations with errors in Appendix C

* Remove sphinx.ext.imgmath in conf.py

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Temporarily disable equations with errors

* Update README.md

* Modify math formatting in Appendix C

* Add usepackage{amssymb} to conf.py

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Fix warnings in wavelet-stat.rst

* Omit Indices and tables in PDF version of User Guide

* Modify math formatting in Appendix G

* Modify math formatting in Appendix E

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Change release date in conf.py

* #1852 get_string_val: check if 2D variable. Also checking if the variable does not have dimension (#1860)

Co-authored-by: Howard Soh <hsoh@kiowa.rap.ucar.edu>

* Feature 1453 create pdf user guide (#1859)

* Enable PDF creation

* Modify inputenc, fontenc latex_elements

* Fix typo in conf.py

* Replace unicode with ascii

* Replace unicode exponent with math mode

* Change eqnarray to align

* Replace gif images with png for PDF

* Fix png file names

* Escape underscore in variable name in math mode

* Escape underscore in variable name in math mode

* Remove underscores from variables in math mode

* Replace bar with overline in some equations

* Test derefencing underscores in tables

* Test math changes in grid stat

* Test math formatting

* Test math formatting

* Add sphinx.ext.pngmath to conf.py

* Fix typo in conf.py

* Add sphinx.ext.mathjax to conf.py

* Add sphinx.ext.imgmath to conf.py

* Fix typo in conf.py

* Change math formatting in Appendix C

* Temporarily disable equations with errors in Appendix C

* Remove sphinx.ext.imgmath in conf.py

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Add sphinx.ext.imgmath to conf.py

* Modify math formatting in Appendix C

* Temporarily disable equations with errors in Appendix C

* Remove sphinx.ext.imgmath in conf.py

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Temporarily disable equations with errors

* Modify math formatting in Appendix C

* Add usepackage{amssymb} to conf.py

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Modify math formatting in Appendix C

* Fix warnings in wavelet-stat.rst

* Omit Indices and tables in PDF version of User Guide

* Modify math formatting in Appendix G

* Modify math formatting in Appendix E

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Modify math formatting in Appendix G

* Change release date in conf.py

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 1853 rps doc (#1861)

* Per #1853, adding RPS docs from Eric.

* Per #1853, work in progress getting the formatting correct.

* Per #1853, work in progress getting the formatting correct.

* Per #1853, work in progress getting the formatting correct.

* Per #1853, work in progress getting the formatting correct.

* Per #1853, adding a manual page break after the ROC image to get it to stay in the right spot.

* Per #1853, backing out last change which didn't make the ROC image stay in the right spot.

* #1855 Removed break after return (SobarQube)

* #1855 Removed break after exit

* 1855 Added return at MetNcPointObsOut::write_to_netcdf

* #1855 Avoid releasing memory twice

* #1855 Removed unused code

* #1855 Corrected syntax error

* #1855 Changed the second call of close() to release _ncFile

* #1855 Deleted break after exit

* #1855 Chamnged while to if

* #1855 Added constructor TCLineCounts and initialized the members

* #1855 Added break statement back for case '-'

* #1855 Check the new size before extending to avoid thereference of the  null pointer

* #1855 Changed count to processed_count for log messages. Initialized variables at get_filtered_nc_data\*()

* #1855 Corected the number of memory copy

* #1855 Exit with an error message if both fgi & bgi are null

* #1855 Clear Lead_Times before extening. Formatting for error messages

* Add definition for the compilation environment on seneca.

* #1855 Extend Lead_Times for new times

* #1855 Removed break after exit

* #1855 define "c" dynamically

* #1855 Move the log message within if statement to avoid dereferencing a null pointer

* Feature 1843 scatter index (#1863)

* Added scatter index variables: SI, SI_BCL, SI_BCU to cnt columns. SL

* Per issue #1843 Added Scatter Index variables (SI, SI_BCL, SI_BCU) to the CNT stat type. SL

* Added Scatter Index (SI, SI_BCL, SI_BCU) to cnt stat type header. SL

* Per issue #1843, added Scatter Index variables to write_cnt_cols(). SL

* Per issue #1843 added Scatter Index (si) to CNTinfo class. SL

* Per issue #1843 added Scatter Index (SI, si) to CNTInfo::get_stat(). SL

* Per issue #1843 added Scatter Index (SI, si) calculation to both versions of compute_cntinfo(). SL

* Per issue #1843, forgot semi-colon after SI calculation, fixed. SL

* Added Scatter Index (si) to some of the clear() and allocate() functions. SL

* Per issue #1843, added Scatter Index (si) to compute_cnt_mean(). SL

* Per issue #1843, added Scatter Index (si) to bootstrap interval calculation and to the CNT write function. SL

* Per issue #1843 added Scatter Index (SI, SI_BCL, SI_BCU) to store_stat_cnt(). SL

* Per issue #1843, in get_stat() moved Scatterd Index (SI) line to be below RMSE for consitency. SL

* Added Scatter Index (SI) to the CNT output format table. SL

* Added Scatter Index (SI) to CNT statistics definitions. SL

* Update appendixC.rst

* Update stat_columns.cc

* Update compute_ci.cc

* Update met_stats.cc

* Per #1843, update write_cntinfo() function. Since we're READING the SI value immediately after the RMSE value when computing CI's, we also need to write SI immediately after RMSE. Otherwise, we'll be computing CI's using the wrong statistics replicates.

* Per #1843, check for divide by zero when computing SI... this could happen if comparing the same input file to itself with Grid-Stat.

* Per #1843, correct definition of SI from RMSE/ME to RMSE/OBAR.

* Per #1843, updated the SI definition to divide by OBAR instead of ME, but forgot to update the divide-by-zero check.

Co-authored-by: Seth Linden <linden@kiowa.rap.ucar.edu>
Co-authored-by: johnhg <johnhg@ucar.edu>

* #1855 Corected typo - compare the numnber of U and V

* #1855 Check if var_info is hull

* #1855 Avoid un-initialized variables: dt at open(), v at lat() & lon(), and local variables at data()

* #1855 Check if ldf is null pointer

* #1855 Removed break after exit

* #1855 Removed break after exit

* Update pcp_combine.cc

* Feature 1864 config urls (#1868)

* Per #1864, remove stale GitHub pages URL for the MET User's Guide.

* Per #1864, found stale GitHub IO links in the issue templates. Should make this same fix in the develop and default branches for all the METplus repos.

* Per #1864, fix stale GitHub IO link in the PR template.

* Move ROC curve in Appendix C

* Crop ROC image for better PDF formatting

* Shrink ROC image for better PDF formatting

* Modify figure alignment in conf.py

* Change text placement for ROC curve figure

* Feature 1834 faq (#1867)

* testing possible new drop-down menus for FAQ

* adding sphinx-panels to extensions to be able to use drop down menus in appendixA

* Per #1834, adding sphinx-panels to requirements.txt to see if that fixes the error

* Per #1834, added sphinx.ext to beginning of sphinx_panels to see if that fixes the error

* Per #1834, remove sphinx.ext and add trailing comma to end of extensions to see if that fixed the error

* Per #1834, added sphinx-panels to pip install command to see if that fixes the error

* Per #1834, added extra space in comment to get docs to build to see if change to documentation.yml will fix an error

* Per #1834, added return character to get rid of warning

* testing dropdown menus #1

* testing dropdown menus #2 removing lines and dotted lines

* testing #3

* testing 4

* fixing numbering, removing 2nd pulldown menu, trying to fix box width

* adding code block in dropdown

* trying to fix width

* trying to fix width with spacing

* trying to fix width with spacing 2nd dropdown

* removing panels

* solved problem, just use dropdown no panels

* adding second dropdown menu

* removing the dropdown menus and fixing the spacing.

* fixing typos

* adding in matched pairs

* adding in formating files for NetCDF and making FILE_IO a header

* fixing spacing

* time slice

* fixing spacing

* UNIX time conversion

* fixing spacing

* fixed-width

* scientific notation

* removing which per Julie P

* adding Gen_Vx_Mask section

* fixing formatting

* changing to numbers

* complex masking region

* neighborhood methods boundaries

* Neighborhood Methods to Compute Fraction

* adding Grid_Stat - How do I use Config File Setup to Read a NetCDF file

* using backticks with asterics

* one more backtick with asterics

* Grid_Stat - What would be an example of Verifying Probabilities

* fixing typos

* What is an example of using Grid-Stat with Regridding and Masking Turned On

* fixing typos

* Grid_Stat - What would be an example of Verifying Probabilities Example2

* trying to fix typos

* trying to fix code-block spacing

* Per #1834, attempting to fix warning.

* How do I use different masks in MET tools using MODE as an example

* trying to fix bullet list

* trying to fix bullet list 2

* trying to fix bullet list 2

* trying to fix bullet list 3

* Per #1834, attempting formatting changes

* Per #1834, attempting formatting changes

* Per #1834, attempting formatting changes

* Per #1834, attempting formatting changes

* Per #1834, attempting formatting changes

* Per #1834, modified formatting, including adding backslashes and removing extra returns in command line calls, and adding indentation for config file notation, and adding a return after each 'A.'

* Per #1834, changed code-block from ini to none to fix formatting

* *Pcp-Combine - What are some examples using -add

* Pcp-Combine -  How do I add and subtract with Pcp-Combine

* Pcp-Combine - How do I Combine 12-hour Accumulated Precipitation from Two Different Initialization Times

* Pcp-Combine - How Do I Correct a Precipitation Time Range

* Pcp-Combine - What Data Formats does MET Read

* Pcp-Combine - How does pass through work

* Pcp_Combine - How do I use -pcprx to run a project faster

* Pcp-Combine - How Do I Enter the Time Format Correctly

* Pcp-Combine - How do I use -subtract

* fixing formatting

* Pcp_Combine - How Do I Use -sum, -add, and -subtract to Achieve Same Accumulation Interval

* Pcp-Combine - What is the difference between -sum vs. -add

* Pcp-Combine - How Do I Select a Specific GRIB Record to Use

* fixing spacing for original text

* Plot-Data-Plane - How Do I Inspect Gen_Vx_Mask Output

* fixing typo

* Plot-Data-Plane - How Do I Specify GRIB Version

* Plot-Data-Plane - last 2 entries

* 2 misc. entries

* fixing typo

* Stat_Analysis - How does -aggregate_stat work

* Stat_Analysis - remaining entries

* fixing typo

* tc-pairs

* tc-stat

* troubleshooting area

* another stat-analysis

* another stat-analysis

* utilities

* fixing dashes

* Per #1834, trying out syntax

* Per #1834, removing added syntax

* fixing returns with bolding

* Per #1834, modified formatting

* adding italics for directories #1834

* replacing code-block ini with none to remove red lettering

* fixing questions to lower case #1834

* linking to section using numref #1834

* linking to section using numref #1834 attempt 2

* linking to section using numref #1834 attempt 3

* linking to section using numref #1834 attempt 4

* linking to section using numref #1834 attempt 5

* linking to section using numref #1834 attempt 6

* linking to section using numref #1834 attempt 7

* linking to section using numref #1834 attempt 8

* linking to anothre section #1834

* linking to another section #1834

* removing old info #1834

* grammar updates #1834

* grammar updates #1834

* fixing typos #1834

* email changes with Julie #1834

* trying to fix warning #1834

* changes #1834

* Per #1834, updating question titles and answers

* Per #1834, made updates to the content.

* Per #1834, made updates to the content

* Per #1834, made updates to the content

* Per #1834, made some major changes to the first 3 FAQ's. I don't have the time/bandwidth to review these completely at this time, but wanted to include at least these updates.

* testing some of the updates John O. suggested.

* updates John O. suggested take 2 #1834.

* updates John O. suggested take 3 #1834.

* updates John O. suggested take 4 #1834.

* updates John O. suggested take 5 #1834.

* updates John O. suggested.  Some didn't show up even though they've been removed #1834.

* trying to fix numbered list indenting #1834

* fixing numbered list indenting #1834

* cleaning up formatting #1834

* fixing broken links #1834

Co-authored-by: Julie.Prestopnik <jpresto@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* bugfix 1872 plot_tcmpr.R -lookin directory (develop) (#1874)

* Bugfix 1875 develop memory (#1877)

* Per #1875, fix set_cdf_ta() to initialize cdf_ta prior to populating it.

* Per #1875, add debug(4) log messages whenever defining a new aggregation case in stat-analysis.

* Per #1875, switch log messages about new cases from Debug(4) to Debug(3).

* Per #1879, porting the same changes over to the develop branch. (#1881)

* Feature 1673 gbeta (#1857)

* Per #1673, add a distance_map.beta_value entry to all the Grid-Stat config files.

* Per #1673, enhance Grid-Stat to parse the new beta_value option and set its value in the library code.

* Per #1673, set the user-defined beta_value when processing the distance map scores.

* Per #1673, add 4 new DMAP columns write them. Just writing bad data values right now, still need to actually compute them! Also need to update Stat-Analysis to update the parsing/aggregation of these new values.

* Per #1673, enable beta_value to be set to a default bad data value.

* Per #1673 and @ericgilleland instruction (#1673 (comment)), strip asymmetric G-Beta (AGBETA) from the output.

* Per #1673, fix typo that was causing the code not to compile.

* Per #1673, update MET User's Guide about G/GBETA.

* Per #1673, report BETA_VALUE = TOTAL / 2 in the output instead of NA, as directed by Eric.

* Per #1673, remove descriptions of Grid-Stat-specific config options for nbrhd, fourier, gradient, and distance_map from the overview section since they belong in the Grid-Stat chapter. Also add direct links for them in the Grid-Stat chapter.

* Per #1673, do not reset the beta_value in DMAP::clear().

* Per #1673, log the DMAP options only after the beta_value has been determined.

* Per #1673, correct the default beta_value setting as N*N / 2.0.

* Per #1673, trying to format G-beta well.

* Per #1673, trying to format G-beta well.

* Per #1673, beta is formatted as \beta and not \Beta in latex.

* Per #1673, beta is formatted as \beta and not \Beta in latex.

* Per #1673, switch to defining beta_value as a function of the input grid size.

* Per #1673, push initial appendix C updates for GBETA.

* Per #1673, working on G and GBETA equations.

* Per #1673, working on G and GBETA equations.

* Per 1673, update GBETA details in appendix C.

* Per #1673, add Eric's info about selecting beta.

* Per #1673, update reference for Gilleland-2019 to Gilleland_PartI-2020 and Gilleland_PartII-2020.

* Per 1673, fix typo.

* Per #1673, making changes requested by Eric.

* Per #1673, making changes requested by Eric.

* Per #1673, update references based on Eric's feedback.

* Update appendixD.rst (#1869)

Updated this appendix.

* Update appendixD.rst

* Per #1673, making the formatting of Gilleland-2020 part I and II references consistent.

* Per #1673, update Grid-Stat docs to clarify that GBETA is only computed on the FULL verification domain and not any masking regions.

* Per #1673, add DataPlane::n_good_data() function to return a count valid data values.

* Per #1673, update vx_statistics library code to only set gbeta/beta_value to bad data for sub-domains.

* Per #1673, update grid_stat to mask out bad data between the fcst/obs fields before computing distance maps. This will change existing unit test results! Also store the count of valid data values in the full verification domain.

* Per #1673, since GBETA is only reported when VX_MASK = FULL, updating GridStatConfig_all to include the FULL masking region to make this example more meaningful.

Co-authored-by: ericgilleland <34106925+ericgilleland@users.noreply.github.com>

* Feature 1764 point stat (#1885)

* Per #1764 added write_orank_row() to do_hera_ens(). SL

* Per issue #1764, added orank stat type for ensemble output. SL

* Per issue #1764, added code to setup_txt_files() for ORANK output. SL

* Added some comments for debuging. SL

* Per #1764, add orank to the list of outputs created by point_stat.

* Per #1764, add functions to compute the number of requested HiRA probabilities and ensemble members. Also update n_txt_row() to keep track of the number of ORANK rows to be written. Not totally sure if I'm counting these ORANK output lines correctly though.

* Per #1764, update logic in setup_txt_files() to call get_max_n_hira_prob() and get_max_n_hira_ens() functions.

* Per #1764, no real changes. Just fixing spacing.

* Per issue #1764, cleaned up print (cout) debug statements. SL

* Per issue #1764 added 'orank = NONE' to the config files for compatibility with changes to point_stat for calculating ORANK. SL

* Per issue #1764 added 'orank = STAT' to config file to produce ORANK output lines in point_stat. SL

* Per issue #1764 added content in all relevant sections for ORANK: observation rank statistic. SL

* Added 'orank = NONE' to config file for compatibility with changes to point_stant for ORANK. SL

* Added 'orank = NONE' to config file for compatibility with changes to point_stant for ORANK. SL

* Apply suggestions from code review

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #1764, no real changes, just fixing indents.

* Per #1764, no real changes, just fixing indents.

* Per #1764, no real changes, just fixing indents.

* Per #1764, putting the docs for VCNT back into its logical order with the other vector line types. The order that they're listed here does not need to match their order in the enumeration in the code.

* Per #1764, fixing a vcnt typo I found in the grid-stat chapter... and making them consistent.

* Per issue #1764: After the call to write_orank_row, added lines to reset the observation begin and end times. SL

* Per #1764, no code changes, just fixing indents.

Co-authored-by: Seth Linden <linden@kiowa.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@kiowa.rap.ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Adding Seth to the NB notification list.

* Bugfix 1886 develop grid_diag (#1888)

* Per #1886, port over the bugfixes from main_v10.0 to develop.

* Per #1886, make grid_diag error out if to_grid is set to FCST or OBS.

* Added additional default labels

* Feature 1870 realtime (#1893)

* Per #1870. add TCPairs config entries for valid_inc, valid_exc, and write_valid.

* Per #1870, removing 2 files I accidentally added.

* Per #1870, add code to parse the new tc_pairs config options.

* Per #1870, unrelated... just fixing spacing.

* Per #1870, update TrackPairInfo/Array classes and tc_pairs application code to use the write_valid option to subset the tracks by requested valid time before writing them.

* Per #1870, update the User's Guide with the new config options. Document valid_inc/valid_exc in the common TC config section and add write_valid to the TC-Pairs chapter.

* Per #1870, move the subset_write_valid() functionality to the library code and support it for both track and probability arrays.

* Per #1870, update unit_tc_pairs.xml with 2 new calls to exercise the new write_valid functionality for both tracks and probabilities.

* Per #1870, correct some typos in the docs... PROBRI and probri should be PROBRIRW and probrirw, resp.

* Per #1870, switching match_points from TRUE back to FALSE after I acciedentally committed that change.

* Per #1870, just fixing indent.

Co-authored-by: John Halley Gotway <johnhg@kiowa.rap.ucar.edu>

Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Howard Soh <hsoh@kiowa.rap.ucar.edu>
Co-authored-by: hsoh-u <hsoh@ucar.edu>
Co-authored-by: Keith Searight <keith.searight@noaa.gov>
Co-authored-by: Seth Linden <linden@ucar.edu>
Co-authored-by: Seth Linden <linden@kiowa.rap.ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: ericgilleland <34106925+ericgilleland@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@kiowa.rap.ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@kiowa.rap.ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@seneca.rap.ucar.edu>
  • Loading branch information
14 people committed Aug 30, 2021
1 parent 4193c48 commit 7121f9e
Show file tree
Hide file tree
Showing 23 changed files with 302 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Fix something that's not working
title: ''
labels: 'type: bug'
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED PROJECT ASSIGNMENT, type: bug'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Enhancement request
about: Improve something that it's currently doing
title: ''
labels: 'type: enhancement'
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED PROJECT ASSIGNMENT, type: enhancement'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new_feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: New feature request
about: Make it do something new
title: ''
labels: 'type: new feature'
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED PROJECT ASSIGNMENT, type: new feature'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/sub-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Sub-Issue
about: Break an issue down into smaller parts
title: ''
labels: 'type: sub-issue'
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED PROJECT ASSIGNMENT, type: sub-issue'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Task
about: Describe something that needs to be done
title: ''
labels: 'type: task'
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED PROJECT ASSIGNMENT, type: task'
assignees: ''

---
Expand Down
9 changes: 8 additions & 1 deletion met/data/config/TCPairsConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ init_inc = [];
init_exc = [];

//
// Valid model time window
// Valid model time windows to include or exclude
//
valid_beg = "";
valid_end = "";
valid_inc = [];
valid_exc = [];

//
// Valid times for which output should be written
//
write_valid = [];

//
// Model initialization hours
Expand Down
37 changes: 23 additions & 14 deletions met/docs/Users_Guide/config_options_tc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ or exclude (exc). Tracks whose initial time meets the specified
criteria will be used. An empty string indicates that all times
should be used.

In TC-Stat, the **-init_beg**, **-init_end**, **init_inc** and **-int_exc** job command options can be used to further refine these selections.

For example:

| init_beg = "20100101";
Expand All @@ -107,26 +109,34 @@ For example:
init_inc = [];
init_exc = [];
.. _valid_beg end inc exc_1:

.. _valid_beg, valid_end_1:

:ref:`valid_beg, valid_end <valid_beg, valid_end_1>`

Specify a model valid time window in YYYYMMDD[_HH[MMSS]] format.
Tracks for which all valid times fall within the time window will be used.
An empty string indicates that all times should be used.
ref:`valid_beg, valid_end, valid_inc, valid_exc <valid_beg end inc exc_1>`

Specify a model valid time window YYYYMMDD[_HH[MMSS]] format or provide a
list of specific valid times to include (inc) or exclude (exc). If a time
window is specified, only tracks for which all points are contained within
the window will be used. If valid times to include or exclude are specified,
tracks will be subset down to the points which meet that criteria. Empty
begin/end time strings and empty include/exclude lists indicate that all
valid times should be used.

In TC-Stat, the **-valid_beg**, **-valid_end**, **valid_inc** and **-valid_exc** job command options can be used to further refine these selections.

For example:

| valid_beg = "20100101";
| valid_end = "20101231";
|
| valid_end = "20101231_12";
| valid_inc = [ "20101231_06" ];
| valid_exc = [ "20101231_00" ];
|
.. code-block:: none
valid_beg = "";
valid_end = "";
valid_inc = [];
valid_exc = [];
.. _init_hour_1:

Expand Down Expand Up @@ -422,7 +432,6 @@ by basin or sub-basin. Note that if your model data and best track do not
use the same basin identifier conventions, using an empty list for this
parameter will result in missed matches.


.. code-block:: none
basin_map = [
Expand Down Expand Up @@ -481,9 +490,9 @@ For example:
valid_inc = [];
valid_exc = [];
.. _ini valid_hour lead req:
.. _init valid_hour lead req:

:ref:`ini_hour, valid_hour, lead, lead_req <ini valid_hour lead req>`
:ref:`init_hour, valid_hour, lead, lead_req <init valid_hour lead req>`

Stratify by the initialization and valid hours and lead time.
Specify a comma-separated list of initialization hours,
Expand Down
20 changes: 15 additions & 5 deletions met/docs/Users_Guide/tc-pairs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ ____________________
init_exc = [];
valid_beg = "";
valid_end = "";
valid_inc = [];
valid_exc = [];
init_hour = [];
init_mask = [];
lead_req = [];
Expand All @@ -118,6 +120,14 @@ The **model** variable contains a list of comma-separated models to be used. Eac

____________________

.. code-block:: none
write_valid = [ "20101231_06" ];
The **write_valid** entry specifies a comma-separated list of valid time strings in YYYYMMDD[_HH[MMSS]] format for which output should be written. An empty list indicates that data for all valid times should be written. This option may be useful when verifying track forecasts in realtime. If evaluating performance for a single valid time, this option can limit the output to that time and skip output for earlier track points.

____________________

.. code-block:: none
check_dup = FALSE;
Expand Down Expand Up @@ -315,7 +325,7 @@ TC-Pairs produces output in TCST format. The default output file name can be ove
- Valid time masking grid applied
* - 13
- LINE_TYPE
- Output line type (TCMPR or PROBRI)
- Output line type (TCMPR or PROBRIRW)

.. _TCMPR Line Type:

Expand Down Expand Up @@ -462,9 +472,9 @@ TC-Pairs produces output in TCST format. The default output file name can be ove
- A/BDEPTH
- system depth, D-deep, M-medium, S-shallow, X-unknown

.. _PROBRI Line Type:
.. _PROBRIRW Line Type:

.. list-table:: Format information for PROBRIRW (Probability of Rapid Intensification) output line type.
.. list-table:: Format information for PROBRIRW (Probability of Rapid Intensification/Weakening) output line type.
:widths: auto
:header-rows: 2

Expand All @@ -475,8 +485,8 @@ TC-Pairs produces output in TCST format. The default output file name can be ove
- Header Column Name
- Description
* - 13
- PROBRI
- Probability of Rapid Intensification line type
- PROBRIRW
- Probability of Rapid Intensification/Weakening line type
* - 14
- ALAT
- Latitude position of edeck model
Expand Down
19 changes: 6 additions & 13 deletions met/docs/Users_Guide/tc-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ _________________________
init_exc = [];
valid_beg = "";
valid_end = "";
valid_inc = [];
valid_exc = [];
init_hour = [];
lead_req = [];
init_mask = [];
Expand All @@ -161,15 +163,6 @@ The **amodel** and **bmodel** fields stratify by the amodel and bmodel columns b

_________________________

.. code-block:: none
valid_inc = [];
valid_exc = [];
The **valid_inc** and **valid_exc** fields stratify by valid times, based on a comma-separated list of specific valid times to include (inc) or exclude (exc). Time strings are defined by YYYYMMDD[_HH[MMSS]]. Using the **-valid_inc** and **-valid_exc** options within the job command lines may further refine these selections.

_________________________

.. code-block:: none
valid_hour = [];
Expand Down Expand Up @@ -372,7 +365,7 @@ _________________________
-job summary -line_type TCMPR -column TK_ERR -dump_row ./tc_summary_job.tcst
-job rirw -line_type TCMPR -rirw_time 24 -rirw_exact false -rirw_thresh ge20
-job probrirw -line_type PROBRIRW -column_thresh RI_WINDOW ==24 \
-probri_thresh 30 -probri_prob_thresh ==0.25
-probrirw_thresh 30 -probrirw_prob_thresh ==0.25
.. _tc_stat-output:

Expand Down Expand Up @@ -466,12 +459,12 @@ The PROBRIRW job produces probabilistic contingency table counts and statistics

• The **-prob_exact bool** option is a boolean defining whether the exact or maximum BEST track intensity change over the time window should be used. If true, the values in the **BDELTA** column are used. If false, the values in the **BDELTA_MAX** column are used. The default is true.

• The **-probri_bdelta_thresh** threshold option defines the BEST track intensity change event threshold. This should typically be set consistent with the probability threshold (**-prob_thresh**) chosen above. The default is greater than or equal to 30 kts.
• The **-probrirw_bdelta_thresh** threshold option defines the BEST track intensity change event threshold. This should typically be set consistent with the probability threshold (**-prob_thresh**) chosen above. The default is greater than or equal to 30 kts.

• The **-probri_prob_thresh threshold_list** option defines the probability thresholds used to create the output Nx2 contingency table. The default is probability bins of width 0.1. These probabilities may be specified as a list (>0.00,>0.25,>0.50,>0.75,>1.00) or using shorthand notation (==0.25) for bins of equal width.
• The **-probrirw_prob_thresh threshold_list** option defines the probability thresholds used to create the output Nx2 contingency table. The default is probability bins of width 0.1. These probabilities may be specified as a list (>0.00,>0.25,>0.50,>0.75,>1.00) or using shorthand notation (==0.25) for bins of equal width.

• The **-out_line_type** option defines the output data that should be written. This job can write PCT, PSTD, PJC, and PRC output line types. The default is PCT and PSTD. Please see :numref:`table_PS_format_info_PCT` through :numref:`table_PS_format_info_PRC` for more details.

Users may also specify the **-out_alpha** option to define the alpha value for the confidence intervals in the PSTD output line type. Multiple values in the **RI_WINDOW** column cannot be combined in a single PROBRIRW job since the BEST track intensity threshold should change for each. Using the **-by RI_WINDOW** option or **-column_thresh RI_WINDOW ==24** option provide convenient ways avoiding this problem.

Users should note that for the PROBRIRW line type, **PROBRI_PROB** is a derived column name. The -probri_thresh option defines the probabilities of interest (e.g. **-probri_thresh 30**) and the **PROBRI_PROB** column name refers to those probability values, regardless of their column number. For example, the job command options **-probri_thresh 30 -column_thresh PROBRI_PROB >0** select 30 kt probabilities and match probability values greater than 0.
Users should note that for the PROBRIRW line type, **PROBRI_PROB** is a derived column name. The -probrirw_thresh option defines the probabilities of interest (e.g. **-probrirw_thresh 30**) and the **PROBRI_PROB** column name refers to those probability values, regardless of their column number. For example, the job command options **-probrirw_thresh 30 -column_thresh PROBRI_PROB >0** select 30 kt probabilities and match probability values greater than 0.
1 change: 1 addition & 0 deletions met/src/basic/vx_config/config_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ static const char conf_key_valid_end[] = "valid_end";
static const char conf_key_valid_inc[] = "valid_inc";
static const char conf_key_valid_exc[] = "valid_exc";
static const char conf_key_valid_hour[] = "valid_hour";
static const char conf_key_write_valid[] = "write_valid";
static const char conf_key_lead[] = "lead";
static const char conf_key_lead_req[] = "lead_req";
static const char conf_key_init_mask[] = "init_mask";
Expand Down
17 changes: 17 additions & 0 deletions met/src/libcode/vx_tc_util/prob_rirw_pair_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,20 @@ bool ProbRIRWPairInfoArray::add(const ProbRIRWInfo &p, const TrackInfo &t) {

////////////////////////////////////////////////////////////////////////

void ProbRIRWPairInfoArray::subset_write_valid(const TimeArray &ta) {

// Check for no work to do
if(ta.n() == 0) return;

ProbRIRWPairInfoArray new_pairs;
for(int i=0; i<Pairs.size(); i++) {
if(ta.has(Pairs[i].prob_rirw().valid())) new_pairs.add(Pairs[i]);
}

// Save the subset
*this = new_pairs;

return;
}

////////////////////////////////////////////////////////////////////////
1 change: 1 addition & 0 deletions met/src/libcode/vx_tc_util/prob_rirw_pair_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class ProbRIRWPairInfoArray {

void add(const ProbRIRWPairInfo &);
bool add(const ProbRIRWInfo &, const TrackInfo &);
void subset_write_valid(const TimeArray &);
};

////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions met/src/libcode/vx_tc_util/tc_columns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void write_tc_mpr_row(TcHdrColumns &hdr, const TrackPairInfo &p,

// Set the description
if(p.n_lines() > i) {
hdr.set_desc((string)p.line(i)->get_item("DESC", false));
hdr.set_desc((string)p.line(i)->get_item("DESC", false));
}

// Write the header columns
Expand Down Expand Up @@ -191,7 +191,7 @@ void write_prob_rirw_row(TcHdrColumns &hdr, const ProbRIRWPairInfo &p,

// Pass the description from the input line to the output
if(p.line().n_items() > 0) {
hdr.set_desc((string)p.line().get_item("DESC", false));
hdr.set_desc((string)p.line().get_item("DESC", false));
}

// Write one line for all the probabilities
Expand Down
46 changes: 43 additions & 3 deletions met/src/libcode/vx_tc_util/track_pair_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,14 @@ void TrackPairInfo::initialize(const TCStatLine &l) {

void TrackPairInfo::set_keep(int i, int val) {

// Check range
if(i < 0 || i >= NPoints) {
mlog << Error
<< "\nTrackPairInfo::set_keep(int, int) -> "
<< "range check error for index value " << i << "\n\n";
exit(1);
}

Keep.set(i, val);

return;
Expand Down Expand Up @@ -780,13 +788,23 @@ TrackPairInfo TrackPairInfo::keep_subset() const {
TrackPairInfo tpi;

// Loop over the points
for(i=0; i<NLines; i++) {
for(i=0; i<NPoints; i++) {

// Check the retention status
if(Keep[i] == 0) continue;

// Add the current track pair point
tpi.add(Line[i]);
// Add from TC-Stat line data
if(NLines == NPoints) {
tpi.add(Line[i]);
}
// Otherwise, add from TC-Pairs track pair
else {
if(tpi.n_points() == 0) tpi.initialize(ADeck, BDeck);
tpi.add(ADeck[i], BDeck[i],
ADeckDLand[i], BDeckDLand[i],
TrackErr[i], XErr[i], YErr[i],
AlongTrackErr[i], CrossTrackErr[i]);
}
}

return(tpi);
Expand Down Expand Up @@ -1008,4 +1026,26 @@ void TrackPairInfoArray::add_watch_warn(const ConcatString &ww_sid,
return;
}

////////////////////////////////////////////////////////////////////////

void TrackPairInfoArray::subset_write_valid(const TimeArray &ta) {

// Check for no work to do
if(ta.n() == 0) return;

// Check each point for requested valid times
int i, j, keep;
for(i=0; i<NPairs; i++) {
for(j=0; j<Pair[i].n_points(); j++) {
keep = (ta.has(Pair[i].valid(j)) ? 1 : 0);
Pair[i].set_keep(j, keep);
}

// Subset the track
Pair[i] = Pair[i].keep_subset();
}

return;
}

///////////////////////////////////////////////////////////////////////
1 change: 1 addition & 0 deletions met/src/libcode/vx_tc_util/track_pair_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class TrackPairInfoArray {

void add(const TrackPairInfo &);
void add_watch_warn(const ConcatString &, WatchWarnType, unixtime);
void subset_write_valid(const TimeArray &);
};

////////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit 7121f9e

Please sign in to comment.