A quick question about the GMV/GMVS grid point data structures. These are pointers to 'blocked' data (I guess for computational efficiency reasons):
GMV(1:NPROMA, :, :, 1:NGPBLKS)
GMVS(1:NPROMA, :, 1:NGPBLKS)
I was wondering if there were non-blocked data variables under these that I can access. Something similar to the YRGSGEOM_NB non-blocked gridpoint horizontal data variable and the YRGSGEOM blocked version which simply points to the corresponding YRGSGEOM_NB data.
Thanks.
Hello Ryan,
There is nothing like non-blocked/blocked data structures for GMV/GMVS.
This duality is only implemented for those structures with single global dimensioning in NGPTOT
(i.e. number of gridpoints belonging to one MPI process in grid-point space).
The blocked structure then allows slicing of those arrays by simply pointing:
STRUCTURE_X(IBL)%ARRAY_Y => STRUCTURE_X_NB%ARRAY_Y(JKGLO:JKGLO+IEND-1)
with the dimensioning:
STRUCTURE_X(NGPBLKS)%ARRAY_Y(NPROMA)
STRUCTURE_X_NB%ARRAY_Y(NGPTOT)
Note that NPROMA*NGPBLKS > NGPTOT > NPROMA*(NGPBLKS-1)
. That is, NGPBLKS
gives the smallest number of NPROMA
chunks to distribute all the NGPTOT
points.
In the previous code example, IBL
is the counter of NPROMA
chunks, JKGLO
gives the position of first element in this chunk and IEND
is either NPROMA
or something smaller to avoid the last chunk goes beyond the NGPTOT
dimension.
As you noticed the GMV(s) arrays are already decomposed into the NGPBLKS
structures dimensioned by NPROMA
.
The blocked equivalent to the line above from GMV/S field would be then: GMV(:, :, :, IBL)
or GMVS(:, :, IBL)
. Just make sure the first loop is always IST:IEND rather than 1:NPROMA there.
Hope this helps.
(with thanks to Filip Vana for supplying this answer)