Skip to content

Fix mom-tx10deg/tx3deg testmods for non-tx2_3v2 grids (#338)#340

Merged
alperaltuntas merged 1 commit into
mainfrom
fix-338-coarse-testmods-tx2_3v3
Jul 9, 2026
Merged

Fix mom-tx10deg/tx3deg testmods for non-tx2_3v2 grids (#338)#340
alperaltuntas merged 1 commit into
mainfrom
fix-338-coarse-testmods-tx2_3v3

Conversation

@alperaltuntas

Copy link
Copy Markdown
Member

Fixes: #338.

The mom-tx10deg and mom-tx3deg testmods failed at runtime on any ocean grid other than tx2_3v2 such as tx2_3v3 because GRID_FILE, TOPO_FILE, CHL_FILE and SALT_RESTORE_FILE were given as paths relative to INPUTDIR which is DIN_LOC_ROOT ocn mom OCN_GRID and the coarse resolution files only exist under the tx2_3v2 input directory, so MOM6 looked under a nonexistent directory and aborted. This was never caught in CI because every test using these testmods runs on a t232 grid.

This change points the four files at the tx2_3v2 directory using a relative path so they resolve correctly regardless of OCN_GRID, and a relative path is used rather than DIN_LOC_ROOT because MOM_override does no variable expansion. Mesh and CICE files were already hardcoded to tx2_3v2 via shell_commands and are unchanged. Verified the resolved paths exist for both tx2_3v3 and tx2_3v2.

@alperaltuntas alperaltuntas requested a review from kdraeder July 9, 2026 15:13
@mnlevy1981

Copy link
Copy Markdown
Collaborator

Should the tx3deg and tx10deg directories be in grid_indpt/ instead of tx2_3v2/?

@alperaltuntas

Copy link
Copy Markdown
Member Author

Should the tx3deg and tx10deg directories be in grid_indpt/ instead of tx2_3v2/?

The reason they are under tx2_3v2/ is because they are subsamplings of tx2_3v2/ by factors of 5 and 15 respectively. However, If you feel strongly about moving them to grid_indpt/`, I can do so.

@alperaltuntas alperaltuntas requested a review from mnlevy1981 July 9, 2026 15:31

@mnlevy1981 mnlevy1981 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should the tx3deg and tx10deg directories be in grid_indpt/ instead of tx2_3v2/?

The reason they are under tx2_3v2/ is because they are subsamplings of tx2_3v2/ by factors of 5 and 15 respectively. However, If you feel strongly about moving them to grid_indpt/`, I can do so.

I don't have strong feelings, it just seemed like grid_indpt was the right place for something that should work for any ocean grid. Given its relationship to the 2/3° grid, the current location makes sense

@kdraeder

kdraeder commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Mesh and CICE files were already hardcoded to tx2_3v2 via shell_commands and are unchanged.

Will this be the best solution for the foreseeable future?
Or is this a good time to move their definitions from shell_commands to these xlm files?

Other than that, your testing shows that these changes solve the problem, so I'll approve them.

@alperaltuntas

Copy link
Copy Markdown
Member Author

Mesh and CICE files were already hardcoded to tx2_3v2 via shell_commands and are unchanged.

Will this be the best solution for the foreseeable future? Or is this a good time to move their definitions from shell_commands to these xlm files?

Other than that, your testing shows that these changes solve the problem, so I'll approve them.

These are ad-hoc testmods that aren't supported or endorsed for regular use, so I'd caution against moving them into the xml files, which could give the false impression that they're officially supported.

@kdraeder kdraeder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing this!

@alperaltuntas alperaltuntas merged commit e5edf77 into main Jul 9, 2026
6 checks passed
@alperaltuntas alperaltuntas deleted the fix-338-coarse-testmods-tx2_3v3 branch July 9, 2026 16:58
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.

Missing files for t2_3v3 10-degree resolution

3 participants