Skip to content
Snippets Groups Projects
read_field.f90 59.4 KiB
Newer Older
        PATC(:,:,:,JSV-NSV_PPBEG+1) = 0.
    END SELECT
  END DO
END IF
IF (NSV_FFEND>=NSV_FFBEG) THEN
  TZFIELD%CSTDNAME   = ''
  TZFIELD%CUNITS     = 'kg kg-1'
  TZFIELD%CDIR       = 'XY'
  TZFIELD%NGRID      = 1
  TZFIELD%NTYPE      = TYPEREAL
  TZFIELD%NDIMS      = 3
  !
  DO JSV = NSV_FFBEG,NSV_FFEND
    SELECT CASE(HGETSVT(JSV))
      CASE ('READ')
        WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'SVT',JSV
        TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
        TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PSVT(:,:,:,JSV),IRESP)
        IF (IRESP /= 0) THEN
          PSVT(:,:,:,JSV) = 0.
        END IF
      CASE ('INIT')
        PSVT(:,:,:,JSV) = 0.
    END SELECT
  END DO
END IF
IF (NSV_CSEND>=NSV_CSBEG) THEN
  TZFIELD%CSTDNAME   = ''
  TZFIELD%CUNITS     = 'kg kg-1'
  TZFIELD%CDIR       = 'XY'
  TZFIELD%NGRID      = 1
  TZFIELD%NTYPE      = TYPEREAL
  TZFIELD%NDIMS      = 3
  !
  DO JSV = NSV_CSBEG,NSV_CSEND
    SELECT CASE(HGETSVT(JSV))
      CASE ('READ')
        WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'SVT',JSV
        TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
        TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PSVT(:,:,:,JSV),IRESP)
        IF (IRESP /= 0) THEN
          PSVT(:,:,:,JSV) = 0.
        END IF
      CASE ('INIT')
        PSVT(:,:,:,JSV) = 0.
    END SELECT
  END DO
END IF
IF (NSV_LNOXEND>=NSV_LNOXBEG) THEN
  TZFIELD%CSTDNAME   = ''
  TZFIELD%CUNITS     = 'ppp'
  TZFIELD%CDIR       = 'XY'
  TZFIELD%NGRID      = 1
  TZFIELD%NTYPE      = TYPEREAL
  TZFIELD%NDIMS      = 3
  !
  DO JSV = NSV_LNOXBEG,NSV_LNOXEND
    SELECT CASE(HGETSVT(JSV))
      CASE ('READ')
        TZFIELD%CMNHNAME   = 'LINOXT'
        TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
        WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)') 'X_Y_Z_','SVT',JSV
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PSVT(:,:,:,JSV))
      CASE ('INIT')
        PSVT(:,:,:,JSV) = 0.
    END SELECT
  END DO
END IF
!
IF (NSV_SNWEND>=NSV_SNWBEG) THEN
  TZFIELD%CSTDNAME   = ''
  TZFIELD%CDIR       = 'XY'
  TZFIELD%NGRID      = 1
  TZFIELD%NTYPE      = TYPEREAL
  TZFIELD%NDIMS      = 3
  TZFIELD%LTIMEDEP   = .TRUE.
  DO JSV = NSV_SNWBEG,NSV_SNWEND
    SELECT CASE(HGETSVT(JSV))
      CASE ('READ')
        TZFIELD%CMNHNAME   = TRIM(CSNOWNAMES(JSV-NSV_SNWBEG+1))//'T'
        TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
        WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)') 'X_Y_Z_','SVT',JSV
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PSVT(:,:,:,JSV))
      CASE ('INIT')
        PSVT(:,:,:,JSV) = 0.
    END SELECT
  END DO
END IF
IF (NSV_SNW>=1) THEN
  TZFIELD%CSTDNAME   = ''
  TZFIELD%CDIR       = 'XY'
  TZFIELD%NGRID      = 1
  TZFIELD%NTYPE      = TYPEREAL
  TZFIELD%NDIMS      = 2
  TZFIELD%LTIMEDEP   = .TRUE.
  DO JSV = 1,NSV_SNW
    SELECT CASE(HGETSVT(JSV))
      CASE ('READ')
        WRITE(TZFIELD%CMNHNAME,'(A10,I3.3)')'SNOWCANO_M',JSV      
        TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
        WRITE(TZFIELD%CCOMMENT,'(A6,A8,I3.3)') 'X_Y_Z_','SNOWCANO',JSV
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,XSNWCANO(:,:,JSV))
      CASE ('INIT')
        XSNWCANO(:,:,JSV) = 0.
    END SELECT
  END DO

