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

Quentin 30/09/2021: bugfix RESTART reproductibility. The surfex online...

Quentin 30/09/2021: bugfix RESTART reproductibility. The surfex online diagnostics (but included pseudo-pronostic variables such as TSRAD) are written at
a time step of +1 in advance with respect to the atmospheric variables which lead to wrong computation of fluxes (such as radiative) at the initial step of a RESTART
parent e8ef1b74
No related branches found
No related tags found
No related merge requests found
......@@ -972,6 +972,10 @@ IF ( nfile_backup_current < NBAK_NUMB ) THEN
TFILE_SURFEX => TZBAKFILE
CALL GOTO_SURFEX(IMI)
CALL WRITE_SURF_ATM_n(YSURF_CUR,'MESONH','ALL',.FALSE.)
IF ( nfile_backup_current -1 > 0) THEN
CALL DIAG_SURF_ATM_n(YSURF_CUR,'MESONH')
CALL WRITE_DIAG_SURF_ATM_n(YSURF_CUR,'MESONH','ALL')
END IF
NULLIFY(TFILE_SURFEX)
END IF
!
......@@ -1426,17 +1430,6 @@ IF (CDCONV/='NONE') THEN
END IF
END IF
!
IF ( nfile_backup_current > 0 .AND. nfile_backup_current <= NBAK_NUMB ) THEN
IF ( KTCOUNT == TBACKUPN(nfile_backup_current)%NSTEP ) THEN
IF (CSURF=='EXTE') THEN
CALL GOTO_SURFEX(IMI)
CALL DIAG_SURF_ATM_n(YSURF_CUR,'MESONH')
TFILE_SURFEX => TZBAKFILE
CALL WRITE_DIAG_SURF_ATM_n(YSURF_CUR,'MESONH','ALL')
NULLIFY(TFILE_SURFEX)
END IF
END IF
END IF
!
CALL SECOND_MNH2(ZTIME2)
!
......
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