Fix mom-tx10deg/tx3deg testmods for non-tx2_3v2 grids (#338)#340
Conversation
|
Should the |
The reason they are under |
mnlevy1981
left a comment
There was a problem hiding this comment.
Should the
tx3degandtx10degdirectories be ingrid_indpt/instead oftx2_3v2/?The reason they are under
tx2_3v2/is because they are subsamplings oftx2_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
Will this be the best solution for the foreseeable future? 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
left a comment
There was a problem hiding this comment.
Thanks for fixing this!
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.