Skip to content
Snippets Groups Projects
Commit 8c659740 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 28/06/2021: IO: better management of pre-5.5 files (default values...

Philippe 28/06/2021: IO: better management of pre-5.5 files (default values for missing fields instead of crash)
parent 437078a3
No related branches found
No related tags found
No related merge requests found
...@@ -441,7 +441,8 @@ END IF ...@@ -441,7 +441,8 @@ END IF
! routine which read related informations in the EXSEG descriptor in order to ! routine which read related informations in the EXSEG descriptor in order to
! check coherence between both informations. ! check coherence between both informations.
! !
CALL IO_Field_read(TPINIFILE,'LOCEAN',LOCEAN) CALL IO_Field_read(TPINIFILE,'LOCEAN',LOCEAN,IRESP)
IF ( IRESP /= 0 ) LOCEAN = .FALSE.
! !
CALL READ_EXSEG_n(KMI,TZFILE_DES,YCONF,GFLAT,GUSERV,GUSERC, & CALL READ_EXSEG_n(KMI,TZFILE_DES,YCONF,GFLAT,GUSERV,GUSERC, &
GUSERR,GUSERI,GUSECI,GUSERS,GUSERG,GUSERH,GUSECHEM, & GUSERR,GUSERI,GUSECI,GUSERS,GUSERG,GUSERH,GUSECHEM, &
......
...@@ -641,7 +641,6 @@ IF (LIBM .AND. CPROGRAM=='MESONH') THEN ...@@ -641,7 +641,6 @@ IF (LIBM .AND. CPROGRAM=='MESONH') THEN
! !
ENDIF ENDIF
! !
ZLRECYCL=.FALSE.
TZFIELD%CMNHNAME = 'RECYCLING' TZFIELD%CMNHNAME = 'RECYCLING'
TZFIELD%CLONGNAME = 'RECYCLING' TZFIELD%CLONGNAME = 'RECYCLING'
TZFIELD%CSTDNAME = '' TZFIELD%CSTDNAME = ''
...@@ -651,7 +650,10 @@ TZFIELD%NGRID = 1 ...@@ -651,7 +650,10 @@ TZFIELD%NGRID = 1
TZFIELD%NTYPE = TYPELOG TZFIELD%NTYPE = TYPELOG
TZFIELD%NDIMS = 0 TZFIELD%NDIMS = 0
TZFIELD%LTIMEDEP = .FALSE. TZFIELD%LTIMEDEP = .FALSE.
CALL IO_Field_read(TPINIFILE,TZFIELD,ZLRECYCL) CALL IO_Field_read(TPINIFILE,TZFIELD,ZLRECYCL,IRESP)
!If field not found (file from older version of MesoNH) => set ZLRECYCL to false
IF ( IRESP /= 0 ) ZLRECYCL = .FALSE.
IF (ZLRECYCL) THEN IF (ZLRECYCL) THEN
! !
TZFIELD%CMNHNAME = 'RCOUNT' TZFIELD%CMNHNAME = 'RCOUNT'
......
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