Index: LMDZ6/trunk/libf/dyn3d/conf_gcm.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d/conf_gcm.F90	(revision 4054)
+++ LMDZ6/trunk/libf/dyn3d/conf_gcm.F90	(revision 4055)
@@ -322,4 +322,6 @@
   iflag_top_bound=1
   CALL getin('iflag_top_bound',iflag_top_bound)
+  if (iflag_top_bound < 0 .or. iflag_top_bound > 2) &
+       call abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
 
   ! mode_top_bound : fields towards which sponge relaxation will be done:
Index: LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90	(revision 4054)
+++ LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90	(revision 4055)
@@ -357,4 +357,6 @@
   iflag_top_bound=1
   CALL getin('iflag_top_bound',iflag_top_bound)
+  if (iflag_top_bound < 0 .or. iflag_top_bound > 2) &
+       call abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
 
   ! mode_top_bound : fields towards which sponge relaxation will be done:
