Skip to content
Snippets Groups Projects
Commit 702a745f authored by ESCOBAR Juan's avatar ESCOBAR Juan
Browse files

Juan 1/06/2018:prep_grib_grid.F90, remove IALLGRIB loop , useless & very memory consuming

parent 64f9032a
No related branches found
No related tags found
No related merge requests found
......@@ -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)
!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment