Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ice_grid: do call 'gridbox_verts' for rectangular grids #749

Merged
merged 1 commit into from
Aug 12, 2022

Commits on Aug 8, 2022

  1. ice_grid: do call 'gridbox_verts' for rectangular grids

    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.
    phil-blain committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    de893ba View commit details
    Browse the repository at this point in the history