-
Notifications
You must be signed in to change notification settings - Fork 24
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 #2550 compute_diagnostics #2728
Conversation
git-subtree-dir: scripts/python/tc_diag_driver git-subtree-split: 2faf117e370906f082b9eff0340a4d2ebd67a0ee
…ython/tc_diag_driver'
…diag_driver code
…ithub.com/robertdemariacira/tc_diag_driver to update the error handling logic.
…python diagnostics config files there.
…running bootstrap on seneca.
… file optional.
…_diag_driver version 0.7.0. Still need to update the TC-Diag C++ code accordingly and decide how to address issues in diagnostics naming conventions and units.
…en the MET C++ parses the results.
…iTable objects since they are NOT aligned in CIRA diag output files.
…orting in both increasing and decreasing order.
…ested in the TC-Diag config file
…o check for their creation.
… insertion order using a vector of map keys.
…ics from the python script and write them to NetCDF and ASCII output files.
Testing notes:
|
…captured in the make_install.log file.
…ded at build time.
…cludes updating diag_lib to version 0.5.0. This makes the SciPy Python package optional rather than required.
@jvigh thanks for clearly describing the differences.
I asked about this at the last project meeting and @musgrave-kate indicated we should use "GFSO".
Correct, the existing unit test only uses GFS data out to 24 h. The need to enhance the unit tests is noted in issue #2729.
Agreed, the computed values do not match well enough yet. In particular, there is an issue with winds that @robertdemariacira has been tasked with investigating. These differences are noted in issue #2729.
Yes, I see that. This is the difference between fixed-width FORTRAN output versus putting 1 space between columns. Let's ask @musgrave-kate if this matters, and if so, I can define a minimum width for the first column in issue #2729.
I assume that when the Python code returns all bad data it doesn't return a units string. Hopefully once the wind issues are resolved, so too will this units mismatch.
Yes, I configured MET with the levels @musgrave-kate indicated we should use by default. The CIRA-computed diagnostics include more levels. Let's follow up with @musgrave-kate about this.
Agreed, the CIRA Python code isn't returning it. I'll update #2729 to further investigate and address these discrepancies. |
I note that the NetCDF output file is not CF-compliant. Not sure what NOAA's requirements are, but guessing this is okay. If CF compliance was desired, here's the compliance report. The main omission is lack of standard_name attributes, which I don't think exist for these diagnostics. Some file-level metadata might be good to include though. Minor point: storm_id and model could be provided as global attributes of the file rather than variables. But I'm not sure there's any convention. If they are going to remain as variables, they should have long_name and/or description attributes. |
Agreed. That's why I want to review/revise the output formats before documenting them ;) Please note any specific requests on issue #2729. |
Sounds good, thanks.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left comments in the code review pane and the PR discussion. If these are all handled or identified as to-do items for later, I approve this PR. Great work!
…ed for MET-12.0.0-beta2
Co-authored-by: jprestop <[email protected]> Co-authored-by: Seth Linden <[email protected]> Co-authored-by: John Halley Gotway <[email protected]> Co-authored-by: Daniel Adriaansen <[email protected]> Co-authored-by: John and Cindy <[email protected]> Co-authored-by: rgbullock <[email protected]> Co-authored-by: Randy Bullock <[email protected]> Co-authored-by: Dave Albo <[email protected]> Co-authored-by: Howard Soh <[email protected]> Co-authored-by: George McCabe <[email protected]> Co-authored-by: hsoh-u <[email protected]> Co-authored-by: MET Tools Test Account <[email protected]> Co-authored-by: Seth Linden <[email protected]> Co-authored-by: lisagoodrich <[email protected]> Co-authored-by: davidalbo <[email protected]> Co-authored-by: Lisa Goodrich <[email protected]> Co-authored-by: metplus-bot <[email protected]> Co-authored-by: j-opatz <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Vigh <[email protected]> Co-authored-by: Tracy Hertneky <[email protected]> Co-authored-by: David Albo <[email protected]> Co-authored-by: Dan Adriaansen <[email protected]> Co-authored-by: Julie Prestopnik <[email protected]> Co-authored-by: root <root@83062d57c5dd> fix 2518 dtypes appf docs (#2519) fix 2531 compilation errors (#2533) fix #2531 compilation_errors_configure (#2535) fix #2514 develop clang (#2563) fix #2575 develop python_convert (#2576) Fix Python environment issue (#2407) fix definitions of G172 and G220 based on comments in NOAA-EMC/NCEPLIBS-w3emc#157. (#2406) fix #2380 develop override (#2382) fix #2408 develop empty config (#2410) fix #2390 develop compile zlib (#2404) fix #2412 develop climo (#2422) fix #2437 develop convert (#2439) fix for develop, for #2437, forgot one reference to the search_parent for a dictionary lookup. fix #2452 develop airnow (#2454) fix #2449 develop pdf (#2464) fix #2402 develop sonarqube (#2468) fix #2426 develop buoy (#2475) fix 2596 main v11.1 rpath compilation (#2614) fix #2514 main_v11.1 clang (#2628) fix #2644 develop percentile (#2647) fix #2730 develop SI_BCU (#2732)
Expected Differences
This PR provides major upgrades to the TC-Diag tool through a large number of modified files. While this is a significant amount of work, more changes to TC-Diag are needed in the beta3 development cycle and are described in issue #2729.
Here's an overview of the changes in this PR:
Incorporates CSU CIRA Python Diagnostics code:
scripts/python/tc_diag
is code pulled from https://github.com/robertdemariacira/tc_diag_driverscripts/python/tc_diag/compute_tc_diag.py
is the Python script that MET actually calls to interface with the CIRA Python diagnostics code.scripts/python/pyembed
containsread_tmp_diag.py
andwrite_tmp_diag.py
scripts to facilitate running TC-Diag withMET_PYTHON_EXE
pointing to a custom Python installation.configure.ac
,configure
, and many Makefiles are caused by adding new directories.data/tc_data/v2023-04-07_gdland_table.dat
is added to define the distance to land. I added a note to Fix the wind-based diagnostics computations in TC-Diag #2729 about how this overlaps the TC-DLand tool.Made a handful of changes to common library code for convenience during development.
Changes to the TC-Diag source code in
src/tools/tc_utils/tc_diag
.Do these changes introduce new tools, command line arguments, or configuration file options? [Yes]
If yes, please describe:
In
TCDiagConfig_default
:override_diags
config option to specify which diagnostics from the nest should override the parents.output_prefix
and replace it withoutput_base_format
.nc_rng_azi_flag
withnc_cyc_grid_flag
.diag_script
separately for the "parent" and "nest" domains passing in different yml configuration files.Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [Yes]
If yes, please describe:
Adds new TC-Diag NetCDF output file.
Adds new TC-Diag ASCII output file.
Pull Request Testing
Describe testing already performed for these changes:
Confirmed that the existing unit test in
unit_tc_diag.xml
runs and produces the two new output files.Carefully compared the newly generated ASCII output to exist CIRA Diagnostics output to ensure consistent formatting. I do note some differences in the actual computed diagnostics values, but those diffs will be investigated and fixed through Fix the wind-based diagnostics computations in TC-Diag #2729.
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
First, read through Fix the wind-based diagnostics computations in TC-Diag #2729 to note what additional changes are needed.
Review these code changes, existing documentation changes, and note that the GHA runs pass with the only difference being the creation of new TC-Diag output files.
This feature branch is compiled and available for your use on seneca in:
/d1/projects/MET/MET_pull_requests/met-12.0.0/beta2/MET-feature_2550_compute_diagnostics
Updates to the TC-Diag chapter, Appendix F about Python embedding, and an unrelated change to the TC-Stat chapter. Please review these on the Files changed tab or in this PR 2728 RTD build.
Further needed updates to documentation are described in #2729.
The
internal/test_unit/xml/unit_tc_diag.xml
file continues running the same Ian case, but the expected output files are updated to include the newly generated diag.nc and diag.txt output file.Note that the TC-Diag unit tests should really be expanded to include an example of nesting, as mentioned in #2729.
Will this PR result in changes to the test suite? [Yes]
If yes, describe the new output and/or changes to the existing output:
Creates 2 new TC-Diag output files.
Please complete this pull request review by [Fri 11/17/23].
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases