diff --git a/src/LIB/SURCOUCHE/src/io_write_field.f90 b/src/LIB/SURCOUCHE/src/io_write_field.f90 index e417d71d97048efce5f9161cda24c14ebd622e36..61f1cc9fb1428c63eb2dab89d76e71dddf23a1af 100644 --- a/src/LIB/SURCOUCHE/src/io_write_field.f90 +++ b/src/LIB/SURCOUCHE/src/io_write_field.f90 @@ -33,6 +33,19 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST) CASE (0) SELECT CASE (TFIELDLIST(IDX)%NTYPE) ! + !0D string + ! + CASE (TYPECHAR) + IF ( .NOT.ALLOCATED(TFIELDLIST(IDX)%TFIELD_C0D) ) THEN + PRINT *,'FATAL: IO_WRITE_FIELDLIST: TFIELD_C0D is NOT allocated for ',TRIM(TFIELDLIST(IDX)%CMNHNAME) + STOP + END IF + IF ( .NOT.ASSOCIATED(TFIELDLIST(IDX)%TFIELD_C0D(IMI)%DATA) ) THEN + PRINT *,'FATAL: IO_WRITE_FIELDLIST: TFIELD_C0D%DATA is not associated for ',TRIM(TFIELDLIST(IDX)%CMNHNAME) + STOP + END IF + CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_C0D(IMI)%DATA) + ! !0D logical ! CASE (TYPELOG) diff --git a/src/LIB/SURCOUCHE/src/mode_field.f90 b/src/LIB/SURCOUCHE/src/mode_field.f90 index 0994e6d1600ec45f2edbcd205291ce6ecdd13804..fb13c1846d2b14e058f7e1b3759855843dbce5b8 100644 --- a/src/LIB/SURCOUCHE/src/mode_field.f90 +++ b/src/LIB/SURCOUCHE/src/mode_field.f90 @@ -15,6 +15,10 @@ IMPLICIT NONE INTEGER,PRIVATE,PARAMETER :: MAXFIELDS = 100 INTEGER,PARAMETER :: TYPEUNDEF = -1, TYPEINT = 1, TYPELOG = 2, TYPEREAL = 3, TYPECHAR = 4, TYPEDATE = 5 ! +TYPE TFIELDPTR_C0D + CHARACTER(LEN=:), POINTER :: DATA => NULL() +END TYPE TFIELDPTR_C0D +! TYPE TFIELDPTR_L0D LOGICAL, POINTER :: DATA => NULL() END TYPE TFIELDPTR_L0D @@ -51,6 +55,8 @@ TYPE TFIELDDATA INTEGER :: NTYPE = TYPEUNDEF !Datatype INTEGER :: NDIMS = 0 !Number of dimensions ! + TYPE(TFIELDPTR_C0D),DIMENSION(:),ALLOCATABLE :: TFIELD_C0D !Pointer to the character string fields (one per nested mesh) + ! TYPE(TFIELDPTR_L0D),DIMENSION(:),ALLOCATABLE :: TFIELD_L0D !Pointer to the scalar logical fields (one per nested mesh) ! TYPE(TFIELDPTR_X0D),DIMENSION(:),ALLOCATABLE :: TFIELD_X0D !Pointer to the scalar real fields (one per nested mesh)