-
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
Bugfix 1817 point2grid latlon to laton #1835
Conversation
… if latitude moves north to south
@hsoh-u I see that this is a bugfix for Project MET-10.1.0-beta2 and Milestone MET-10.1.0. Will there be a corresponding pull request to fix this in MET-10.0.0? |
The PR #1837 is created |
@hsoh-u There was nothing listed for "recommend testing for the reviewer(s) to perform" in this pull request. But, I thought I would try running the point2grid and plot_data_plane commands that you listed under the "testing already performed" using:
and then see what the differences were. When I run the met-10.1.0-beta1 point2grid with the following command:
this is the output I get (The difference in the output from the feature branch is enclosed in asterisks):
When I run with the bugfix_1817_point2grid_latlon_to_laton branch point2grid, with the following command:
this is the output I get (The difference in the output from the beta1 branch is enclosed in asterisks):
Is that the expected difference in regridded values? I am working on kiowa and ncview is not in my path:
I looked for it in /usr/local/, but couldn't find it there:
I have attached the two test.ps (converted to png so that I could upload them) files (named test_beta1.png Can you please confirm that this is the expected change? |
Yes, it's the expected output. There are no differences at the log messages. /usr/local/ncview/bin/ncview
|
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.
@hsoh-u Thank you for confirming that this is the expected output and thank you for the tip using "find" in /usr/local!
I verified the code changed and Howard confirmed the new output is expected. All the checks passed. I approved this request.
Correction with log message: the mapping (from cells to to cells) are changed. Some regridded data values are changed, too. |
* 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 Co-authored-by: jprestop <[email protected]> Co-authored-by: Howard Soh <[email protected]> Co-authored-by: hsoh-u <[email protected]>
Pull Request Testing
The problem was caused the input NetCDF has latitude from north to south. The "units" attribute at the latitude variable is not correct. The problem still happens if the "units" attribute is corrected. The problem was computing the offset from x-index and y-index (two-to_one() method).
./point2grid /d1/personal/hsoh/data/Binyu/wrong_latitude_units/VOLCAT_HIMAWARI-8_FLDK_s2020296_050000_v300250_VCB_w167_FLDK_b2020295_204000_g001_pc.nc "latlon 200 200 45 153 0.1 0.1" bezy_2020296_0500_regrided.nc -field 'name="ash_mass_loading"; level="(0,,)";'
OR
/d1/personal/hsoh/git/bugfixes/bugfix_1817_point2grid_latlon_to_laton/MET/met/bin/point2grid /d1/personal/hsoh/data/Binyu/wrong_latitude_units/VOLCAT_HIMAWARI-8_FLDK_s2020296_050000_v300250_VCB_w167_FLDK_b2020295_204000_g001_pc.nc "latlon 200 200 45 153 0.1 0.1" bezy_2020296_0500_regrided.nc -field 'name="ash_mass_loading"; level="(0,,)";'
./plot_data_plane bezy_2020296_0500_regrided.nc test.ps 'name="ash_mass_loading"; level="(,)";'
Note: The plot by ncview for the input NetCDF (VOLCAT_HIMAWARI-8_FLDK_s2020296_050000_v300250_VCB_w167_FLDK_b2020295_204000_g001_pc.nc) and the output netCDF (bezy_2020296_0500_regrided.nc) are not similar. You have to check the lat/lon by moving the mouse at the ncview
The ncview of input NetCDF: the latitude is north to south (latitude decreases with ncview from bottom left)
The ncview of output NetCDF by point2grid: the latitude is south to north
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
It was a bug. No additional documentation.
Old MET supports regrid_data_Plane on this input. MET 10.0 beta 4 or later does not allow because the input is not evenly spaced horizontally/vertically.
Do these changes include sufficient testing updates? [Yes]
Will this PR result in changes to the test suite? [Yes]
If yes, describe the new output and/or changes to the existing output:
The unit test "point2grid_2D_time" has the latitude north to south. SO the output should be updated by this change.
<MET_UNIT_TEST_OUT>/point2grid/point2grid_2D_time_west_bering_sea.nc will have different content
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes