egpnorm_trans.F90 Source File


This file depends on

sourcefile~~egpnorm_trans.f90~~EfferentGraph sourcefile~egpnorm_trans.f90 egpnorm_trans.F90 sourcefile~eset_resol_mod.f90 eset_resol_mod.F90 sourcefile~egpnorm_trans.f90->sourcefile~eset_resol_mod.f90 sourcefile~gpnorm_trans_ctl_mod.f90 gpnorm_trans_ctl_mod.F90 sourcefile~egpnorm_trans.f90->sourcefile~gpnorm_trans_ctl_mod.f90 sourcefile~tpm_dim.f90 tpm_dim.F90 sourcefile~egpnorm_trans.f90->sourcefile~tpm_dim.f90 sourcefile~tpm_geometry.f90 tpm_geometry.F90 sourcefile~egpnorm_trans.f90->sourcefile~tpm_geometry.f90 sourcefile~eset_resol_mod.f90->sourcefile~tpm_dim.f90 sourcefile~eset_resol_mod.f90->sourcefile~tpm_geometry.f90 sourcefile~abort_trans_mod.f90 abort_trans_mod.F90 sourcefile~eset_resol_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~tpm_distr.f90 tpm_distr.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpm_distr.f90 sourcefile~tpm_fftw.f90 tpm_fftw.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpm_fftw.f90 sourcefile~tpm_fields.f90 tpm_fields.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpm_fields.f90 sourcefile~tpm_gen.f90 tpm_gen.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpm_gen.f90 sourcefile~tpmald_dim.f90 tpmald_dim.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpmald_dim.f90 sourcefile~tpmald_distr.f90 tpmald_distr.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpmald_distr.f90 sourcefile~tpmald_fields.f90 tpmald_fields.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpmald_fields.f90 sourcefile~tpmald_geo.f90 tpmald_geo.F90 sourcefile~eset_resol_mod.f90->sourcefile~tpmald_geo.f90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~tpm_dim.f90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~tpm_geometry.f90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~set2pe_mod.f90 set2pe_mod.F90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~set2pe_mod.f90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~tpm_distr.f90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~tpm_gen.f90 sourcefile~tpm_trans.f90 tpm_trans.F90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~tpm_trans.f90 sourcefile~trgtol_mod.f90 trgtol_mod.F90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~trgtol_mod.f90 sourcefile~abort_trans_mod.f90->sourcefile~tpm_gen.f90 sourcefile~set2pe_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~set2pe_mod.f90->sourcefile~tpm_distr.f90 sourcefile~eq_regions_mod.f90 eq_regions_mod.F90 sourcefile~set2pe_mod.f90->sourcefile~eq_regions_mod.f90 sourcefile~growing_allocator_mod.f90 growing_allocator_mod.F90 sourcefile~tpm_trans.f90->sourcefile~growing_allocator_mod.f90 sourcefile~parkind_ectrans.f90 parkind_ectrans.F90 sourcefile~tpm_trans.f90->sourcefile~parkind_ectrans.f90 sourcefile~trgtol_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~trgtol_mod.f90->sourcefile~tpm_distr.f90 sourcefile~trgtol_mod.f90->sourcefile~tpm_gen.f90 sourcefile~trgtol_mod.f90->sourcefile~tpm_trans.f90 sourcefile~buffered_allocator_mod.f90 buffered_allocator_mod.F90 sourcefile~trgtol_mod.f90->sourcefile~buffered_allocator_mod.f90 sourcefile~trgtol_mod.f90->sourcefile~eq_regions_mod.f90 sourcefile~trgtol_mod.f90->sourcefile~parkind_ectrans.f90 sourcefile~pe2set_mod.f90 pe2set_mod.F90 sourcefile~trgtol_mod.f90->sourcefile~pe2set_mod.f90 sourcefile~tpm_stats.f90 tpm_stats.F90 sourcefile~trgtol_mod.f90->sourcefile~tpm_stats.f90 sourcefile~buffered_allocator_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~buffered_allocator_mod.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 sourcefile~pe2set_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~pe2set_mod.f90->sourcefile~tpm_distr.f90 sourcefile~pe2set_mod.f90->sourcefile~eq_regions_mod.f90

