Closed JohnHalleyGotway closed 1 week ago
@JohnHalleyGotway and @KathrynNewman met to review this PR and found the following:
I was able to update the logic in tcrmw_grid.cc
to reverse the x dimension of the range-azimuth grid, effectively switching from a counterclockwise rotation of azimuths to clockwise. Here's what that change looks like in the latitudes:
Moving left to right, as the azimuth increases from 0 degrees to 360 degrees, the CCW data on the left INCREASES in latitude before decreasing. Whereas the updated CW data on the right DECREASES in latitude before increasing.
A similar result can be seen in the reversed pattern of the range/azimuth gridded data. Here's 500mb RH, CCW on the left and CW on the right:
I also see the clockwise rotation by inspecting the lat/lon locations reported in the DEBUG(4) log messages from by TC-RMW. Compare the center point to the lat/lon of 4 points for range ~= 200km. Here's a selection:
DEBUG 4: wind_ne_to_rt() -> center lat/lon (25.3, 84.8), range (km): 199.8, azimuth (deg): 0, point lat/lon (25.2867, 82.8149), uv (-22.29, 3.51), radial wind: -22.29, tangential wind: 3.51
DEBUG 4: wind_ne_to_rt() -> center lat/lon (25.3, 84.8), range (km): 199.8, azimuth (deg): 90, point lat/lon (23.5052, 84.8), uv (-21.41, 2.45), radial wind: 2.45, tangential wind: 21.41
DEBUG 4: wind_ne_to_rt() -> center lat/lon (25.3, 84.8), range (km): 199.8, azimuth (deg): 180, point lat/lon (25.2867, 86.7851), uv (-18.19, 3.81), radial wind: 18.19, tangential wind: -3.81
DEBUG 4: wind_ne_to_rt() -> center lat/lon (25.3, 84.8), range (km): 199.8, azimuth (deg): 270, point lat/lon (27.0948, 84.8), uv (-20.07, 3.66), radial wind: -3.66, tangential wind: -20.07
Note that I also dumped the data from some of these lines into Excel to "manually" derive radial and tangential winds to confirm that MET is computing them correctly. The manual output matches the values reported by MET.
I also compared the U/V values reported in these log messages to the values shown in the NetCDF range-azimuth file and confirmed that they are consistent... just to make sure there wasn't a problem in how the data is being read from the file.
Expected Differences
Please review this at the same time as PR #2920, to fix this bug in the
main_v11.1
branch.[x] Do these changes introduce new tools, command line arguments, or configuration file options? [No] If yes, please describe:
[x] Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No] If yes, please describe:
Pull Request Testing
4 of these are the same as the diffs for PR #2920. But the TC-Diag file (
file1: /data/output/met_test_truth/tc_diag/sal092022_gfso_doper_2022092400_diag.nc
) is the new difference for this PR.I used
ncdump
to dump to ascii and compare the results. Some diffs are way out in the 8th or more decimal place, but real differences only occur for850TANG
,850VORT
, and200DVRG
as planned/hoped:I'll note that while the diagnostics are modified, they do not resolve the discrepancies noted in MET #2729.
Please find the code for testing on seneca in:
/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-bugfix_2841_develop_tang_rad_winds
You can find the updated documentation for this PR at this link: https://met--2921.org.readthedocs.build/en/2921/Users_Guide/tc-rmw.html
[x] Do these changes include sufficient testing updates? [Yes] No new tests are needed, but output from existing tests will change.
[x] 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: Modifies all output from TC-RMW and TC-Diag.
[x] Will this PR result in changes to existing METplus Use Cases? [Yes] If yes, create a new Update Truth METplus issue to describe them. Output from any unit tests that run TC-RMW or TC-Diag will be modified.
[x] Do these changes introduce new SonarQube findings? [???] If yes, please describe: Unknown.
[x] Please complete this pull request review by [Fri 5/21/24]. The main_v11.1 bugfix (PR #2920) is needed by 6/21/24 to be included in the MET-11.1.1 bugfix release on that date.
Pull Request Checklist
See the METplus Workflow for details.