Skip to content

Point to Grid Translator for MetNet3 (OMO weather stations) - #85

Open
trudramukerji14 wants to merge 2 commits into
openclimatefix:mainfrom
trudramukerji14:feature/point_to_grid
Open

Point to Grid Translator for MetNet3 (OMO weather stations)#85
trudramukerji14 wants to merge 2 commits into
openclimatefix:mainfrom
trudramukerji14:feature/point_to_grid

Conversation

@trudramukerji14

@trudramukerji14 trudramukerji14 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

The point-to-grid translator maps sparse weather station observations onto the same 624×624 grid resolution as the other image-based inputs (radar, satellite), so they can all be concatenated together into a single tensor.

Note on data sources: . This implementation uses MADIS 1-minute ASOS data as a public approximation, with 14 variables selected from the OMO variable list at madis.ncep.noaa.gov as our best approximation of the input channels described in Table 1 of the paper. The 14 variables used are based on the OMO variable list at:
https://madis.ncep.noaa.gov/sfc_OMO_variable_list.shtml
"""

Note on projection: The paper does not specify the map projection used. This implementation uses Lambert Conformal Conic (LCC) projection via pyproj, which is the standard projection for CONUS weather data and is used by all other MetNet-3 input sources (MRMS, HRRR, NEXRAD).

**Other changes:

  • I removed the contents of the init file in data so the importing would be easier (please let me know if this is not good practice)
  • I added pyproj to requirements

How Has This Been Tested?

Added tests to tests/test_data.py covering:

test_output_shape — verifies the output tensor has the correct shape [14, grid_height, grid_width]
test_fill_value — verifies empty grid cells have the correct fill value when no stations are provided
test_nan_handling — verifies NaN values in station observations are ignored and don't propagate to the grid
test_outside_bounds — verifies stations outside the grid domain are correctly ignored
test_averaging — verifies multiple stations falling in the same pixel are correctly averaged

image

Checklist:

  • [X ] My code follows OCF's coding style guidelines
  • [X ] I have performed a self-review of my own code
  • [] I have made corresponding changes to the documentation
  • [ X] I have added tests that prove my fix is effective or that my feature works
  • [ X] I have checked my code and corrected any misspellings

@trudramukerji14 trudramukerji14 changed the title WIP: Point to Grid Translator for MetNet3 (OMO weather stations) Point to Grid Translator for MetNet3 (OMO weather stations) Aug 13, 2026
@trudramukerji14
trudramukerji14 marked this pull request as ready for review August 13, 2026 13:34
@trudramukerji14

Copy link
Copy Markdown
Contributor Author

Hi @jacobbieker

I just made this PR on the point-to-grid translator for the OMO stations. Let me know if I missed anything or if I should add/change anything here. No rush!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant