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 2231 unstructured grid #2723

Merged
merged 118 commits into from
Nov 17, 2023
Merged

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Nov 1, 2023

Expected Differences

The capability of unstructured grid is implemented, but not completed.

  • --enable-ugrid is added to the configure, default is without ugrid capability.
    • At seneca, atlas and eckit libraries are installed at /d1/projects/MET/MET_releases/external_libs/gnu_8.3.0
    • The configuration for seneca is updated at internal/scripts/environment/development.seneca
  • Updated configurations, see below
    • added
  • Find variables by looking at the level setting (L and P options only) if the given name does not exist:
    • search the variable "<name>_<DDD><uuu>", "temperature_<DDD><uuu>
      • DDD: vertical level from level setting, pressure or height
      • uuu: unit, optional, ignore the unit if exists, for example, hPa
    • for example,name = "temperature"; level = "P1000-500"; is given
    • result: temperature_500hPa, temperature_700hPa, temperature_850hPa, and temperature_925hPa are selected
  • Four unit tests are added
    • point_stat
      • MPAS diagnostic file VS prefburf
      • MPAS output file VS prefburf
    • grid_stat:
      • MPAS diagnostic VS. GFS (grib2)
      • MPAS diagnostic VS. MPAS output
    • four configuration files were added
      • internal/test_unit/config/GridStatConfig_ugrid_mpas
      • internal/test_unit/config/GridStatConfig_ugrid_mpas_diag
      • internal/test_unit/config/PointStatConfig_ugrid_mpas_diag
      • internal/test_unit/config/PointStatConfig_ugrid_mpas_out
    • $MET_TEST_INPUT/ugrid_data is added

Error messages if "file_type = NETCDF_UGRID" is configured at the configuration file but MET was built without "--enable-ugrid" option:

ERROR  :
ERROR  : Met2dDataFileFactory::new_met_2d_data_file() -> data file type "FileType_UGrid" is not activated. Recompile with the --enable-ugrid option"
ERROR  :

Not completed items:

  • GHA is not ready because of missing Atlas and eckit libraries for the Docker

  • The grid_stat output as the unstructured grid is not supported

    • The regrid option has to be configured for the grid_stat between unstructured grid inputs
  • Documentation: not done

  • Unit test

    • the unit test of the unstructured grid is not conditional
    • did not set <grid_nc> output with grid_stat because of parsing error
  • Do these changes introduce new tools, command line arguments, or configuration file options? [Yes]

    If yes, please describe:

  • File type NETCDF_UGRID is added

  • Three configurations are added to GridStatConfig and PointStatConfig

    • ugrid_max_distance_km = 30;
    • ugrid_user_map_config: to override metadata settings (dimension and variable names)
    • ugrid_coordinates_file: to specify the static metadata file (for MPAS)
  • 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 in the unit test (commands and configurations)

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Test with other MPAS input.
    Test with LFRic data (I did not test LFRic data)
    The build is ready at /d1/personal/hsoh/git/pull_request/MET_feature_2231_unstructured_grid/bin

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]

Working on this

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

Four unit tests are added (see above)

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

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

more outputs from the four unit tests

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

Howard Soh added 30 commits September 12, 2023 10:09
…onfigurable by using the connfiguration file
Howard Soh and others added 19 commits November 15, 2023 11:07
…d Makefile.in files. These changes break are for GRIB2, Python, and UGRID to differentiate between the internal MET libraries from the associated external dependencies. Replace existing GRIB2_LIBS with GRIB2_MET_LIBS and GRIB2_DEP_LIBS. Do the same for PYTHON_LIBS and UGRID_LIBS.
…ssful compilation using the dtcenter/met-base-unit-test:v3.1 image.
@hsoh-u hsoh-u linked an issue Nov 16, 2023 that may be closed by this pull request
21 tasks
Copy link
Contributor

@DanielAdriaansen DanielAdriaansen left a comment

Choose a reason for hiding this comment

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

Documentation is still needed, but functionality with point_stat and grid_stat has been tested with MPAS output for two meshes. Great work @hsoh-u !

I approve, and look forward to expanding on this for the next beta.

Copy link

@willmayfield willmayfield left a comment

Choose a reason for hiding this comment

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

Ran a few tests with point_stat (diag files vs bufr) and grid_stat (diag files vs diag files, results on climo file grid), using MPAS diag files with pressure levels in separate netcdf variables. Used separate lines in the config for these variables. Results were as expected and run times reasonable for a high resolution mesh. Approving!

@JohnHalleyGotway
Copy link
Collaborator

Thanks @hsoh-u for all this excellent work, and thanks to @DanielAdriaansen and @willmayfield for advising on and reviewing it. I'm proceeding with the merge into develop for inclusion in the MET-12.0.0-beta2 release.

@JohnHalleyGotway JohnHalleyGotway merged commit 9c33f83 into develop Nov 17, 2023
33 of 34 checks passed
@JohnHalleyGotway JohnHalleyGotway deleted the feature_2231_unstructured_grid branch November 17, 2023 19:05
@willmayfield
Copy link

Great work @hsoh-u !!! And thank you @DanielAdriaansen and @JohnHalleyGotway !

JohnHalleyGotway pushed a commit that referenced this pull request Nov 17, 2023
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Seth Linden <linden@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John and Cindy <halleygotway@Halleys-Mac-mini.local>
Co-authored-by: rgbullock <bullock@ucar.edu>
Co-authored-by: Randy Bullock <bullock@seneca.rap.ucar.edu>
Co-authored-by: Dave Albo <dave@seneca.rap.ucar.edu>
Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: hsoh-u <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: Seth Linden <linden@ucar.edu>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: Lisa Goodrich <lisag@ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Vigh <jvigh@ucar.edu>
Co-authored-by: Tracy Hertneky <39317287+hertneky@users.noreply.github.com>
Co-authored-by: David Albo <dave@ucar.edu>
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: root <root@83062d57c5dd>
fix 2518 dtypes appf docs (#2519)
fix 2531 compilation errors (#2533)
fix #2531 compilation_errors_configure (#2535)
fix #2514 develop clang (#2563)
fix #2575 develop python_convert (#2576)
Fix Python environment issue (#2407)
fix definitions of G172 and G220 based on comments in NOAA-EMC/NCEPLIBS-w3emc#157. (#2406)
fix #2380 develop override (#2382)
fix #2408 develop empty config (#2410)
fix #2390 develop compile zlib (#2404)
fix #2412 develop climo (#2422)
fix #2437 develop convert (#2439)
fix for develop, for #2437, forgot one reference to the search_parent for a dictionary lookup.
fix #2452 develop airnow (#2454)
fix #2449 develop pdf (#2464)
fix #2402 develop sonarqube (#2468)
fix #2426 develop buoy (#2475)
fix 2596 main v11.1 rpath compilation (#2614)
fix #2514 main_v11.1 clang (#2628)
fix #2644 develop percentile (#2647)
fix #2730 develop SI_BCU (#2732)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Add support for NetCDF files following the UGRID convention
4 participants