prfi2b_mod.F90 Source File


This file depends on

sourcefile~~prfi2b_mod.f90~~EfferentGraph sourcefile~prfi2b_mod.f90 prfi2b_mod.F90 sourcefile~tpm_dim.f90 tpm_dim.F90 sourcefile~prfi2b_mod.f90->sourcefile~tpm_dim.f90 sourcefile~tpm_distr.f90 tpm_distr.F90 sourcefile~prfi2b_mod.f90->sourcefile~tpm_distr.f90 sourcefile~tpm_geometry.f90 tpm_geometry.F90 sourcefile~prfi2b_mod.f90->sourcefile~tpm_geometry.f90 sourcefile~tpm_trans.f90 tpm_trans.F90 sourcefile~prfi2b_mod.f90->sourcefile~tpm_trans.f90 sourcefile~parkind_ectrans.f90 parkind_ectrans.F90 sourcefile~tpm_geometry.f90->sourcefile~parkind_ectrans.f90 sourcefile~growing_allocator_mod.f90 growing_allocator_mod.F90 sourcefile~tpm_trans.f90->sourcefile~growing_allocator_mod.f90 sourcefile~tpm_trans.f90->sourcefile~parkind_ectrans.f90

Files dependent on this one

sourcefile~~prfi2b_mod.f90~~AfferentGraph sourcefile~prfi2b_mod.f90 prfi2b_mod.F90 sourcefile~prfi2_mod.f90 prfi2_mod.F90 sourcefile~prfi2_mod.f90->sourcefile~prfi2b_mod.f90 sourcefile~ltdir_mod.f90~2 ltdir_mod.F90 sourcefile~ltdir_mod.f90~2->sourcefile~prfi2_mod.f90

Source Code

! (C) Copyright 1990- ECMWF.
! (C) Copyright 1990- Meteo-France.
! 
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
! In applying this licence, ECMWF does not waive the privileges and immunities
! granted to it by virtue of its status as an intergovernmental organisation
! nor does it submit to any jurisdiction.
!

MODULE PRFI2B_MOD
CONTAINS
SUBROUTINE PRFI2B(KFIELD,KM,KMLOC,PAIA,PSIA)

!**** *PRFI2B* - Prepare input work arrays for direct transform

!     Purpose.
!     --------
!        To extract the Fourier fields for a specific zonal wavenumber
!        and put them in an order suitable for the direct Legendre
!        tranforms, i.e. split into symmetric and anti-symmetric part.

!**   Interface.
!     ----------
!     *CALL* *PRFI2B(..)

!        Explicit arguments :
!        -------------------   KFIELD - number of fields
!                              KM - zonal wavenumber
!                              KMLOC - local zonal wavenumber
!                              PAOA - antisymmetric part of Fourier
!                              fields for zonal wavenumber KM
!                              PSOA - symmetric part of Fourier
!                              fields for zonal wavenumber KM

!        Implicit arguments :  FOUBUF in TPM_TRANS
!        --------------------

!     Method.
!     -------

!     Externals.   None.
!     ----------

!     Reference.
!     ----------
!        ECMWF Research Department documentation of the IFS

!     Author.
!     -------
!        Mats Hamrud and Philippe Courtier  *ECMWF*

!     Modifications.
!     --------------
!        Original : 90-07-01
!        MPP Group: 95-10-01 Support for Distributed Memory version
!        Modified : 04/06/99 D.Salmond : change order of AIA and SIA
!     ------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPIM     ,JPRB

USE TPM_DIM         ,ONLY : R
USE TPM_TRANS       ,ONLY : FOUBUF
USE TPM_GEOMETRY    ,ONLY : G
USE TPM_DISTR       ,ONLY : D
!

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)  :: KFIELD,KM,KMLOC
REAL(KIND=JPRB)  , INTENT(OUT) :: PSIA(:,:),   PAIA(:,:)

!     LOCAL INTEGER SCALARS
INTEGER(KIND=JPIM) :: IGLS,  ISL, ISTAN, ISTAS, JF, JGL


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

!*       1.    EXTRACT SYM./ANTISYM. FIELDS FROM FOURIER ARRAY.
!              ------------------------------------------------

ISL = MAX(R%NDGNH-G%NDGLU(KM)+1,1)

DO JGL=ISL,R%NDGNH
  IGLS = R%NDGL+1-JGL
  ISTAN = (D%NSTAGT1B(D%NPROCL(JGL) )+D%NPNTGTB1(KMLOC,JGL ))*2*KFIELD
  ISTAS = (D%NSTAGT1B(D%NPROCL(IGLS))+D%NPNTGTB1(KMLOC,IGLS))*2*KFIELD
!DIR$ IVDEP
!OCL    NOVREC
  DO JF=1,KFIELD*2
    PSIA(JF,JGL) = FOUBUF(ISTAN+JF)+FOUBUF(ISTAS+JF)
    PAIA(JF,JGL) = FOUBUF(ISTAN+JF)-FOUBUF(ISTAS+JF)
  ENDDO
ENDDO

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

END SUBROUTINE PRFI2B
END MODULE PRFI2B_MOD