From 702a745f239cad02595fc4b6288befb1d2814084 Mon Sep 17 00:00:00 2001 From: ESCOBAR Juan <escj@nuwa> Date: Fri, 1 Jun 2018 11:10:18 +0200 Subject: [PATCH] Juan 1/06/2018:prep_grib_grid.F90, remove IALLGRIB loop , useless & very memory consuming --- src/SURFEX/prep_grib_grid.F90 | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/SURFEX/prep_grib_grid.F90 b/src/SURFEX/prep_grib_grid.F90 index 238385f00..7d148175e 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) ! -- GitLab