Update areafac_c, areafac_ce in halo in dynamics #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe this fixes the issues in the updated remap advection. The problem was that CICE was not bit-for-bit on different block sizes with the latest changes even though it was bit-for-bit for a fixed block size with different pes or decompositions. This indicated a problem on the halo. The problem existed with B, C, or CD grids in this branch.
The fix is to change the areafac_c and areafac_ce fields so they are defined everywhere, including in the complete halo. The current version only sets areafac_c and areafac_ce on part of the halo (for reasons I don't understand). earea and narea are defined everywhere on the halo, so we can set areafac_c and areafac_ce in the complete halo trivially.
The changes in ice_grid.F90 are not required for this fix, but are probably needed for symmetry testing (which we don't do automatically yet).
Somewhere in the remap advection special cases, areafac_c or (more likely) areafac_ce must have been used on a point where it wasn't set properly on the halo. And that's why different block sizes produced different answers. With these fixes, that problem goes away. That doesn't guarantee that all the special cases are implemented correctly in terms of offsets and answers, but this does fix the block size reproducibility issue.
I'm running a complete test suite now and will have more results soon. Feel free to merge and/or test this in the areafact branch in the mean time. I think it's safe to do so. I will run a complete test suite, we probably want to also rerun the QCs and any other manual testing just be really sure the final thing we want to merge is OK.