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 1729 set attr grid #2946

Closed
wants to merge 23 commits into from
Closed

Feature 1729 set attr grid #2946

wants to merge 23 commits into from

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Aug 15, 2024

Expected Differences

set_attr_grid was introduced and the configuration was processed. MET libraries were updated partially. The rest of MET libraries were modified to support the set_attr_grid setting. The set_attr_gird setting for gridded data replaces the grid information from the input NetCDF file
The set_attr_gird setting for point data works differently. Instead of stopping point2grid, it continues with the missing grid information with the set_attr_grid setting. But the new grid information is not applied. The actual longitude and latitude variable names should be given via the user defined configuration for point2grid.

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

Added two unit tests

/plot_data_plane \
      /d1/projects/MET/MET_test_data/unit_test/model_data/nccf/MITLL.ProxyEchoTopsCalibratedMosaic.20200831_235328_v_20200831_235328.nc \
      EchoTops_set_attr_grid.ps \
      'name="ProxyEchoTopsCalibratedMosaic"; level="(0,*,*)"; set_attr_grid="latlon 8008 4004 -90 -180 0.04 0.04";' \
      -title "Global Synthetic Weather Radar EchoTops" \
      -v 1

./point2grid \
      /d1/projects/MET/MET_test_data/unit_test/model_data/cice/iceh.2018-01-03.c00.tlat_tlon.nc \
      G231 \
      point2grid_cice_to_G231.nc \
      -config /d1/personal/hsoh/git/features/feature_1729_set_attr_grid/MET/internal/test_unit/config/Point2GridConfig_tlat_tlon \
      -field 'name="hi_d"; level="(0,*,*)"; set_attr_grid="latlon 180 360 -80 -180 1 1";' \
      -v 1
  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

Test with the real input file which needs the grid definition for certain variables.

The unittest for plot_data_plane uses a gridded data which is not evenly distributed horizontally and vertically.
The input data file the point2grid unittest was generated (by removing the grid information and providing the user configuration:

file_type = NETCDF_NCCF; 

var_name_map = [
  { key = "lat_vname";     val = "TLAT"; },
  { key = "lon_vname";     val = "TLON"; }
];
  • 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]

Two unittests were added

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

Two more outputs:

  • plot_data_plane/EchoTops_set_attr_grid.ps

  • point2grid/point2grid_cice_to_G231.nc

  • Will this PR result in changes to existing METplus Use Cases? [No]

    If yes, create a new Update Truth METplus issue to describe them.

  • Do these changes introduce new SonarQube findings? [No]

    If yes, please describe:

  • 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) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • 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 12.0.0 milestone Aug 15, 2024
@hsoh-u
Copy link
Collaborator Author

hsoh-u commented Aug 28, 2024

Created another feature branch feature_1729_set_attr_grid_v3 and pull request because of differences at some unittest outputs.

@hsoh-u hsoh-u closed this Aug 28, 2024
@hsoh-u hsoh-u deleted the feature_1729_set_attr_grid branch September 6, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Enhance the set_attr_grid processing logic to support input files lacking a grid definition
1 participant