!--------------------------------------------------------------------------------------------------
!  DOXYGEN
!> @brief Inserir Brief de DASSIM
!> @details Inserir Details de DASSIM 
!> @author ORIGINATOR - ????? 
!> @date ??-??-?? \n
!> @author LUCCI 
!> @date 18-03-20 \n
!> @version V1.1.0
!> @details MODERNIZATION OF THE CODE, INCLUDING:
!!                      * F77 TO F90/F95
!!                      * INDENTATION & UNIFORMIZATION CODE
!!                      * REPLACEMENT OF COMMONS BLOCK FOR MODULES
!!                      * DOCUMENTATION WITH DOXYGEN
!!                      * OPENMP FUNCTIONALITY 
!<
!> @param[in] K - Significado de K
!> @details <b>Use Module:</b> 
!! @arg @c F77KINDS
!! @arg @c MPPSTAFF
!! @arg @c PARMETA
!! @arg @c VRBLS
!> @details <b>Driver:</b> 
!<
!> @details <b>Calls:</b>
!! @arg @c BOCOHMPI
!! @arg @c BOCOVMPI
!--------------------------------------------------------------------------------------------------
    SUBROUTINE DASSIM(K)
!--------------------------------------------------------------------------------------------------
! SUBROUTINE DASSIM
! 
! SUBPROGRAM: DASSIM - ?????
! PROGRAMMER: ?????          
! ORG: W/NP22
! DATE: ??-??-??
!
! ABSTRACT:
! ?????
!
! PROGRAM HISTORY LOG:
! ??-??-??  ?????      - ORIGINATOR
! 18-03-20  LUCCI      - MODERNIZATION OF THE CODE, INCLUDING:
!                        * F77 TO F90/F95
!                        * INDENTATION & UNIFORMIZATION CODE
!                        * REPLACEMENT OF COMMONS BLOCK FOR MODULES
!                        * DOCUMENTATION WITH DOXYGEN
!                        * OPENMP FUNCTIONALITY
!
! INPUT ARGUMENT LIST:
! K -
!
! OUTPUT ARGUMENT LIST:
! NONE
!
! INPUT/OUTPUT ARGUMENT LIST:
! NONE
!
! USE MODULES: F77KINDS
!              MPPSTAFF
!              PARMETA
!              VRBLS 
! 
! DRIVER     : -----
!
! CALLS      : BOCOHMPI
!              BOCOVMPI
!--------------------------------------------------------------------------------------------------
    USE F77KINDS
    USE MPPSTAFF
    USE PARMETA
    USE VRBLS
!
    IMPLICIT NONE
!
    INTEGER(KIND=I4)                                                      , INTENT(IN)          ::&
    & K
    INTEGER(KIND=I4)                                                                            ::&
    & I       , J
!
    CHARACTER(LEN=2)                                                                            ::&
    & C_K
!
    CHARACTER(LEN=256)                                                                          ::&
    & FNAME
!
    REAL   (KIND=R4)    , DIMENSION(:,:)    , ALLOCATABLE                                       ::&
    & DUM1
!
    REAL   (KIND=R4)    , DIMENSION(:,:,:)  , ALLOCATABLE                                       ::&
    & DUM2
!
    REAL   (KIND=R4)    , PARAMETER :: W1 = 0.
!
    ALLOCATE (DUM1(0:IM+1, 0:JM+1))
!
    ALLOCATE (DUM2(0:IM+1, 0:JM+1, LM))
!
    WRITE(C_K,'(I2.2)') K
!
    FNAME = "../data/data_in/vrbls"//C_K//"."//C_MYPE
!
    IF (MYPE == 0) THEN
        PRINT *,'DATA ASSIM,',FNAME
    END IF
!
    OPEN(51, FILE=TRIM(FNAME), FORM='UNFORMATTED')
!
    READ(51) DUM1
    PD = W1 * PD + (1-W1) * DUM1
!
    READ(51) DUM2
    T  = W1 * T  + (1-W1) * DUM2
!
    READ(51) DUM2
    Q  = W1 * Q  + (1-W1) * DUM2
!
    READ(51) DUM2
    U  = W1 * U  + (1-W1) * DUM2
!
    READ(51) DUM2
    V  = W1 * V  + (1-W1) * DUM2
!
    CLOSE(51)
!
    CALL BOCOHMPI(PD, 1)
    CALL BOCOHMPI(T , LM)
    CALL BOCOHMPI(Q , LM)
    CALL BOCOVMPI(U , V , LM)
!
    DEALLOCATE(DUM1, DUM2)
!
    END SUBROUTINE DASSIM
