LMDZ
sumplatf_mod.F90
Go to the documentation of this file.
2 CONTAINS
3 SUBROUTINE sumplatf(KDGL,KPROCA,KMYSETA,&
4  &kultpp,kprocl,kptrls)
5 
6 !**** *SUMPLATF * - Initialize fourier space distibution in N-S direction
7 
8 ! Purpose.
9 ! --------
10 
11 
12 !** Interface.
13 ! ----------
14 ! *CALL* *SUMPLATF *
15 
16 ! Explicit arguments - input :
17 ! --------------------
18 ! KDGL -last latitude
19 ! KPROCA -number of processors in A direction
20 ! KMYSETA -process number in A direction
21 
22 ! Explicit arguments - output:
23 ! --------------------
24 
25 ! KULTPP -number of latitudes in process
26 ! (in Fourier space)
27 ! KPROCL -process responsible for latitude
28 ! (in Fourier space)
29 ! KPTRLS -pointer to first global latitude
30 ! of process (in Fourier space)
31 
32 ! Implicit arguments :
33 ! --------------------
34 
35 
36 ! Method.
37 ! -------
38 ! See documentation
39 
40 ! Externals. SUMPLATB and SUEMPLATB.
41 ! ----------
42 
43 ! Reference.
44 ! ----------
45 ! ECMWF Research Department documentation of the IFS
46 
47 ! Author.
48 ! -------
49 ! MPP Group *ECMWF*
50 
51 ! Modifications.
52 ! --------------
53 ! Original : 95-10-01
54 ! David Dent:97-06-02 parameters KFRSTLAT etc added
55 ! JF. Estrade:97-11-13 Adaptation to ALADIN case
56 ! J.Boutahar: 98-07-06 phasing with CY19
57 ! Modified 98-08-10 by K. YESSAD: removal of LRPOLE option + cleanings
58 ! (correct computation of extrapolar latitudes for KPROCL).
59 ! Modified 98-12-07 by K. YESSAD and C. FISCHER: cleaning.
60 ! - merge old sumplat.F and suemplat.F
61 ! - gather 'lelam' code and 'not lelam' code.
62 ! - clean (useless duplication of variables, non doctor features).
63 ! - remodularise according to lelam/not lelam
64 ! -> lelam features in new routine suemplatb.F,
65 ! not lelam features in new routine sumplatb.F
66 ! ------------------------------------------------------------------
67 
68 USE parkind1 ,ONLY : jpim ,jprb
69 
70 use tpm_geometry
71 
72 use sumplatb_mod
73 
74 
75 IMPLICIT NONE
76 
77 
78 ! * DUMMY:
79 INTEGER(KIND=JPIM),INTENT(IN) :: KDGL
80 INTEGER(KIND=JPIM),INTENT(IN) :: KPROCA
81 INTEGER(KIND=JPIM),INTENT(IN) :: KMYSETA
82 INTEGER(KIND=JPIM),INTENT(OUT) :: KULTPP(:)
83 INTEGER(KIND=JPIM),INTENT(OUT) :: KPROCL(:)
84 INTEGER(KIND=JPIM),INTENT(OUT) :: KPTRLS(:)
85 
86 ! * LOCAL:
87 INTEGER(KIND=JPIM) :: INDIC(kproca),ILAST(kproca)
88 
89 ! LOCAL INTEGER SCALARS
90 INTEGER(KIND=JPIM) :: IA, ILAT, ISTART, IMEDIAP,IRESTM, JA, JLTLOC
91 LOGICAL :: LLSPLIT
92 
93 ! -----------------------------------------------------------------
94 
95 !* 1. CODE DEPENDING ON 'LELAM': COMPUTATION OF
96 ! KMEDIAP, KRESTM, INDIC, ILAST.
97 ! -----------------------------------------
98 
99 llsplit = .false.
100 
101 CALL sumplatb(1,kdgl,kproca,g%NLOEN,llsplit,&
102  &imediap,irestm,indic,ilast)
103 
104 ! -----------------------------------------------------------------
105 
106 !* 2. CODE NOT DEPENDING ON 'LELAM':
107 ! ------------------------------
108 
109 
110 
111 ! * Definitions related to distribution of latitudes along sets
112 ! ------------ in fourier-space -----------------------------
113 istart = 0
114 kultpp(1) = ilast(1)
115 DO ja=1,kproca
116  IF(ja > 1) THEN
117  IF(ilast(ja) /= 0) THEN
118  kultpp(ja) = ilast(ja)-ilast(ja-1)
119  ELSE
120  kultpp(ja) = 0
121  ENDIF
122  ENDIF
123  DO jltloc=1,kultpp(ja)
124  ilat = istart + jltloc
125  kprocl(ilat) = ja
126  ENDDO
127  istart = istart + kultpp(ja)
128 ENDDO
129 
130 ! * Computes KPTRLS.
131 
132 ia = kprocl(1)
133 kptrls(ia) = 1
134 DO ja=ia+1,kproca
135  kptrls(ja) = kptrls(ja-1) + kultpp(ja-1)
136 ENDDO
137 
138 END SUBROUTINE sumplatf
139 END MODULE sumplatf_mod
!$Id mode_top_bound COMMON comconstr g
Definition: comconst.h:7
subroutine sumplatf(KDGL, KPROCA, KMYSETA, KULTPP, KPROCL, KPTRLS)
Definition: sumplatf_mod.F90:5
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL false
Definition: calcul_STDlev.h:26
integer, parameter jprb
Definition: parkind1.F90:31
integer, parameter jpim
Definition: parkind1.F90:13
subroutine sumplatb(KDGSA, KDGL, KPROCA, KLOENG, LDSPLIT, KMEDIAP, KRESTM, KINDIC, KLAST)
Definition: sumplatb_mod.F90:5