Skip to content
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 met v10.0 point2grid latlon to laton #1837

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Jun 18, 2021

Pull Request Testing

  • Describe testing already performed for these changes:

The same contents at #1835
./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)

    • Clicking "Inv P" botton will flip vertically (latitude increases with ncview from bottom left)
    • It's rotated about 45 degrees
      • how to know: check latitude/longitude changes by moving the mouse vertically/horizontally).
  • 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? [No]

No changes

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the test suite? [Yes or No]

    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

  • Please complete this pull request review by [Fill in date].

Pull Request Checklist

See the METplus Workflow for details.

  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    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
  • After submitting the PR, select Linked issues with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

@hsoh-u hsoh-u added this to the met-10.0.1 (bugfix) milestone Jun 18, 2021
@hsoh-u hsoh-u requested a review from jprestop June 18, 2021 17:25
@hsoh-u hsoh-u linked an issue Jun 18, 2021 that may be closed by this pull request
22 tasks
@hsoh-u hsoh-u mentioned this pull request Jun 18, 2021
12 tasks
@jprestop
Copy link
Collaborator

@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:

the executables from met-10.0.0 (/d1/projects/MET/MET_releases/met-10.0.0/bin/)
the executables from the bugfix_1817_MET_v10.0_point2grid_latlon_to_laton branch (/d1/projects/MET/MET_pull_requests/met-10.0.1/bugfix_1817/MET-bugfix_1817_MET_v10.0_point2grid_latlon_to_laton_into_main_v10.0/met/bin/)
and then see what the differences were.

When I run the met-10.0.0 point2grid with the following command:

/d1/projects/MET/MET_releases/met-10.0.0/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,*,*)";'

this is the output I get (The difference in the output from the feature branch is enclosed in asterisks):

DEBUG 1: Reading data file: /d1/personal/hsoh/data/Binyu/wrong_latitude_units/VOLCAT_HIMAWARI-8_FLDK_s2020296_050000_v300250_VCB_w167_FLDK_b2020295_204000_g001_pc.nc
DEBUG 1: get_nc_data(NcVar *, double *) type_id: 10 type name: int64
DEBUG 2: Interpolation options: method = UW_MEAN, vld_thresh = 0.5
DEBUG 2: Output grid: Projection: Lat/Lon Nx: 200 Ny: 200 lat_ll: 45.000 lon_ll: -153.000 delta_lat: 0.100 delta_lon: 0.100
DEBUG 1: get_nc_data(NcVar *, double *) type_id: 10 type name: int64
DEBUG 2: 
DEBUG 2: NcCfFile::getData(NcVar *, const LongArray &, DataPlane &) const -> data was flipped to north.
DEBUG 2: Range of data (name="ash_mass_loading"; level="(0,*,*)";)
DEBUG 2: 	input: 0.0217733 to 5.64083	**regridded: 0.0974455 to 3.68398**.
DEBUG 1: Writing output file: bezy_2020296_0500_regrided.nc

When I run the bugfix_1817_MET_v10.0_point2grid_latlon_to_laton branch point2grid with the following command:

/d1/projects/MET/MET_pull_requests/met-10.0.1/bugfix_1817/MET-bugfix_1817_MET_v10.0_point2grid_latlon_to_laton_into_main_v10.0/met/bin/point2grid /d1/personal/hs
oh/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_2
020296_0500_regrided.nc -field 'name="ash_mass_loading"; level="(0,*,*)";'

this is the output I get (The difference in the output from the met-10.0.0 branch is enclosed in asterisks):

DEBUG 1: Reading data file: /d1/personal/hsoh/data/Binyu/wrong_latitude_units/VOLCAT_HIMAWARI-8_FLDK_s2020296_050000_v300250_VCB_w167_FLDK_b2020295_204000_g001_pc.nc
DEBUG 1: get_nc_data(NcVar *, double *) type_id: 10 type name: int64
DEBUG 2: Interpolation options: method = UW_MEAN, vld_thresh = 0.5
DEBUG 2: Output grid: Projection: Lat/Lon Nx: 200 Ny: 200 lat_ll: 45.000 lon_ll: -153.000 delta_lat: 0.100 delta_lon: 0.100
DEBUG 1: get_nc_data(NcVar *, double *) type_id: 10 type name: int64
DEBUG 2: 
DEBUG 2: NcCfFile::getData(NcVar *, const LongArray &, DataPlane &) const -> data was flipped to north.
DEBUG 2: Range of data (name="ash_mass_loading"; level="(0,*,*)";)
DEBUG 2: 	input: 0.0217733 to 5.64083	**regridded: 0.0794586 to 4.32057**.
DEBUG 1: Writing output file: bezy_2020296_0500_regrided.nc

Is that the expected difference in regridded values?

I am working on kiowa and ncview is not in my path:

kiowa:jpresto:/d1/personal/jpresto/MET/met_help/hsoh_pr_bugfix_1817_develop/current> which ncview
ncview: Command not found.

I looked for it in /usr/local/, but couldn't find it there:

kiowa:jpresto:/d1/personal/jpresto/MET/met_help/hsoh_pr_bugfix_1817_develop/current> find /usr/local -name ncview
kiowa:jpresto:/d1/personal/jpresto/MET/met_help/hsoh_pr_bugfix_1817_develop/current> 

I have attached the two test.ps (converted to png so that I could upload them) files (named test_10.0.0.png
and test_bugfix_1817_main.png).

test_10 0 0

test_bugfix_1817_main

Can you please confirm that this is the expected change?

@hsoh-u
Copy link
Collaborator Author

hsoh-u commented Jun 21, 2021

Yes, the second image is the expected one.

Copy link
Collaborator

@jprestop jprestop left a 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!
I verified the code changed and Howard confirmed the new output is expected. All the checks passed. I approve this request.

@hsoh-u hsoh-u merged commit b73243c into main_v10.0 Jun 21, 2021
@hsoh-u hsoh-u deleted the bugfix_1817_MET_v10.0_point2grid_latlon_to_laton branch June 21, 2021 21:18
JohnHalleyGotway added a commit that referenced this pull request Jul 6, 2021
* Per #1789, remove duplicate plot_point_obs configuration section. (#1790)

* Per #1798, fix up the read_tmpe_dataplane.py script to handle a grid string or dictionary. (#1799)

* Github Issue #1801: Comment out code that checks for BEST track to support extra-tropical cyclone tracks not verified against BEST tracks.

* Bugfix 1395 main_v10.0 comp script (#1796)

* Updating compile script and associated config files for met-10.0.0

* Removing old config files

* install_met_env.het

* Updated orion file

* Added stampede2 config file

* Adding modulefiles for various machines

* Feature main_v10.0 bugfix_checklist (#1803)

* Recommended updates to clarify the use of projects and milestones for bugfixes.

* Making details consistent across all issue templates.

* Per met-help question (https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=99964) clarify the description of the obs_thresh option.

* Update README.md

Adding text for GitHub Discussions

* changed non-unicode apostrophe and fixed typo in URL (#1813)

* Correct formatting errors in release notes.

* #1817 Added to_north argument at two_to_one()

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

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

Co-authored-by: bikegeek <[email protected]>
Co-authored-by: jprestop <[email protected]>
Co-authored-by: bikegeek <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The output of point2grid is flipped and rotated with lat/lon to lat/lon conversion
2 participants