LMDZ
yomfpc.F90
Go to the documentation of this file.
1 MODULE yomfpc
2 
3 USE parkind1 ,ONLY : jpim ,jprb
4 
5 USE parfpos, ONLY : jpos2df ,jpos3df ,jpos3h ,jpos3p ,jpos3pv , &
7  & jpossgp ,jposxfu
8 
9 IMPLICIT NONE
10 
11 SAVE
12 
13 ! ------------------------------------------------------------------
14 
15 !* Scientific and technical variables
16 
17 ! === TECHNICAL VARIABLES ===
18 
19 ! CFPDIR : prefix (path) for the output files
20 ! CFPIDEN: identificator of the output files
21 ! CFPFMT : format of the output files ('MODEL','GAUSS','LELAM' or 'LALON')
22 ! CFPDOM, C1FPDOM : names of the subdomains
23 ! CFP3DF, C1FP3DF : names 3D dynamics fields to compute
24 ! CFP3DFS,C1FP3DFS: names 3D dynamics fields to compute on model levels
25 ! CFP3DFP,C1FP3DFP: names 3D dynamics fields to compute on Pressure levels
26 ! CFP3DFH,C1FP3DFH: names 3D dynamics fields to compute on H levels
27 ! CFP3DFT,C1FP3DFT: names 3D dynamics fields to compute on THETA levels
28 ! CFP3DFV,C1FP3DFV: names 3D dynamics fields to compute on PV levels
29 ! CFP2DF, C1FP2DF : names 2D dynamics fields to compute
30 ! CFPPHY, C1FPPHY : names of physical fields to be post-processed
31 ! CFPCFU, C1FPCFU : names of cumulated fluxes fields to be post-processed
32 ! CFPXFU, C1FPXFU : names of instantaneous fluxes fields to be post-proc
33 ! Remark: C1FPXXX=CFPXXX(1)//CFPXXX(2)//...//CFPXXX(JPOSXXX)
34 ! for XXX=DOM,3DF,2DF,PHY,CFU,XFU.
35 
36 ! Variables used for ECMWF
37 
38 ! MFP3DFS: Gribcodes of 3D dynamics fields to compute on model levels
39 ! MFP3DFH: Gribcodes of 3D dynamics fields to compute on H levels
40 ! MFP3DFT: Gribcodes of 3D dynamics fields to compute on THETA levels
41 ! MFP3DFV: Gribcodes of 3D dynamics fields to compute on PV levels
42 ! MFP3DFP: Gribcodes of 3D dynamics fields to compute on P levels
43 ! MFP2DF : Gribcodes of 2D dynamics fields to compute
44 ! MFPPHY : Gribcodes of physical fields to processed
45 
46 ! RFP3P : post-processing pressure levels
47 ! RFP3H : post-processing height (above orography) levels
48 ! RFP3TH : post-processing potential temperature levels
49 ! RFP3PV : post-processing potential vorticity levels
50 ! NRFP3S : post-processing eta levels (CONF. 927 only)
51 
52 ! LFPCNT : control varying output variables according to time step
53 ! LTRACEFP: trace for Full-POS
54 ! NFPGRIB : level of GRIB coding in output file ARPEGE/ALADIN.
55 ! 0 : no packing at all
56 ! 1 : standart GRIB encoding
57 ! 2 : modified GRIB encoding
58 
59 ! NFPDOM : useful dimension of CFPDOM
60 ! NFP3DF : useful dimension of CFP3DF
61 ! NFP3DFS: useful dimension of CFP3DFS
62 ! NFP3DFH: useful dimension of CFP3DFH
63 ! NFP3DFT: useful dimension of CFP3DFT
64 ! NFP3DFV: useful dimension of CFP3DFV
65 ! NFP3DFP: useful dimension of CFP3DFP
66 ! NFP2DF : useful dimension of CFP2DF
67 ! NFPPHY : useful dimension of CFPPHY
68 ! NFPCFU : useful dimension of CFPCFU
69 ! NFPXFU : useful dimension of CFPXFU
70 ! NFP3P : useful dimension of RFP3P
71 ! NFP3H : useful dimension of RFP3H
72 ! NFP3TH : useful dimension of RFP3TH
73 ! NFP3PV : useful dimension of RFP3PV
74 ! NFP3S : useful dimension of NRFP3S
75 ! NFPXLEV: max. number of pp. levels
76 ! MFP3DYN : max. number of 3D-dynamic fields neeeded for LFPART2
77 ! MFP2DYN : max. number of 2D-dynamic fields neeeded for LFPART2
78 ! NFPDPHY : maximum number of physical fields
79 
80 ! The next keys force variables to be primitive for the post-processing :
81 ! LFPNHPD : .TRUE. if pp of NH pressure departure
82 ! LFPNHVD : .TRUE. if pp of NH vertical divergence
83 ! LFPNHVW : .TRUE. if pp of NH true vertical velocity
84 
85 ! LFPLOSP : .TRUE. = Fill Ps array with Log(Ps)
86 ! LFPRH100 : .TRUE. to convert relative humidity in percent
87 
88 ! === SCIENTIFIC VARIABLES ===
89 
90 ! LFPSPEC: =.T. if pp. dyn. fields are written out as spectral coefficients
91 ! =.F. if pp. dyn. fields are written out as grid point values.
92 ! LFITP : =1 if pp. fields on P levels should be fited ; =0 otherwise
93 ! LFITT : =1 if pp. fields on THETA levels should be fited ; =0 otherwise
94 ! LFITV : =1 if pp. fields on PV levels should be fited ; =0 otherwise
95 
96 ! NFPCLI : usage level for climatology
97 ! =0 no climatology
98 ! =1 orography and land-sea mask of output only
99 ! =2 all available climatological fields of the current month
100 ! =3 shifting mean from the climatological fields of the current
101 ! month to the ones of the closest month
102 
103 ! NFPINDYN : type of interpolations for dynamical fields
104 ! NFPINPHY : type of interpolations for physical fields
105 ! 4 for bilinear, 12 for quadratic
106 
107 ! LFPQ : =.TRUE. if specific humidity is interpolated
108 ! : =.FALSE. if relative humidity is interpolated
109 ! LASQ : =.TRUE. if ASQ set to 80% saturation
110 
111 ! WSXI : max. surface moisture in input
112 ! WDXI : max. deep soil moisture in input
113 ! WSXO : max. surface moisture in output
114 ! WDXO : max. deep soil moisture in output
115 
116 ! FPBL : Critical Thickness of PBL
117 ! RFPCORR: Critical orography difference for correcting surface
118 ! temperature through standart profile.
119 ! RFPCSAB: Critical sand percentage difference for computing relative
120 ! soil moisture in ISBA
121 ! RFPCD2 : Critical soil depth difference for computing relative
122 ! soil moisture in ISBA
123 ! RFPVCAP: Minimum pressure of model level to provide an equatorial
124 ! cap in the computation of variables on constant PV surfaces
125 ! NFPLNPR : 0 => conventional formulation of (delta P) : ln(P(l)/P(l-1))
126 ! 1 => formulation of (delta P) used in non hydrostatic model,
127 ! i.e. (P(l)-P(l-1))/SQRT(P(l)*P(l-1))
128 ! LFPMOIS: Month allowed for climatology usage :
129 ! .F. => month of the model (forecast)
130 ! .T. => month of the file
131 ! NFPINCR : Bogussing indicator ; =0 for no bogussing ; =1 for bogussing
132 ! NFPLAKE : To overwrite created lakes or islands by specific data :
133 ! 0 => do not overwrite
134 ! -1 => overwrite with rhoughly interpolated data
135 ! +1 => overwrite with climatology
136 ! NFPCAPE : Kind of computation for CAPE & CIN :
137 ! 1 => from bottom model layer
138 ! 2 => from the most unstable layer
139 ! 3 => from mto standart height (2 meters) as recomputed values
140 ! 4 => from mto standart height (2 meters) out of fluxes
141 ! (used for analysis)
142 ! NFPSURFEX : Subcontract surface fields to SURFEX
143 ! 0 => no subcontract
144 ! 1 => transform native arp/ald surface fields to surfex fields
145 ! and write out by surfex
146 ! NFPMASK : number of masks for the interpolation of surface fields
147 ! 0 => no mask
148 ! 1 => land-sea mask
149 ! 2 => land mask, sea mask
150 ! LMOCONVAR : if true mocon is computed from N-1 level parameters (for varpack use)
151 
152 CHARACTER (LEN = JPOSDIR) :: cfpdir
153 CHARACTER (LEN = 5) :: cfpfmt
154 CHARACTER (LEN = 8) :: cfpiden
155 CHARACTER (LEN = JPOSLEN) :: cfpdom(jposdom)
156 CHARACTER (LEN = 12) :: cfp3df(jpos3df)
157 CHARACTER (LEN = 12) :: cfp3dfs(jpos3df)
158 CHARACTER (LEN = 12) :: cfp3dfp(jpos3df)
159 CHARACTER (LEN = 12) :: cfp3dfh(jpos3df)
160 CHARACTER (LEN = 12) :: cfp3dft(jpos3df)
161 CHARACTER (LEN = 12) :: cfp3dfv(jpos3df)
162 CHARACTER (LEN = 16) :: cfp2df(jpos2df)
163 CHARACTER (LEN = 16) :: cfpphy(jpossgp)
164 CHARACTER (LEN = 16) :: cfpcfu(jposcfu)
165 CHARACTER (LEN = 16) :: cfpxfu(jposxfu)
166 CHARACTER (LEN = 12*JPOS3DF) :: c1fp3df
167 CHARACTER (LEN = 12*JPOS3DF) :: c1fp3dfs
168 CHARACTER (LEN = 12*JPOS3DF) :: c1fp3dfp
169 CHARACTER (LEN = 12*JPOS3DF) :: c1fp3dfh
170 CHARACTER (LEN = 12*JPOS3DF) :: c1fp3dft
171 CHARACTER (LEN = 12*JPOS3DF) :: c1fp3dfv
172 CHARACTER (LEN = 16*JPOS2DF) :: c1fp2df
173 CHARACTER (LEN = 16*JPOSSGP) :: c1fpphy
174 CHARACTER (LEN = 16*JPOSCFU) :: c1fpcfu
175 CHARACTER (LEN = 16*JPOSXFU) :: c1fpxfu
176 CHARACTER (LEN = JPOSLEN*JPOSDOM) :: c1fpdom
177 INTEGER(KIND=JPIM) :: mfp3dfs(jpos3df)
178 INTEGER(KIND=JPIM) :: mfp3dfp(jpos3df)
179 INTEGER(KIND=JPIM) :: mfp3dfh(jpos3df)
180 INTEGER(KIND=JPIM) :: mfp3dft(jpos3df)
181 INTEGER(KIND=JPIM) :: mfp3dfv(jpos3df)
182 INTEGER(KIND=JPIM) :: mfp2df(jpos2df)
183 INTEGER(KIND=JPIM) :: mfpphy(jpossgp)
184 
185 REAL(KIND=JPRB) :: rfp3p(jpos3p)
186 REAL(KIND=JPRB) :: rfp3h(jpos3h)
187 REAL(KIND=JPRB) :: rfp3th(jpos3th)
188 REAL(KIND=JPRB) :: rfp3pv(jpos3pv)
189 INTEGER(KIND=JPIM) :: nrfp3s(jpos3s)
190 
191 INTEGER(KIND=JPIM) :: nfpdom
192 INTEGER(KIND=JPIM) :: nfp3df
193 INTEGER(KIND=JPIM) :: nfp3dfs
194 INTEGER(KIND=JPIM) :: nfp3dfp
195 INTEGER(KIND=JPIM) :: nfp3dfh
196 INTEGER(KIND=JPIM) :: nfp3dft
197 INTEGER(KIND=JPIM) :: nfp3dfv
198 INTEGER(KIND=JPIM) :: nfp2df
199 INTEGER(KIND=JPIM) :: nfpphy
200 INTEGER(KIND=JPIM) :: nfpcfu
201 INTEGER(KIND=JPIM) :: nfpxfu
202 INTEGER(KIND=JPIM) :: nfp3p
203 INTEGER(KIND=JPIM) :: nfp3h
204 INTEGER(KIND=JPIM) :: nfp3th
205 INTEGER(KIND=JPIM) :: nfp3pv
206 INTEGER(KIND=JPIM) :: nfp3s
207 INTEGER(KIND=JPIM) :: nfpgrib
208 INTEGER(KIND=JPIM) :: nfpcli
209 INTEGER(KIND=JPIM) :: mfp3dyn
210 INTEGER(KIND=JPIM) :: mfp2dyn
211 INTEGER(KIND=JPIM) :: nfplnpr
212 INTEGER(KIND=JPIM) :: nfpincr
213 INTEGER(KIND=JPIM) :: nfpindyn
214 INTEGER(KIND=JPIM) :: nfpinphy
215 INTEGER(KIND=JPIM) :: nfpcape
216 REAL(KIND=JPRB) :: wsxi
217 REAL(KIND=JPRB) :: wdxi
218 REAL(KIND=JPRB) :: wsxo
219 REAL(KIND=JPRB) :: wdxo
220 REAL(KIND=JPRB) :: fpbl
221 REAL(KIND=JPRB) :: rfpcorr
222 REAL(KIND=JPRB) :: rfpcsab
223 REAL(KIND=JPRB) :: rfpcd2
224 REAL(KIND=JPRB) :: rfpvcap
225 LOGICAL :: lfpspec
226 LOGICAL :: lfitp
227 LOGICAL :: lfitt
228 LOGICAL :: lfitv
229 LOGICAL :: lfpq
230 LOGICAL :: ltracefp
231 LOGICAL :: lfpcnt
232 LOGICAL :: lasq
233 LOGICAL :: lfpnhpd
234 LOGICAL :: lfpnhvd
235 LOGICAL :: lfpnhvw
236 LOGICAL :: lfpmois
237 LOGICAL :: lfplosp
238 LOGICAL :: lfprh100
239 LOGICAL :: lmoconvar
240 INTEGER(KIND=JPIM) :: nfplake
241 INTEGER(KIND=JPIM) :: nfpxlev
242 INTEGER(KIND=JPIM) :: nfpdphy
243 INTEGER(KIND=JPIM) :: nfpsurfex
244 INTEGER(KIND=JPIM) :: nfpmask
245 ! ------------------------------------------------------------------
246 !$OMP THREADPRIVATE(c1fp2df,c1fp3df,c1fp3dfh,c1fp3dfp,c1fp3dfs,c1fp3dft,c1fp3dfv,c1fpcfu,c1fpdom,c1fpphy,c1fpxfu)
247 !$OMP THREADPRIVATE(cfp2df,cfp3df,cfp3dfh,cfp3dfp,cfp3dfs,cfp3dft,cfp3dfv,cfpcfu,cfpdir,cfpdom,cfpfmt,cfpiden)
248 !$OMP THREADPRIVATE(cfpphy,cfpxfu,fpbl,lasq,lfitp,lfitt,lfitv,lfpcnt,lfplosp,lfpmois,lfpnhpd,lfpnhvd,lfpnhvw)
249 !$OMP THREADPRIVATE(lfpq,lfprh100,lfpspec,lmoconvar,ltracefp,mfp2df,mfp2dyn,mfp3dfh,mfp3dfp,mfp3dfs,mfp3dft)
250 !$OMP THREADPRIVATE(mfp3dfv,mfp3dyn,mfpphy,nfp2df,nfp3df,nfp3dfh,nfp3dfp,nfp3dfs,nfp3dft,nfp3dfv,nfp3h,nfp3p)
251 !$OMP THREADPRIVATE(nfp3pv,nfp3s,nfp3th,nfpcape,nfpcfu,nfpcli,nfpdom,nfpdphy,nfpgrib,nfpincr,nfpindyn,nfpinphy)
252 !$OMP THREADPRIVATE(nfplake,nfplnpr,nfpmask,nfpphy,nfpsurfex,nfpxfu,nfpxlev,nrfp3s,rfp3h,rfp3p,rfp3pv,rfp3th)
253 !$OMP THREADPRIVATE(rfpcd2,rfpcorr,rfpcsab,rfpvcap,wdxi,wdxo,wsxi,wsxo)
254 END MODULE yomfpc
integer(kind=jpim) nfp3dfp
Definition: yomfpc.F90:194
integer(kind=jpim), parameter jposxfu
Definition: parfpos.F90:51
integer(kind=jpim), dimension(jpossgp) mfpphy
Definition: yomfpc.F90:183
real(kind=jprb) rfpcsab
Definition: yomfpc.F90:222
integer(kind=jpim), parameter jpos3df
Definition: parfpos.F90:68
character(len=16), dimension(jpossgp) cfpphy
Definition: yomfpc.F90:163
logical lfitt
Definition: yomfpc.F90:227
integer(kind=jpim) nfp3pv
Definition: yomfpc.F90:205
character(len=8) cfpiden
Definition: yomfpc.F90:154
integer(kind=jpim) nfp3dfs
Definition: yomfpc.F90:193
logical lfpq
Definition: yomfpc.F90:229
integer(kind=jpim), dimension(jpos3df) mfp3dfp
Definition: yomfpc.F90:178
character(len=12), dimension(jpos3df) cfp3dfp
Definition: yomfpc.F90:158
character(len=16 *jpossgp) c1fpphy
Definition: yomfpc.F90:173
integer(kind=jpim) nfp2df
Definition: yomfpc.F90:198
integer(kind=jpim), dimension(jpos3df) mfp3dfh
Definition: yomfpc.F90:179
character(len=12 *jpos3df) c1fp3dfv
Definition: yomfpc.F90:171
integer(kind=jpim), parameter jpos3h
Definition: parfpos.F90:53
real(kind=jprb), dimension(jpos3pv) rfp3pv
Definition: yomfpc.F90:188
integer(kind=jpim) nfp3p
Definition: yomfpc.F90:202
integer(kind=jpim) nfp3dfv
Definition: yomfpc.F90:197
character(len=12 *jpos3df) c1fp3dfh
Definition: yomfpc.F90:169
real(kind=jprb), dimension(jpos3th) rfp3th
Definition: yomfpc.F90:187
integer(kind=jpim) nfp3th
Definition: yomfpc.F90:204
character(len=16), dimension(jposcfu) cfpcfu
Definition: yomfpc.F90:164
character(len=jposlen), dimension(jposdom) cfpdom
Definition: yomfpc.F90:155
integer(kind=jpim), dimension(jpos3df) mfp3dfs
Definition: yomfpc.F90:177
integer(kind=jpim) nfplake
Definition: yomfpc.F90:240
logical lfpnhvd
Definition: yomfpc.F90:234
real(kind=jprb) wsxi
Definition: yomfpc.F90:216
integer(kind=jpim) nfpcfu
Definition: yomfpc.F90:200
integer(kind=jpim) nfpcape
Definition: yomfpc.F90:215
integer(kind=jpim) mfp2dyn
Definition: yomfpc.F90:210
character(len=12), dimension(jpos3df) cfp3dfs
Definition: yomfpc.F90:157
logical lfpcnt
Definition: yomfpc.F90:231
integer(kind=jpim), parameter jposlen
Definition: parfpos.F90:44
character(len=16), dimension(jposxfu) cfpxfu
Definition: yomfpc.F90:165
integer(kind=jpim) nfp3dft
Definition: yomfpc.F90:196
real(kind=jprb), dimension(jpos3p) rfp3p
Definition: yomfpc.F90:185
integer(kind=jpim) nfpsurfex
Definition: yomfpc.F90:243
character(len=16 *jposcfu) c1fpcfu
Definition: yomfpc.F90:174
character(len=12), dimension(jpos3df) cfp3dft
Definition: yomfpc.F90:160
integer(kind=jpim), dimension(jpos2df) mfp2df
Definition: yomfpc.F90:182
integer, parameter jprb
Definition: parkind1.F90:31
integer(kind=jpim), parameter jposdir
Definition: parfpos.F90:46
integer(kind=jpim), parameter jpos3th
Definition: parfpos.F90:54
integer(kind=jpim), dimension(jpos3s) nrfp3s
Definition: yomfpc.F90:189
Definition: yomfpc.F90:1
integer(kind=jpim) nfpgrib
Definition: yomfpc.F90:207
real(kind=jprb), dimension(jpos3h) rfp3h
Definition: yomfpc.F90:186
real(kind=jprb) rfpcorr
Definition: yomfpc.F90:221
character(len=12), dimension(jpos3df) cfp3dfv
Definition: yomfpc.F90:161
integer(kind=jpim) nfplnpr
Definition: yomfpc.F90:211
integer(kind=jpim) nfpcli
Definition: yomfpc.F90:208
logical lfpmois
Definition: yomfpc.F90:236
character(len=jposlen *jposdom) c1fpdom
Definition: yomfpc.F90:176
integer(kind=jpim) nfpxlev
Definition: yomfpc.F90:241
integer(kind=jpim) nfpdom
Definition: yomfpc.F90:191
character(len=5) cfpfmt
Definition: yomfpc.F90:153
integer(kind=jpim) nfpdphy
Definition: yomfpc.F90:242
real(kind=jprb) fpbl
Definition: yomfpc.F90:220
character(len=jposdir) cfpdir
Definition: yomfpc.F90:152
integer(kind=jpim), parameter jpossgp
Definition: parfpos.F90:66
character(len=12), dimension(jpos3df) cfp3df
Definition: yomfpc.F90:156
logical lmoconvar
Definition: yomfpc.F90:239
character(len=12 *jpos3df) c1fp3dfs
Definition: yomfpc.F90:167
integer(kind=jpim) nfpmask
Definition: yomfpc.F90:244
integer(kind=jpim) mfp3dyn
Definition: yomfpc.F90:209
real(kind=jprb) wsxo
Definition: yomfpc.F90:218
character(len=12 *jpos3df) c1fp3df
Definition: yomfpc.F90:166
logical lfpnhvw
Definition: yomfpc.F90:235
character(len=16 *jpos2df) c1fp2df
Definition: yomfpc.F90:172
integer(kind=jpim), dimension(jpos3df) mfp3dft
Definition: yomfpc.F90:180
character(len=16 *jposxfu) c1fpxfu
Definition: yomfpc.F90:175
character(len=12 *jpos3df) c1fp3dft
Definition: yomfpc.F90:170
integer(kind=jpim), parameter jposdom
Definition: parfpos.F90:43
real(kind=jprb) wdxo
Definition: yomfpc.F90:219
real(kind=jprb) rfpcd2
Definition: yomfpc.F90:223
integer(kind=jpim) nfpphy
Definition: yomfpc.F90:199
logical ltracefp
Definition: yomfpc.F90:230
integer(kind=jpim), parameter jpos3s
Definition: parfpos.F90:56
logical lfitp
Definition: yomfpc.F90:226
character(len=12 *jpos3df) c1fp3dfp
Definition: yomfpc.F90:168
integer(kind=jpim), parameter jpos3p
Definition: parfpos.F90:52
integer(kind=jpim) nfpxfu
Definition: yomfpc.F90:201
integer(kind=jpim) nfpincr
Definition: yomfpc.F90:212
logical lfplosp
Definition: yomfpc.F90:237
logical lfpnhpd
Definition: yomfpc.F90:233
integer(kind=jpim), parameter jposcfu
Definition: parfpos.F90:50
integer, parameter jpim
Definition: parkind1.F90:13
integer(kind=jpim) nfp3s
Definition: yomfpc.F90:206
real(kind=jprb) rfpvcap
Definition: yomfpc.F90:224
character(len=12), dimension(jpos3df) cfp3dfh
Definition: yomfpc.F90:159
integer(kind=jpim), dimension(jpos3df) mfp3dfv
Definition: yomfpc.F90:181
real(kind=jprb) wdxi
Definition: yomfpc.F90:217
integer(kind=jpim) nfp3dfh
Definition: yomfpc.F90:195
integer(kind=jpim) nfp3h
Definition: yomfpc.F90:203
integer(kind=jpim), parameter jpos3pv
Definition: parfpos.F90:55
integer(kind=jpim), parameter jpos2df
Definition: parfpos.F90:70
integer(kind=jpim) nfpindyn
Definition: yomfpc.F90:213
logical lasq
Definition: yomfpc.F90:232
integer(kind=jpim) nfp3df
Definition: yomfpc.F90:192
logical lfitv
Definition: yomfpc.F90:228
logical lfprh100
Definition: yomfpc.F90:238
integer(kind=jpim) nfpinphy
Definition: yomfpc.F90:214
character(len=16), dimension(jpos2df) cfp2df
Definition: yomfpc.F90:162
logical lfpspec
Definition: yomfpc.F90:225