Feature #1518 winds#3403
Conversation
…rInfo base class.
…d, used a pre-defined hard-coded list of variable names to drive the derivation logic.
…class. Next up are handling wind rotations and adding lots of tests.
…add long names and units for derived wind fields.
…ing winds, the level string needs to be wrapped in parenthesis based on the existing parsing logic.
…r than just the derived classes for GRIB1 and GRIB2.
…nce. Still need to add the vorticity and divergence derivations and add new unit tests.
… they're non-trivial.
…CF) contain earth-relative winds.
…cp_combine -sum command to work again on precip data where name = APCP_03 while req_name = APCP.
…ptive disc/pcat/pnum.
…). We now have rotate_winds() for both DataPlane and DataPlaneArray inputs. And wind rotation is now handled AFTER the calls to process_data_plane().
…as to make the unit tests happier. ci-run-unit
…-Diag unit test fails in GHA when using 3.4-latest.
…fter adding the swap UV logic.
…umber of them relative to the develop branch.
…into feature_1518_winds
…lls to mlog throughout the MET repo.
…hen the current field name setting matches the contents of what's in ConfigConstants. That way, it is NOT used when the user explicitly sets the field name.
…satisfy SonarQube's complaints about calling new and delete.
|
|
@JohnHalleyGotway, excellent job on stepping through the numerous details and code changes for this PR. I ran through the new unit tests and looked at the log files, tested on some GRIB2 data (against prepbufr data), and I also cross-checked the MET output from this branch against a current set-up using a user script (leveraging wrf-python) to derive the earth-relative wind components and wind speed from WRF output files. All tests looked good and ran and produced output as expected. In the case of comparing MET derivation functionality against wrf-python, no differences in the output were noted. |
|
|
||
| Numerical weather prediction model output often defines winds relative to the orientation of the model grid rather than true north-south and east-west directions on the earth. | ||
| However point observations typically define winds relative to true earth directions. Prior to comparing them, the model wind data must be rotated from grid-relative to | ||
| to earth-relative. While the degree of grid-to-earth rotation varies based on the projection type and location, failing to rotate the winds has a significant impact on |
There was a problem hiding this comment.
Minor, but would suggest changing to "can have a significant impact"
|
|
||
| .. code-block:: none | ||
|
|
||
| u_wind_field_name = "UGRD,U"; |
There was a problem hiding this comment.
Yes, those are the defaults in this ConfigConstants file.
| ---------------------------- | ||
|
|
||
| Numerical weather prediction model output often defines winds relative to the orientation of the model grid rather than true north-south and east-west directions on the earth. | ||
| However point observations typically define winds relative to true earth directions. Prior to comparing them, the model wind data must be rotated from grid-relative to |
There was a problem hiding this comment.
I realize most users will be using the new rotation/derivation capability on point-data, but do we need to mention anything about using for grid-to-grid verification in the grid-stat section -- e.g., if a user wanted verify wrf analysis files against forecast files?



This is a rather extensive set of changes to more broadly support wind rotation and derivation of gridded wind data across multiple input file types. Please note the following development details:
set_job_controls.shreverts back to METbaseimage 3.4 for now since 3.5 causes an unrelated segfault in TC-Diag. This needs to be fixed separately.ConfigConstantsdefaults show common GRIB and WRF-NetCDF variable names. Please advise if these should be updated.unit_plot_data_plane.xml, I addedis_grid_relative=false;in 2 spots to suppress wind rotation to preserve existing output and demonstrate that settingis_grid_relativeactually works.unit_winds.xmlcall pcp_combine as a "pass-through" to demonstrate the rotation and derivations of winds from both U/V and wind speed/direction inputs.WindMetaDatastruct stores the metadata for identifying winds info in one spot. It is an element of VarInfo and can be specified separately for EACH FIELD read, if needed.vx_data2dbase class library.read_wind_data()function, when going U->V or V->U, it FIRST tries swapping the U's and V's to look for a match. If the swap changes the field name, we try that first. If not, we proceed to the search strings in the*_wind_field_nameoption.set_name()was NOT sufficient. Instead we need the fullset_dict()option to include all the misc config options.table_lookup.h/.ccshould be noted. Previously, MET logged when a variable named (e.g.TMP) appeared more than once in the GRIB tables. Of course that happens all the time! That's now changed to only print info about the name NEVER appearing in the GRIB tables.get_field()reach each config string independently rather than letting one string settings affect the subsequent ones.Expected Differences
If yes, please describe:
Adds the following config options in
ConfigConstants:If yes, please describe:
Pull Request Testing
Describe testing already performed for these changes:
Extensive manual testing during development and added 3 new unit tests in
unit_winds.xmlto illustrate the functionality for GRIB1, GRIB2, and WRF-NetCDF input files.Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
unit_winds.xmlat verbosity level 3 and carefully review the log messages about the derivation and rotation of winds.seneca:/d1/projects/MET/MET_pull_requests/met-13.0.0/rc1/MET-feature_1518_winds.Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
Do these changes include sufficient testing updates? [Yes]
unit_winds.xmldemonstrate with 3 input files. Please advise if testing for additional inputs is warranted.Will this PR result in changes to the MET test suite? [Yes]
If yes, describe the new output and/or changes to the existing output:
unit_winds.xmlare added.grib_tables/um_raw/PS.557WW_SC.U_DI.F_GP.GALWEM-GD_GR.C17KM_AR.GLOBAL_DD.20160424_CY.00_FH.000_DF.psgrid_stat/grid_stat_WRF_pres_120000L_20190831_120000V_pairs.ncandgrid_stat/grid_stat_WRF_pres_120000L_20190831_120000V.statU_PLdata (e.g. U-wind at pressure levels) was NOT being rotated from grid-to-earth relative, and now it is.Will this PR result in changes to existing METplus Use Cases? [Maybe]
If yes, create a new Update Truth METplus issue to describe them.
Do these changes introduce new SonarQube findings? [Yes]
If yes, please describe:
Please complete this pull request review by [Friday, July 3rd].
I scheduled a meeting to discuss for Tuesday, June 30th.
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: METplus-X.Y Support project for bugfix releases or MET-X.Y Development project for the next coordinated release