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: Refine support for LAEA grids via NetCDF and GRIB2 files #2565

Closed
8 of 22 tasks
JohnHalleyGotway opened this issue Jun 9, 2023 · 4 comments · Fixed by #2616
Closed
8 of 22 tasks

Bugfix: Refine support for LAEA grids via NetCDF and GRIB2 files #2565

JohnHalleyGotway opened this issue Jun 9, 2023 · 4 comments · Fixed by #2616
Assignees
Labels
MET: Library Code priority: high High Priority requestor: METplus Team METplus Development Team required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: bug Fix something that is not working
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

Describe the Problem

Development for #1693 ADDED support for reading LAEA grids from GRIB2 files. However, it also REMOVED the existing support for reading LAEA grids from CF-compliant NetCDF files. As such, we commented out the existing unit test that tested that functionality (see <test name="plot_data_plane_LAEA_NCCF"> in unit_plot_data_plane.xml).

This task is to restore that support for reading LAEA data from CF-compliant NetCDF files. Recommend paying careful attention to Lambert azimuthal equal area documentation. And please remember to uncomment the plot_data_plane_LAEA_NCCF unit test mentioned above.

Only need to fix this for the develop branch prior to the MET-11.1.0 release.

Expected Behavior

Support LAEA grids read from both GRIB2 and CF-complaint NetCDF files.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next bugfix version

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Development issue
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: bug Fix something that is not working alert: NEED ACCOUNT KEY Need to assign an account key to this issue requestor: METplus Team METplus Development Team MET: Library Code priority: high High Priority labels Jun 9, 2023
@JohnHalleyGotway JohnHalleyGotway added this to the MET 11.1.0 milestone Jun 9, 2023
@JohnHalleyGotway JohnHalleyGotway added the required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone label Jun 9, 2023
@JohnHalleyGotway
Copy link
Collaborator Author

@mpm-meto and @robdarvell, @rgbullock is working on this issue. He is using a MetOffice data file for testing that is centered on the United Kingdom.
20230302T2100Z-visibility_at_screen_level.nc

I am wondering if you perhaps have a sample data file that's further away from the prime meridian with which he could also test? For example, in the past you send us data centered over India. Can you provide a sample LAEA CF-Compliant NetCDF file that covers the India domain?

@mpm-meto
Copy link

I can ask. Perhaps UM partners now running IMPROVER will have some sample data but we don't have any LAEA data over other parts of the world.

@JohnHalleyGotway
Copy link
Collaborator Author

OK, thanks for checking. We'll do the best we can with UK LAEA NetCDF sample data we have. If you do get your hands on NetCDF data for additional LAEA domains, please pass it along.

JohnHalleyGotway added a commit that referenced this issue Jul 13, 2023
… from CF-compliant NetCDF files. Note that the GRIB2 parameters remain the primary method for defining LAEA grids. Randy uses the NetCDF parameters to instantiate the GRIB2 data structure.
JohnHalleyGotway added a commit that referenced this issue Jul 13, 2023
… adopting this as the standard way of initializing an LAEA grid.
JohnHalleyGotway added a commit that referenced this issue Jul 18, 2023
…c to dump the grid data structs that are parsed, just like we do for other file formats (GRIB2, MET NetCDF, ...)
JohnHalleyGotway added a commit that referenced this issue Jul 18, 2023
JohnHalleyGotway added a commit that referenced this issue Jul 19, 2023
…ide semi_major_axis and semi_minor_axis by 2.
JohnHalleyGotway added a commit that referenced this issue Jul 20, 2023
…place the sample MetOffice data over the UK.
JohnHalleyGotway added a commit that referenced this issue Jul 20, 2023
…rt-coming in the grib2c library in handling negative longitude values. Define and call a utility function to reprocess the bytes and check for negative values.
@JohnHalleyGotway JohnHalleyGotway linked a pull request Jul 20, 2023 that will close this issue
15 tasks
JohnHalleyGotway added a commit that referenced this issue Jul 21, 2023
…GHA build artifacts. After using docker to build the image, run a docker copy command to copy out the compliation logs.
@JohnHalleyGotway JohnHalleyGotway changed the title Bugfix: Restore support for LAEA grids via NetCDF files Bugfix: Refine support for LAEA grids via NetCDF and GRIB2 files Jul 21, 2023
@JohnHalleyGotway
Copy link
Collaborator Author

Note that I renamed this issue to clarify that 2 changes are needed:

  1. Restore support for parsing LAEA grids from CF-compliant NetCDF files.
  2. Refine support for parsing LAEA grids from GRIB2 files.

For the latter, the MET-11.1.0-rc1 version does not properly parse longitudes from the LAEA GRIB2 metadata. The problem lies in the GRIB2C library which MET uses to retrieve that metadata. In the sample GRIB2 files over the United Kingdom, the 2 longitudes defining the LAEA grid have negative values. The GRIB2C library does not properly parse that negative value.

Both 1. and 2. are now fixed. For 2., MET now reprocesses the 4 bytes which constitute the value and reprocess them looking for a negative.

@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED ACCOUNT KEY Need to assign an account key to this issue label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MET: Library Code priority: high High Priority requestor: METplus Team METplus Development Team required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: bug Fix something that is not working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants