diff --git a/src/LIB/SURCOUCHE/src/mode_field.f90 b/src/LIB/SURCOUCHE/src/mode_field.f90 index c6eca9e5cb6ead4f09a051774327023c7d67cb5b..a106f785d39cd1434ed0cfcc7a94c4504891f347 100644 --- a/src/LIB/SURCOUCHE/src/mode_field.f90 +++ b/src/LIB/SURCOUCHE/src/mode_field.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2016-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2016-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -3886,6 +3886,9 @@ IF (.NOT.LFIELDLIST_ISINIT) THEN RETURN END IF ! +if (kfrom > nmodel_allocated .or. kto > nmodel_allocated ) & + call Print_msg( NVERB_FATAL, 'GEN', 'FIELDLIST_GOTO_MODEL', 'kfrom or kto > nmodel_allocated' ) +! ! Initialize some pointers ! !PW: TODO: check if still necessary as XRHODREFZ and XTHVREFZ are now initialiazed in ini_modeln even for KMI/=1 (29/01/2019)