Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ice_grid: do call 'gridbox_verts' for rectangular grids (#749)
At the end of subroutine ice_grid::gridbox_corners, the arrays 'lont_bounds' and 'lonu_bounds', which contain the longitude of the corners of each grid cell on the T and U grids, are converted to to the [0, 360] range. In the case of rectangular grids ('grid_type = rectangular'), at the point where 'gridbox_corners' is called in 'init_grid2', 'lont_bounds' is not initialized, causing the code to abort if compiling with NaN initialization. This is due to the fact that 'gridbox_verts', which initializes 'lont_bounds' and 'latt_bounds', is not called in 'rectgrid', whereas it is called in 'popgrid[_nc]'. Do call 'gridbox_verts' in 'rectgrid', so that 'lont_bounds' and 'latt_bounds' are correctly initalized in that case also. Note that these calls are also missing in 'latlongrid' and 'cpomgrid', but since these two subroutines are not used in standalone configuration, let's not bother for now.
- Loading branch information