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

Philippe 29/05/2024: IO_Fieldlist_1field_write: manage model number internally...

Philippe 29/05/2024: IO_Fieldlist_1field_write: manage model number internally (remove corresponding dummy argument)
parent a7d43da7
No related branches found
No related tags found
No related merge requests found
...@@ -4348,23 +4348,18 @@ USE MODD_IO, ONLY: ISP ...@@ -4348,23 +4348,18 @@ USE MODD_IO, ONLY: ISP
USE MODD_OUT_n, ONLY: LOUT_BIGBOX_WRITE, NOUT_FIELDLIST, NOUT_NBOXES, TOUT_BOXES USE MODD_OUT_n, ONLY: LOUT_BIGBOX_WRITE, NOUT_FIELDLIST, NOUT_NBOXES, TOUT_BOXES
USE MODD_PRECISION, ONLY: CDFINT USE MODD_PRECISION, ONLY: CDFINT
USE MODE_MODELN_HANDLER, ONLY: GET_CURRENT_MODEL_INDEX
IMPLICIT NONE IMPLICIT NONE
TYPE(TFILEDATA), INTENT(IN) :: TPOUTPUT !Output file TYPE(TFILEDATA), INTENT(IN) :: TPOUTPUT !Output file
INTEGER :: IMI
INTEGER :: JBOX INTEGER :: JBOX
INTEGER :: JI INTEGER :: JI
INTEGER(KIND=CDFINT) :: IGROUPID_ROOT INTEGER(KIND=CDFINT) :: IGROUPID_ROOT
TYPE(TFILEDATA) :: TZOUTPUT TYPE(TFILEDATA) :: TZOUTPUT
!
IMI = GET_CURRENT_MODEL_INDEX()
!
IF ( LOUT_BIGBOX_WRITE ) THEN IF ( LOUT_BIGBOX_WRITE ) THEN
DO JI = 1, SIZE( NOUT_FIELDLIST ) DO JI = 1, SIZE( NOUT_FIELDLIST )
CALL IO_Fieldlist_1field_write( TPOUTPUT, IMI, TFIELDLIST(NOUT_FIELDLIST(JI)), 0, TOUT_BOXES(0) ) CALL IO_Fieldlist_1field_write( TPOUTPUT, TFIELDLIST(NOUT_FIELDLIST(JI)), 0, TOUT_BOXES(0) )
END DO END DO
END IF END IF
...@@ -4390,12 +4385,12 @@ IF ( NOUT_NBOXES > 0 ) THEN ...@@ -4390,12 +4385,12 @@ IF ( NOUT_NBOXES > 0 ) THEN
! Write fields common to all boxes ! Write fields common to all boxes
DO JI = 1, SIZE( NOUT_FIELDLIST ) DO JI = 1, SIZE( NOUT_FIELDLIST )
CALL IO_Fieldlist_1field_write( TZOUTPUT, IMI, TFIELDLIST(NOUT_FIELDLIST(JI)), JBOX, TOUT_BOXES(JBOX) ) CALL IO_Fieldlist_1field_write( TZOUTPUT, TFIELDLIST(NOUT_FIELDLIST(JI)), JBOX, TOUT_BOXES(JBOX) )
END DO END DO
! Write box-specific fields ! Write box-specific fields
DO JI = 1, SIZE( TOUT_BOXES(JBOX)%NFIELDLIST_SUPP ) DO JI = 1, SIZE( TOUT_BOXES(JBOX)%NFIELDLIST_SUPP )
CALL IO_Fieldlist_1field_write( TZOUTPUT, IMI, TFIELDLIST(TOUT_BOXES(JBOX)%NFIELDLIST_SUPP(JI)), JBOX, TOUT_BOXES(JBOX) ) CALL IO_Fieldlist_1field_write( TZOUTPUT, TFIELDLIST(TOUT_BOXES(JBOX)%NFIELDLIST_SUPP(JI)), JBOX, TOUT_BOXES(JBOX) )
END DO END DO
! Restore the root group (not really necessary but cleaner) ! Restore the root group (not really necessary but cleaner)
...@@ -4406,21 +4401,25 @@ END IF ...@@ -4406,21 +4401,25 @@ END IF
END SUBROUTINE IO_Fieldlist_write END SUBROUTINE IO_Fieldlist_write
SUBROUTINE IO_Fieldlist_1field_write( TPOUTPUT, KMI, TPFIELD, KBOXID, TPBOX ) SUBROUTINE IO_Fieldlist_1field_write( TPOUTPUT, TPFIELD, KBOXID, TPBOX )
USE MODD_FIELD, ONLY: TFIELDDATA, TFIELDMETADATA USE MODD_FIELD, ONLY: TFIELDDATA, TFIELDMETADATA
USE MODD_OUT_n, ONLY: CMAINDOMAINNAME, TOUTBOXMETADATA USE MODD_OUT_n, ONLY: CMAINDOMAINNAME, TOUTBOXMETADATA
USE MODE_MODELN_HANDLER, ONLY: GET_CURRENT_MODEL_INDEX
TYPE(TFILEDATA), INTENT(IN) :: TPOUTPUT !Output file TYPE(TFILEDATA), INTENT(IN) :: TPOUTPUT !Output file
INTEGER, INTENT(IN) :: KMI
TYPE(TFIELDDATA), INTENT(IN) :: TPFIELD TYPE(TFIELDDATA), INTENT(IN) :: TPFIELD
INTEGER, INTENT(IN) :: KBOXID INTEGER, INTENT(IN) :: KBOXID
TYPE(TOUTBOXMETADATA), INTENT(INOUT) :: TPBOX TYPE(TOUTBOXMETADATA), INTENT(INOUT) :: TPBOX
INTEGER :: IIINF, IJINF, IKINF INTEGER :: IIINF, IJINF, IKINF
INTEGER :: IISUP, IJSUP, IKSUP INTEGER :: IISUP, IJSUP, IKSUP
INTEGER :: IMI
TYPE(TFIELDMETADATA) :: TZFIELDMD TYPE(TFIELDMETADATA) :: TZFIELDMD
IMI = GET_CURRENT_MODEL_INDEX()
TZFIELDMD = TFIELDMETADATA( TPFIELD ) !Copy only metadata (TZFIELDMD is of TYPE(TFIELDMETADATA)) TZFIELDMD = TFIELDMETADATA( TPFIELD ) !Copy only metadata (TZFIELDMD is of TYPE(TFIELDMETADATA))
NDIMS: SELECT CASE (TPFIELD%NDIMS) NDIMS: SELECT CASE (TPFIELD%NDIMS)
...@@ -4437,12 +4436,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4437,12 +4436,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X0D is NOT allocated ' ) ': TFIELD_X0D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X0D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X0D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X0D%DATA is NOT associated' ) ': TFIELD_X0D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_X0D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_X0D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 0D real fields' ) ': CLBTYPE/=NONE not allowed for 0D real fields' )
...@@ -4455,12 +4454,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4455,12 +4454,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N0D is NOT allocated ' ) ': TFIELD_N0D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N0D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N0D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N0D%DATA is NOT associated' ) ': TFIELD_N0D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_N0D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_N0D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 0D integer fields' ) ': CLBTYPE/=NONE not allowed for 0D integer fields' )
...@@ -4473,12 +4472,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4473,12 +4472,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_L0D is NOT allocated ' ) ': TFIELD_L0D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_L0D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_L0D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_L0D%DATA is NOT associated' ) ': TFIELD_L0D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_L0D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_L0D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 0D logical fields' ) ': CLBTYPE/=NONE not allowed for 0D logical fields' )
...@@ -4491,12 +4490,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4491,12 +4490,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_C0D is NOT allocated ' ) ': TFIELD_C0D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_C0D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_C0D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_C0D%DATA is NOT associated' ) ': TFIELD_C0D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_C0D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_C0D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 0D character fields' ) ': CLBTYPE/=NONE not allowed for 0D character fields' )
...@@ -4509,12 +4508,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4509,12 +4508,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_T0D is NOT allocated ' ) ': TFIELD_T0D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_T0D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_T0D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_T0D%DATA is NOT associated' ) ': TFIELD_T0D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_T0D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_T0D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 0D date/time fields' ) ': CLBTYPE/=NONE not allowed for 0D date/time fields' )
...@@ -4569,15 +4568,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4569,15 +4568,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X1D is NOT allocated ' ) ': TFIELD_X1D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X1D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X1D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X1D%DATA is NOT associated' ) ': TFIELD_X1D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TPFIELD%CDIR /= 'XX' .AND. TPFIELD%CDIR /= 'YY' .AND. TPFIELD%CDIR /= 'ZZ' ) THEN IF ( TPFIELD%CDIR /= 'XX' .AND. TPFIELD%CDIR /= 'YY' .AND. TPFIELD%CDIR /= 'ZZ' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_X1D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_X1D(IMI)%DATA)
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X1D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X1D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, KBOXID = KBOXID ) KXOBOX = IIINF, KXEBOX = IISUP, KBOXID = KBOXID )
END IF END IF
ELSE ELSE
...@@ -4592,15 +4591,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4592,15 +4591,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N1D is NOT allocated ' ) ': TFIELD_N1D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N1D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N1D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N1D%DATA is NOT associated' ) ': TFIELD_N1D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TPFIELD%CDIR /= 'XX' .AND. TPFIELD%CDIR /= 'YY' .AND. TPFIELD%CDIR /= 'ZZ' ) THEN IF ( TPFIELD%CDIR /= 'XX' .AND. TPFIELD%CDIR /= 'YY' .AND. TPFIELD%CDIR /= 'ZZ' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_N1D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_N1D(IMI)%DATA)
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_N1D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_N1D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, KBOXID = KBOXID ) KXOBOX = IIINF, KXEBOX = IISUP, KBOXID = KBOXID )
END IF END IF
ELSE ELSE
...@@ -4615,13 +4614,13 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4615,13 +4614,13 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_L1D is NOT allocated ' ) ': TFIELD_L1D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_L1D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_L1D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_L1D%DATA is NOT associated' ) ': TFIELD_L1D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TPFIELD%CDIR /= 'XX' .AND. TPFIELD%CDIR /= 'YY' .AND. TPFIELD%CDIR /= 'ZZ' ) THEN IF ( TPFIELD%CDIR /= 'XX' .AND. TPFIELD%CDIR /= 'YY' .AND. TPFIELD%CDIR /= 'ZZ' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_L1D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_L1D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', 'CDIR=XX, YY or ZZ not allowed for 1D logical fields' ) call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', 'CDIR=XX, YY or ZZ not allowed for 1D logical fields' )
END IF END IF
...@@ -4637,12 +4636,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4637,12 +4636,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_C1D is NOT allocated ' ) ': TFIELD_C1D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_C1D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_C1D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_C1D%DATA is NOT associated' ) ': TFIELD_C1D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_C1D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_C1D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 1D character fields' ) ': CLBTYPE/=NONE not allowed for 1D character fields' )
...@@ -4655,12 +4654,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4655,12 +4654,12 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_T1D is NOT allocated ' ) ': TFIELD_T1D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_T1D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_T1D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_T1D%DATA is NOT associated' ) ': TFIELD_T1D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_T1D(KMI)%DATA) CALL IO_Field_write(TPOUTPUT,TPFIELD,TPFIELD%TFIELD_T1D(IMI)%DATA)
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': CLBTYPE/=NONE not allowed for 1D date/time fields' ) ': CLBTYPE/=NONE not allowed for 1D date/time fields' )
...@@ -4694,15 +4693,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4694,15 +4693,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X2D is NOT allocated ' ) ': TFIELD_X2D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X2D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X2D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X2D%DATA is NOT associated' ) ': TFIELD_X2D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X2D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X2D(IMI)%DATA )
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X2D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X2D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, & KXOBOX = IIINF, KXEBOX = IISUP, &
KYOBOX = IJINF, KYEBOX = IJSUP, & KYOBOX = IJINF, KYEBOX = IJSUP, &
KBOXID = KBOXID ) KBOXID = KBOXID )
...@@ -4719,15 +4718,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4719,15 +4718,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N2D is NOT allocated ' ) ': TFIELD_N2D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N2D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N2D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N2D%DATA is NOT associated' ) ': TFIELD_N2D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_N2D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_N2D(IMI)%DATA )
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_N2D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_N2D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, & KXOBOX = IIINF, KXEBOX = IISUP, &
KYOBOX = IJINF, KYEBOX = IJSUP, & KYOBOX = IJINF, KYEBOX = IJSUP, &
KBOXID = KBOXID ) KBOXID = KBOXID )
...@@ -4765,15 +4764,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4765,15 +4764,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X3D is NOT allocated ' ) ': TFIELD_X3D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X3D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X3D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X3D%DATA is NOT associated' ) ': TFIELD_X3D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X3D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X3D(IMI)%DATA )
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X3D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X3D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, & KXOBOX = IIINF, KXEBOX = IISUP, &
KYOBOX = IJINF, KYEBOX = IJSUP, & KYOBOX = IJINF, KYEBOX = IJSUP, &
KZOBOX = IKINF, KZEBOX = IKSUP, & KZOBOX = IKINF, KZEBOX = IKSUP, &
...@@ -4792,15 +4791,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4792,15 +4791,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N3D is NOT allocated ' ) ': TFIELD_N3D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N3D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_N3D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_N3D%DATA is NOT associated' ) ': TFIELD_N3D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_N3D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_N3D(IMI)%DATA )
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_N3D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_N3D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, & KXOBOX = IIINF, KXEBOX = IISUP, &
KYOBOX = IJINF, KYEBOX = IJSUP, & KYOBOX = IJINF, KYEBOX = IJSUP, &
KZOBOX = IKINF, KZEBOX = IKSUP, & KZOBOX = IKINF, KZEBOX = IKSUP, &
...@@ -4840,15 +4839,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4840,15 +4839,15 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X4D is NOT allocated ' ) ': TFIELD_X4D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X4D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X4D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X4D%DATA is NOT associated' ) ': TFIELD_X4D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X4D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X4D(IMI)%DATA )
ELSE ELSE
CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X4D(KMI)%DATA, & CALL IO_Field_write_BOX( TPOUTPUT, TZFIELDMD, 'OTHER', TPFIELD%TFIELD_X4D(IMI)%DATA, &
KXOBOX = IIINF, KXEBOX = IISUP, & KXOBOX = IIINF, KXEBOX = IISUP, &
KYOBOX = IJINF, KYEBOX = IJSUP, & KYOBOX = IJINF, KYEBOX = IJSUP, &
KZOBOX = IKINF, KZEBOX = IKSUP, & KZOBOX = IKINF, KZEBOX = IKSUP, &
...@@ -4879,13 +4878,13 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4879,13 +4878,13 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X5D is NOT allocated ' ) ': TFIELD_X5D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X5D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X5D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X5D%DATA is NOT associated' ) ': TFIELD_X5D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X5D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X5D(IMI)%DATA )
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', '5D REAL not (yet) fully implemented' ) call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', '5D REAL not (yet) fully implemented' )
END IF END IF
...@@ -4914,13 +4913,13 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS) ...@@ -4914,13 +4913,13 @@ NDIMS: SELECT CASE (TPFIELD%NDIMS)
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X6D is NOT allocated ' ) ': TFIELD_X6D is NOT allocated ' )
END IF END IF
IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X6D(KMI)%DATA) ) THEN IF ( .NOT.ASSOCIATED(TPFIELD%TFIELD_X6D(IMI)%DATA) ) THEN
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// & call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', trim(tpfield%cmnhname)// &
': TFIELD_X6D%DATA is NOT associated' ) ': TFIELD_X6D%DATA is NOT associated' )
END IF END IF
IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN IF ( TPFIELD%CLBTYPE == 'NONE' ) THEN
IF ( TZFIELDMD%CDIR /= 'XY' ) THEN IF ( TZFIELDMD%CDIR /= 'XY' ) THEN
CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X6D(KMI)%DATA ) CALL IO_Field_write( TPOUTPUT, TPFIELD, TPFIELD%TFIELD_X6D(IMI)%DATA )
ELSE ELSE
call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', '6D REAL not (yet) fully implemented' ) call Print_msg( NVERB_ERROR, 'IO', 'IO_Fieldlist_1field_write', '6D REAL not (yet) fully implemented' )
END IF END IF
......
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