forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the ALE sponge, the `mask_u` and `mask_v` masks are constructed from `mask_z`, but also require valid halo data on their E/W or N/S boundaries. Although a `pass_var` function is called on `mask_z` before computing these masks, this function will not populate the halos of `mask_z` if there is no adjacent data, e.g. a non-reentrant boundary or a land-masked tile. And even though `mask_z` was initialized to zero, this was undone by the internal dellocation/reallocation of the array inside of `horiz_interp_and_extrap_tracer` (although the actual result appears to be compiler dependent). There are two major changes in this patch: * The FMS-based `horiz_interp_and_extrap_tracer` function no longer does a deallocate/reallocate of its output arrays, and now simply assumes they are unallocated. The output arrays are also explicitly declared as intent(out). This change clarifies that only the compute domains of `mask_z` and associated fields are updated, although it doesn't fully resolve the issue described above. * The ALE sponge code now explicitly initializes the halo values of mask_z before interpolating the mask_u and mask_v masks. This ensures that `mask_[uv]` boundary values are disabled on points where no halo data is available (and hence no halo updates from `pass_var`. When the data is available, sensible values will replace these zeros. These changes prevent anomalous values of mask_z from entering the halos, and ensuring that `mask_[uv]` contain sensible values. A similar operation should not be required by the tracer fields, since the zero-halo values in the mask will correctly disable these values when no adjacent field is available for halo updates.
- Loading branch information
1 parent
817217e
commit 456d4a9
Showing
2 changed files
with
30 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters