diff --git a/src/SURFEX/prep_grib_grid.F90 b/src/SURFEX/prep_grib_grid.F90
index 238385f0093cc960c86edc98114dd699565298b3..7d148175e1c36065beab673558e926cf2e459e53 100644
--- a/src/SURFEX/prep_grib_grid.F90
+++ b/src/SURFEX/prep_grib_grid.F90
@@ -35,6 +35,7 @@
 !!      Original   06/2003
 !!      S. Faroux 01/2011 : to use library GRIB_API instead of GRIBEX (from
 !!                          read_all_data_grib_case)
+!!      J. Escobar 1/06/2018 : remove IALLGRIB loop , useless & very memory consuming
 !-------------------------------------------------------------------------------
 !
 !*      0. DECLARATIONS
@@ -114,11 +115,6 @@ INTEGER                            :: JLOOP1        ! Dummy counter
 INTEGER :: INFOMPI, J
 REAL(KIND=JPRB) :: ZHOOK_HANDLE
 !
-INTEGER                            :: JLOOP
-INTEGER(KIND=kindOfInt)                            :: ICOUNT        ! number of messages in the file
-INTEGER(KIND=kindOfInt),DIMENSION(:),ALLOCATABLE   :: IALLGRIB      ! number of the grib in memory
-!
-!
 !---------------------------------------------------------------------------------------
 !
 IF (LHOOK) CALL DR_HOOK('PREP_GRIB_GRID_1',0,ZHOOK_HANDLE)
@@ -140,24 +136,6 @@ END IF
 IF (IRET /= 0) THEN
   CALL ABOR1_SFX('PREP_GRIB_GRID: Error in reading the grib file')
 END IF
-!*JPC*GFS*AUG2015
- CALL GRIB_COUNT_IN_FILE(IUNIT,ICOUNT)
-IF (IRET /= 0) THEN
-  CALL ABOR1_SFX('PREP_GRIB_GRID: Error in reading the grib file')
-END IF
-ALLOCATE(IALLGRIB(ICOUNT))
-! initialize the tabular with a negativ number 
-! ( all the IALLGRIB will be  different )
-IALLGRIB(:)=-12
-!charge all the message in memory
-DO JLOOP=1,ICOUNT
-CALL GRIB_NEW_FROM_FILE(IUNIT,IALLGRIB(JLOOP),IRET)
-IF (IRET /= 0) THEN
-  CALL ABOR1_SFX('PREP_GRIB_GRID: Error in reading the grib file')
-END IF
-END DO
-!*JPC*GFS*AUG2015
-!
 ! close the grib file
  CALL GRIB_CLOSE_FILE(IUNIT)
 !