diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F index 288c79db284d..77796959538d 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F @@ -181,7 +181,7 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft) call mpas_pool_get_array(forcingPool, 'landIceFloatingMask', landIceFloatingMask) call mpas_pool_get_array(forcingPool, 'landIceFraction', landIceFraction) - if (landIceFloatingMask(1) == -1) then + if (nCellsAll.gt.0 .AND. landIceFloatingMask(1) == -1) then call mpas_log_write('landIceFloatingMask contains the default value which likely indicates that this field is missing in the initial condition file (e.g. because it is meant for an older E3SM version).', & MPAS_LOG_CRIT) endif