END IF

IF (CCONF == 'RESTA') THEN
  IF (CTEMP_SCHEME/='LEFR') THEN
    CALL IO_READ_FIELD(TPINIFILE,'US_PRES',PRUS_PRES)
    CALL IO_READ_FIELD(TPINIFILE,'VS_PRES',PRVS_PRES)
    CALL IO_READ_FIELD(TPINIFILE,'WS_PRES',PRWS_PRES)
  END IF
  IF (LSPLIT_CFL) THEN
    CALL IO_READ_FIELD(TPINIFILE,'THS_CLD',PRTHS_CLD)
    DO JRR = 1, SIZE(PRT,4)
      SELECT CASE(JRR)
        CASE (1)
          CALL IO_READ_FIELD(TPINIFILE,'RVS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE (2)
          CALL IO_READ_FIELD(TPINIFILE,'RCS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE (3)
          CALL IO_READ_FIELD(TPINIFILE,'RRS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE (4)
          CALL IO_READ_FIELD(TPINIFILE,'RIS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE (5)
          CALL IO_READ_FIELD(TPINIFILE,'RSS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE (6)
          CALL IO_READ_FIELD(TPINIFILE,'RGS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE (7)
          CALL IO_READ_FIELD(TPINIFILE,'RHS_CLD',PRRS_CLD(:,:,:,JRR))
        CASE DEFAULT
          CALL PRINT_MSG(NVERB_FATAL,'GEN','READ_FIELD','PRT is too big')
      END SELECT
    END DO
    DO JSV = NSV_C2R2BEG,NSV_C2R2END
      IF (JSV == NSV_C2R2BEG ) THEN
        TZFIELD%CMNHNAME   = 'RSVS_CLD1'
        TZFIELD%CSTDNAME   = ''
        TZFIELD%CLONGNAME  = 'RSVS_CLD1'
        TZFIELD%CUNITS     = '1'
        TZFIELD%CDIR       = 'XY'
        TZFIELD%CCOMMENT   = 'X_Y_Z_RHS_CLD'
        TZFIELD%NGRID      = 1
        TZFIELD%NTYPE      = TYPEREAL
        TZFIELD%NDIMS      = 3
        TZFIELD%LTIMEDEP   = .TRUE.
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PRSVS_CLD(:,:,:,JSV))
      END IF
      IF (JSV == NSV_C2R2BEG ) THEN
        TZFIELD%CMNHNAME   = 'RSVS_CLD2'
        TZFIELD%CSTDNAME   = ''
        TZFIELD%CLONGNAME  = 'RSVS_CLD2'
        TZFIELD%CUNITS     = '1'
        TZFIELD%CDIR       = 'XY'
        TZFIELD%CCOMMENT   = 'X_Y_Z_RHS_CLD'
        TZFIELD%NGRID      = 1
        TZFIELD%NTYPE      = TYPEREAL
        TZFIELD%NDIMS      = 3
        TZFIELD%LTIMEDEP   = .TRUE.
        CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PRSVS_CLD(:,:,:,JSV))
      END IF
    END DO
  END IF
END IF
!
!*       2.1  Time t-dt:
!
IF (CPROGRAM=='MESONH' .AND. HUVW_ADV_SCHEME(1:3)=='CEN' .AND. &
        HTEMP_SCHEME == 'LEFR' ) THEN
  IF (CCONF=='RESTA') THEN
    CALL IO_READ_FIELD(TPINIFILE,'UM', PUM)
    CALL IO_READ_FIELD(TPINIFILE,'VM', PVM)
    CALL IO_READ_FIELD(TPINIFILE,'WM', PWM)
    CALL IO_READ_FIELD(TPINIFILE,'DUM',PDUM)
    CALL IO_READ_FIELD(TPINIFILE,'DVM',PDVM)
    CALL IO_READ_FIELD(TPINIFILE,'DWM',PDWM)
  ELSE
    PUM = PUT
    PVM = PVT
    PWM = PWT
  END IF
END IF
!
!*       2.2a  3D LS fields  
!
!
CALL INI_LS(TPINIFILE,HGETRVT,GLSOURCE,PLSUM,PLSVM,PLSWM,PLSTHM,PLSRVM)
!
!
!*       2.2b  2D "surfacic" LB fields   
!
!
CALL INI_LB(TPINIFILE,GLSOURCE,ISV,                                   &
     KSIZELBX_ll,KSIZELBXU_ll,KSIZELBY_ll,KSIZELBYV_ll,               &
     KSIZELBXTKE_ll,KSIZELBYTKE_ll,                                   &
     KSIZELBXR_ll,KSIZELBYR_ll,KSIZELBXSV_ll,KSIZELBYSV_ll,           &
     HGETTKET,HGETRVT,HGETRCT,HGETRRT,HGETRIT,HGETRST,                &
     HGETRGT,HGETRHT,HGETSVT,                                         &
     PLBXUM,PLBXVM,PLBXWM,PLBXTHM,PLBXTKEM,PLBXRM,PLBXSVM,            &
     PLBYUM,PLBYVM,PLBYWM,PLBYTHM,PLBYTKEM,PLBYRM,PLBYSVM             )
!
!
!*       2.3  Some special variables:
CALL IO_READ_FIELD(TPINIFILE,'DRYMASST',PDRYMASST) ! dry mass
SELECT CASE(HGETSRCT)                ! turbulent flux SRC at time t
  CASE('READ')
    CALL IO_READ_FIELD(TPINIFILE,'SRCT',PSRCT)
  CASE('INIT')
    PSRCT(:,:,:)=0.
END SELECT
!
SELECT CASE(HGETSIGS)                ! subgrid condensation
  CASE('READ')
  CASE('INIT')
    PSIGS(:,:,:)=0.
END SELECT
!
SELECT CASE(HGETPHC)             ! pH in cloud water
  CASE('READ')
  CASE('INIT')
END SELECT
!
SELECT CASE(HGETPHR)             ! pH in rainwater
  CASE('READ')
  CASE('INIT')
END SELECT
!
IRESP=0
IF(HGETCLDFR=='READ') THEN           ! cloud fraction
  CALL IO_READ_FIELD(TPINIFILE,'CLDFR',PCLDFR,IRESP)
ENDIF
IF(HGETCLDFR=='INIT' .OR. IRESP /= 0) THEN
  IF(SIZE(PRT,4) > 3) THEN
    WHERE(PRT(:,:,:,2)+PRT(:,:,:,4) > 1.E-30)
      PCLDFR(:,:,:) = 1.
    ELSEWHERE
      PCLDFR(:,:,:) = 0.
    ENDWHERE
  ELSE
    WHERE(PRT(:,:,:,2) > 1.E-30)
      PCLDFR(:,:,:) = 1.
    ELSEWHERE
      PCLDFR(:,:,:) = 0.
    ENDWHERE
  ENDIF
ENDIF
!
!* boundary layer depth
!
IF (HGETBL_DEPTH=='READ') THEN
  CALL IO_READ_FIELD(TPINIFILE,'BL_DEPTH',PBL_DEPTH)
ELSE
  PBL_DEPTH(:,:)=XUNDEF
END IF
!
!* surface boundary layer depth
!
IF (HGETSBL_DEPTH=='READ') THEN
  CALL IO_READ_FIELD(TPINIFILE,'SBL_DEPTH',PSBL_DEPTH)
ELSE
  PSBL_DEPTH(:,:)=0.
END IF
!
!* Contribution from MAss Flux parameterizations to vert. flux of buoyancy
!
SELECT CASE(HGETTKET)                   
  CASE('READ') 
    IF (CSCONV=='EDKF') THEN 
      CALL IO_READ_FIELD(TPINIFILE,'WTHVMF',PWTHVMF)
    ELSE
      PWTHVMF(:,:,:)=0
    ENDIF
  CASE('INIT')
    PWTHVMF(:,:,:)=0.
END SELECT 
!-------------------------------------------------------------------------------
!
!*       2.4   READ FORCING VARIABLES
!              ----------------------
!
!
IF ( LFORCING ) THEN
  DO JT=1,KFRC
!
    WRITE (YFRC,'(I3.3)') JT
!
    TZFIELD%CMNHNAME   = 'DTFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Date of forcing profile '//YFRC
    TZFIELD%NGRID      = 0
    TZFIELD%NTYPE      = TYPEDATE
    TZFIELD%NDIMS      = 0
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,TPDTFRC(JT))
!
    TZFIELD%CMNHNAME   = 'UFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'm s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Zonal component of horizontal forcing wind'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PUFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'VFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'm s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Meridian component of horizontal forcing wind'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PVFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'WFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'm s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Vertical forcing wind'
    TZFIELD%NGRID      = 4
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PWFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'THFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'K'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Forcing potential temperature'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTHFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'RVFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'kg kg-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Forcing vapor mixing ratio'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PRVFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'TENDTHFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'K s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Large-scale potential temperature tendency for forcing'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTENDTHFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'TENDRVFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'kg kg-1 s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Large-scale vapor mixing ratio tendency for forcing'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTENDRVFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'GXTHFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'K m-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Large-scale potential temperature gradient for forcing'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PGXTHFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'GYTHFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'K m-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Large-scale potential temperature gradient for forcing'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PGYTHFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'PGROUNDFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'Pa'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Forcing ground pressure'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 0
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PPGROUNDFRC(JT))
    TZFIELD%CMNHNAME   = 'TENDUFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'm s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Large-scale U tendency for forcing'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTENDUFRC(:,JT))
!
    TZFIELD%CMNHNAME   = 'TENDVFRC'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'm s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Large-scale V tendency for forcing'
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 1
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTENDVFRC(:,JT))
  END DO
END IF
!
!-------------------------------------------------------------------------------
IF (L2D_ADV_FRC) THEN

  DO JT=1,KADVFRC  
    WRITE (YFRC,'(I3.3)') JT
    !
    TZFIELD%CMNHNAME   = 'DTADV'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Date and time of the advecting forcing '//YFRC
    TZFIELD%NGRID      = 0
    TZFIELD%NTYPE      = TYPEDATE
    TZFIELD%NDIMS      = 0
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,TPDTADVFRC(JT))
    TZFIELD%CMNHNAME   = 'TH_ADV'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'K s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = ''
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 3
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PDTHFRC(:,:,:,JT))
    !
    TZFIELD%CMNHNAME   = 'Q_ADV'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'kg kg-1 s-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = ''
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 3
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PDRVFRC(:,:,:,JT))
  ENDDO
