Skip to content

[rrfs-mpas-jedi] Replace JEDI obs offline domain check with a JEDI Polygon Check pre-filter.#1293

Draft
SamuelTrahanNOAA wants to merge 12 commits intoNOAA-EMC:rrfs-mpas-jedifrom
SamuelTrahanNOAA:feature/ObsPolygonCheck
Draft

[rrfs-mpas-jedi] Replace JEDI obs offline domain check with a JEDI Polygon Check pre-filter.#1293
SamuelTrahanNOAA wants to merge 12 commits intoNOAA-EMC:rrfs-mpas-jedifrom
SamuelTrahanNOAA:feature/ObsPolygonCheck

Conversation

@SamuelTrahanNOAA
Copy link
Contributor

@SamuelTrahanNOAA SamuelTrahanNOAA commented Feb 2, 2026

DESCRIPTION OF CHANGES:

Replaces the offline JEDI obs domain check with a domain check in a JEDI prefilter.

DEPENDENCIES:

The new filter isn't in JEDI UFO yet; it is here:

Until the filter PR is merged, there are equivalent sorc/_workarounds_ changes. They're in sorc/build.rdas and sorc/_workarounds_/PolygonCheck. They should be removed and replaced by updated JEDI code before this PR is merged.

TESTS CONDUCTED:

Three levels of testing:

  1. Tested filter outside JEDI in a simple test program with various polygons and obs patterns to confirm it works.
  2. New JEDI UFO unit test for the filter on Ursa.
  3. Confirmed filter works in rrfs-workflow 3km CONUS on GAEA.

I'm waiting for more thorough independent testing. That's one of the reasons why this is a draft.

Machines/Platforms:

Affects all machines/platforms for configurations that use MPAS JEDI.

Test cases:

All cases that run MPAS JEDI will use this change.

  • Engineering tests
    • Non-DA engineering test
    • DA engineering test
      • Retro
      • Ensemble
      • Parallel
  • RRFS fire weather
  • RRFS_A:
  • RRFS_B:
  • RTMA:
  • Others:

ISSUE:

@SamuelTrahanNOAA SamuelTrahanNOAA changed the title Feature/obs polygon check Replace JEDI obs offline domain check with a JEDI Polygon Check pre-filter. Feb 2, 2026
cp jedivar.yaml no_polygon_jedivar.yaml
"${USHrrfs}/yamlify_domain_edge.py" -g "invariant.nc" -i '' > polygon.yaml
cat polygon.yaml no_polygon_jedivar.yaml > jedivar.yaml
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

@SamuelTrahanNOAA Thanks for getting this ready for retro testing.
I understand that this is still a draft PR. But a heads up that the polygon generation will only need to run once for each domain in its lifetime. So we will NOT include lines 139-143 in exrrfs_jedivar.sh, but instead run it manually once and then put the results somewhere (either as a fix file or as a exp setting option).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps we can do this?

  1. Add a variable $BOUNDARY_POLYGON_YAML
  2. If that variable is set to a valid path, use that file,
  3. Otherwise, automatically generate it.

A side-effect of the automatic generation fallback is to give you the polygon boundary file you need to put in parm/

Copy link
Contributor

Choose a reason for hiding this comment

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

I will test your branch and then talk further with you on this. Thanks!

@ShunLiu-NOAA
Copy link
Contributor

@SamuelTrahanNOAA could you update https://github.com/NOAA-EMC/RDASApp first and have a ctest in RDASApp?

cp ../_workaround_/PolygonCheck/ObsPolygonCheck.h sorc/ufo/src/ufo/filters/ObsPolygonCheck.h
cp ../_workaround_/PolygonCheck/instantiateObsFilterFactory.h sorc/ufo/src/ufo/instantiateObsFilterFactory.h
cp ../_workaround_/PolygonCheck/filtersCMakeLists.txt sorc/ufo/test/testinput/unit_tests/filters/CMakeLists.txt
cp ../_workaround_/PolygonCheck/polygon_check.yaml sorc/ufo/test/testinput/unit_tests/filters/polygon_check.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to include the unit tests into the workflow?
Usually, we don't do ctests in the workflow.

Also, could you add comment information before lines 68? Similar to lines 48-49? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those lines should not be merged. Also, the PolygonCheck directory should not be merged. They're present only to facilitate practical testing of the feature.

I included the unit tests so the ufo/ directory is identical to my branch in the ufo PR. That makes it easier to confirm they're in sync.

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't know how long it will take for your UFO PR to get merged. Sometimes, it may take a few months.

It is very likely that we will use the workaround for a while before the UFO PR gets merged and RDASApp gets sync'ed and updated.

@SamuelTrahanNOAA
Copy link
Contributor Author

@ShunLiu-NOAA - I'd like to wait for the ufo PR to be merged before making PRs at higher levels. This PR is needed for practical tests of the change in a workflow.

Also, there's already a unit test for the filter inside RDASApp/sorc/ufo in its PR. The unit test is under review, along with the filter.

@MatthewPyle-NOAA MatthewPyle-NOAA changed the title Replace JEDI obs offline domain check with a JEDI Polygon Check pre-filter. [rrfs-mpas-jedi] Replace JEDI obs offline domain check with a JEDI Polygon Check pre-filter. Feb 2, 2026
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.

3 participants