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

Add support for the Lambert Azimuthal Equal Area grids #1693

Closed
8 of 20 tasks
michelleharrold opened this issue Mar 3, 2021 · 22 comments · Fixed by #2567
Closed
8 of 20 tasks

Add support for the Lambert Azimuthal Equal Area grids #1693

michelleharrold opened this issue Mar 3, 2021 · 22 comments · Fixed by #2567
Assignees
Labels
MET: Library Code priority: blocker Blocker requestor: DTC/AF V&V Air Force Verification and Validation Project requestor: UK Met Office United Kingdom Met Office required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: new feature Make it do something new
Milestone

Comments

@michelleharrold
Copy link

michelleharrold commented Mar 3, 2021

Describe the New Feature

As of 10/25/22 - Identified as CRITICAL for Met Office:

MET assumes a spherical Earth. The EUMETNET (radar) dataset is on a Lambert Azimuthal Equal Area grid, which uses an ellipsoidal Earth. Randy already has some code for latlon_to_xy. The xy_to_latlon code still needs to be implemented, and the code needs to be implemented in MET (and tested accordingly).

Acceptance Testing

Same data is located on Cheyenne:
/gpfs/fs1/p/ral/jntp/AF/gswr/eumetnet (in HDF5 format)

This data can be moved to a more convenient location. Some sample data has already been shared with Randy.

Tests will need to be done to make sure the Lambert Azimuthal Equal Area projection is working as anticipated (will work with Randy to establish necessary tests).

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the new feature down into sub-issues.
No sub-issues required.

Relevant Deadlines

Goal is to target the met-10.1.0_beta1 release scheduled for 5/13/21.

Funding Source

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required: Randy B
  • Select scientist(s) or no scientist required: Michelle H

Labels

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

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones or add "alert:NEED PROJECT ASSIGNMENT" label
  • Select milestone to next major version milestone or "Future Versions"

Define Related Issue(s)

Consider the impact to the other METplus components.

New Feature 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 develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development 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 develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s), Project(s), Milestone, and Linked issues
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway
Copy link
Collaborator

From @michelleharrold:

The deliverable for this project is due 31 May, so the sooner the better!

For reference - the EUMETNET data is what this is needed for. It is currently in HDF5, so the goal is to have you write the python code to convert to MET-friendly NetCDF and then have MET be able to handle the lambert azimuthal equal area grid. I suppose we could also have you include a regridding in the python script to bypass needing the lambert azimuthal equal area grid...but that seems like a cop out? But there is a hard deadline of 31 May -- and that is when the analysis needs to be done, so we need about 2 weeks to actually run MET and analyze output. Is this reasonable?

@JohnHalleyGotway JohnHalleyGotway added requestor: DTC/AF V&V Air Force Verification and Validation Project and removed requestor: USAF United States Air Force labels Apr 20, 2021
@JohnHalleyGotway
Copy link
Collaborator

From @rgbullock

I finished up the laea grid code. I've also tested it and it seems to be working well. I decided to go with the series expansion rather than the iterative scheme in the code, because it turns out that the iteration doesn't always converge.

The definition for the grid Michelle and Tracy are using is contained in the source file "laea_grid_defs.h". It's currently called tracy_data ... you'll probably want to change the name to something else.

For the benefit of those who will ultimately have the task of maintaining my grid code, the main reference for this work is

"Map Projections --- A Working Manual", by John P. Snyder
U. S. Geological Survey Professional Paper 1395

I'll let someone else write the code for wiring this up to the 2D data factory class. It should just be a matter of populating the LaeaData struct from the info in the data file.

I guess that's it unless there's something I've forgotten about.

One thing: Since this grid is on a non-spherical earth, any code that uses it will need to link to libvx_geodesy.a when compiling, so someone should probably add that to any of the Makefile.am files where it's needed so that autoconf knows about it.

@JohnHalleyGotway JohnHalleyGotway self-assigned this Apr 27, 2021
@JohnHalleyGotway
Copy link
Collaborator

@rgbullock has finished development for this support. Added @JohnHalleyGotway to the assignee list so he can work on integrating these changes into the rest of the MET codebase.

JohnHalleyGotway added a commit that referenced this issue Apr 29, 2021
…. The only real change here is defining LaeaGrid::serialize().
@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Apr 29, 2021

Here is a link to the GRIB2 definition of Lambert Azimuthal Equal Area grids:
https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-140.shtml

Along with an ECMWF grid template:
https://apps.ecmwf.int/codes/grib/format/grib2/templates/3/140

And here is a sample LAEA GRIB2 file I found on the MetOffice website:
https://metoffice.apiconnect.ibmcloud.com/metoffice/development/projection

wgrib2 -V ukv_agl_temperature_1.5_12.grib
	Lambert Azimuthal Equal Area grid: (1042 x 970) input WE:SN output WE:SN res 48
	Lat1 44.517153 Lon1 2164.600777 Cen Lon -2.500000 Std Par 54.900000
	Dx 2000.000000 m Dy 2000.000000 m mode 48

@rgbullock, how can we translate these GRIB2 projection definitions to the entries in the LaeaData struct that you've already added?

