[MITgcm-support] question about cube-sphere topology log output
Jean-Michel Campin
jmc at mit.edu
Mon Oct 21 19:19:23 EDT 2024
Hi Dan,
I took a quick look at what the docs say about pkg/exch2 and I have the impression that this
is seriously outdated. Also I remember that I changed (a long time ago, when moving the
matlab pkg/exch2 code generator inside pkg/exch2 fortran code) the meaning of the
index mapping function (the "exch2_oi" described in the docs), so this part of the docs
is no longer relevant.
Regarding this:
> what is pij?
> what is oi,oj?
The best place for a minimal description is W2_EXCH2_PARAMS.h, lines 58-68 :
C-- COMMON /W2_EXCH2_BUILD_I/ Integer variables used to build topology
C facet_owns :: Range of tiles this facet "owns"
C facet_pij \ ::
C facet_oi } :: indices correspondence matrix (facet_pij) & offsets:
C facet_oj / ::
C-with: suffix "so" for indices of source facet j ;
C suffix "tg" for indices of target facet jj= INT(facet_link(i,j))
C pij(:,i,j) : matrix which gives so indices when applied to tg indices
C iso = pij(1)*itg + pij(2)*jtg + oi
C jso = pij(3)*itg + pij(4)*jtg + oj
C-----
these are used to fill-up the halo-region of the target facet "tg" from the interior of
the source facet "so"; (convention: 1,2,3,4 <==> N,S,E,W)
Note that these are not really used for I/O and global-mapping of the domain,
but just to fill the halo regions.
Does this answer your question ? and if you need more info about I/O,
let me know.
Cheers,
Jean-Michel
On Tue, Oct 15, 2024 at 02:26:14PM +0000, Daniel Goldberg wrote:
> hello all
>
> Im interested in cube sphere topology. the reason is i would like to code up a solver off-line on a cube-sphere grid ? the intention is for it to eventually enable STREAMICE to run in a cube-sphere grid in order to be coupled with AIM.
>
> i read the page https://mitgcm.readthedocs.io/en/latest/phys_pkgs/exch2.html and didn't find that it answered my questions that i could see, at least not directly enough! however, i ran the solid-body.cs-32x32x1 verification and looked in the file w2_tile_topology.0000.log that are produced, and it might be closer to what i was looking for, but i would like to make sure i understand:
>
> N.Edge Facet 1 <-- W.Edge Facet 3 : pij= 0 -1 1 0 ; oi,oj= 33 32
> S.Edge Facet 1 <-- N.Edge Facet 6 : pij= 1 0 0 1 ; oi,oj= 0 -32
> E.Edge Facet 1 <-- W.Edge Facet 2 : pij= 1 0 0 1 ; oi,oj= 32 0
> W.Edge Facet 1 <-- N.Edge Facet 5 : pij= 0 1 -1 0 ; oi,oj= -32 33
>
> the above is from the log, so my understanding is that
>
> *
> facet (face) 1 shares its northern edge with the western edge of face 3.
> *
> "North", "West" etc refer to the top row and the left column in an array sense, not geographic directions.
> *
> if i were to use the matlab utility read_cs_face to read binary output, the "Facet" number above would match the "face" argument.
>
> Is all/any of this correct? If so i have two further questions:
>
> *
> what is pij?
> *
> what is oi,oj?
>
> Many thanks!
> Dan
>
>
> --
> Daniel Goldberg, PhD (he/him)
> Reader in Glaciology
> School of Geosciences, University of Edinburgh
> Geography Building, Drummond Street, Edinburgh EH8 9XP
> https://dngoldberg.github.io/
> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th? ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list