Skip to content

Commit 6843ecc

Browse files
committed
Have gpu/SETUP_TRANS match the interface with new LD_ALL_FFTW option
1 parent 3e2cefc commit 6843ecc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/trans/gpu/external/setup_trans.F90

+11-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

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

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

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

101104
USE PARKIND1, ONLY: JPIM, JPRB, JPRD
@@ -145,6 +148,7 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
145148
REAL(KIND=JPRD) ,OPTIONAL,INTENT(IN) :: PSTRET
146149
LOGICAL ,OPTIONAL,INTENT(IN):: LDGRIDONLY
147150
LOGICAL ,OPTIONAL,INTENT(IN):: LDUSEFLT
151+
LOGICAL ,OPTIONAL,INTENT(IN):: LD_ALL_FFTW
148152
LOGICAL ,OPTIONAL,INTENT(IN):: LDUSERPNM
149153
LOGICAL ,OPTIONAL,INTENT(IN):: LDKEEPRPNM
150154
LOGICAL ,OPTIONAL,INTENT(IN):: LDSPSETUPONLY
@@ -394,6 +398,10 @@ SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KDLON,KLOEN,LDSPLIT,PSTRET,&
394398
! Setup distribution independent dimensions
395399
CALL SETUP_DIMS
396400

401+
IF(PRESENT(LD_ALL_FFTW)) THEN
402+
WRITE(NOUT,*) 'SETUP_TRANS: LD_ALL_FFTW option is not relevant for GPUs'
403+
ENDIF
404+
397405
S%LSOUTHPNM=.FALSE.
398406
IF(PRESENT(PSTRET)) THEN
399407
IF (ABS(PSTRET-1.0_JPRBT)>100._JPRBT*EPSILON(1._JPRBT)) THEN

0 commit comments

Comments
 (0)