# GMV/GMVS 'blocked' grid point arrays

**URL:** <https://forum.ecmwf.int/t/gmv-gmvs-blocked-grid-point-arrays/12165>\
**Category:** OpenIFS\
**Tags:** openifs-40r1, openifs-model-grid\
**Created:** [23 May 2018 12:09 UTC](https://forum.ecmwf.int/t/gmv-gmvs-blocked-grid-point-arrays/12165 "2018-05-23T12:09:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glenn\_Carver](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/g/e495f1/32.png) [@Glenn\_Carver](https://forum.ecmwf.int/u/Glenn_Carver)\
**Post date:** [23 May 2018 12:09 UTC](https://forum.ecmwf.int/t/gmv-gmvs-blocked-grid-point-arrays/12165/1 "2018-05-23T12:09:22Z")

</div>

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&nbsp; YRGSGEOM\_NB non-blocked gridpoint horizontal data variable and the YRGSGEOM blocked version which simply points to the corresponding YRGSGEOM\_NB data.

Thanks.

---

<div class="post-metadata">

**Author:** ![Glenn\_Carver](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/g/e495f1/32.png) [@Glenn\_Carver](https://forum.ecmwf.int/u/Glenn_Carver)\
**Post date:** [23 May 2018 12:11 UTC](https://forum.ecmwf.int/t/gmv-gmvs-blocked-grid-point-arrays/12165/2 "2018-05-23T12:11:50Z")

</div>

Hello Ryan,

There is nothing like non-blocked/blocked data structures for GMV/GMVS.&nbsp;  
  
 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&nbsp;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:&nbsp;

```
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.&nbsp;  
  
 As you noticed the GMV(s) arrays are already decomposed into the `NGPBLKS` structures dimensioned by `NPROMA`.&nbsp;  
  
 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.&nbsp;  
  
 Hope this helps.

(with thanks to Filip Vana for supplying this answer)
