Skip to content

Support NEMO tripolar T and F pivots. Add option to follow latitude circles#45

Open
geoffstanley wants to merge 2 commits into
MOM6-community:masterfrom
geoffstanley:dev--tripolar-TFpivot--latitude-circle
Open

Support NEMO tripolar T and F pivots. Add option to follow latitude circles#45
geoffstanley wants to merge 2 commits into
MOM6-community:masterfrom
geoffstanley:dev--tripolar-TFpivot--latitude-circle

Conversation

@geoffstanley

@geoffstanley geoffstanley commented Jun 10, 2026

Copy link
Copy Markdown

New options for the topology argument:

  • topology = "tripolar-Tpivot" handles the NEMO tripolar grid pivoting on the T (tracer) point
  • topology = "tripolar-Fpivot" handles the NEMO tripolar grid pivoting on the F (vorticity) point

The formulas for how to cross the north fold were created by studying Appendix E of the NEMO manual, v4.2.

New argument curve:

  • curve = "great circle" is the default; no changes from previous behaviour
  • curve = "latitude circle" is new; the walk through grid space will approximate a latitude circle.

Minor updates to examples/4_sections_on_global_tripolar_grid.ipynb to showcase curve = "latitude circle".

Minor edits to docs/environment.yml and examples/load_example_model_grid.py that I needed to make to get started.

- tripolar-Tpivot for NEMO orca2 orca025 orca12 orca36 -- and maybe
  MOM6?
- tripolar-Fpivot for NEMO orca1 orca05
- curve="latitude circle" option follows latitude=constant curves.
  Other curves can be added by providing two functions, one that
  measures closeness to the desired curve, and one that measures
  closeness to the endpoint.
- kwargs argument added to GriddedSection.__init__ to allow passing
  through `topology` argument
- Removed modulo nx operations where not necessary in `infer_grid_path`,
  but added a check on initial i values that I have not seen fail
- build lons_c_seg, lats_c_seg as numpy arrays directly, rather than
  appending to a list
- examples/4_sections_on_global_tripolar_grid.ipynb updated to show
  `curve="latitude circle"` and `topology="tripolar-Tpivot"`. Testing
  `topology="tripolar-Fpivot"` will require some other dataset.
@geoffstanley

Copy link
Copy Markdown
Author

I left topology = "MOM-tripolar" unchanged for backwards compatibility. Is it correct? Should it be the same as one of tripolar-Tpivot or tripolar-Fpivot?

I found the MOM5 elements manual section 9.4.3 specifies that the northern seam for U points (same as F points, as that document is written for an Arakawa B-grid) operates as
U_{i, j} = U_{ni - i, 2 nj - j} for nj < j <= nj + halo
in 1-indexing. Plugging in j = nj + 1 gives
U_{i, nj+1} = U_{ni - i, nj - 1}
and then converting to 0-indexing, I think this becomes
U_{i, nj} = U_{(ni - 2 -i) % ni, nj-2}
which is the same formula I have obtained from the NEMO manual linked above. Is MOM6 the same as MOM5 in this regard?

From examples/4_sections_on_global_tripolar_grid.ipynb, here is the sections that was noted as causing trouble for Sectionate, with "MOM-tripolar":

topology results
"MOM-tripolar" image
"tripolar-Tpivot" image
"tripolar-Fpivot" image

Oddly, tripolar-Tpivot appears to work well, but MOM-tripolar and tripolar-Fpivot do not.

I thought the issue might be with the (i,j) walk algorithm, so I made a separate branch with a new algorithm over in https://github.com/geoffstanley/sectionate/tree/dev--walk-algorithm . More on that later.

I get good results with following various transects across the north fold with a mesh_mask from NEMO's eorca1 ("tripolar-Fpivot") and eorca025 ("tripolar-Tpivot") grids.

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