ENDIF
!
IF (L2D_REL_FRC) THEN

  DO JT=1,KRELFRC  
    WRITE (YFRC,'(I3.3)') JT
    !
    TZFIELD%CMNHNAME   = 'DTREL'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = 'Date and time of the relaxation forcing '//YFRC
    TZFIELD%NGRID      = 0
    TZFIELD%NTYPE      = TYPEDATE
    TZFIELD%NDIMS      = 0
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,TPDTRELFRC(JT))
    !
    ! Relaxation
    TZFIELD%CMNHNAME   = 'TH_REL'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'K'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = ''
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 3
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTHREL(:,:,:,JT))
    TZFIELD%CMNHNAME   = 'Q_REL'//YFRC
    TZFIELD%CSTDNAME   = ''
    TZFIELD%CLONGNAME  = TRIM(TZFIELD%CMNHNAME)
    TZFIELD%CUNITS     = 'kg kg-1'
    TZFIELD%CDIR       = '--'
    TZFIELD%CCOMMENT   = ''
    TZFIELD%NGRID      = 1
    TZFIELD%NTYPE      = TYPEREAL
    TZFIELD%NDIMS      = 3
    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PRVREL(:,:,:,JT))
  ENDDO
ENDIF
!
IF (LUV_FLX) THEN
  IF ( CCONF /= 'START' .OR. CPROGRAM=='SPAWN ' ) THEN
    CALL IO_READ_FIELD(TPINIFILE,'VU_FLX',PVU_FLUX_M)
  ELSE IF (CCONF == 'START') THEN
    PVU_FLUX_M(:,:,:)=0.
  END IF
