Closed TomMelt closed 9 months ago
I haven't even looked at the code yet, but I think we had the same problem in the nextsim-DG test with the MacOS test failing to extract correctly into homebrew/cask
. I will try to find a) if I am indeed remembering correctly and then b) what the solution was.
I haven't even looked at the code yet, but I think we had the same problem in the nextsim-DG test with the MacOS test failing to extract correctly into
homebrew/cask
. I will try to find a) if I am indeed remembering correctly and then b) what the solution was.
Solved with commit e59851e.
After PR https://github.com/nextsimhub/nextsimdg/pull/373
domain_decomp
produces incorrect meta data whenx
andy
dims were switched (for rectangular shaped grids) -- even when supplying--dim0 y
and--dim1 x
options.E.g. when running the
testRectGrid_MPI
test fromnextsimdg
we have a rectangular grid of dimensions:However if we run
decomp
we get the following meta data (notice thatglobalX
,globalY
and other related dimensions are the wrong way round).This PR fixes the issue and the correct meta data is produced.
Notice I have omitted the
--dim0
and--dim1
flags.This "fix" has been implemented by transposing the input data when it is read-in from the netcdf file specified by
--grid
.This was the simplest way to get everything working without breaking the tests, the library or the stand-alone binary.
Whilst this works for now I think a proper solution should be found because I think it could be confusing in future.
Unfortunately I think we need to switch everything else -- instead of the input i.e.,
dim0 <-> dim1
,x <-> y
etc.This is not as trivial as I first thought however as there are many places where this needs to be carefully checked.