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

Enhance MET's regrid dictionary to add reinterpolation methods using point2grid #2658

Open
5 of 21 tasks
AliciaBentley-NOAA opened this issue Aug 21, 2023 · 3 comments
Open
5 of 21 tasks
Assignees
Labels
alert: NEED MORE DEFINITION Not yet actionable, additional definition required MET: Library Code priority: blocker Blocker requestor: NOAA/EMC NOAA Environmental Modeling Center 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

@AliciaBentley-NOAA
Copy link

AliciaBentley-NOAA commented Aug 21, 2023

Describe the New Feature

ADDED CONTEXT: In conjunction with #2859, this issue seeks out a path to ingest tripolar projection datasets through MET. In particular, this issue deals with verifying tripolar projected datasets (such as RTOFS) on a polar stereographic projection (or any other supported projection) using interpolation methods. Currently MET is unable to process a tripolar projection that is not CF-compliant; CF-compliant netCDF files can utilize the point2grid tool to achieve interpolation.

On investigation, the CICE dataset (and other NOAA tripolar datasets) are not CF-compliant and will require additional methods added to point2grid for interpolation (which is being enhanced via #2857).

The work on this issue would expand the interpolation access from point2grid to the regrid dictionary available in grid-to-grid verification tools including Grid-Stat and MODE. This will require a call to the point2grid logic in the regrid dictionary that can properly assess an input forecast file and determine if it is one of the supported tripolar formats. If it is, the regrid dictionary will employ the proper logic to interpolate the tripolar grid into the desired projection.

ORIGINAL ISSUE: We would like MET to be able to read in tripolar grids. The Real-Time Ocean Forecast System (RTOFS), for example, uses a tripolar grid. Tripolar grids are a 'composite of two grids connected along a specified "join" latitude' . In a tripolar grid, there is a bipolar grid on one side (north or south) of the "join latitude" and a single pole grid on the other side. For RTOFS, this join latitude is 47°N. North of 47°N is an Arctic bipolar grid and south of 47°N is a Mercator projection (see attached figure). Tripiolar grids are designed to mitigate the convergence of longitudes at the North Pole.

Note: WCOSS2 does not allow xESMF, so any functionality built can not use xESMF.

References:
Environmental Modeling Center: "About Global RTOFS". https://polar.ncep.noaa.gov/global/about/
Geophysical Fluid Dynamics Laboratory: "A Guide to Grid Coupling in FMS".
https://www.gfdl.noaa.gov/guide-to-grid-coupling-in-fms/
Murray, R. J., 1996: Explicit generation of orthogonal grids for ocean models. Journal of Computational
Physics, 126, 251-273. [link to PDF]

72092322-50985100-32cf-11ea-9ed6-5f6118db28ed

image

Acceptance Testing

Current RTOFS files can be downloaded from:
https://nomads.ncep.noaa.gov/pub/data/nccf/com/rtofs/prod/rtofs.YYYYMMDD/rtofs_glo_2ds_f000_ice.nc
(Please check this file is the correct one with Bob Grumbine, and I can edit as needed.)
If MET can read in and display a graphic of the contents of a tripolar grid, I think we'll be all set.

Time Estimate

Estimate the amount of work required here.
I can't give an estimate for how much work this is for DTC. My hope is that because this was once covered by two closed MET issues (using tools that we can't use on WCOSS2) that we might not be starting from scratch and this will take less time than thought.
Closed MET issues: #1231 and #1345

Sub-Issues

Consider breaking the new feature down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

EVSv2- with development to begin in early 2024.

Funding Source

2799991

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 Repository and/or Organization level Project(s) or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next official version 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) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@AliciaBentley-NOAA AliciaBentley-NOAA added alert: NEED ACCOUNT KEY Need to assign an account key to this issue alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle alert: NEED MORE DEFINITION Not yet actionable, additional definition required type: new feature Make it do something new labels Aug 21, 2023
@JohnHalleyGotway JohnHalleyGotway added requestor: NOAA/EMC NOAA Environmental Modeling Center priority: blocker Blocker MET: Library Code and removed alert: NEED MORE DEFINITION Not yet actionable, additional definition required alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle labels Aug 21, 2023
@JohnHalleyGotway JohnHalleyGotway added this to the MET 12.0.0 milestone Aug 21, 2023
@JohnHalleyGotway JohnHalleyGotway added the required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project label Oct 16, 2023
@JohnHalleyGotway
Copy link
Collaborator

EMC would like to test GFS GEFS ocean HR runs on a tri-polar grid. Recommend talking to @AliciaBentley-NOAA or @GwenChen-NOAA.

@hsoh-u hsoh-u removed the alert: NEED ACCOUNT KEY Need to assign an account key to this issue label Dec 12, 2023
@JohnHalleyGotway JohnHalleyGotway added the alert: NEED MORE DEFINITION Not yet actionable, additional definition required label Dec 14, 2023
@hsoh-u
Copy link
Collaborator

hsoh-u commented Dec 19, 2023

Python embedding requires the xesmf package. The bilinear is applied for METplus test case:

https://github.com/dtcenter/METplus/blob/main_v5.1/parm/use_cases/model_applications/marine_and_cryosphere/PlotDataPlane_obsHYCOM_coordTripolar/read_tripolar_grid.py

import xesmf as xe

# create output grid using lat/lon bounds of data outside boundary
out_grid = xe.util.grid_2d(0,
                           360,
                           LONGITUDE_SPACING,
                           lat_min,
                           lat_max,
                           LATITUDE_SPACING)

# create regridder using cropped data and output grid
# NOTE: this creates a temporary file in the current directory!
# consider supplying path to file in tmp directory using filename arg
# set reuse_weights=True to read temporary weight file if it exists
regridder = xe.Regridder(xr_out_bounds,
                         out_grid,
                         'bilinear',
                         ignore_degenerate=True,
                         reuse_weights=True,
                         filename=weight_file)

@AliciaBentley-NOAA
Copy link
Author

After months of back and forth with NCO in previous years, it was determined that xESMF is not allowed on WCOSS2. We need to use a different approach to do this. Thanks for the suggestion!

@j-opatz j-opatz changed the title New feature to read in tripolar grids Enhance MET's regrid dictionary to add reinterpolation methods using point2grid Apr 16, 2024
@JohnHalleyGotway JohnHalleyGotway added required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone and removed required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED MORE DEFINITION Not yet actionable, additional definition required MET: Library Code priority: blocker Blocker requestor: NOAA/EMC NOAA Environmental Modeling Center 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
Status: 🎯 Up Next
Development

No branches or pull requests

6 participants