Skip to content
Snippets Groups Projects
Commit 8bc98299 authored by RODIER Quentin's avatar RODIER Quentin
Browse files

M.Goret 28/06/2021:bugfix increase LNOWRITE table and add abort if writing...

M.Goret 28/06/2021:bugfix increase LNOWRITE table and add abort if writing surfex field needs more memory (for long simulations/large number of surf. field writes without restart)
parent ec875bda
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,8 @@ LOGICAL :: LNAM_TEB_WRITTEN = .TRUE. ...@@ -46,7 +46,8 @@ LOGICAL :: LNAM_TEB_WRITTEN = .TRUE.
LOGICAL :: LNAM_WATFLUX_WRITTEN = .TRUE. LOGICAL :: LNAM_WATFLUX_WRITTEN = .TRUE.
! !
LOGICAL :: LFIRST_WRITE = .TRUE. LOGICAL :: LFIRST_WRITE = .TRUE.
LOGICAL, DIMENSION(50000) :: LNOWRITE INTEGER, PARAMETER :: NSIZE_LNOWRITE = 80000
LOGICAL, DIMENSION(NSIZE_LNOWRITE) :: LNOWRITE
INTEGER :: NCPT_WRITE = 0 INTEGER :: NCPT_WRITE = 0
! !
LOGICAL :: LSPLIT_PATCH = .TRUE. LOGICAL :: LSPLIT_PATCH = .TRUE.
......
...@@ -20,7 +20,7 @@ USE MODD_XIOS, ONLY : LXIOS, LXIOS_DEF_CLOSED ...@@ -20,7 +20,7 @@ USE MODD_XIOS, ONLY : LXIOS, LXIOS_DEF_CLOSED
USE XIOS, ONLY : XIOS_IS_VALID_FIELD, XIOS_FIELD_IS_ACTIVE USE XIOS, ONLY : XIOS_IS_VALID_FIELD, XIOS_FIELD_IS_ACTIVE
#endif #endif
! !
USE MODD_WRITE_SURF_ATM, ONLY : LFIRST_WRITE, LNOWRITE, NCPT_WRITE USE MODD_WRITE_SURF_ATM, ONLY : LFIRST_WRITE, LNOWRITE, NCPT_WRITE, NSIZE_LNOWRITE
! !
USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE YOMHOOK ,ONLY : LHOOK, DR_HOOK
USE PARKIND1 ,ONLY : JPRB USE PARKIND1 ,ONLY : JPRB
...@@ -48,6 +48,13 @@ IF (TRIM(HREC)=="time".OR.TRIM(HREC)=="longitude".OR.TRIM(HREC)=="latitude") THE ...@@ -48,6 +48,13 @@ IF (TRIM(HREC)=="time".OR.TRIM(HREC)=="longitude".OR.TRIM(HREC)=="latitude") THE
ENDIF ENDIF
! !
NCPT_WRITE = NCPT_WRITE + 1 NCPT_WRITE = NCPT_WRITE + 1
IF (NCPT_WRITE > NSIZE_LNOWRITE) THEN
WRITE(ILUOUT,*) '--------------------------------------'
WRITE(ILUOUT,*) 'Error when writing a field'
WRITE(ILUOUT,*) 'No more room available in LNOWRITE table'
WRITE(ILUOUT,*) 'Please increase its size in modd_write_surf_atm'
CALL ABOR1_SFX('TEST_RECORD_LEN: LNOWRITE table is full')
ENDIF
! !
IF (LFIRST_WRITE) THEN IF (LFIRST_WRITE) THEN
! !
......
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