Conversation
Test and validate nghost=2, add fixes where needed - Fix bug in gatherscatter, only impacts nghost > 1 - Modify remap advection departure points to only check where velocity is not zero - Add a check in remap advection if open boundaries are used, nghost must be >= 2. Add nghost=2 tests to test suites Update full2nest.sh script and full/nest test to use nghost=2 for nest case Modify order of domain_nml output and checks so output is first Add check to ignore "buildincremental" in test setup Update error message in ice boundary if northern-most tripole block is not large enough Update documentation
eclare108213
left a comment
There was a problem hiding this comment.
This looks good to me. Nice debugging.
GitHub Actions is failing ... GitHub's AI helper says
The job is failing because the remap advection scheme requires nghost >= 2 when using regional boundary conditions (open, zero_gradient, or linear_extrap), but the configuration is set to nghost = 1.
The error occurs at line 291 in ice_transport_remap.F90
:)
|
Thanks @eclare108213, doing comprehensive testing now. Looks like the displaced pole grids have open bcs in ns but there is land on both the north and south edge. OK, need to adjust for that in my check in remap advection. |
|
|
||
| character(len=*), parameter :: subname = '(init_remap)' | ||
|
|
||
| ! check that if open boundaries are used, nghost > 1 |
There was a problem hiding this comment.
What happens when a boundary type = 'open'? Does the code abort or provide a warning?
There was a problem hiding this comment.
'open' can only be used when there is land on the entire open boundary. That's what we use for the displaced pole grids in the ns direction. The 'open' boundary_type does nothing at the boundary in practice, halo values on the outer boundary are unset. If 'open' were to require nghost=2 for remap advection, then all our displaced pole grids would need to use nghost=2 or we'd have to change the boundary_type for this configuration.
We don't really have an obvious way to tell whether a case truly needs nghost=2 or not. It does if the boundary is not cyclic, not closed, not tripole and not all land. For now, I'm assuming 'open' goes with all land which means only the zero_gradient and linear_extrap cases need nghost=2 when remap advection is on. That's not a perfect check.
PR checklist
Add nghost to namelist, validate nghost=2
apcraig
expect bit-for-bit, testing underway
Add support for nghost>1 and validate. This is needed for open boundary conditions (regional grids) using remap advection. The remap advection implementation needs two layers of halo cells. This is satisfied with nghost=1 with closed, cyclic, and tripole bcs, not not for open bcs.
Test and validate nghost=2, add fixes where needed
Add nghost=2 tests to test suites
Update full2nest.sh script and full/nest test to use nghost=2 for nest case
Modify order of domain_nml output and checks so output is first
Add check to ignore "buildincremental" in test setup
Update error message in ice boundary if northern-most tripole block is not large enough
Update documentation
Tested several cases to verify nghost=1 and nghost=2 are bit-for-bit. Added unit tests that check nghost=2. Verified nghost=2 now fixes the remap advection issues that occurred in the full/nest regional testcase.