Skip to content

Commit

Permalink
Have gpu/SETUP_TRANS match the interface with new LD_ALL_FFTW option
Browse files Browse the repository at this point in the history
  • Loading branch information
samhatfield committed Feb 5, 2025
1 parent 2c5b1c0 commit 37f1a83
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/trans/gpu/external/setup_trans.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
& KTMAX,KRESOL,PWEIGHT,LDGRIDONLY,LDUSERPNM,LDKEEPRPNM,LDUSEFLT,&
& LDSPSETUPONLY,LDPNMONLY,LDUSEFFTW,&
& LDSPSETUPONLY,LDPNMONLY,LDUSEFFTW,LD_ALL_FFTW,&
& LDLL,LDSHIFTLL,CDIO_LEGPOL,CDLEGPOLFNAME,KLEGPOLPTR,KLEGPOLPTR_LEN)

!**** *SETUP_TRANS* - Setup transform package for specific resolution
Expand All @@ -37,7 +37,8 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
! LDSPLIT - true if split latitudes in grid-point space [false]
! KTMAX - truncation order for tendencies?
! KRESOL - the resolution identifier
! PWEIGHT - the weight per grid-point (for a weighted distribution)
! PWEIGHT - the weight per grid-point (for a weighted distribution);
! Note, only seems to be used from within enkf
! LDGRIDONLY - true if only grid space is required

! KSMAX,KDGL,KTMAX and KLOEN are GLOBAL variables desribing the resolution
Expand All @@ -53,7 +54,8 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
! LDKEEPRPNM - Keep Legendre Polynomials (only applicable when using
! FLT, otherwise always kept)
! LDPNMONLY - Compute the Legendre polynomials only, not the FFTs.
! LDUSEFFTW - Use FFTW for FFTs
! LDUSEFFTW - Use FFTW for FFTs (option deprecated - FFTW is now mandatory)
! LD_ALL_FFTW : T to transform all fields in one call, F to transforms fields one after another
! LDLL - Setup second set of input/output latitudes
! the number of input/output latitudes to transform is equal KDGL
! or KDGL+2 in the case that includes poles + equator
Expand Down Expand Up @@ -96,6 +98,7 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
! G. Mozdzynski : Jun 2015 Support alternative FFTs to FFTW
! M.Hamrud/W.Deconinck : July 2015 IO options for Legenndre polynomials
! R. El Khatib 07-Mar-2016 Better flexibility for Legendre polynomials computation in stretched mode
! R. El Khatib 08-Jun-2023 LALL_FFTW for better flexibility
! ------------------------------------------------------------------

USE PARKIND1, ONLY: JPIM, JPRB, JPRD
Expand Down Expand Up @@ -145,6 +148,7 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
REAL(KIND=JPRD) ,OPTIONAL,INTENT(IN) :: PSTRET
LOGICAL ,OPTIONAL,INTENT(IN):: LDGRIDONLY
LOGICAL ,OPTIONAL,INTENT(IN):: LDUSEFLT
LOGICAL ,OPTIONAL,INTENT(IN):: LD_ALL_FFTW
LOGICAL ,OPTIONAL,INTENT(IN):: LDUSERPNM
LOGICAL ,OPTIONAL,INTENT(IN):: LDKEEPRPNM
LOGICAL ,OPTIONAL,INTENT(IN):: LDSPSETUPONLY
Expand Down Expand Up @@ -394,6 +398,10 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
! Setup distribution independent dimensions
CALL SETUP_DIMS

IF(PRESENT(LD_ALL_FFTW)) THEN
WRITE(NOUT,*) 'SETUP_TRANS: LD_ALL_FFTW option is not relevant for GPUs'
ENDIF

S%LSOUTHPNM=.FALSE.
IF(PRESENT(PSTRET)) THEN
IF (ABS(PSTRET-1.0_JPRBT)>100._JPRBT*EPSILON(1._JPRBT)) THEN
Expand Down

0 comments on commit 37f1a83

Please sign in to comment.