eftdir_mod.F90 Source File


This file depends on

sourcefile~~eftdir_mod.f90~~EfferentGraph sourcefile~eftdir_mod.f90 eftdir_mod.F90 sourcefile~abort_trans_mod.f90 abort_trans_mod.F90 sourcefile~eftdir_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~buffered_allocator_mod.f90 buffered_allocator_mod.F90 sourcefile~eftdir_mod.f90->sourcefile~buffered_allocator_mod.f90 sourcefile~ftdir_mod.f90 ftdir_mod.F90 sourcefile~eftdir_mod.f90->sourcefile~ftdir_mod.f90 sourcefile~tpm_dim.f90 tpm_dim.F90 sourcefile~eftdir_mod.f90->sourcefile~tpm_dim.f90 sourcefile~tpm_distr.f90 tpm_distr.F90 sourcefile~eftdir_mod.f90->sourcefile~tpm_distr.f90 sourcefile~tpm_gen.f90 tpm_gen.F90 sourcefile~eftdir_mod.f90->sourcefile~tpm_gen.f90 sourcefile~tpm_hicfft.f90 tpm_hicfft.F90 sourcefile~eftdir_mod.f90->sourcefile~tpm_hicfft.f90 sourcefile~tpmald_dim.f90 tpmald_dim.F90 sourcefile~eftdir_mod.f90->sourcefile~tpmald_dim.f90 sourcefile~abort_trans_mod.f90->sourcefile~tpm_gen.f90 sourcefile~buffered_allocator_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~growing_allocator_mod.f90 growing_allocator_mod.F90 sourcefile~buffered_allocator_mod.f90->sourcefile~growing_allocator_mod.f90 sourcefile~ftdir_mod.f90->sourcefile~tpm_dim.f90 sourcefile~ftdir_mod.f90->sourcefile~tpm_distr.f90 sourcefile~tpm_fftw.f90 tpm_fftw.F90 sourcefile~ftdir_mod.f90->sourcefile~tpm_fftw.f90 sourcefile~tpm_geometry.f90 tpm_geometry.F90 sourcefile~ftdir_mod.f90->sourcefile~tpm_geometry.f90 sourcefile~tpm_hicfft.f90->sourcefile~growing_allocator_mod.f90 sourcefile~growing_allocator_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~growing_allocator_mod.f90->sourcefile~tpm_gen.f90

Files dependent on this one

sourcefile~~eftdir_mod.f90~~AfferentGraph sourcefile~eftdir_mod.f90 eftdir_mod.F90 sourcefile~edir_trans_ctl_mod.f90 edir_trans_ctl_mod.F90 sourcefile~edir_trans_ctl_mod.f90->sourcefile~eftdir_mod.f90 sourcefile~edir_trans.f90 edir_trans.F90 sourcefile~edir_trans.f90->sourcefile~edir_trans_ctl_mod.f90 sourcefile~edir_trans.f90~2 edir_trans.F90 sourcefile~edir_trans.f90~2->sourcefile~edir_trans_ctl_mod.f90

Source Code

MODULE EFTDIR_MOD
CONTAINS
SUBROUTINE EFTDIR(ALLOCATOR,HFTDIR,PREEL,PREEL_COMPLEX,KF_FS,AUX_PROC)

USE PARKIND1  ,ONLY : JPIM, JPRB, JPIB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK, JPHOOK

USE TPM_GEN,                ONLY: NCUR_RESOL
USE TPM_DISTR       ,ONLY : D
USE TPM_DIM         ,ONLY : R
USE TPMALD_DIM      ,ONLY : RALD

USE TPM_HICFFT      ,ONLY : EXECUTE_DIR_FFT
USE FTDIR_MOD, ONLY : FTDIR_HANDLE

USE ABORT_TRANS_MOD ,ONLY : ABORT_TRANS

USE ISO_C_BINDING
USE BUFFERED_ALLOCATOR_MOD

!

IMPLICIT NONE

TYPE(BUFFERED_ALLOCATOR), INTENT(IN) :: ALLOCATOR
TYPE(FTDIR_HANDLE) :: HFTDIR
INTEGER(KIND=JPIM), INTENT(IN)  :: KF_FS
REAL(KIND=JPRB),    INTENT(INOUT), POINTER  :: PREEL(:)   ! (IRLEN+2)*NDGLG*KF_FS
REAL(KIND=JPRB),    INTENT(OUT), POINTER  :: PREEL_COMPLEX(:)
EXTERNAL AUX_PROC
OPTIONAL AUX_PROC

INTEGER(KIND=JPIM) :: JLOT, IRLEN

REAL(KIND=JPRB) :: ZDUM
INTEGER(KIND=JPIM) :: INUL

REAL(KIND=JPRB), POINTER, SAVE :: ZREEL(:), ZREEL_COMPLEX(:)

REAL(KIND=JPHOOK) :: ZHOOK_HANDLE

!     ------------------------------------------------------------------

!*       1.       PERFORM LEGENDRE TRANFORM.
!                 --------------------------

IF (LHOOK) CALL DR_HOOK('ELEINV_MOD:ELEINV',0,ZHOOK_HANDLE)

IRLEN=R%NDLON+R%NNOEXTZG


#ifdef IN_PLACE_FFT
    PREEL_COMPLEX => PREEL
#else
    CALL ASSIGN_PTR(PREEL_COMPLEX, GET_ALLOCATION(ALLOCATOR, HFTDIR%HREEL_COMPLEX),&
      & 1_JPIB, 1_JPIB*KF_FS*D%NLENGTF*C_SIZEOF(PREEL_COMPLEX(1)))
#endif



! Periodization of auxiliary fields in x direction
IF(R%NNOEXTZL>0) THEN
  !!! FIXME !!! CALL EXTPER(PREEL,R%NDLON+R%NNOEXTZL,1,R%NDLON,KF_FS,D%NDGL_FS,D%NSTAGTF,0)
  CALL ABORT('FIXME')
ENDIF
IF (PRESENT(AUX_PROC)) THEN
  !!! FIXME !!! CALL AUX_PROC(PREEL,ZDUM,KF_FS,D%NLENGTF,1,D%NDGL_FS,0,.TRUE.,&
  !!! FIXME !!!  & D%NSTAGTF,INUL,INUL,INUL)
  CALL ABORT('FIXME')
ENDIF


JLOT=SIZE(PREEL)/(IRLEN+2)

IF (JLOT==0) THEN
  IF (LHOOK) CALL DR_HOOK('ELEINV_MOD:ELEINV',1,ZHOOK_HANDLE)
  RETURN
ENDIF

!$ACC DATA PRESENT(PREEL,RALD%NLOENS_LON,RALD%NOFFSETS_LON)

CALL EXECUTE_DIR_FFT(PREEL,PREEL_COMPLEX,NCUR_RESOL,JLOT, &
    & LOENS=RALD%NLOENS_LON, &
    & OFFSETS=RALD%NOFFSETS_LON,ALLOC=ALLOCATOR%PTR)

!$ACC END DATA


IF (LHOOK) CALL DR_HOOK('EFTDIR_MOD:EFTDIR',1,ZHOOK_HANDLE)

END SUBROUTINE EFTDIR
END MODULE EFTDIR_MOD