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

Feature #2218 main_v11.0 polar stereographic #2419

Merged
merged 11 commits into from
Feb 2, 2023

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Jan 21, 2023

Expected Differences

Copied from #2351.
And please check the images at PR 2351.

  • Support negative delta for x and y
  • The scale_factor is computed if the standard parallel is available.
  • Added parameters for polar stereographics when the standard parallel is applied or ellipsoidal earth.
    • x_pin = y_pin = 0. (was offset from origin) for spherical earth
    • lon_pin = actual longitude of bottom left corner (was lon of the origin)
  • NSIDC Sea Ice Edge NetCDF files are polar stereographics for an ellipsoidal earth. The lat/lon conversion is not the same with polar stereographics for the spherical earth. It gives a warning
    • It's not tested with the scale_factor 1 (because no sample data file)

if "-v 15" is given, the conversion results are printed

  • input x/y, not index

  • converted lat/lon

  • computed x/y

  • difference of original x/y and compiuted x/y

  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • 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

  • Describe testing already performed for these changes:

Tested with two sample files with standard_parallel attribute.

  • radolan_sp.nc: with standard_parallel (spherical earth)
  • NSIDC0081_SEAICE_PS_N25km_20220723_v2.0.nc with standard_parallel (ellipsoidal earth)
  • They are added to the unittest input

The tests are added to the plot_data_plane unittest (north pole for both).

/d1/projects/MET/MET_pull_requests/met-11.0.1/issue_2218/MET_2218_polar_stereographic_v11.0/bin/plot_data_plane \
      /d1/projects/MET/MET_test_data/unit_test/model_data/nccf/radolan_sp.nc \
      radolan_sp_PREC.ps \
      'name="PREC"; level="(0,*,*)";' \
      -title "NCCF Polar Stereographic Precipitation" \
      -v 1

/d1/projects/MET/MET_pull_requests/met-11.0.1/issue_2218/MET_2218_polar_stereographic_v11.0/bin/plot_data_plane \
      /d1/projects/MET/MET_test_data/unit_test/model_data/nccf/NSIDC0081_SEAICE_PS_N25km_20220723_v2.0.nc \
      NSIDC0081_SEAICE_PS_N25km.ps \
      'name="F16_ICECON"; level="(0,*,*)";' \
      -title "Sea Ice Concentration" \
      -v 1
/d1/projects/MET/MET_pull_requests/met-11.0.1/issue_2218/MET_2218_polar_stereographic_v11.0/bin/regrid_data_plane /d1/projects/MET/MET_test_data/unit_test/model_data/nccf/NSIDC0081_SEAICE_PS_N25km_20220723_v2.0.nc G001 polar_regrid.nc -field 'name="F16_ICECON"; level="(0,*,*)";'

ncdump polar_regrid.nc  | less
OR
/d1/projects/MET/MET_pull_requests/met-11.0.1/issue_2218/MET_2218_polar_stereographic_v11.0/bin/plot_data_plane polar_regrid.nc polar_regrid.ps 'name="F16_ICECON"; level="(*,*)";'
display polar_regrid.ps


Make sure that there some valid F16_ICECON values at regridded output, polar_regrid.nc
OR
The output of plot_data_plane shows some data.

South pole (input file is not at unit test data)

/d1/projects/MET/MET_pull_requests/met-11.0.1/issue_2218/MET_2218_polar_stereographic_v11.0/bin/plot_data_plane \
      /d1/personal/hsoh/data/MET-2218/NSIDC0081_SEAICE_PS_S25km_20220723_v2.0.nc \
      NSIDC0081_SEAICE_PS_N25km.ps \
      'name="F16_ICECON"; level="(0,*,*)";' \
      -title "Sea Ice Concentration" \
      -v 1
  • 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]

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

Two more unit tests

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

    If yes, describe the new output and/or changes to the existing output:

Two more plots:

  • plot_data_plane/radolan_sp_PREC.ps

  • plot_data_plane/NSIDC0081_SEAICE_PS_N25km.ps

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

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • 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 Development issue 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.

Copy link
Contributor

@j-opatz j-opatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review is from a tool execution perspective only, since I don't have the knowledge base to provide a code or GitHub automated testing review.
I was able to replicate the error that was described in the original Discussions, and found that running with this feature branch solved the error. I tested this against both north and south pole files that were provided and confirmed that they matched the results of an ncview command.
I don't know if the GHA failure is worth looking into, but I can confirm that the branch as it currently stands does fix the error.

@hsoh-u
Copy link
Collaborator Author

hsoh-u commented Jan 24, 2023

GHA issues were resolved. The new data file was at the wrong place.
Two more outputs from unit test are expected differences.

@JohnHalleyGotway JohnHalleyGotway changed the title Feature 2218 polar stereographic main v11.0 Feature #2218 main_v11.0 polar stereographic Jan 25, 2023
@JohnHalleyGotway JohnHalleyGotway added this to the MET 11.0.1 (bugfix) milestone Jan 25, 2023
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see and fix the issues noted in PR #2418 for this PR as well.

@JohnHalleyGotway JohnHalleyGotway requested review from sethlinden and removed request for sethlinden January 26, 2023 20:39
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of these changes.

I reran the tests from PR #2418 for this pull request and the output looks good. I note that GitHub actions failed... but only because of the addition of 2 new tests. So that is expected.

Thanks!

@hsoh-u hsoh-u merged commit 5b6f2bb into main_v11.0 Feb 2, 2023
JohnHalleyGotway added a commit that referenced this pull request Feb 2, 2023
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: jprestop <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
3 participants