Source Code

! (C) Copyright 2001- ECMWF.
! (C) Copyright 2001- 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.
! 


SUBROUTINE EGPNORM_TRANS(PGP,KFIELDS,KPROMA,PAVE,PMIN,PMAX,LDAVE_ONLY,KRESOL)


!**** *EGPNORM_TRANS* - calculate grid-point norms

!     Purpose.
!     --------
!        calculate grid-point norms

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

!     Explicit arguments :
!     --------------------
!     PGP(:,:,:) - gridpoint fields (input)
!                  PGP is  dimensioned (NPROMA,KFIELDS,NGPBLKS) where
!                  NPROMA is the blocking factor, KFIELDS the total number
!                  of fields and NGPBLKS the number of NPROMA blocks.
!     KFIELDS     - number of fields (input)
!                   (these do not have to be just levels)
!     KPROMA      - required blocking factor (input)
!     PAVE        - average (output)
!     PMIN        - minimum (input/output)
!     PMAX        - maximum (input/output)
!     LDAVE_ONLY  - T : PMIN and PMAX already contain local MIN and MAX
!     KRESOL      -  resolution tag (optional)
!                    default assumes first defined resolution
!

!     Author.
!     -------
!        George Mozdzynski *ECMWF*

!     Modifications.
!     --------------
!        Original : 19th Sept 2008
!        R. El Khatib 07-08-2009 Optimisation directive for NEC
!        R. El Khatib 16-Sep-2019 merge with global model code
!     ------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPIM     ,JPRB, JPRD

!ifndef INTERFACE

USE TPM_DIM         ,ONLY : R
USE TPM_GEOMETRY    ,ONLY : G
USE TPM_DIM         ,ONLY : R
USE ESET_RESOL_MOD  ,ONLY : ESET_RESOL
USE GPNORM_TRANS_CTL_MOD, ONLY : GPNORM_TRANS_CTL
USE YOMHOOK         ,ONLY : LHOOK,   DR_HOOK, JPHOOK

!endif INTERFACE

IMPLICIT NONE

! Declaration of arguments

REAL(KIND=JPRB)   ,INTENT(IN)    :: PGP(:,:,:)
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PAVE(:)
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PMIN(:)
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PMAX(:)
INTEGER(KIND=JPIM),INTENT(IN)    :: KFIELDS
INTEGER(KIND=JPIM),INTENT(IN)    :: KPROMA
LOGICAL           ,INTENT(IN)    :: LDAVE_ONLY
INTEGER(KIND=JPIM),OPTIONAL, INTENT(IN)  :: KRESOL

!ifndef INTERFACE

CHARACTER(LEN=80) :: CLENV
REAL(KIND=JPRD) :: ZW(R%NDGL)
REAL(KIND=JPHOOK) :: ZHOOK_HANDLE

IF (LHOOK) CALL DR_HOOK('EGPNORM_TRANS',0,ZHOOK_HANDLE)

! Set current resolution
CALL ESET_RESOL(KRESOL)

CALL GET_ENVIRONMENT_VARIABLE("EGPNORM_OLD",CLENV)
IF (LEN_TRIM(CLENV) > 0) THEN
  ZW(:) = 1._JPRD/G%NLOEN
ELSE
  ZW(:) = 1._JPRD/R%NDGL
ENDIF

CALL GPNORM_TRANS_CTL(PGP,KFIELDS,KPROMA,PAVE,PMIN,PMAX,LDAVE_ONLY,ZW)

IF (LHOOK) CALL DR_HOOK('EGPNORM_TRANS',1,ZHOOK_HANDLE)

!endif INTERFACE

END SUBROUTINE EGPNORM_TRANS