ENDIF
!
IF (LTH_FLX) THEN
  IF ( CCONF /= 'START' .OR. CPROGRAM=='SPAWN ' ) THEN
    CALL IO_READ_FIELD(TPINIFILE,'VT_FLX',PVTH_FLUX_M)
    CALL IO_READ_FIELD(TPINIFILE,'WT_FLX',PWTH_FLUX_M)
   ELSE IF (CCONF == 'START') THEN
       PWTH_FLUX_M(:,:,:)=0.
       PVTH_FLUX_M(:,:,:)=0.
   END IF
ENDIF
!
!-------------------------------------------------------------------------------
!
!
!*       3.    PRINT ON OUTPUT-LISTING
!              ----------------------
!
IF (NVERB >= 10 .AND. .NOT. L1D) THEN
  IIUP = SIZE(PUT,1)
  IJUP = SIZE(PVT,2) 
! 
  WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PUT values:'
  WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
  DO JKLOOP=1,KKU
    WRITE(ILUOUT,FMT=*) PUT(1,1,JKLOOP),PUT(IIUP/2,IJUP/2,JKLOOP), &
    PUT(IIUP,KJU,JKLOOP),JKLOOP    
  END DO
!
  WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PVT values:'
  WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
  DO JKLOOP=1,KKU
    WRITE(ILUOUT,FMT=*) PVT(1,1,JKLOOP),PVT(IIUP/2,IJUP/2,JKLOOP), &
    PVT(IIUP,IJUP,JKLOOP),JKLOOP    
  END DO