JohnHalleyGotway added a commit that referenced this issue May 13, 2021
… as currently implemented. Since they rely on the vx_geodesy library, I also updated all the Makefile.am files by adding -lvx_geodesy immediately after each -lvx_grid entry.
@TaraJensen TaraJensen added the required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project label May 17, 2021
JohnHalleyGotway added a commit that referenced this issue May 19, 2021
…d in main_v10.0 and develop. Setting grid = name does not work when MET_PYTHON_EXE is set. The read_tmp_dataplane.py needs to be tweaked to support this usage.
@JohnHalleyGotway
Copy link
Collaborator

@rgbullock can you please provide an update on this issue? Are you able to update the MET library code to instantiate a LAEA grid from a GRIB2 file?

@JohnHalleyGotway
Copy link
Collaborator

Thanks @robdarvell, I just grabbed those files but did not find what I expected:

ncdump -h 202211150600_nimrod_ng_radar_rainrate_composite_1km_UK.nc
	float rainfall_rate_composite(projection_y_coordinate, projection_x_coordinate) ;
...
		rainfall_rate_composite:grid_mapping = "transverse_mercator" ;
	int transverse_mercator ;
		transverse_mercator:grid_mapping_name = "transverse_mercator" ;
		transverse_mercator:longitude_of_prime_meridian = 0. ;
		transverse_mercator:semi_major_axis = 6377563.396 ;
		transverse_mercator:semi_minor_axis = 6356256.91 ;
		transverse_mercator:longitude_of_central_meridian = -2. ;
		transverse_mercator:latitude_of_projection_origin = 49. ;
		transverse_mercator:false_easting = 400000. ;
		transverse_mercator:false_northing = -100000. ;
		transverse_mercator:scale_factor_at_central_meridian = 0.9996012717 ;

Looks like this is for a Transverse Mercator projection rather than Lambert Azimuthal Equal Area.

Do you have any sample data for the latter that I can use to develop/test this issue?

@robdarvell
Copy link

Apologies @JohnHalleyGotway for the duff data. I was told the radar files were on the LAEA grid, but I hadn't actually checked through the ncdump before I sent them.

I have placed a new temperature and visibility file onto the ftp server, and checked that the ncdump talked about LAEA on them. Hopefully (!) they are what you need.
They cover the UKV (ie UK) domain.

Rob

JohnHalleyGotway added a commit that referenced this issue Nov 19, 2022
…ize a grid using LAEAGrib2Data but just can't get the survive to the output step. The lg pointer is set initially but it gets reset to la.
@JohnHalleyGotway JohnHalleyGotway moved this to 📋 Backlog in MET-11.1.0 Development Nov 20, 2022
@JohnHalleyGotway JohnHalleyGotway moved this from 📋 Backlog to 🏗 In progress in MET-11.1.0 Development Nov 20, 2022
@TaraJensen
Copy link
Contributor

Trying to get this going again. @JohnHalleyGotway - did we ever grab the files @robdarvell put up on the FTP server? If not - hopefully @robdarvell can post them again.

@robdarvell
Copy link

I have put some alternate LAEA grid files on the ftp server in darvell_data
(they are probs of thresholds being met fields)

@JohnHalleyGotway JohnHalleyGotway moved this from 🏗 In progress to 🔖 Ready in MET-11.1.0 Development Mar 2, 2023
JohnHalleyGotway added a commit that referenced this issue May 25, 2023
…ted PostScript output file name so that the test will pass. Also update the config.tab.cc and color_parser_yacc.cc with the current NULLPTR contents that are created on seneca. Hopefully that'll solve the EmptyConfigFile GHA failure.
@JohnHalleyGotway JohnHalleyGotway moved this from 🔖 Ready to 🏗 In progress in MET-11.1.0 Development May 25, 2023
JohnHalleyGotway added a commit that referenced this issue Jun 9, 2023
JohnHalleyGotway added a commit that referenced this issue Jun 9, 2023
…t this support should be restored prior to the MET-11.1.0 release.
@JohnHalleyGotway JohnHalleyGotway linked a pull request Jun 9, 2023 that will close this issue
15 tasks
@JohnHalleyGotway JohnHalleyGotway moved this from 🏗 In progress to 👀 In review in MET-11.1.0 Development Jun 9, 2023
JohnHalleyGotway added a commit that referenced this issue Jun 12, 2023
Co-authored-by: rgbullock <[email protected]>
Co-authored-by: Randy Bullock <[email protected]>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in MET-11.1.0 Development Jun 12, 2023
@JohnHalleyGotway JohnHalleyGotway changed the title Add MET support for Lambert Azimuthal Equal Area grid Add MET support for the Lambert Azimuthal Equal Area grid Jun 13, 2023
@JohnHalleyGotway JohnHalleyGotway changed the title Add MET support for the Lambert Azimuthal Equal Area grid Add support for the Lambert Azimuthal Equal Area grids Jun 13, 2023
@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: blocker Blocker requestor: DTC/AF V&V Air Force Verification and Validation Project requestor: UK Met Office United Kingdom Met Office required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: new feature Make it do something new
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants