Fix out-of-bounds warnings

Fix warnings about out-of-bounds array access, such as:

```
src/meshfem3D/finalize_mesher.f90:169.44:

      write(IMAIN,*) 'computed g_x  = ',g_x(ixr,iyr,ichunkr),' m.s-2'
                                            1
Warning: Array reference at (1) is out of bounds (0 < 1) in dimension 1
```