!
  WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PWT values:'
  WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
  DO JKLOOP=1,KKU
    WRITE(ILUOUT,FMT=*) PWT(1,1,JKLOOP),PWT(IIUP/2,IJUP/2,JKLOOP), &
    PWT(IIUP,IJUP,JKLOOP),JKLOOP    
  END DO
!
  WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PTHT values:'
  WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
  DO JKLOOP=1,KKU
    WRITE(ILUOUT,FMT=*) PTHT(1,1,JKLOOP),PTHT(IIUP/2,IJUP/2,JKLOOP), &
    PTHT(IIUP,IJUP,JKLOOP),JKLOOP    
  END DO
!
  IF(SIZE(PTKET,1) /=0) THEN
    WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PTKET values:'
    WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
    DO JKLOOP=1,KKU
      WRITE(ILUOUT,FMT=*) PTKET(1,1,JKLOOP),PTKET(IIUP/2,IJUP/2,JKLOOP), &
      PTKET(IIUP,IJUP,JKLOOP),JKLOOP    
    END DO
  END IF
!
  IF (SIZE(PRT,4) /= 0) THEN
    WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PRT values:'
    DO JRR = 1, SIZE(PRT,4)
      WRITE(ILUOUT,FMT=*) 'JRR = ',JRR
      WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
      DO JKLOOP=1,KKU
        WRITE(ILUOUT,FMT=*) PRT(1,1,JKLOOP,JRR),PRT(IIUP/2,IJUP/2,JKLOOP,JRR), &
        PRT(IIUP,IJUP,JKLOOP,JRR),JKLOOP    
      END DO
    END DO
!
  END IF   
!
  IF (SIZE(PSVT,4) /= 0) THEN
    WRITE(ILUOUT,FMT=*) 'READ_FIELD: Some PSVT values:'
    DO JRR = 1, SIZE(PSVT,4)
      WRITE(ILUOUT,FMT=*) 'JRR = ',JRR
      WRITE(ILUOUT,FMT=*) '(1,1,JK)   (IIU/2,IJU/2,JK)   (IIU,IJU,JK)    JK  '
      DO JKLOOP=1,KKU
        WRITE(ILUOUT,FMT=*) PSVT(1,1,JKLOOP,JRR),PSVT(IIUP/2,IJUP/2,JKLOOP,JRR), &
        PSVT(IIUP,IJUP,JKLOOP,JRR),JKLOOP    
      END DO
    END DO
!
  END IF   
END IF 
!-------------------------------------------------------------------------------
!
END SUBROUTINE READ_FIELD