nextsimhub / domain_decomp

Domain decomposition tool for the nextSIM-DG next-generation sea ice model.
Apache License 2.0
1 stars 0 forks source link

Check compatibility with OASIS coupler #5

Open athelaf opened 2 years ago

athelaf commented 2 years ago

The OASIS coupler (see documentation, Section 2.2.3) supports 5 types of grid partitioning, including the Box partition approach we use in our domain decomposition. The definition of the boxes is similar, i.e., each partition is described by its upper left corner and its local extents in the X and Y dimensions, where X is the first dimension and Y is the second. However, in our tool the upper left corner is described by coordinates, assuming Y is the fastest increasing dimension (our tool uses C-compatible ordering internally), while in OASIS it is described by a single global offset, assuming X is the fastest increasing dimension (OASIS uses Fortran-compatible ordering internally). An example of a box partition over 3 processes for OASIS is shown below: Screenshot from 2022-08-09 10-17-49

jwallwork23 commented 3 months ago

Related to https://github.com/nextsimhub/nextsimdg/issues/640.

jwallwork23 commented 3 months ago

See issue5_oasis-compat for work in progress.

TomMelt commented 1 month ago

I recently refactored (#59) and modified the internal ordering (#58) so that we could be compatible both with the nextsimDG and OASIS coupler. One thing I am not sure of, in the above diagram (and those in the OASIS docs), where is the coordinate system origin i.e., x=0, y=0. My current understanding is that (0,0) is the top-left corner. If that is the case, then I believe the new implementation ( as written in PR #58) will give the correct compatibility.

If (0,0) is not the top left corner (in the diagram) then we potentially have a problem.

jwallwork23 commented 1 month ago

I recently refactored (#59) and modified the internal ordering (#58) so that we could be compatible both with the nextsimDG and OASIS coupler. One thing I am not sure of, in the above diagram (and those in the OASIS docs), where is the coordinate system origin i.e., x=0, y=0. My current understanding is that (0,0) is the top-left corner. If that is the case, then I believe the new implementation ( as written in PR #58) will give the correct compatibility.

If (0,0) is not the top left corner (in the diagram) then we potentially have a problem.

The fact that proc 1 in the diagram is positioned in the top left is encouraging.