7SUBROUTINE lima ( LIMAP, LIMAW, LIMAC, LIMAM, TNSV, D, CST, NEBN, &
8 ICED, ICEP, ELECD, ELECP, &
9 BUCONF, TBUDGETS, HACTCCN, KBUDGETS, KRR, &
11 PRHODREF, PEXNREF, PDZZ, PTHVREFZIKB, &
13 KCARB, KSOA, KSP, ODUST, OSALT, OORILAM, &
14 PDTHRAD, PTHT, PRT, PSVT, PCIT, PW_NU, &
15 PAERO,PSOLORG, PMI, PTHS, PRS, PSVS, &
16 PINPRC, PINDEP, PINPRR, PINPRI, PINPRS, PINPRG, PINPRH, &
17 PEVAP3D, PCLDFR, PICEFR, PPRCFR, PFPR, &
20 PLATHAM_IAGGS, PEFIELDW, PSV_ELEC_T, PSV_ELEC_S )
82USE yomhook,
ONLY:lhook, dr_hook, jphook
94TYPE(
nsv_t),
INTENT(IN) :: TNSV
96TYPE(
cst_t),
INTENT(IN) :: CST
97TYPE(
neb_t),
INTENT(IN) :: NEBN
103CHARACTER(LEN=4),
INTENT(IN) :: HACTCCN
105INTEGER,
INTENT(IN) :: KBUDGETS
106INTEGER,
INTENT(IN) :: KRR
108REAL,
INTENT(IN) :: PTSTEP
110LOGICAL,
INTENT(IN) :: OELEC
112REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PRHODREF
113REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PEXNREF
114REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PDZZ
116REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PRHODJ
117REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PPABST
118INTEGER,
INTENT(IN) :: KCARB, KSOA, KSP
119LOGICAL,
INTENT(IN) :: ODUST, OSALT, OORILAM
121REAL,
DIMENSION(MERGE(D%NIJT,0,LIMAP%LACTIT), &
MERGE(D%NKT, 0,LIMAP%LACTIT)),
INTENT(IN) :: PDTHRAD
122REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PTHT
123REAL,
DIMENSION(D%NIJT, D%NKT, KRR),
INTENT(IN) :: PRT
124REAL,
DIMENSION(D%NIJT, D%NKT, TNSV%NSV_LIMA),
INTENT(IN) :: PSVT
125REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(INOUT) :: PCIT
126REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(IN) :: PW_NU
127REAL,
DIMENSION(D%NIJT, D%NKT ,TNSV%NSV),
INTENT(INOUT) :: PAERO
128REAL,
DIMENSION(MERGE(D%NIJT,0,OORILAM), &
MERGE(D%NKT ,0,OORILAM), &
MERGE(KSOA,0,OORILAM)),
INTENT(IN) :: PSOLORG
129REAL,
DIMENSION(MERGE(D%NIJT ,0,OORILAM), &
MERGE(D%NKT ,0,OORILAM), &
MERGE(KSP+KCARB+KSOA ,0,OORILAM)),
INTENT(IN) :: PMI
131REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(INOUT) :: PTHS
132REAL,
DIMENSION(D%NIJT, D%NKT, KRR),
INTENT(INOUT) :: PRS
133REAL,
DIMENSION(D%NIJT, D%NKT, TNSV%NSV_LIMA),
INTENT(INOUT) :: PSVS
135REAL,
DIMENSION(MERGE(D%NIJT,0,LIMAP%LSEDC)),
INTENT(OUT) :: PINPRC
136REAL,
DIMENSION(MERGE(D%NIJT,0,LIMAP%LDEPOC)),
INTENT(OUT) :: PINDEP
137REAL,
DIMENSION(D%NIJT),
INTENT(OUT) :: PINPRR
138REAL,
DIMENSION(MERGE(D%NIJT,0,LIMAP%LSEDI)),
INTENT(OUT) :: PINPRI
139REAL,
DIMENSION(D%NIJT),
INTENT(OUT) :: PINPRS
140REAL,
DIMENSION(D%NIJT),
INTENT(OUT) :: PINPRG
141REAL,
DIMENSION(D%NIJT),
INTENT(OUT) :: PINPRH
142REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(OUT) :: PEVAP3D
144REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(INOUT) :: PCLDFR
145REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(INOUT) :: PICEFR
146REAL,
DIMENSION(D%NIJT, D%NKT),
INTENT(INOUT) :: PPRCFR
147REAL,
DIMENSION(D%NIJT, D%NKT, KRR),
INTENT(OUT) :: PFPR
149REAL,
DIMENSION(D%NIJT,D%NKT),
OPTIONAL,
INTENT(INOUT) :: PHLC_HCF
150REAL,
DIMENSION(D%NIJT,D%NKT),
OPTIONAL,
INTENT(INOUT) :: PHLC_HRC
151REAL,
DIMENSION(D%NIJT,D%NKT),
OPTIONAL,
INTENT(INOUT) :: PHLI_HCF
152REAL,
DIMENSION(D%NIJT,D%NKT),
OPTIONAL,
INTENT(INOUT) :: PHLI_HRI
154REAL,
DIMENSION(MERGE(D%NIJT,0,OELEC), &
MERGE(D%NKT,0,OELEC)),
OPTIONAL,
INTENT(IN) :: PLATHAM_IAGGS
155REAL,
DIMENSION(D%NIJT, D%NKT),
OPTIONAL,
INTENT(IN) :: PEFIELDW
156REAL,
DIMENSION(D%NIJT, D%NKT, TNSV%NSV_ELEC),
OPTIONAL,
INTENT(IN) :: PSV_ELEC_T
157REAL,
DIMENSION(D%NIJT, D%NKT, TNSV%NSV_ELEC),
OPTIONAL,
INTENT(INOUT) :: PSV_ELEC_S
159REAL,
INTENT(IN) :: PTHVREFZIKB
164REAL,
DIMENSION(D%NIJT,D%NKT) :: ZTHT, ZRVT, ZRCT, ZRRT, ZRIT, ZRST, ZRGT, ZRHT
165REAL,
DIMENSION(D%NIJT,D%NKT) :: ZCCT, ZCRT, ZCIT, ZCST, ZCGT, ZCHT
166REAL,
DIMENSION(D%NIJT,D%NKT) :: ZTHS, ZRVS, ZRCS, ZRRS, ZRIS, ZRSS, ZRGS, ZRHS
167REAL,
DIMENSION(D%NIJT,D%NKT) :: ZCCS, ZCRS, ZCIS, ZCSS, ZCGS, ZCHS
168REAL,
DIMENSION(D%NIJT,D%NKT,LIMAP%NMOD_CCN) :: ZCCNFT, ZCCNAT
169REAL,
DIMENSION(D%NIJT,D%NKT,LIMAP%NMOD_CCN) :: ZCCNFS, ZCCNAS
170REAL,
DIMENSION(D%NIJT,D%NKT,LIMAP%NMOD_IFN) :: ZIFNFT, ZIFNNT
171REAL,
DIMENSION(D%NIJT,D%NKT,LIMAP%NMOD_IFN) :: ZIFNFS, ZIFNNS
172REAL,
DIMENSION(D%NIJT,D%NKT,LIMAP%NMOD_IMM) :: ZIMMNT
173REAL,
DIMENSION(D%NIJT,D%NKT,LIMAP%NMOD_IMM) :: ZIMMNS
174REAL,
DIMENSION(D%NIJT,D%NKT) :: ZHOMFT
175REAL,
DIMENSION(D%NIJT,D%NKT) :: ZHOMFS
176REAL,
DIMENSION(D%NIJT,D%NKT) :: ZWKBUD
178REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZCIS_SHAPE
179REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZRIS_SHAPE
180REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZCIT_SHAPE
181REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZRIT_SHAPE
184REAL,
DIMENSION(D%NIJT,D%NKT) :: ZEXN, ZT
188REAL,
DIMENSION(:),
ALLOCATABLE :: &
189 ZP1D, ZRHODREF1D, ZEXNREF1D, ZEXN1D, &
191 ZRVT1D, ZRCT1D, ZRRT1D, ZRIT1D, ZRST1D, ZRGT1D, ZRHT1D, &
192 ZCCT1D, ZCRT1D, ZCIT1D, ZCST1D, ZCGT1D, ZCHT1D, &
194 ZHLC_LCF1D, ZHLC_LRC1D, ZHLI_LCF1D, ZHLI_LRI1D, &
195 ZHLC_HCF1D, ZHLC_HRC1D, ZHLI_HCF1D, ZHLI_HRI1D
197REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZIFNN1D
198REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZCIT1D_SHAPE
202REAL,
DIMENSION(:),
ALLOCATABLE :: &
205 z_th_honr, z_rr_honr, z_cr_honr, &
206 z_th_imlt, z_rc_imlt, z_cc_imlt, &
208 z_th_honc, z_rc_honc, z_cc_honc, &
210 z_rc_auto, z_cc_auto, z_cr_auto, &
211 z_rc_accr, z_cc_accr, &
214 z_th_evap, z_rr_evap, z_cr_evap, &
215 z_ri_cnvi, z_ci_cnvi, &
216 z_th_deps, z_rs_deps, &
217 z_th_depi, z_ri_depi, &
218 z_ri_cnvs, z_ci_cnvs, &
221 z_ri_aggs, z_ci_aggs, &
222 z_th_depg, z_rg_depg, &
223 z_th_berfi, z_rc_berfi, &
224 z_th_rim, z_cc_rim, z_cs_rim, z_rc_rimss, z_rc_rimsg, z_rs_rimcg, &
225 z_ri_hms, z_ci_hms, z_rs_hms, &
226 z_th_acc, z_cr_acc, z_cs_acc, z_rr_accss, z_rr_accsg, z_rs_accrg, &
227 z_rs_cmel, z_cs_cmel, &
228 z_th_cfrz, z_rr_cfrz, z_cr_cfrz, z_ri_cfrz, z_ci_cfrz, &
229 z_ri_cibu, z_ci_cibu, &
230 z_ri_rdsf, z_ci_rdsf, &
231 z_th_wetg, z_rc_wetg, z_cc_wetg, z_rr_wetg, z_cr_wetg, &
232 z_ri_wetg, z_ci_wetg, z_rs_wetg, z_cs_wetg, z_rg_wetg, z_cg_wetg, z_rh_wetg, &
234 z_th_dryg, z_rc_dryg, z_cc_dryg, z_rr_dryg, z_cr_dryg, &
235 z_ri_dryg, z_ci_dryg, z_rs_dryg, z_cs_dryg, z_rg_dryg, &
236 z_ri_hmg, z_ci_hmg, z_rg_hmg, &
237 z_th_gmlt, z_rr_gmlt, z_cr_gmlt, z_cg_gmlt, &
238 z_th_deph, z_rh_deph, &
239 z_th_weth, z_rc_weth, z_cc_weth, z_rr_weth, z_cr_weth, &
240 z_ri_weth, z_ci_weth, z_rs_weth, z_cs_weth, z_rg_weth, z_cg_weth, z_rh_weth, &
242 z_rg_cohg, z_cg_cohg, &
243 z_th_hmlt, z_rr_hmlt, z_cr_hmlt, z_ch_hmlt, &
244 z_rv_corr2, z_rc_corr2, z_rr_corr2, z_ri_corr2, &
245 z_cc_corr2, z_cr_corr2, z_ci_corr2
248REAL,
DIMENSION(D%NIJT,D%NKT) :: Z_RR_CVRC, Z_CR_CVRC
254REAL,
DIMENSION(:),
ALLOCATABLE :: &
255 ZA_TH, ZA_RV, ZA_RC, ZA_CC, ZA_RR, ZA_CR, ZA_RI, ZA_CI, ZA_RS, ZA_CS, ZA_RG, ZA_CG, ZA_RH, ZA_CH, &
256 ZB_TH, ZB_RV, ZB_RC, ZB_CC, ZB_RR, ZB_CR, ZB_RI, ZB_CI, ZB_RS, ZB_CS, ZB_RG, ZB_CG, ZB_RH, ZB_CH
257REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZB_IFNN
259REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZA_CI_SHAPE
260REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZB_CI_SHAPE
263REAL,
DIMENSION(:,:),
ALLOCATABLE :: &
266 ztot_th_honr, ztot_rr_honr, ztot_cr_honr, &
267 ztot_th_imlt, ztot_rc_imlt, ztot_cc_imlt, &
269 ztot_th_honc, ztot_rc_honc, ztot_cc_honc, &
271 ztot_rc_auto, ztot_cc_auto, ztot_cr_auto, &
272 ztot_rc_accr, ztot_cc_accr, &
275 ztot_th_evap, ztot_rr_evap, ztot_cr_evap, &
276 ztot_ri_cnvi, ztot_ci_cnvi, &
277 ztot_th_deps, ztot_rs_deps, &
278 ztot_th_depi, ztot_ri_depi, &
279 ztot_ri_cnvs, ztot_ci_cnvs, &
282 ztot_ri_aggs, ztot_ci_aggs, &
283 ztot_th_depg, ztot_rg_depg, &
284 ztot_th_berfi, ztot_rc_berfi, &
285 ztot_th_rim, ztot_cc_rim, ztot_cs_rim, ztot_rc_rimss, ztot_rc_rimsg, ztot_rs_rimcg, &
286 ztot_ri_hms, ztot_ci_hms, ztot_rs_hms, &
287 ztot_th_acc, ztot_cr_acc, ztot_cs_acc, ztot_rr_accss, ztot_rr_accsg, ztot_rs_accrg, &
288 ztot_rs_cmel, ztot_cs_cmel, &
289 ztot_th_cfrz, ztot_rr_cfrz, ztot_cr_cfrz, ztot_ri_cfrz, ztot_ci_cfrz, &
290 ztot_ri_cibu, ztot_ci_cibu, &
291 ztot_ri_rdsf, ztot_ci_rdsf, &
292 ztot_th_wetg, ztot_rc_wetg, ztot_cc_wetg, ztot_rr_wetg, ztot_cr_wetg, &
293 ztot_ri_wetg, ztot_ci_wetg, ztot_rs_wetg, ztot_cs_wetg, ztot_rg_wetg, ztot_cg_wetg, ztot_rh_wetg, &
294 ztot_th_dryg, ztot_rc_dryg, ztot_cc_dryg, ztot_rr_dryg, ztot_cr_dryg, &
295 ztot_ri_dryg, ztot_ci_dryg, ztot_rs_dryg, ztot_cs_dryg, ztot_rg_dryg, &
296 ztot_ri_hmg, ztot_ci_hmg, ztot_rg_hmg, &
297 ztot_th_gmlt, ztot_rr_gmlt, ztot_cr_gmlt, ztot_cg_gmlt, &
298 ztot_th_deph, ztot_rh_deph, &
299 ztot_th_weth, ztot_rc_weth, ztot_cc_weth, ztot_rr_weth, ztot_cr_weth, &
300 ztot_ri_weth, ztot_ci_weth, ztot_rs_weth, ztot_cs_weth, ztot_rg_weth, ztot_cg_weth, ztot_rh_weth, &
301 ztot_rg_cohg, ztot_cg_cohg, &
302 ztot_th_hmlt, ztot_rr_hmlt, ztot_cr_hmlt, ztot_ch_hmlt, &
303 ztot_rr_cvrc, ztot_cr_cvrc, &
304 ztot_rv_corr2, ztot_rc_corr2, ztot_rr_corr2, ztot_ri_corr2, &
305 ztot_cc_corr2, ztot_cr_corr2, ztot_ci_corr2, &
306 ztot_ri_hind, ztot_rc_hinc, ztot_rv_henu, ztot_rv_honh
308REAL,
DIMENSION(:,:),
ALLOCATABLE :: &
309 ZTOT_RI_HIND_OTS, ZTOT_RR_HONR_OTS, ZTOT_RC_IMLT_OTS, &
310 ZTOT_RC_HONC_OTS, ZTOT_RS_DEPS_OTS, ZTOT_RI_AGGS_OTS, &
311 ZTOT_RI_CNVS_OTS, ZTOT_RG_DEPG_OTS, ZTOT_RC_AUTO_OTS, &
312 ZTOT_RC_ACCR_OTS, ZTOT_RR_EVAP_OTS, &
313 ZTOT_RC_RIMSS_OTS, ZTOT_RC_RIMSG_OTS, ZTOT_RS_RIMCG_OTS, &
314 ZTOT_RR_ACCSS_OTS, ZTOT_RR_ACCSG_OTS, ZTOT_RS_ACCRG_OTS, &
315 ZTOT_RS_CMEL_OTS, ZTOT_RI_CFRZ_OTS, ZTOT_RR_CFRZ_OTS, &
316 ZTOT_RC_WETG_OTS, ZTOT_RI_WETG_OTS, ZTOT_RR_WETG_OTS, &
317 ZTOT_RS_WETG_OTS, ZTOT_RC_DRYG_OTS, ZTOT_RI_DRYG_OTS, &
318 ZTOT_RR_DRYG_OTS, ZTOT_RS_DRYG_OTS, ZTOT_RR_GMLT_OTS, &
319 ZTOT_RC_BERFI_OTS, ZTOT_RH_WETG_OTS, &
320 ZTOT_RV_HENU_OTS, ZTOT_RC_HINC_OTS, ZTOT_RV_HONH_OTS, &
321 ZTOT_RR_CVRC_OTS, ZTOT_RI_CNVI_OTS, ZTOT_RI_DEPI_OTS, &
322 ZTOT_RI_HMS_OTS, ZTOT_RI_HMG_OTS, ZTOT_RI_CIBU_OTS, &
323 ZTOT_RI_RDSF_OTS, ZTOT_RC_CORR2_OTS, ZTOT_RR_CORR2_OTS, &
326REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZTOT_IFNN_IMLT
328REAL,
DIMENSION(:,:),
ALLOCATABLE :: Z_SHCI_HONC, Z_SHCI_CNVI, &
329 Z_SHCI_HMS, Z_SHCI_HMG, &
330 Z_SHCI_CFRZ, Z_SHCI_CIBU, &
331 Z_SHCI_RDSF, Z_SHCI_WETG, &
332 Z_SHCI_DRYG, Z_SHCI_CORR2,&
333 Z_SHCI_IMLT, Z_SHCI_HACH, &
334 Z_SHCI_CNVS, Z_SHCI_AGGS
335REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZTOT_SHCI_HONC, ZTOT_SHCI_CNVI, &
336 ZTOT_SHCI_HMS, ZTOT_SHCI_HMG, &
337 ZTOT_SHCI_CFRZ, ZTOT_SHCI_CIBU, &
338 ZTOT_SHCI_RDSF, ZTOT_SHCI_WETG, &
339 ZTOT_SHCI_DRYG, ZTOT_SHCI_CORR2,&
340 ZTOT_SHCI_IMLT, ZTOT_SHCI_HACH, &
341 ZTOT_SHCI_CNVS, ZTOT_SHCI_AGGS
342REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZLBDAI_SHAPE
343REAL,
DIMENSION(:,:),
ALLOCATABLE :: Z_SHCI_ISC
344REAL,
DIMENSION(:,:),
ALLOCATABLE :: Z_SHCI_ISCS
345REAL,
DIMENSION(:),
ALLOCATABLE :: Z_SHRI_ISCS
346REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZTOT_SHCI_ISC
347REAL,
DIMENSION(:,:,:),
ALLOCATABLE :: ZTOT_SHCI_ISCS
348REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZTOT_SHRI_ISCS
349REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZAUX_ISCS
352REAL,
DIMENSION(D%NIJT,D%NKT) :: Z0RVT, Z0RCT, Z0RRT, Z0RIT, Z0RST, Z0RGT, Z0RHT
353REAL,
DIMENSION(:),
ALLOCATABLE :: Z0RVT1D, Z0RCT1D, Z0RRT1D, Z0RIT1D, Z0RST1D, Z0RGT1D, Z0RHT1D
357REAL,
DIMENSION(D%NIJT,D%NKT) :: ZTIME, ZTIME_LASTCALL
358INTEGER,
DIMENSION(D%NIJT,D%NKT) :: IITER
359REAL,
DIMENSION(:),
ALLOCATABLE :: ZTIME1D, ZTIME_LASTCALL1D, ZMAXTIME, ZTIME_THRESHOLD
360INTEGER,
DIMENSION(:),
ALLOCATABLE :: IITER1D
361LOGICAL,
DIMENSION(D%NIJT,D%NKT) :: GLCOMPUTE
362LOGICAL,
DIMENSION(:),
ALLOCATABLE :: GLCOMPUTE1D
364INTEGER :: INB_ITER_MAX
367REAL,
DIMENSION(:),
ALLOCATABLE :: ZCF1D, ZIF1D, ZPF1D
373INTEGER :: II, IPACK, IN, IK
375INTEGER,
DIMENSION(:),
ALLOCATABLE :: I1, I3
379REAL,
DIMENSION(D%NIJT) :: ZW2D
380REAL,
DIMENSION(D%NIJT,D%NKT) :: ZRT_SUM
381REAL,
DIMENSION(D%NIJT,D%NKT) :: ZCPT
382LOGICAL,
DIMENSION(D%NIJT) :: GDEP
383REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZRHODJONTSTEP
385INTEGER :: ISV_LIMA_NC
386INTEGER :: ISV_LIMA_NR
387INTEGER :: ISV_LIMA_CCN_FREE
388INTEGER :: ISV_LIMA_CCN_ACTI
389INTEGER :: ISV_LIMA_NI
390INTEGER :: ISV_LIMA_NS
391INTEGER :: ISV_LIMA_NG
392INTEGER :: ISV_LIMA_NH
393INTEGER :: ISV_LIMA_IFN_FREE
394INTEGER :: ISV_LIMA_IFN_NUCL
395INTEGER :: ISV_LIMA_IMM_NUCL
396INTEGER :: ISV_LIMA_HOM_HAZE
399REAL(KIND=jphook) :: zhook_handle
402LOGICAL,
DIMENSION(:,:),
ALLOCATABLE :: GMASK_ELEC
404REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZQPIT, ZQNIT, ZQCT, ZQRT, ZQIT, ZQST, ZQGT, ZQHT
405REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZQPIS, ZQNIS, ZQCS, ZQRS, ZQIS, ZQSS, ZQGS, ZQHS
406REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZRVT_ELEC, ZRCT_ELEC, ZRRT_ELEC, ZRIT_ELEC, ZRST_ELEC, ZRGT_ELEC, ZRHT_ELEC
407REAL,
DIMENSION(:,:),
ALLOCATABLE :: ZCCT_ELEC, ZCRT_ELEC, ZCIT_ELEC, ZCST_ELEC, ZCGT_ELEC, ZCHT_ELEC
408REAL,
DIMENSION(:),
ALLOCATABLE :: ZLATHAM_IAGGS
411LOGICAL,
DIMENSION(D%NIJT,D%NKT) :: LLMICRO
412REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLC_LCF
413REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLC_LRC
414REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLI_LCF
415REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLI_LRI
416REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLC_HCF
417REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLC_HRC
418REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLI_HCF
419REAL,
DIMENSION(D%NIJT, D%NKT) :: ZHLI_HRI
420REAL,
DIMENSION(D%NIJT, D%NKT) :: ZSIGMA_RC
427IF (lhook)
CALL dr_hook(
'LIMA', 0, zhook_handle)
429isv_lima_nc = tnsv%NSV_LIMA_NC - tnsv%NSV_LIMA_BEG + 1
430isv_lima_nr = tnsv%NSV_LIMA_NR - tnsv%NSV_LIMA_BEG + 1
431isv_lima_ccn_free = tnsv%NSV_LIMA_CCN_FREE - tnsv%NSV_LIMA_BEG + 1
432isv_lima_ccn_acti = tnsv%NSV_LIMA_CCN_ACTI - tnsv%NSV_LIMA_BEG + 1
433isv_lima_ni = tnsv%NSV_LIMA_NI - tnsv%NSV_LIMA_BEG + 1
434isv_lima_ns = tnsv%NSV_LIMA_NS - tnsv%NSV_LIMA_BEG + 1
435isv_lima_ng = tnsv%NSV_LIMA_NG - tnsv%NSV_LIMA_BEG + 1
436isv_lima_nh = tnsv%NSV_LIMA_NH - tnsv%NSV_LIMA_BEG + 1
437isv_lima_ifn_free = tnsv%NSV_LIMA_IFN_FREE - tnsv%NSV_LIMA_BEG + 1
438isv_lima_ifn_nucl = tnsv%NSV_LIMA_IFN_NUCL - tnsv%NSV_LIMA_BEG + 1
439isv_lima_imm_nucl = tnsv%NSV_LIMA_IMM_NUCL - tnsv%NSV_LIMA_BEG + 1
440isv_lima_hom_haze = tnsv%NSV_LIMA_HOM_HAZE - tnsv%NSV_LIMA_BEG + 1
442zths(d%NIJB:d%NIJE,:) = pths(d%NIJB:d%NIJE,:)
443ztht(d%NIJB:d%NIJE,:) = pths(d%NIJB:d%NIJE,:) * ptstep
484IF ( buconf%LBU_ENABLE .OR. oelec)
THEN
487 ALLOCATE( ztot_cr_brku(d%NIJT, d%NKT ) ); ztot_cr_brku(:,:) = 0.
488 ALLOCATE( ztot_th_honr(d%NIJT, d%NKT ) ); ztot_th_honr(:,:) = 0.
489 ALLOCATE( ztot_rr_honr(d%NIJT, d%NKT ) ); ztot_rr_honr(:,:) = 0.
490 ALLOCATE( ztot_cr_honr(d%NIJT, d%NKT ) ); ztot_cr_honr(:,:) = 0.
491 ALLOCATE( ztot_th_imlt(d%NIJT, d%NKT ) ); ztot_th_imlt(:,:) = 0.
492 ALLOCATE( ztot_rc_imlt(d%NIJT, d%NKT ) ); ztot_rc_imlt(:,:) = 0.
493 ALLOCATE( ztot_cc_imlt(d%NIJT, d%NKT ) ); ztot_cc_imlt(:,:) = 0.
494 ALLOCATE( ztot_ifnn_imlt(d%NIJT, d%NKT, limap%NMOD_IFN ) ); ztot_ifnn_imlt(:,:,:) = 0.
495 ALLOCATE( ztot_th_honc(d%NIJT, d%NKT ) ); ztot_th_honc(:,:) = 0.
496 ALLOCATE( ztot_rc_honc(d%NIJT, d%NKT ) ); ztot_rc_honc(:,:) = 0.
497 ALLOCATE( ztot_cc_honc(d%NIJT, d%NKT ) ); ztot_cc_honc(:,:) = 0.
498 ALLOCATE( ztot_cc_self(d%NIJT, d%NKT ) ); ztot_cc_self(:,:) = 0.
499 ALLOCATE( ztot_rc_auto(d%NIJT, d%NKT ) ); ztot_rc_auto(:,:) = 0.
500 ALLOCATE( ztot_cc_auto(d%NIJT, d%NKT ) ); ztot_cc_auto(:,:) = 0.
501 ALLOCATE( ztot_cr_auto(d%NIJT, d%NKT ) ); ztot_cr_auto(:,:) = 0.
502 ALLOCATE( ztot_rc_accr(d%NIJT, d%NKT ) ); ztot_rc_accr(:,:) = 0.
503 ALLOCATE( ztot_cc_accr(d%NIJT, d%NKT ) ); ztot_cc_accr(:,:) = 0.
504 ALLOCATE( ztot_cr_scbu(d%NIJT, d%NKT ) ); ztot_cr_scbu(:,:) = 0.
505 ALLOCATE( ztot_th_evap(d%NIJT, d%NKT ) ); ztot_th_evap(:,:) = 0.
506 ALLOCATE( ztot_rr_evap(d%NIJT, d%NKT ) ); ztot_rr_evap(:,:) = 0.
507 ALLOCATE( ztot_cr_evap(d%NIJT, d%NKT ) ); ztot_cr_evap(:,:) = 0.
508 ALLOCATE( ztot_ri_cnvi(d%NIJT, d%NKT ) ); ztot_ri_cnvi(:,:) = 0.
509 ALLOCATE( ztot_ci_cnvi(d%NIJT, d%NKT ) ); ztot_ci_cnvi(:,:) = 0.
510 ALLOCATE( ztot_th_deps(d%NIJT, d%NKT ) ); ztot_th_deps(:,:) = 0.
511 ALLOCATE( ztot_rs_deps(d%NIJT, d%NKT ) ); ztot_rs_deps(:,:) = 0.
512 ALLOCATE( ztot_th_depi(d%NIJT, d%NKT ) ); ztot_th_depi(:,:) = 0.
513 ALLOCATE( ztot_ri_depi(d%NIJT, d%NKT ) ); ztot_ri_depi(:,:) = 0.
514 ALLOCATE( ztot_ri_cnvs(d%NIJT, d%NKT ) ); ztot_ri_cnvs(:,:) = 0.
515 ALLOCATE( ztot_ci_cnvs(d%NIJT, d%NKT ) ); ztot_ci_cnvs(:,:) = 0.
516 ALLOCATE( ztot_ci_isc(d%NIJT, d%NKT ) ); ztot_ci_isc(:,:) = 0.
517 ALLOCATE( ztot_cs_ssc(d%NIJT, d%NKT ) ); ztot_cs_ssc(:,:) = 0.
518 ALLOCATE( ztot_ri_aggs(d%NIJT, d%NKT ) ); ztot_ri_aggs(:,:) = 0.
519 ALLOCATE( ztot_ci_aggs(d%NIJT, d%NKT ) ); ztot_ci_aggs(:,:) = 0.
520 ALLOCATE( ztot_th_depg(d%NIJT, d%NKT ) ); ztot_th_depg(:,:) = 0.
521 ALLOCATE( ztot_rg_depg(d%NIJT, d%NKT ) ); ztot_rg_depg(:,:) = 0.
522 ALLOCATE( ztot_th_berfi(d%NIJT, d%NKT ) ); ztot_th_berfi(:,:) = 0.
523 ALLOCATE( ztot_rc_berfi(d%NIJT, d%NKT ) ); ztot_rc_berfi(:,:) = 0.
524 ALLOCATE( ztot_th_rim(d%NIJT, d%NKT ) ); ztot_th_rim(:,:) = 0.
525 ALLOCATE( ztot_cc_rim(d%NIJT, d%NKT ) ); ztot_cc_rim(:,:) = 0.
526 ALLOCATE( ztot_cs_rim(d%NIJT, d%NKT ) ); ztot_cs_rim(:,:) = 0.
527 ALLOCATE( ztot_rc_rimss(d%NIJT, d%NKT ) ); ztot_rc_rimss(:,:) = 0.
528 ALLOCATE( ztot_rc_rimsg(d%NIJT, d%NKT ) ); ztot_rc_rimsg(:,:) = 0.
529 ALLOCATE( ztot_rs_rimcg(d%NIJT, d%NKT ) ); ztot_rs_rimcg(:,:) = 0.
530 ALLOCATE( ztot_ri_hms(d%NIJT, d%NKT ) ); ztot_ri_hms(:,:) = 0.
531 ALLOCATE( ztot_ci_hms(d%NIJT, d%NKT ) ); ztot_ci_hms(:,:) = 0.
532 ALLOCATE( ztot_rs_hms(d%NIJT, d%NKT ) ); ztot_rs_hms(:,:) = 0.
533 ALLOCATE( ztot_th_acc(d%NIJT, d%NKT ) ); ztot_th_acc(:,:) = 0.
534 ALLOCATE( ztot_cr_acc(d%NIJT, d%NKT ) ); ztot_cr_acc(:,:) = 0.
535 ALLOCATE( ztot_cs_acc(d%NIJT, d%NKT ) ); ztot_cs_acc(:,:) = 0.
536 ALLOCATE( ztot_rr_accss(d%NIJT, d%NKT ) ); ztot_rr_accss(:,:) = 0.
537 ALLOCATE( ztot_rr_accsg(d%NIJT, d%NKT ) ); ztot_rr_accsg(:,:) = 0.
538 ALLOCATE( ztot_rs_accrg(d%NIJT, d%NKT ) ); ztot_rs_accrg(:,:) = 0.
539 ALLOCATE( ztot_rs_cmel(d%NIJT, d%NKT ) ); ztot_rs_cmel(:,:) = 0.
540 ALLOCATE( ztot_cs_cmel(d%NIJT, d%NKT ) ); ztot_cs_cmel(:,:) = 0.
541 ALLOCATE( ztot_th_cfrz(d%NIJT, d%NKT ) ); ztot_th_cfrz(:,:) = 0.
542 ALLOCATE( ztot_rr_cfrz(d%NIJT, d%NKT ) ); ztot_rr_cfrz(:,:) = 0.
543 ALLOCATE( ztot_cr_cfrz(d%NIJT, d%NKT ) ); ztot_cr_cfrz(:,:) = 0.
544 ALLOCATE( ztot_ri_cfrz(d%NIJT, d%NKT ) ); ztot_ri_cfrz(:,:) = 0.
545 ALLOCATE( ztot_ci_cfrz(d%NIJT, d%NKT ) ); ztot_ci_cfrz(:,:) = 0.
546 ALLOCATE( ztot_ri_cibu(d%NIJT, d%NKT ) ); ztot_ri_cibu(:,:) = 0.
547 ALLOCATE( ztot_ci_cibu(d%NIJT, d%NKT ) ); ztot_ci_cibu(:,:) = 0.
548 ALLOCATE( ztot_ri_rdsf(d%NIJT, d%NKT ) ); ztot_ri_rdsf(:,:) = 0.
549 ALLOCATE( ztot_ci_rdsf(d%NIJT, d%NKT ) ); ztot_ci_rdsf(:,:) = 0.
550 ALLOCATE( ztot_th_wetg(d%NIJT, d%NKT ) ); ztot_th_wetg(:,:) = 0.
551 ALLOCATE( ztot_rc_wetg(d%NIJT, d%NKT ) ); ztot_rc_wetg(:,:) = 0.
552 ALLOCATE( ztot_cc_wetg(d%NIJT, d%NKT ) ); ztot_cc_wetg(:,:) = 0.
553 ALLOCATE( ztot_rr_wetg(d%NIJT, d%NKT ) ); ztot_rr_wetg(:,:) = 0.
554 ALLOCATE( ztot_cr_wetg(d%NIJT, d%NKT ) ); ztot_cr_wetg(:,:) = 0.
555 ALLOCATE( ztot_ri_wetg(d%NIJT, d%NKT ) ); ztot_ri_wetg(:,:) = 0.
556 ALLOCATE( ztot_ci_wetg(d%NIJT, d%NKT ) ); ztot_ci_wetg(:,:) = 0.
557 ALLOCATE( ztot_rs_wetg(d%NIJT, d%NKT ) ); ztot_rs_wetg(:,:) = 0.
558 ALLOCATE( ztot_cs_wetg(d%NIJT, d%NKT ) ); ztot_cs_wetg(:,:) = 0.
559 ALLOCATE( ztot_rg_wetg(d%NIJT, d%NKT ) ); ztot_rg_wetg(:,:) = 0.
560 ALLOCATE( ztot_cg_wetg(d%NIJT, d%NKT ) ); ztot_cg_wetg(:,:) = 0.
561 ALLOCATE( ztot_rh_wetg(d%NIJT, d%NKT ) ); ztot_rh_wetg(:,:) = 0.
562 ALLOCATE( ztot_th_dryg(d%NIJT, d%NKT ) ); ztot_th_dryg(:,:) = 0.
563 ALLOCATE( ztot_rc_dryg(d%NIJT, d%NKT ) ); ztot_rc_dryg(:,:) = 0.
564 ALLOCATE( ztot_cc_dryg(d%NIJT, d%NKT ) ); ztot_cc_dryg(:,:) = 0.
565 ALLOCATE( ztot_rr_dryg(d%NIJT, d%NKT ) ); ztot_rr_dryg(:,:) = 0.
566 ALLOCATE( ztot_cr_dryg(d%NIJT, d%NKT ) ); ztot_cr_dryg(:,:) = 0.
567 ALLOCATE( ztot_ri_dryg(d%NIJT, d%NKT ) ); ztot_ri_dryg(:,:) = 0.
568 ALLOCATE( ztot_ci_dryg(d%NIJT, d%NKT ) ); ztot_ci_dryg(:,:) = 0.
569 ALLOCATE( ztot_rs_dryg(d%NIJT, d%NKT ) ); ztot_rs_dryg(:,:) = 0.
570 ALLOCATE( ztot_cs_dryg(d%NIJT, d%NKT ) ); ztot_cs_dryg(:,:) = 0.
571 ALLOCATE( ztot_rg_dryg(d%NIJT, d%NKT ) ); ztot_rg_dryg(:,:) = 0.
572 ALLOCATE( ztot_ri_hmg(d%NIJT, d%NKT ) ); ztot_ri_hmg(:,:) = 0.
573 ALLOCATE( ztot_ci_hmg(d%NIJT, d%NKT ) ); ztot_ci_hmg(:,:) = 0.
574 ALLOCATE( ztot_rg_hmg(d%NIJT, d%NKT ) ); ztot_rg_hmg(:,:) = 0.
575 ALLOCATE( ztot_th_gmlt(d%NIJT, d%NKT ) ); ztot_th_gmlt(:,:) = 0.
576 ALLOCATE( ztot_rr_gmlt(d%NIJT, d%NKT ) ); ztot_rr_gmlt(:,:) = 0.
577 ALLOCATE( ztot_cr_gmlt(d%NIJT, d%NKT ) ); ztot_cr_gmlt(:,:) = 0.
578 ALLOCATE( ztot_cg_gmlt(d%NIJT, d%NKT ) ); ztot_cg_gmlt(:,:) = 0.
579 ALLOCATE( ztot_th_deph(d%NIJT, d%NKT ) ); ztot_th_deph(:,:) = 0.
580 ALLOCATE( ztot_rh_deph(d%NIJT, d%NKT ) ); ztot_rh_deph(:,:) = 0.
581 ALLOCATE( ztot_th_weth(d%NIJT, d%NKT ) ); ztot_th_weth(:,:) = 0.
582 ALLOCATE( ztot_rc_weth(d%NIJT, d%NKT ) ); ztot_rc_weth(:,:) = 0.
583 ALLOCATE( ztot_cc_weth(d%NIJT, d%NKT ) ); ztot_cc_weth(:,:) = 0.
584 ALLOCATE( ztot_rr_weth(d%NIJT, d%NKT ) ); ztot_rr_weth(:,:) = 0.
585 ALLOCATE( ztot_cr_weth(d%NIJT, d%NKT ) ); ztot_cr_weth(:,:) = 0.
586 ALLOCATE( ztot_ri_weth(d%NIJT, d%NKT ) ); ztot_ri_weth(:,:) = 0.
587 ALLOCATE( ztot_ci_weth(d%NIJT, d%NKT ) ); ztot_ci_weth(:,:) = 0.
588 ALLOCATE( ztot_rs_weth(d%NIJT, d%NKT ) ); ztot_rs_weth(:,:) = 0.
589 ALLOCATE( ztot_cs_weth(d%NIJT, d%NKT ) ); ztot_cs_weth(:,:) = 0.
590 ALLOCATE( ztot_rg_weth(d%NIJT, d%NKT ) ); ztot_rg_weth(:,:) = 0.
591 ALLOCATE( ztot_cg_weth(d%NIJT, d%NKT ) ); ztot_cg_weth(:,:) = 0.
592 ALLOCATE( ztot_rh_weth(d%NIJT, d%NKT ) ); ztot_rh_weth(:,:) = 0.
593 ALLOCATE( ztot_rg_cohg(d%NIJT, d%NKT ) ); ztot_rg_cohg(:,:) = 0.
594 ALLOCATE( ztot_cg_cohg(d%NIJT, d%NKT ) ); ztot_cg_cohg(:,:) = 0.
595 ALLOCATE( ztot_th_hmlt(d%NIJT, d%NKT ) ); ztot_th_hmlt(:,:) = 0.
596 ALLOCATE( ztot_rr_hmlt(d%NIJT, d%NKT ) ); ztot_rr_hmlt(:,:) = 0.
597 ALLOCATE( ztot_cr_hmlt(d%NIJT, d%NKT ) ); ztot_cr_hmlt(:,:) = 0.
598 ALLOCATE( ztot_ch_hmlt(d%NIJT, d%NKT ) ); ztot_ch_hmlt(:,:) = 0.
599 ALLOCATE( ztot_rr_cvrc(d%NIJT, d%NKT ) ); ztot_rr_cvrc(:,:) = 0.
600 ALLOCATE( ztot_cr_cvrc(d%NIJT, d%NKT ) ); ztot_cr_cvrc(:,:) = 0.
602 ALLOCATE( ztot_rv_corr2(d%NIJT, d%NKT ) ); ztot_rv_corr2(:,:) = 0.
603 ALLOCATE( ztot_rc_corr2(d%NIJT, d%NKT ) ); ztot_rc_corr2(:,:) = 0.
604 ALLOCATE( ztot_rr_corr2(d%NIJT, d%NKT ) ); ztot_rr_corr2(:,:) = 0.
605 ALLOCATE( ztot_ri_corr2(d%NIJT, d%NKT ) ); ztot_ri_corr2(:,:) = 0.
606 ALLOCATE( ztot_cc_corr2(d%NIJT, d%NKT ) ); ztot_cc_corr2(:,:) = 0.
607 ALLOCATE( ztot_cr_corr2(d%NIJT, d%NKT ) ); ztot_cr_corr2(:,:) = 0.
608 ALLOCATE( ztot_ci_corr2(d%NIJT, d%NKT ) ); ztot_ci_corr2(:,:) = 0.
611 ALLOCATE( ztot_ri_hind_ots(d%NIJT, d%NKT ) )
612 ALLOCATE( ztot_rr_honr_ots(d%NIJT, d%NKT ) )
613 ALLOCATE( ztot_rc_imlt_ots(d%NIJT, d%NKT ) )
614 ALLOCATE( ztot_rc_honc_ots(d%NIJT, d%NKT ) )
615 ALLOCATE( ztot_rs_deps_ots(d%NIJT, d%NKT ) )
616 ALLOCATE( ztot_ri_aggs_ots(d%NIJT, d%NKT ) )
617 ALLOCATE( ztot_ri_cnvs_ots(d%NIJT, d%NKT ) )
618 ALLOCATE( ztot_rg_depg_ots(d%NIJT, d%NKT ) )
619 ALLOCATE( ztot_rc_auto_ots(d%NIJT, d%NKT ) )
620 ALLOCATE( ztot_rc_accr_ots(d%NIJT, d%NKT ) )
621 ALLOCATE( ztot_rr_evap_ots(d%NIJT, d%NKT ) )
622 ALLOCATE( ztot_rc_rimss_ots(d%NIJT, d%NKT ) )
623 ALLOCATE( ztot_rc_rimsg_ots(d%NIJT, d%NKT ) )
624 ALLOCATE( ztot_rs_rimcg_ots(d%NIJT, d%NKT ) )
625 ALLOCATE( ztot_rr_accss_ots(d%NIJT, d%NKT ) )
626 ALLOCATE( ztot_rr_accsg_ots(d%NIJT, d%NKT ) )
627 ALLOCATE( ztot_rs_accrg_ots(d%NIJT, d%NKT ) )
628 ALLOCATE( ztot_rs_cmel_ots(d%NIJT, d%NKT ) )
629 ALLOCATE( ztot_ri_cfrz_ots(d%NIJT, d%NKT ) )
630 ALLOCATE( ztot_rr_cfrz_ots(d%NIJT, d%NKT ) )
631 ALLOCATE( ztot_rc_wetg_ots(d%NIJT, d%NKT ) )
632 ALLOCATE( ztot_ri_wetg_ots(d%NIJT, d%NKT ) )
633 ALLOCATE( ztot_rr_wetg_ots(d%NIJT, d%NKT ) )
634 ALLOCATE( ztot_rs_wetg_ots(d%NIJT, d%NKT ) )
635 ALLOCATE( ztot_rc_dryg_ots(d%NIJT, d%NKT ) )
636 ALLOCATE( ztot_ri_dryg_ots(d%NIJT, d%NKT ) )
637 ALLOCATE( ztot_rr_dryg_ots(d%NIJT, d%NKT ) )
638 ALLOCATE( ztot_rs_dryg_ots(d%NIJT, d%NKT ) )
639 ALLOCATE( ztot_rr_gmlt_ots(d%NIJT, d%NKT ) )
640 ALLOCATE( ztot_rc_berfi_ots(d%NIJT, d%NKT ) )
641 ALLOCATE( ztot_rh_wetg_ots(d%NIJT, d%NKT ) )
642 ALLOCATE( ztot_rv_henu_ots(d%NIJT, d%NKT ) )
643 ALLOCATE( ztot_rc_hinc_ots(d%NIJT, d%NKT ) )
644 ALLOCATE( ztot_rv_honh_ots(d%NIJT, d%NKT ) )
645 ALLOCATE( ztot_rr_cvrc_ots(d%NIJT, d%NKT ) )
646 ALLOCATE( ztot_ri_cnvi_ots(d%NIJT, d%NKT ) )
647 ALLOCATE( ztot_ri_depi_ots(d%NIJT, d%NKT ) )
648 ALLOCATE( ztot_ri_hms_ots(d%NIJT, d%NKT ) )
649 ALLOCATE( ztot_ri_hmg_ots(d%NIJT, d%NKT ) )
650 ALLOCATE( ztot_ri_cibu_ots(d%NIJT, d%NKT ) )
651 ALLOCATE( ztot_ri_rdsf_ots(d%NIJT, d%NKT ) )
652 ALLOCATE( ztot_rc_corr2_ots(d%NIJT, d%NKT ) )
653 ALLOCATE( ztot_rr_corr2_ots(d%NIJT, d%NKT ) )
654 ALLOCATE( ztot_ri_corr2_ots(d%NIJT, d%NKT ) )
657IF ( buconf%LBU_ENABLE .AND. limap%LCRYSTAL_SHAPE )
THEN
658 ALLOCATE( ztot_shci_imlt(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_imlt(:,:,:) = 0.
659 ALLOCATE( ztot_shci_corr2(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ); ztot_shci_corr2(:,:,:) = 0.
660 ALLOCATE( ztot_shci_honc(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_honc(:,:,:) = 0.
661 ALLOCATE( ztot_shci_aggs(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_aggs(:,:,:) = 0.
662 ALLOCATE( ztot_shci_cnvi(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_cnvi(:,:,:) = 0.
663 ALLOCATE( ztot_shci_hms(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_hms(:,:,:) = 0.
664 ALLOCATE( ztot_shci_cfrz(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_cfrz(:,:,:) = 0.
665 ALLOCATE( ztot_shci_cibu(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_cibu(:,:,:) = 0.
666 ALLOCATE( ztot_shci_rdsf(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_rdsf(:,:,:) = 0.
667 ALLOCATE( ztot_shci_wetg(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_wetg(:,:,:) = 0.
668 ALLOCATE( ztot_shci_dryg(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_dryg(:,:,:) = 0.
669 ALLOCATE( ztot_shci_hmg(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_hmg(:,:,:) = 0.
670 ALLOCATE( ztot_shci_cnvs(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_cnvs(:,:,:) = 0.
671 ALLOCATE( ztot_shci_hach(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_hach(:,:,:) = 0.
672 ALLOCATE( ztot_shci_isc(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_isc(:,:,:) = 0.
673 ALLOCATE( ztot_shci_iscs(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE) ) ; ztot_shci_iscs(:,:,:) = 0.
674 ALLOCATE( ztot_shri_iscs(d%NIJT,d%NKT) ) ; ztot_shri_iscs(:,:) = 0.
677ALLOCATE (ztot_ri_hind(d%NIJT,d%NKT)) ; ztot_ri_hind(:,:) = 0.
678ALLOCATE (ztot_rc_hinc(d%NIJT,d%NKT)) ; ztot_rc_hinc(:,:) = 0.
679ALLOCATE (ztot_rv_henu(d%NIJT,d%NKT)) ; ztot_rv_henu(:,:) = 0.
680ALLOCATE (ztot_rv_honh(d%NIJT,d%NKT)) ; ztot_rv_honh(:,:) = 0.
682zinv_tstep = 1./ptstep
683zexn(d%NIJB:d%NIJE,:) = (ppabst(d%NIJB:d%NIJE,:)/cst%XP00)**(cst%XRD/cst%XCPD)
684zt(d%NIJB:d%NIJE,:) = ztht(d%NIJB:d%NIJE,:) * zexn(d%NIJB:d%NIJE,:)
690zrvt(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,1) * ptstep
691zrvs(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,1)
692IF ( krr .GE. 2 ) zrct(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,2) * ptstep
693IF ( krr .GE. 2 ) zrcs(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,2)
694IF ( krr .GE. 3 ) zrrt(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,3) * ptstep
695IF ( krr .GE. 3 ) zrrs(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,3)
696IF ( krr .GE. 4 ) zrit(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,4) * ptstep
697IF ( krr .GE. 4 ) zris(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,4)
698IF ( krr .GE. 5 ) zrst(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,5) * ptstep
699IF ( krr .GE. 5 ) zrss(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,5)
700IF ( krr .GE. 6 ) zrgt(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,6) * ptstep
701IF ( krr .GE. 6 ) zrgs(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,6)
702IF ( krr .GE. 7 ) zrht(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,7) * ptstep
703IF ( krr .GE. 7 ) zrhs(d%NIJB:d%NIJE,:) = prs(d%NIJB:d%NIJE,:,7)
707IF ( limap%NMOM_C.GE.2)
THEN
708 zcct(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_nc) * ptstep
709 zccs(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_nc)
711 IF (limap%LICE3)
THEN
712 zcct(d%NIJB:d%NIJE,:) = 300.e6 / prhodref(d%NIJB:d%NIJE,:)
714 zcct(d%NIJB:d%NIJE,:) = 100.e6 / prhodref(d%NIJB:d%NIJE,:)
716 zccs(d%NIJB:d%NIJE,:) = zcct(d%NIJB:d%NIJE,:) / ptstep
718IF ( limap%NMOM_I.GE.2)
THEN
719 IF (.NOT. limap%LCRYSTAL_SHAPE)
THEN
720 zcit(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ni) * ptstep
721 zcis(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ni)
722 ALLOCATE(zcit_shape(0,0,0))
723 ALLOCATE(zcis_shape(0,0,0))
724 ALLOCATE(zrit_shape(0,0,0))
725 ALLOCATE(zris_shape(0,0,0))
727 ALLOCATE(zcit_shape(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE)); zcit_shape(:,:,:) = 0.
728 ALLOCATE(zcis_shape(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE)); zcis_shape(:,:,:) = 0.
729 ALLOCATE(zrit_shape(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE)); zrit_shape(:,:,:) = 0.
730 ALLOCATE(zris_shape(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE)); zris_shape(:,:,:) = 0.
731 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
732 zcit_shape(d%NIJB:d%NIJE,:,ish) = psvs(d%NIJB:d%NIJE,:,isv_lima_ni+ish-1) * ptstep
733 zcis_shape(d%NIJB:d%NIJE,:,ish) = psvs(d%NIJB:d%NIJE,:,isv_lima_ni+ish-1)
738 zcit(:,:)=pcit(:,:)/prhodref(:,:)
739 zcis(:,:)=pcit(:,:)/prhodref(:,:)*zinv_tstep
740 ALLOCATE(zcit_shape(0,0,0))
741 ALLOCATE(zcis_shape(0,0,0))
742 ALLOCATE(zrit_shape(0,0,0))
743 ALLOCATE(zris_shape(0,0,0))
745IF ( limap%NMOM_R.GE.2) zcrt(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_nr) * ptstep
746IF ( limap%NMOM_R.GE.2) zcrs(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_nr)
747IF ( limap%NMOM_I.GE.2) zcit(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ni) * ptstep
748IF ( limap%NMOM_I.GE.2) zcis(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ni)
749IF ( limap%NMOM_S.GE.2) zcst(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ns) * ptstep
750IF ( limap%NMOM_S.GE.2) zcss(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ns)
751IF ( limap%NMOM_G.GE.2) zcgt(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ng) * ptstep
752IF ( limap%NMOM_G.GE.2) zcgs(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ng)
753IF ( limap%NMOM_H.GE.2) zcht(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_nh) * ptstep
754IF ( limap%NMOM_H.GE.2) zchs(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_nh)
756IF ( limap%NMOD_CCN .GE. 1 ) zccnft(d%NIJB:d%NIJE,:,:) = &
757 & psvs(d%NIJB:d%NIJE,:,isv_lima_ccn_free:isv_lima_ccn_free+limap%NMOD_CCN-1) * ptstep
758IF ( limap%NMOD_CCN .GE. 1 ) zccnat(d%NIJB:d%NIJE,:,:) = &
759 & psvs(d%NIJB:d%NIJE,:,isv_lima_ccn_acti:isv_lima_ccn_acti+limap%NMOD_CCN-1) * ptstep
760IF ( limap%NMOD_CCN .GE. 1 ) zccnfs(d%NIJB:d%NIJE,:,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ccn_free:isv_lima_ccn_free+limap%NMOD_CCN-1)
761IF ( limap%NMOD_CCN .GE. 1 ) zccnas(d%NIJB:d%NIJE,:,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ccn_acti:isv_lima_ccn_acti+limap%NMOD_CCN-1)
763IF ( limap%NMOD_IFN .GE. 1 ) zifnft(d%NIJB:d%NIJE,:,:) = &
764 & psvs(d%NIJB:d%NIJE,:,isv_lima_ifn_free:isv_lima_ifn_free+limap%NMOD_IFN-1) * ptstep
765IF ( limap%NMOD_IFN .GE. 1 ) zifnnt(d%NIJB:d%NIJE,:,:) = &
766 & psvs(d%NIJB:d%NIJE,:,isv_lima_ifn_nucl:isv_lima_ifn_nucl+limap%NMOD_IFN-1) * ptstep
767IF ( limap%NMOD_IFN .GE. 1 ) zifnfs(d%NIJB:d%NIJE,:,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ifn_free:isv_lima_ifn_free+limap%NMOD_IFN-1)
768IF ( limap%NMOD_IFN .GE. 1 ) zifnns(d%NIJB:d%NIJE,:,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_ifn_nucl:isv_lima_ifn_nucl+limap%NMOD_IFN-1)
770IF ( limap%NMOD_IMM .GE. 1 ) zimmnt(d%NIJB:d%NIJE,:,:) = &
771 & psvs(d%NIJB:d%NIJE,:,isv_lima_imm_nucl:isv_lima_imm_nucl+limap%NMOD_IMM-1) * ptstep
772IF ( limap%NMOD_IMM .GE. 1 ) zimmns(d%NIJB:d%NIJE,:,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_imm_nucl:isv_lima_imm_nucl+limap%NMOD_IMM-1)
774IF ( limap%LHHONI ) zhomft(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_hom_haze) * ptstep
775IF ( limap%LHHONI ) zhomfs(d%NIJB:d%NIJE,:) = psvs(d%NIJB:d%NIJE,:,isv_lima_hom_haze)
780 ALLOCATE(zqpit(d%NIJT,d%NKT))
781 ALLOCATE(zqct(d%NIJT,d%NKT))
782 ALLOCATE(zqrt(d%NIJT,d%NKT))
783 ALLOCATE(zqit(d%NIJT,d%NKT))
784 ALLOCATE(zqst(d%NIJT,d%NKT))
785 ALLOCATE(zqgt(d%NIJT,d%NKT))
786 ALLOCATE(zqnit(d%NIJT,d%NKT))
787 IF (krr == 7)
ALLOCATE(zqht(d%NIJT,d%NKT))
789 ALLOCATE(zqpis(d%NIJT,d%NKT))
790 ALLOCATE(zqcs(d%NIJT,d%NKT))
791 ALLOCATE(zqrs(d%NIJT,d%NKT))
792 ALLOCATE(zqis(d%NIJT,d%NKT))
793 ALLOCATE(zqss(d%NIJT,d%NKT))
794 ALLOCATE(zqgs(d%NIJT,d%NKT))
795 ALLOCATE(zqnis(d%NIJT,d%NKT))
796 IF (krr == 7)
ALLOCATE(zqhs(d%NIJT,d%NKT))
798 ALLOCATE(zrvt_elec(d%NIJT,d%NKT))
799 ALLOCATE(zrct_elec(d%NIJT,d%NKT))
800 ALLOCATE(zrrt_elec(d%NIJT,d%NKT))
801 ALLOCATE(zrit_elec(d%NIJT,d%NKT))
802 ALLOCATE(zrst_elec(d%NIJT,d%NKT))
803 ALLOCATE(zrgt_elec(d%NIJT,d%NKT))
804 IF (krr == 7)
ALLOCATE(zrht_elec(d%NIJT,d%NKT))
805 ALLOCATE(zcct_elec(d%NIJT,d%NKT))
806 ALLOCATE(zcrt_elec(d%NIJT,d%NKT))
807 ALLOCATE(zcit_elec(d%NIJT,d%NKT))
808 ALLOCATE(zcst_elec(d%NIJT,d%NKT))
809 ALLOCATE(zcgt_elec(d%NIJT,d%NKT))
810 IF (krr == 7)
ALLOCATE(zcht_elec(d%NIJT,d%NKT))
812 zqpit(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,1) * ptstep
813 zqct(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,2) * ptstep
814 zqrt(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,3) * ptstep
815 zqit(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,4) * ptstep
816 zqst(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,5) * ptstep
817 zqgt(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,6) * ptstep
819 zqnit(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,7) * ptstep
820 ELSE IF (krr == 7)
THEN
821 zqht(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,7) * ptstep
822 zqnit(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,8) * ptstep
825 zqpis(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,1)
826 zqcs(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,2)
827 zqrs(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,3)
828 zqis(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,4)
829 zqss(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,5)
830 zqgs(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,6)
832 zqnis(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,7)
833 ELSE IF (krr == 7)
THEN
834 zqhs(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,7)
835 zqnis(d%NIJB:d%NIJE,:) = psv_elec_s(d%NIJB:d%NIJE,:,8)
916IF ( buconf%LBU_ENABLE )
THEN
917 IF ( buconf%LBUDGET_TH ) zwkbud(:,:) = zths(:,:) * prhodj(:,:)
918 IF ( buconf%LBUDGET_TH ) &
919 CALL tbudgets(nbudget_th)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
920 IF ( buconf%LBUDGET_RC .AND. limap%NMOM_C.GE.1 .AND. limap%LSEDC ) zwkbud(:,:) = zrcs(:,:) * prhodj(:,:)
921 IF ( buconf%LBUDGET_RC .AND. limap%NMOM_C.GE.1 .AND. limap%LSEDC ) &
922 CALL tbudgets(nbudget_rc)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
923 IF ( buconf%LBUDGET_RR .AND. limap%NMOM_R.GE.1 ) zwkbud(:,:) = zrrs(:,:) * prhodj(:,:)
924 IF ( buconf%LBUDGET_RR .AND. limap%NMOM_R.GE.1 ) &
925 CALL tbudgets(nbudget_rr)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
926 IF ( buconf%LBUDGET_RI .AND. limap%NMOM_I.GE.1 .AND. limap%LSEDI ) zwkbud(:,:) = zris(:,:) * prhodj(:,:)
927 IF ( buconf%LBUDGET_RI .AND. limap%NMOM_I.GE.1 .AND. limap%LSEDI ) &
928 CALL tbudgets(nbudget_ri)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
929 IF ( buconf%LBUDGET_RS .AND. limap%NMOM_S.GE.1 ) zwkbud(:,:) = zrss(:,:) * prhodj(:,:)
930 IF ( buconf%LBUDGET_RS .AND. limap%NMOM_S.GE.1 ) &
931 CALL tbudgets(nbudget_rs)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
932 IF ( buconf%LBUDGET_RG .AND. limap%NMOM_G.GE.1 ) zwkbud(:,:) = zrgs(:,:) * prhodj(:,:)
933 IF ( buconf%LBUDGET_RG .AND. limap%NMOM_G.GE.1 ) &
934 CALL tbudgets(nbudget_rg)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
935 IF ( buconf%LBUDGET_RH .AND. limap%NMOM_H.GE.1 ) zwkbud(:,:) = zrhs(:,:) * prhodj(:,:)
936 IF ( buconf%LBUDGET_RH .AND. limap%NMOM_H.GE.1 ) &
937 CALL tbudgets(nbudget_rh)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
938 IF ( buconf%LBUDGET_SV )
THEN
939 IF ( limap%LSEDC .AND. limap%NMOM_C.GE.2) zwkbud(:,:) = zccs(:,:) * prhodj(:,:)
940 IF ( limap%LSEDC .AND. limap%NMOM_C.GE.2) &
941 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NC)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
942 IF ( limap%NMOM_R.GE.2) zwkbud(:,:) = zcrs(:,:) * prhodj(:,:)
943 IF ( limap%NMOM_R.GE.2) &
944 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NR)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
945 IF ( limap%LSEDI .AND. limap%NMOM_I.GE.2)
THEN
946 IF (.NOT. limap%LCRYSTAL_SHAPE)
THEN
947 zwkbud(:,:) = zcis(:,:) * prhodj(:,:)
948 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NI)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
950 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
951 zwkbud(:,:) = zcis_shape( :, :, ish) * prhodj( :, :)
952 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NI + ish - 1)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
956 IF ( limap%NMOM_S.GE.2) zwkbud(:,:) = zcss(:,:) * prhodj(:,:)
957 IF ( limap%NMOM_S.GE.2) &
958 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NS)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
959 IF ( limap%NMOM_G.GE.2) zwkbud(:,:) = zcgs(:,:) * prhodj(:,:)
960 IF ( limap%NMOM_G.GE.2) &
961 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NG)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
962 IF ( limap%NMOM_H.GE.2) zwkbud(:,:) = zchs(:,:) * prhodj(:,:)
963 IF ( limap%NMOM_H.GE.2) &
964 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NH)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
967 IF ( limap%LSEDC ) zwkbud(:,:) = zqcs(:,:) * prhodj(:,:)
969 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 1)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
970 zwkbud(:,:) = zqrs(:,:) * prhodj(:,:)
971 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 2)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
972 IF ( limap%LSEDI ) zwkbud(:,:) = zqis(:,:) * prhodj(:,:)
974 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 3)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
975 zwkbud(:,:) = zqss(:,:) * prhodj(:,:)
976 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 4)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
977 zwkbud(:,:) = zqgs(:,:) * prhodj(:,:)
978 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 5)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
979 IF (limap%NMOM_H .GE. 1) zwkbud(:,:) = zqhs(:,:) * prhodj(:,:)
980 IF (limap%NMOM_H .GE. 1) &
981 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 6)%PTR%INIT_PHY(d,
'SEDI', zwkbud )
989zrt_sum(d%NIJB:d%NIJE,:) = (zrvs(d%NIJB:d%NIJE,:) + zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:) + zris(d%NIJB:d%NIJE,:) + &
990 &zrss(d%NIJB:d%NIJE,:) + zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:))*ptstep
991zcpt(d%NIJB:d%NIJE,:) = cst%XCPD + (cst%XCPV * zrvs(d%NIJB:d%NIJE,:) + &
992 cst%XCL * (zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:)) + &
993 cst%XCI * (zris(d%NIJB:d%NIJE,:) + zrss(d%NIJB:d%NIJE,:) + &
994 zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:)))*ptstep
995IF (limap%NMOM_C.GE.1 .AND. limap%LSEDC)
THEN
998 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
999 'L', 2, 2, 0, 1, ptstep, oelec, elecp, elecd, &
1000 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1001 zrcs, zccs, pinprc, pfpr(:,:,2), pefieldw, zqcs)
1003 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1004 'L', 2, 2, 0, 1, ptstep, oelec, elecp, elecd, &
1005 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1006 zrcs, zccs, pinprc, pfpr(:,:,2))
1011zrt_sum(d%NIJB:d%NIJE,:) = (zrvs(d%NIJB:d%NIJE,:) + zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:) + zris(d%NIJB:d%NIJE,:) + &
1012 zrss(d%NIJB:d%NIJE,:) + zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:))*ptstep
1013zcpt(d%NIJB:d%NIJE,:) = cst%XCPD + (cst%XCPV * zrvs(d%NIJB:d%NIJE,:) + &
1014 cst%XCL * (zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:)) + &
1015 cst%XCI * (zris(d%NIJB:d%NIJE,:) + zrss(d%NIJB:d%NIJE,:) + &
1016 zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:)))*ptstep
1017IF (limap%NMOM_R.GE.1)
THEN
1020 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1021 'L', limap%NMOM_R, 3, 0, 1, ptstep, oelec, elecp, elecd, &
1022 pdzz, prhodref, pthvrefzikb,ppabst, zt, zrt_sum, zcpt, &
1023 zrrs, zcrs, pinprr, pfpr(:,:,3), pefieldw, zqrs)
1025 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1026 'L', limap%NMOM_R, 3, 0, 1, ptstep, oelec, elecp, elecd, &
1027 pdzz, prhodref,pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1028 zrrs, zcrs, pinprr, pfpr(:,:,3))
1033zrt_sum(d%NIJB:d%NIJE,:) = (zrvs(d%NIJB:d%NIJE,:) + zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:) + zris(d%NIJB:d%NIJE,:) + &
1034 zrss(d%NIJB:d%NIJE,:) + zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:))*ptstep
1035zcpt(d%NIJB:d%NIJE,:) = cst%XCPD + (cst%XCPV * zrvs(d%NIJB:d%NIJE,:) + &
1036 cst%XCL * (zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:)) + &
1037 cst%XCI * (zris(d%NIJB:d%NIJE,:) + zrss(d%NIJB:d%NIJE,:) + &
1038 zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:)))*ptstep
1039IF (limap%NMOM_I.GE.1 .AND. limap%LSEDI)
THEN
1042 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1043 'I', limap%NMOM_I, 4, 0, 1, ptstep, oelec, elecp, elecd, &
1044 pdzz, prhodref,pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1045 zris, zcis, zw2d, pfpr(:,:,4), pefieldw, zqis)
1047 IF (.NOT. limap%LCRYSTAL_SHAPE)
THEN
1048 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1049 'I', limap%NMOM_I, 4, 0, 1, ptstep, oelec, elecp, elecd, &
1050 pdzz, prhodref,pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1051 zris, zcis, zw2d, pfpr(:,:,4))
1053 ALLOCATE(zlbdai_shape(d%NIJT,d%NKT,limap%NNB_CRYSTAL_SHAPE))
1054 CALL lima_shape_compute_lbda_3d(d, limap, limac, zris, zcis_shape, zris_shape, zlbdai_shape)
1055 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
1056 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1057 'I', limap%NMOM_I, 4, ish, 1, ptstep, oelec, elecp, elecd, &
1058 pdzz, prhodref,pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1059 zris_shape(:,:,ish), zcis_shape(:,:,ish), zw2d, pfpr(:,:,4), &
1060 plbdai_shape=zlbdai_shape(:,:,ish))
1062 zcis(d%NIJB:d%NIJE,:) = sum(zcis_shape(d%NIJB:d%NIJE,:,:),dim=3)
1063 zris(d%NIJB:d%NIJE,:) = sum(zris_shape(d%NIJB:d%NIJE,:,:),dim=3)
1064 DEALLOCATE(zlbdai_shape)
1070zrt_sum(d%NIJB:d%NIJE,:) = (zrvs(d%NIJB:d%NIJE,:) + zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:) + zris(d%NIJB:d%NIJE,:) + &
1071 zrss(d%NIJB:d%NIJE,:) + zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:))*ptstep
1072zcpt(d%NIJB:d%NIJE,:) = cst%XCPD + (cst%XCPV * zrvs(d%NIJB:d%NIJE,:) + &
1073 cst%XCL * (zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:)) + &
1074 cst%XCI * (zris(d%NIJB:d%NIJE,:) + zrss(d%NIJB:d%NIJE,:) + &
1075 zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:)))*ptstep
1076IF (limap%NMOM_S.GE.1)
THEN
1079 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1080 'I', limap%NMOM_S, 5, 0, 1, ptstep, oelec, elecp, elecd, &
1081 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1082 zrss, zcss, pinprs, pfpr(:,:,5), pefieldw, zqss)
1084 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1085 'I', limap%NMOM_S, 5, 0, 1, ptstep, oelec, elecp, elecd, &
1086 pdzz, prhodref, pthvrefzikb, ppabst,zt, zrt_sum, zcpt, &
1087 zrss, zcss, pinprs, pfpr(:,:,5))
1092zrt_sum(d%NIJB:d%NIJE,:) = (zrvs(d%NIJB:d%NIJE,:) + zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:) + zris(d%NIJB:d%NIJE,:) + &
1093 zrss(d%NIJB:d%NIJE,:) + zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:))*ptstep
1094zcpt(d%NIJB:d%NIJE,:) = cst%XCPD + (cst%XCPV * zrvs(d%NIJB:d%NIJE,:) + &
1095 cst%XCL * (zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:)) + &
1096 cst%XCI * (zris(d%NIJB:d%NIJE,:) + zrss(d%NIJB:d%NIJE,:) + &
1097 zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:)))*ptstep
1098IF (limap%NMOM_G.GE.1)
THEN
1101 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1102 'I', limap%NMOM_G, 6, 0, 1, ptstep, oelec, elecp, elecd, &
1103 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1104 zrgs, zcgs, pinprg, pfpr(:,:,6), pefieldw, zqgs)
1106 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1107 'I', limap%NMOM_G, 6, 0, 1, ptstep, oelec, elecp, elecd, &
1108 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1109 zrgs, zcgs, pinprg, pfpr(:,:,6))
1114zrt_sum(d%NIJB:d%NIJE,:) = (zrvs(d%NIJB:d%NIJE,:) + zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:) + zris(d%NIJB:d%NIJE,:) + &
1115 zrss(d%NIJB:d%NIJE,:) + zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:))*ptstep
1116zcpt(d%NIJB:d%NIJE,:) = cst%XCPD + (cst%XCPV * zrvs(d%NIJB:d%NIJE,:) + &
1117 cst%XCL * (zrcs(d%NIJB:d%NIJE,:) + zrrs(d%NIJB:d%NIJE,:)) + &
1118 cst%XCI * (zris(d%NIJB:d%NIJE,:) + zrss(d%NIJB:d%NIJE,:) + &
1119 zrgs(d%NIJB:d%NIJE,:) + zrhs(d%NIJB:d%NIJE,:)))*ptstep
1120IF (limap%NMOM_H.GE.1)
THEN
1123 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1124 'I', limap%NMOM_H, 7, 0, 1, ptstep, oelec, elecp, elecd, &
1125 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1126 zrhs, zchs, pinprh, pfpr(:,:,7), pefieldw, zqhs)
1128 CALL lima_sedimentation(limap, limaw, limac, limam, d, cst, &
1129 'I', limap%NMOM_H, 7, 0, 1, ptstep, oelec, elecp, elecd, &
1130 pdzz, prhodref, pthvrefzikb, ppabst, zt, zrt_sum, zcpt, &
1131 zrhs, zchs, pinprh, pfpr(:,:,7))
1135zths(d%NIJB:d%NIJE,:) = zt(d%NIJB:d%NIJE,:) / zexn(d%NIJB:d%NIJE,:) * zinv_tstep
1139IF ( buconf%LBU_ENABLE )
then
1140 IF ( buconf%LBUDGET_TH ) zwkbud(:,:) = zths(:,:) * prhodj(:,:)
1141 IF ( buconf%LBUDGET_TH ) &
1142 CALL tbudgets(nbudget_th)%PTR%END_PHY(d,
'SEDI', zwkbud )
1143 IF ( buconf%LBUDGET_RC .AND. limap%NMOM_C.GE.1 .AND. limap%LSEDC ) zwkbud(:,:) = zrcs(:,:) * prhodj(:,:)
1144 IF ( buconf%LBUDGET_RC .AND. limap%NMOM_C.GE.1 .AND. limap%LSEDC ) &
1145 CALL tbudgets(nbudget_rc)%PTR%END_PHY(d,
'SEDI', zwkbud )
1146 IF ( buconf%LBUDGET_RR .AND. limap%NMOM_R.GE.1 ) zwkbud(:,:) = zrrs(:,:) * prhodj(:,:)
1147 IF ( buconf%LBUDGET_RR .AND. limap%NMOM_R.GE.1 ) &
1148 CALL tbudgets(nbudget_rr)%PTR%END_PHY(d,
'SEDI', zwkbud )
1149 IF ( buconf%LBUDGET_RI .AND. limap%NMOM_I.GE.1 .AND. limap%LSEDI ) zwkbud(:,:) = zris(:,:) * prhodj(:,:)
1150 IF ( buconf%LBUDGET_RI .AND. limap%NMOM_I.GE.1 .AND. limap%LSEDI ) &
1151 CALL tbudgets(nbudget_ri)%PTR%END_PHY(d,
'SEDI', zwkbud )
1152 IF ( buconf%LBUDGET_RS .AND. limap%NMOM_S.GE.1 ) zwkbud(:,:) = zrss(:,:) * prhodj(:,:)
1153 IF ( buconf%LBUDGET_RS .AND. limap%NMOM_S.GE.1 ) &
1154 CALL tbudgets(nbudget_rs)%PTR%END_PHY(d,
'SEDI', zwkbud )
1155 IF ( buconf%LBUDGET_RG .AND. limap%NMOM_G.GE.1 ) zwkbud(:,:) = zrgs(:,:) * prhodj(:,:)
1156 IF ( buconf%LBUDGET_RG .AND. limap%NMOM_G.GE.1 ) &
1157 CALL tbudgets(nbudget_rg)%PTR%END_PHY(d,
'SEDI', zwkbud )
1158 IF ( buconf%LBUDGET_RH .AND. limap%NMOM_H.GE.1 ) zwkbud(:,:) = zrhs(:,:) * prhodj(:,:)
1159 IF ( buconf%LBUDGET_RH .AND. limap%NMOM_H.GE.1 ) &
1160 CALL tbudgets(nbudget_rh)%PTR%END_PHY(d,
'SEDI', zwkbud )
1161 IF ( buconf%LBUDGET_SV )
then
1162 IF ( limap%LSEDC .AND. limap%NMOM_C.GE.2 ) zwkbud(:,:) = zccs(:,:) * prhodj(:,:)
1163 IF ( limap%LSEDC .AND. limap%NMOM_C.GE.2 ) &
1164 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NC)%PTR%END_PHY(d,
'SEDI', zwkbud )
1165 IF ( limap%NMOM_R.GE.2 ) zwkbud(:,:) = zcrs(:,:) * prhodj(:,:)
1166 IF ( limap%NMOM_R.GE.2 ) &
1167 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NR)%PTR%END_PHY(d,
'SEDI', zwkbud )
1168 IF ( limap%LSEDI .AND. limap%NMOM_I.GE.2 )
THEN
1169 IF (.NOT. limap%LCRYSTAL_SHAPE)
THEN
1170 zwkbud(:,:) = zcis(:,:) * prhodj(:,:)
1171 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NI)%PTR%END_PHY(d,
'SEDI', zwkbud )
1173 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
1174 zwkbud(:,:) = zcis_shape( :, :, ish) * prhodj( :, :)
1175 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NI + ish - 1)%PTR%END_PHY(d,
'SEDI', zwkbud )
1179 IF ( limap%NMOM_S.GE.2 ) zwkbud(:,:) = zcss(:,:) * prhodj(:,:)
1180 IF ( limap%NMOM_S.GE.2 ) &
1181 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NS)%PTR%END_PHY(d,
'SEDI', zwkbud )
1182 IF ( limap%NMOM_G.GE.2 ) zwkbud(:,:) = zcgs(:,:) * prhodj(:,:)
1183 IF ( limap%NMOM_G.GE.2 ) &
1184 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NG)%PTR%END_PHY(d,
'SEDI', zwkbud )
1185 IF ( limap%NMOM_H.GE.2 ) zwkbud(:,:) = zchs(:,:) * prhodj(:,:)
1186 IF ( limap%NMOM_H.GE.2 ) &
1187 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NH)%PTR%END_PHY(d,
'SEDI', zwkbud )
1190 IF ( limap%LSEDC ) zwkbud(:,:) = zqcs(:,:) * prhodj(:,:)
1191 IF ( limap%LSEDC ) &
1192 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 1)%PTR%END_PHY(d,
'SEDI', zwkbud )
1193 zwkbud(:,:) = zqrs(:,:) * prhodj(:,:)
1194 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 2)%PTR%END_PHY(d,
'SEDI', zwkbud )
1195 IF ( limap%LSEDI ) zwkbud(:,:) = zqis(:,:) * prhodj(:,:)
1196 IF ( limap%LSEDI ) &
1197 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 3)%PTR%END_PHY(d,
'SEDI', zwkbud )
1198 zwkbud(:,:) = zqss(:,:) * prhodj(:,:)
1199 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 4)%PTR%END_PHY(d,
'SEDI', zwkbud )
1200 zwkbud(:,:) = zqgs(:,:) * prhodj(:,:)
1201 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 5)%PTR%END_PHY(d,
'SEDI', zwkbud )
1202 IF (limap%NMOM_H .GE. 1) zwkbud(:,:) = zqhs(:,:) * prhodj(:,:)
1203 IF (limap%NMOM_H .GE. 1) &
1204 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_ELECBEG + 6)%PTR%END_PHY(d,
'SEDI', zwkbud )
1211IF (limap%NMOM_C.GE.1 .AND. limap%LDEPOC)
THEN
1213IF (.NOT. limap%LSEDC) pinprc=0.
1214 IF ( buconf%LBUDGET_RC ) zwkbud(:,:) = zrcs(:,:) * prhodj(:,:)
1215 IF ( buconf%LBUDGET_RC )
CALL tbudgets(nbudget_rc)%PTR%INIT_PHY(d,
'DEPO', zwkbud )
1216 IF ( buconf%LBUDGET_SV .AND. limap%NMOM_C.GE.2) zwkbud(:,:) = zccs(:,:) * prhodj(:,:)
1217 IF ( buconf%LBUDGET_SV .AND. limap%NMOM_C.GE.2) &
1218 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NC)%PTR%INIT_PHY(d,
'DEPO', zwkbud )
1221 gdep(d%NIJB:d%NIJE) = zrcs(d%NIJB:d%NIJE,d%NKB) >0 .AND. zccs(d%NIJB:d%NIJE,d%NKB) >0 .AND. &
1222 zrct(d%NIJB:d%NIJE,d%NKB) >0 .AND. zcct(d%NIJB:d%NIJE,d%NKB) >0
1224 zrcs(d%NIJB:d%NIJE,d%NKB) = zrcs(d%NIJB:d%NIJE,d%NKB) - limap%XVDEPOC * zrct(d%NIJB:d%NIJE,d%NKB) / pdzz(d%NIJB:d%NIJE,d%NKB)
1225 zccs(d%NIJB:d%NIJE,d%NKB) = zccs(d%NIJB:d%NIJE,d%NKB) - limap%XVDEPOC * zcct(d%NIJB:d%NIJE,d%NKB) / pdzz(d%NIJB:d%NIJE,d%NKB)
1226 pinprc(d%NIJB:d%NIJE) = pinprc(d%NIJB:d%NIJE) + limap%XVDEPOC * zrct(d%NIJB:d%NIJE,d%NKB) * prhodref(d%NIJB:d%NIJE,d%NKB) &
1228 pindep(d%NIJB:d%NIJE) = limap%XVDEPOC * zrct(d%NIJB:d%NIJE,d%NKB) * prhodref(d%NIJB:d%NIJE,d%NKB) /cst%XRHOLW
1231 IF ( buconf%LBUDGET_RC ) zwkbud(:,:) = zrcs(:,:) * prhodj(:,:)
1232 IF ( buconf%LBUDGET_RC )
CALL tbudgets(nbudget_rc)%PTR%END_PHY(d,
'DEPO', zwkbud )
1233 IF ( buconf%LBUDGET_SV .AND. limap%NMOM_C.GE.2) zwkbud(:,:) = zccs(:,:) * prhodj(:,:)
1234 IF ( buconf%LBUDGET_SV .AND. limap%NMOM_C.GE.2) &
1235 CALL tbudgets(nbudget_sv1 - 1 + tnsv%NSV_LIMA_NC)%PTR%END_PHY(d,
'DEPO', zwkbud )
1271ztht(d%NIJB:d%NIJE,:) = zths(d%NIJB:d%NIJE,:) * ptstep
1272zt(d%NIJB:d%NIJE,:) = ztht(d%NIJB:d%NIJE,:) * zexn(d%NIJB:d%NIJE,:)
1274IF ( krr .GE. 2 ) zrct(d%NIJB:d%NIJE,:) = zrcs(d%NIJB:d%NIJE,:) * ptstep
1275IF ( krr .GE. 3 ) zrrt(d%NIJB:d%NIJE,:) = zrrs(d%NIJB:d%NIJE,:) * ptstep
1276IF ( krr .GE. 4 ) zrit(d%NIJB:d%NIJE,:) = zris(d%NIJB:d%NIJE,:) * ptstep
1277IF ( krr .GE. 5 ) zrst(d%NIJB:d%NIJE,:) = zrss(d%NIJB:d%NIJE,:) * ptstep
1278IF ( krr .GE. 6 ) zrgt(d%NIJB:d%NIJE,:) = zrgs(d%NIJB:d%NIJE,:) * ptstep
1279IF ( krr .GE. 7 ) zrht(d%NIJB:d%NIJE,:) = zrhs(d%NIJB:d%NIJE,:) * ptstep
1281IF ( limap%NMOM_C.GE.2 ) zcct(d%NIJB:d%NIJE,:) = zccs(d%NIJB:d%NIJE,:) * ptstep
1282IF ( limap%NMOM_R.GE.2 ) zcrt(d%NIJB:d%NIJE,:) = zcrs(d%NIJB:d%NIJE,:) * ptstep
1283IF ( limap%NMOM_I.GE.2 ) zcit(d%NIJB:d%NIJE,:) = zcis(d%NIJB:d%NIJE,:) * ptstep
1284IF ( limap%NMOM_S.GE.2 ) zcst(d%NIJB:d%NIJE,:) = zcss(d%NIJB:d%NIJE,:) * ptstep
1285IF ( limap%NMOM_G.GE.2 ) zcgt(d%NIJB:d%NIJE,:) = zcgs(d%NIJB:d%NIJE,:) * ptstep
1286IF ( limap%NMOM_H.GE.2 ) zcht(d%NIJB:d%NIJE,:) = zchs(d%NIJB:d%NIJE,:) * ptstep
1288IF (limap%LCRYSTAL_SHAPE)
THEN
1289 zcit_shape(d%NIJB:d%NIJE,:,:) = zcis_shape(d%NIJB:d%NIJE,:,:) * ptstep
1290 zcit(d%NIJB:d%NIJE,:) = sum(zcit_shape(d%NIJB:d%NIJE,:,:),dim=3)
1294 zqct(d%NIJB:d%NIJE,:) = zqcs(d%NIJB:d%NIJE,:) * ptstep
1295 zqrt(d%NIJB:d%NIJE,:) = zqrs(d%NIJB:d%NIJE,:) * ptstep
1296 zqit(d%NIJB:d%NIJE,:) = zqis(d%NIJB:d%NIJE,:) * ptstep
1297 zqst(d%NIJB:d%NIJE,:) = zqss(d%NIJB:d%NIJE,:) * ptstep
1298 zqgt(d%NIJB:d%NIJE,:) = zqgs(d%NIJB:d%NIJE,:) * ptstep
1299 IF (limap%NMOM_H .GE. 1) zqht(d%NIJB:d%NIJE,:) = zqhs(d%NIJB:d%NIJE,:) * ptstep
1307CALL lima_compute_cloud_fractions (limap, d, &
1314 pcldfr, picefr, pprcfr )
1322CALL lima_nucleation_procs (limap, limaw, limac, tnsv, d, cst, nebn, buconf, tbudgets, kbudgets, &
1323 kcarb, ksoa, ksp, odust, osalt, oorilam, &
1325 prhodref, zexn, ppabst, zt, pdthrad, pw_nu, &
1326 ztht, zrvt, zrct, zrrt, zrit, zrst, zrgt, zrht, &
1327 zcct, zcrt, zcit, zcit_shape, paero,psolorg, pmi, hactccn, &
1328 zccnft, zccnat, zifnft, zifnnt, zimmnt, zhomft, &
1329 pcldfr, picefr, pprcfr, &
1330 ztot_rv_henu, ztot_rc_hinc, ztot_ri_hind, ztot_rv_honh)
1335zrvs(d%NIJB:d%NIJE,:) = zrvt(d%NIJB:d%NIJE,:) *zinv_tstep
1336zrcs(d%NIJB:d%NIJE,:) = zrct(d%NIJB:d%NIJE,:) *zinv_tstep
1337zrrs(d%NIJB:d%NIJE,:) = zrrt(d%NIJB:d%NIJE,:) *zinv_tstep
1338zris(d%NIJB:d%NIJE,:) = zrit(d%NIJB:d%NIJE,:) *zinv_tstep
1339zrss(d%NIJB:d%NIJE,:) = zrst(d%NIJB:d%NIJE,:) *zinv_tstep
1340zrgs(d%NIJB:d%NIJE,:) = zrgt(d%NIJB:d%NIJE,:) *zinv_tstep
1341zrhs(d%NIJB:d%NIJE,:) = zrht(d%NIJB:d%NIJE,:) *zinv_tstep
1343IF (limap%NMOM_C.GE.2) zccs(d%NIJB:d%NIJE,:) = zcct(d%NIJB:d%NIJE,:) *zinv_tstep
1344IF (limap%NMOM_R.GE.2) zcrs(d%NIJB:d%NIJE,:) = zcrt(d%NIJB:d%NIJE,:) *zinv_tstep
1345IF (limap%NMOM_I.GE.2) zcis(d%NIJB:d%NIJE,:) = zcit(d%NIJB:d%NIJE,:) *zinv_tstep
1346IF (limap%NMOM_S.GE.2) zcss(d%NIJB:d%NIJE,:) = zcst(d%NIJB:d%NIJE,:) *zinv_tstep
1347IF (limap%NMOM_G.GE.2) zcgs(d%NIJB:d%NIJE,:) = zcgt(d%NIJB:d%NIJE,:) *zinv_tstep
1348IF (limap%NMOM_H.GE.2) zchs(d%NIJB:d%NIJE,:) = zcht(d%NIJB:d%NIJE,:) *zinv_tstep
1350IF (limap%LCRYSTAL_SHAPE)
THEN
1351 zcis_shape(d%NIJB:d%NIJE,:,:) = zcit_shape(d%NIJB:d%NIJE,:,:) * zinv_tstep
1352 zcis(d%NIJB:d%NIJE,:) = sum(zcis_shape(d%NIJB:d%NIJE,:,:),dim=3)
1355zccnfs(d%NIJB:d%NIJE,:,:) = zccnft(d%NIJB:d%NIJE,:,:) *zinv_tstep
1356zccnas(d%NIJB:d%NIJE,:,:) = zccnat(d%NIJB:d%NIJE,:,:) *zinv_tstep
1357zifnfs(d%NIJB:d%NIJE,:,:) = zifnft(d%NIJB:d%NIJE,:,:) *zinv_tstep
1358zifnns(d%NIJB:d%NIJE,:,:) = zifnnt(d%NIJB:d%NIJE,:,:) *zinv_tstep
1359zimmns(d%NIJB:d%NIJE,:,:) = zimmnt(d%NIJB:d%NIJE,:,:) *zinv_tstep
1360zhomfs(d%NIJB:d%NIJE,:) = zhomft(d%NIJB:d%NIJE,:) *zinv_tstep
1362zths(d%NIJB:d%NIJE,:) = ztht(d%NIJB:d%NIJE,:) *zinv_tstep
1363zt(d%NIJB:d%NIJE,:) = ztht(d%NIJB:d%NIJE,:) * zexn(d%NIJB:d%NIJE,:)
1366 zrvt_elec(d%NIJB:d%NIJE,:) = zrvt(d%NIJB:d%NIJE,:)
1367 zrct_elec(d%NIJB:d%NIJE,:) = zrct(d%NIJB:d%NIJE,:)
1368 zrrt_elec(d%NIJB:d%NIJE,:) = zrrt(d%NIJB:d%NIJE,:)
1369 zrit_elec(d%NIJB:d%NIJE,:) = zrit(d%NIJB:d%NIJE,:)
1370 zrst_elec(d%NIJB:d%NIJE,:) = zrst(d%NIJB:d%NIJE,:)
1371 zrgt_elec(d%NIJB:d%NIJE,:) = zrgt(d%NIJB:d%NIJE,:)
1372 IF (limap%NMOM_H .GE. 1) zrht_elec(d%NIJB:d%NIJE,:) = zrht(d%NIJB:d%NIJE,:)
1373 IF (limap%NMOM_C .GE. 2) zcct_elec(d%NIJB:d%NIJE,:) = zcct(d%NIJB:d%NIJE,:)
1374 IF (limap%NMOM_R .GE. 2) zcrt_elec(d%NIJB:d%NIJE,:) = zcrt(d%NIJB:d%NIJE,:)
1375 IF (limap%NMOM_I .GE. 2) zcit_elec(d%NIJB:d%NIJE,:) = zcit(d%NIJB:d%NIJE,:)
1376 IF (limap%NMOM_S .GE. 2) zcst_elec(d%NIJB:d%NIJE,:) = zcst(d%NIJB:d%NIJE,:)
1377 IF (limap%NMOM_G .GE. 2) zcgt_elec(d%NIJB:d%NIJE,:) = zcgt(d%NIJB:d%NIJE,:)
1378 IF (limap%NMOM_H .GE. 2) zcht_elec(d%NIJB:d%NIJE,:) = zcht(d%NIJB:d%NIJE,:)
1388 llmicro(:,:)=zrct(:,:)>limap%XRTMIN(2) .OR. &
1389 zrrt(:,:)>limap%XRTMIN(3) .OR. &
1390 zrit(:,:)>limap%XRTMIN(4) .OR. &
1391 zrst(:,:)>limap%XRTMIN(5) .OR. &
1392 zrgt(:,:)>limap%XRTMIN(6) .OR. &
1393 zrht(:,:)>limap%XRTMIN(7)
1395 llmicro(:,:)=zrct(:,:)>limap%XRTMIN(2) .OR. &
1396 zrrt(:,:)>limap%XRTMIN(3) .OR. &
1397 zrit(:,:)>limap%XRTMIN(4) .OR. &
1398 zrst(:,:)>limap%XRTMIN(5) .OR. &
1399 zrgt(:,:)>limap%XRTMIN(6)
1406IF ( nebn%LSUBG_COND )
THEN
1407 IF (limap%CSUBG_AUCV_RC==
"NONE")
THEN
1410 zhlc_hrc(:,:)=zrct(:,:)
1411 zhlc_hcf(:,:)=pcldfr(:,:)
1413 zhlc_hrc(:,:)=phlc_hrc(:,:)
1414 zhlc_hcf(:,:)=phlc_hcf(:,:)
1415 DO ik = d%NKTB, d%NKTE
1416 DO ii=d%NIJB, d%NIJE
1417 zhlc_lrc(ii, ik) = zrct(ii, ik) - zhlc_hrc(ii, ik)
1418 IF(zrct(ii, ik)>0.)
THEN
1419 zhlc_lcf(ii, ik) = pcldfr(ii, ik)- zhlc_hcf(ii, ik)
1426 IF (limap%CSUBG_AUCV_RI==
"NONE")
THEN
1429 zhli_hri(:,:)=zrit(:,:)
1430 zhli_hcf(:,:)=picefr(:,:)
1432 zhli_hri(:,:)=phli_hri(:,:)
1433 zhli_hcf(:,:)=phli_hcf(:,:)
1434 DO ik = d%NKTB, d%NKTE
1435 DO ii=d%NIJB, d%NIJE
1436 zhli_lri(ii, ik) = zrit(ii, ik) - zhli_hri(ii, ik)
1437 IF(zrit(ii, ik)>0.)
THEN
1438 zhli_lcf(ii, ik) = picefr(ii, ik)- zhli_hcf(ii, ik)
1445 isize=d%NIJT*(d%NKTE-d%NKTB+1)
1446 CALL lima_compute_pdf(cst, limap, isize, limap%CSUBG_AUCV_RC, limap%CSUBG_AUCV_RI, limap%CSUBG_PR_PDF,&
1447 llmicro(:,d%NKTB:d%NKTE), prhodref(:,d%NKTB:d%NKTE), zrct(:,d%NKTB:d%NKTE), zrit(:,d%NKTB:d%NKTE), &
1448 pcldfr(:,d%NKTB:d%NKTE), zt(:,d%NKTB:d%NKTE), zsigma_rc(:,d%NKTB:d%NKTE), &
1449 zhlc_hcf(:,d%NKTB:d%NKTE), zhlc_lcf(:,d%NKTB:d%NKTE), &
1450 zhlc_hrc(:,d%NKTB:d%NKTE), zhlc_lrc(:,d%NKTB:d%NKTE), &
1451 zhli_hcf(:,d%NKTB:d%NKTE), zhli_lcf(:,d%NKTB:d%NKTE), &
1452 zhli_hri(:,d%NKTB:d%NKTE), zhli_lri(:,d%NKTB:d%NKTE), &
1453 pprcfr(:,d%NKTB:d%NKTE))
1454 CALL lima_rainfr_vert(d, limap, pprcfr, zrrt, zrst, zrgt, zrht)
1461 zhlc_hrc(:,:)=zrct(:,:)
1462 zhli_hri(:,:)=zrit(:,:)
1473inb_iter_max=limap%NMAXITER
1474IF(limap%XTSTEP_TS/=0.)
THEN
1475 inb_iter_max=max(1, int(ptstep/limap%XTSTEP_TS))
1476 ztstep=ptstep/inb_iter_max
1477 inb_iter_max=max(limap%NMAXITER, inb_iter_max)
1484zrt_sum(d%NIJB:d%NIJE,:) = zrct(d%NIJB:d%NIJE,:) + zrrt(d%NIJB:d%NIJE,:) + zrit(d%NIJB:d%NIJE,:) + &
1485 zrst(d%NIJB:d%NIJE,:) + zrgt(d%NIJB:d%NIJE,:) + zrht(d%NIJB:d%NIJE,:)
1486WHERE (zrt_sum(d%NIJB:d%NIJE,:)<limap%XRTMIN(2)) ztime(d%NIJB:d%NIJE,:)=ptstep
1488DO WHILE(any(ztime(d%NIJB:d%NIJE,d%NKTB:d%NKTE)<ptstep))
1490 IF(limap%XMRSTEP/=0.)
THEN
1493 z0rvt(d%NIJB:d%NIJE,:)=zrvt(d%NIJB:d%NIJE,:)
1494 z0rct(d%NIJB:d%NIJE,:)=zrct(d%NIJB:d%NIJE,:)
1495 z0rrt(d%NIJB:d%NIJE,:)=zrrt(d%NIJB:d%NIJE,:)
1496 z0rit(d%NIJB:d%NIJE,:)=zrit(d%NIJB:d%NIJE,:)
1497 z0rst(d%NIJB:d%NIJE,:)=zrst(d%NIJB:d%NIJE,:)
1498 z0rgt(d%NIJB:d%NIJE,:)=zrgt(d%NIJB:d%NIJE,:)
1499 z0rht(d%NIJB:d%NIJE,:)=zrht(d%NIJB:d%NIJE,:)
1502 IF(limap%XTSTEP_TS/=0.)
THEN
1505 ztime_lastcall(d%NIJB:d%NIJE,:)=ztime(d%NIJB:d%NIJE,:)
1508 glcompute(:,:)=.false.
1510 glcompute(d%NIJB:d%NIJE,d%NKTB:d%NKTE) = ztime(d%NIJB:d%NIJE,d%NKTB:d%NKTE)<ptstep
1511 WHERE(glcompute(:,:))
1512 iiter(:,:)=iiter(:,:)+1
1515 DO WHILE(any(glcompute(:,:)))
1520 ipack = count(glcompute)
1523 ipack = countjv(glcompute,i1,i3)
1524 ALLOCATE(zrhodref1d(ipack))
1525 ALLOCATE(zexnref1d(ipack))
1526 ALLOCATE(zexn1d(ipack))
1527 ALLOCATE(zp1d(ipack))
1528 ALLOCATE(ztht1d(ipack))
1529 ALLOCATE(zrvt1d(ipack))
1530 ALLOCATE(zrct1d(ipack))
1531 ALLOCATE(zrrt1d(ipack))
1532 ALLOCATE(zrit1d(ipack))
1533 ALLOCATE(zrst1d(ipack))
1534 ALLOCATE(zrgt1d(ipack))
1535 ALLOCATE(zrht1d(ipack))
1536 ALLOCATE(zcct1d(ipack))
1537 ALLOCATE(zcrt1d(ipack))
1538 ALLOCATE(zcit1d(ipack))
1539 ALLOCATE(zcst1d(ipack))
1540 ALLOCATE(zcgt1d(ipack))
1541 ALLOCATE(zcht1d(ipack))
1542 ALLOCATE(zifnn1d(ipack,limap%NMOD_IFN))
1543 ALLOCATE(zevap1d(ipack))
1544 ALLOCATE(ztime1d(ipack))
1545 ALLOCATE(glcompute1d(ipack))
1546 ALLOCATE(iiter1d(ipack))
1547 ALLOCATE(ztime_lastcall1d(ipack))
1548 ALLOCATE(z0rvt1d(ipack))
1549 ALLOCATE(z0rct1d(ipack))
1550 ALLOCATE(z0rrt1d(ipack))
1551 ALLOCATE(z0rit1d(ipack))
1552 ALLOCATE(z0rst1d(ipack))
1553 ALLOCATE(z0rgt1d(ipack))
1554 ALLOCATE(z0rht1d(ipack))
1555 ALLOCATE(zcf1d(ipack))
1556 ALLOCATE(zif1d(ipack))
1557 ALLOCATE(zpf1d(ipack))
1558 ALLOCATE(zhlc_hrc1d(ipack))
1559 ALLOCATE(zhlc_hcf1d(ipack))
1560 ALLOCATE(zhli_hri1d(ipack))
1561 ALLOCATE(zhli_hcf1d(ipack))
1562 ALLOCATE(zhlc_lrc1d(ipack))
1563 ALLOCATE(zhlc_lcf1d(ipack))
1564 ALLOCATE(zhli_lri1d(ipack))
1565 ALLOCATE(zhli_lcf1d(ipack))
1566 ALLOCATE(zlatham_iaggs(ipack))
1567 IF (limap%LCRYSTAL_SHAPE)
THEN
1568 ALLOCATE(zcit1d_shape(ipack,limap%NNB_CRYSTAL_SHAPE))
1570 ALLOCATE(zcit1d_shape(0,0))
1573 zrhodref1d(ii) = prhodref(i1(ii),i3(ii))
1574 zexnref1d(ii) = pexnref(i1(ii),i3(ii))
1575 zexn1d(ii) = zexn(i1(ii),i3(ii))
1576 zp1d(ii) = ppabst(i1(ii),i3(ii))
1577 ztht1d(ii) = ztht(i1(ii),i3(ii))
1578 zrvt1d(ii) = zrvt(i1(ii),i3(ii))
1579 zrct1d(ii) = zrct(i1(ii),i3(ii))
1580 zrrt1d(ii) = zrrt(i1(ii),i3(ii))
1581 zrit1d(ii) = zrit(i1(ii),i3(ii))
1582 zrst1d(ii) = zrst(i1(ii),i3(ii))
1583 zrgt1d(ii) = zrgt(i1(ii),i3(ii))
1584 zrht1d(ii) = zrht(i1(ii),i3(ii))
1585 zcct1d(ii) = zcct(i1(ii),i3(ii))
1586 zcrt1d(ii) = zcrt(i1(ii),i3(ii))
1587 zcit1d(ii) = zcit(i1(ii),i3(ii))
1588 zcst1d(ii) = zcst(i1(ii),i3(ii))
1589 zcgt1d(ii) = zcgt(i1(ii),i3(ii))
1590 zcht1d(ii) = zcht(i1(ii),i3(ii))
1591 zifnn1d(ii,:) = zifnnt(i1(ii),i3(ii),:)
1592 zevap1d(ii) = pevap3d(i1(ii),i3(ii))
1593 ztime1d(ii) = ztime(i1(ii),i3(ii))
1594 glcompute1d(ii) = glcompute(i1(ii),i3(ii))
1595 iiter1d(ii) = iiter(i1(ii),i3(ii))
1596 ztime_lastcall1d(ii) = ztime_lastcall(i1(ii),i3(ii))
1597 z0rvt1d(ii) = z0rvt(i1(ii),i3(ii))
1598 z0rct1d(ii) = z0rct(i1(ii),i3(ii))
1599 z0rrt1d(ii) = z0rrt(i1(ii),i3(ii))
1600 z0rit1d(ii) = z0rit(i1(ii),i3(ii))
1601 z0rst1d(ii) = z0rst(i1(ii),i3(ii))
1602 z0rgt1d(ii) = z0rgt(i1(ii),i3(ii))
1603 z0rht1d(ii) = z0rht(i1(ii),i3(ii))
1604 zcf1d(ii) = pcldfr(i1(ii),i3(ii))
1605 zif1d(ii) = picefr(i1(ii),i3(ii))
1606 zpf1d(ii) = pprcfr(i1(ii),i3(ii))
1607 zhlc_hrc1d(ii) = zhlc_hrc(i1(ii),i3(ii))
1608 zhlc_hcf1d(ii) = zhlc_hcf(i1(ii),i3(ii))
1609 zhli_hri1d(ii) = zhli_hri(i1(ii),i3(ii))
1610 zhli_hcf1d(ii) = zhli_hcf(i1(ii),i3(ii))
1611 zhlc_lrc1d(ii) = zhlc_lrc(i1(ii),i3(ii))
1612 zhlc_lcf1d(ii) = zhlc_lcf(i1(ii),i3(ii))
1613 zhli_lri1d(ii) = zhli_lri(i1(ii),i3(ii))
1614 zhli_lcf1d(ii) = zhli_lcf(i1(ii),i3(ii))
1616 zlatham_iaggs(ii) = platham_iaggs(i1(ii),i3(ii))
1618 zlatham_iaggs(ii) = 1.0
1620 IF (limap%LCRYSTAL_SHAPE)
THEN
1621 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
1622 zcit1d_shape(ii,ish) = zcit_shape(i1(ii),i3(ii),ish)
1627 WHERE(zcf1d(:)<1.e-10 .AND. zrct1d(:)>limap%XRTMIN(2) .AND. zcct1d(:)>limap%XCTMIN(2)) zcf1d(:)=1.
1628 WHERE(zif1d(:)<1.e-10 .AND. zrit1d(:)>limap%XRTMIN(4) .AND. zcit1d(:)>limap%XCTMIN(4)) zif1d(:)=1.
1629 WHERE(zpf1d(:)<1.e-10 .AND. zrrt1d(:)>limap%XRTMIN(3) .AND. zcrt1d(:)>limap%XCTMIN(3)) zpf1d(:)=1.
1630 WHERE(zpf1d(:)<1.e-10 .AND. zrst1d(:)>limap%XRTMIN(5) .AND. zcst1d(:)>limap%XCTMIN(5)) zpf1d(:)=1.
1631 WHERE(zpf1d(:)<1.e-10 .AND. zrgt1d(:)>limap%XRTMIN(6) .AND. zcgt1d(:)>limap%XCTMIN(6)) zpf1d(:)=1.
1632 WHERE(zpf1d(:)<1.e-10 .AND. zrht1d(:)>limap%XRTMIN(7) .AND. zcht1d(:)>limap%XCTMIN(7)) zpf1d(:)=1.
1636 ALLOCATE(zmaxtime(ipack)) ; zmaxtime(:) = 0.
1637 ALLOCATE(ztime_threshold(ipack)) ; ztime_threshold(:) = 0.
1639 ALLOCATE(za_th(ipack)) ; za_th(:) = 0.
1640 ALLOCATE(za_rv(ipack)) ; za_rv(:) = 0.
1641 ALLOCATE(za_rc(ipack)) ; za_rc(:) = 0.
1642 ALLOCATE(za_rr(ipack)) ; za_rr(:) = 0.
1643 ALLOCATE(za_ri(ipack)) ; za_ri(:) = 0.
1644 ALLOCATE(za_rs(ipack)) ; za_rs(:) = 0.
1645 ALLOCATE(za_rg(ipack)) ; za_rg(:) = 0.
1646 ALLOCATE(za_rh(ipack)) ; za_rh(:) = 0.
1647 ALLOCATE(za_cc(ipack)) ; za_cc(:) = 0.
1648 ALLOCATE(za_cr(ipack)) ; za_cr(:) = 0.
1649 ALLOCATE(za_ci(ipack)) ; za_ci(:) = 0.
1650 ALLOCATE(za_cs(ipack)) ; za_cs(:) = 0.
1651 ALLOCATE(za_cg(ipack)) ; za_cg(:) = 0.
1652 ALLOCATE(za_ch(ipack)) ; za_ch(:) = 0.
1654 ALLOCATE(zb_th(ipack)) ; zb_th(:) = 0.
1655 ALLOCATE(zb_rv(ipack)) ; zb_rv(:) = 0.
1656 ALLOCATE(zb_rc(ipack)) ; zb_rc(:) = 0.
1657 ALLOCATE(zb_rr(ipack)) ; zb_rr(:) = 0.
1658 ALLOCATE(zb_ri(ipack)) ; zb_ri(:) = 0.
1659 ALLOCATE(zb_rs(ipack)) ; zb_rs(:) = 0.
1660 ALLOCATE(zb_rg(ipack)) ; zb_rg(:) = 0.
1661 ALLOCATE(zb_rh(ipack)) ; zb_rh(:) = 0.
1662 ALLOCATE(zb_cc(ipack)) ; zb_cc(:) = 0.
1663 ALLOCATE(zb_cr(ipack)) ; zb_cr(:) = 0.
1664 ALLOCATE(zb_ci(ipack)) ; zb_ci(:) = 0.
1665 ALLOCATE(zb_cs(ipack)) ; zb_cs(:) = 0.
1666 ALLOCATE(zb_cg(ipack)) ; zb_cg(:) = 0.
1667 ALLOCATE(zb_ch(ipack)) ; zb_ch(:) = 0.
1668 ALLOCATE(zb_ifnn(ipack,limap%NMOD_IFN)) ; zb_ifnn(:,:) = 0.
1670 ALLOCATE(z_cr_brku(ipack)) ; z_cr_brku(:) = 0.
1671 ALLOCATE(z_th_honr(ipack)) ; z_th_honr(:) = 0.
1672 ALLOCATE(z_rr_honr(ipack)) ; z_rr_honr(:) = 0.
1673 ALLOCATE(z_cr_honr(ipack)) ; z_cr_honr(:) = 0.
1674 ALLOCATE(z_th_imlt(ipack)) ; z_th_imlt(:) = 0.
1675 ALLOCATE(z_rc_imlt(ipack)) ; z_rc_imlt(:) = 0.
1676 ALLOCATE(z_cc_imlt(ipack)) ; z_cc_imlt(:) = 0.
1677 ALLOCATE(z_th_honc(ipack)) ; z_th_honc(:) = 0.
1678 ALLOCATE(z_rc_honc(ipack)) ; z_rc_honc(:) = 0.
1679 ALLOCATE(z_cc_honc(ipack)) ; z_cc_honc(:) = 0.
1680 ALLOCATE(z_cc_self(ipack)) ; z_cc_self(:) = 0.
1681 ALLOCATE(z_rc_auto(ipack)) ; z_rc_auto(:) = 0.
1682 ALLOCATE(z_cc_auto(ipack)) ; z_cc_auto(:) = 0.
1683 ALLOCATE(z_cr_auto(ipack)) ; z_cr_auto(:) = 0.
1684 ALLOCATE(z_rc_accr(ipack)) ; z_rc_accr(:) = 0.
1685 ALLOCATE(z_cc_accr(ipack)) ; z_cc_accr(:) = 0.
1686 ALLOCATE(z_cr_scbu(ipack)) ; z_cr_scbu(:) = 0.
1687 ALLOCATE(z_th_evap(ipack)) ; z_th_evap(:) = 0.
1688 ALLOCATE(z_rr_evap(ipack)) ; z_rr_evap(:) = 0.
1689 ALLOCATE(z_cr_evap(ipack)) ; z_cr_evap(:) = 0.
1690 ALLOCATE(z_ri_cnvi(ipack)) ; z_ri_cnvi(:) = 0.
1691 ALLOCATE(z_ci_cnvi(ipack)) ; z_ci_cnvi(:) = 0.
1692 ALLOCATE(z_th_deps(ipack)) ; z_th_deps(:) = 0.
1693 ALLOCATE(z_rs_deps(ipack)) ; z_rs_deps(:) = 0.
1694 ALLOCATE(z_th_depi(ipack)) ; z_th_depi(:) = 0.
1695 ALLOCATE(z_ri_depi(ipack)) ; z_ri_depi(:) = 0.
1696 ALLOCATE(z_ri_cnvs(ipack)) ; z_ri_cnvs(:) = 0.
1697 ALLOCATE(z_ci_cnvs(ipack)) ; z_ci_cnvs(:) = 0.
1698 ALLOCATE(z_cs_ssc(ipack)) ; z_cs_ssc(:) = 0.
1699 ALLOCATE(z_ci_isc(ipack)) ; z_ci_isc(:) = 0.
1700 ALLOCATE(z_ri_aggs(ipack)) ; z_ri_aggs(:) = 0.
1701 ALLOCATE(z_ci_aggs(ipack)) ; z_ci_aggs(:) = 0.
1702 ALLOCATE(z_th_depg(ipack)) ; z_th_depg(:) = 0.
1703 ALLOCATE(z_rg_depg(ipack)) ; z_rg_depg(:) = 0.
1704 ALLOCATE(z_th_berfi(ipack)) ; z_th_berfi(:) = 0.
1705 ALLOCATE(z_rc_berfi(ipack)) ; z_rc_berfi(:) = 0.
1706 ALLOCATE(z_th_rim(ipack)) ; z_th_rim(:) = 0.
1707 ALLOCATE(z_cc_rim(ipack)) ; z_cc_rim(:) = 0.
1708 ALLOCATE(z_cs_rim(ipack)) ; z_cs_rim(:) = 0.
1709 ALLOCATE(z_rc_rimss(ipack)) ; z_rc_rimss = 0.
1710 ALLOCATE(z_rc_rimsg(ipack)) ; z_rc_rimsg = 0.
1711 ALLOCATE(z_rs_rimcg(ipack)) ; z_rs_rimcg = 0.
1712 ALLOCATE(z_ri_hms(ipack)) ; z_ri_hms(:) = 0.
1713 ALLOCATE(z_ci_hms(ipack)) ; z_ci_hms(:) = 0.
1714 ALLOCATE(z_rs_hms(ipack)) ; z_rs_hms(:) = 0.
1715 ALLOCATE(z_th_acc(ipack)) ; z_th_acc(:) = 0.
1716 ALLOCATE(z_cr_acc(ipack)) ; z_cr_acc(:) = 0.
1717 ALLOCATE(z_cs_acc(ipack)) ; z_cs_acc(:) = 0.
1718 ALLOCATE(z_rr_accss(ipack)) ; z_rr_accss = 0.
1719 ALLOCATE(z_rr_accsg(ipack)) ; z_rr_accsg = 0.
1720 ALLOCATE(z_rs_accrg(ipack)) ; z_rs_accrg = 0.
1721 ALLOCATE(z_rs_cmel(ipack)) ; z_rs_cmel(:) = 0.
1722 ALLOCATE(z_cs_cmel(ipack)) ; z_cs_cmel(:) = 0.
1723 ALLOCATE(z_th_cfrz(ipack)) ; z_th_cfrz(:) = 0.
1724 ALLOCATE(z_rr_cfrz(ipack)) ; z_rr_cfrz(:) = 0.
1725 ALLOCATE(z_cr_cfrz(ipack)) ; z_cr_cfrz(:) = 0.
1726 ALLOCATE(z_ri_cfrz(ipack)) ; z_ri_cfrz(:) = 0.
1727 ALLOCATE(z_ci_cfrz(ipack)) ; z_ci_cfrz(:) = 0.
1728 ALLOCATE(z_ri_cibu(ipack)) ; z_ri_cibu(:) = 0.
1729 ALLOCATE(z_ci_cibu(ipack)) ; z_ci_cibu(:) = 0.
1730 ALLOCATE(z_ri_rdsf(ipack)) ; z_ri_rdsf(:) = 0.
1731 ALLOCATE(z_ci_rdsf(ipack)) ; z_ci_rdsf(:) = 0.
1732 ALLOCATE(z_th_wetg(ipack)) ; z_th_wetg(:) = 0.
1733 ALLOCATE(z_rc_wetg(ipack)) ; z_rc_wetg(:) = 0.
1734 ALLOCATE(z_cc_wetg(ipack)) ; z_cc_wetg(:) = 0.
1735 ALLOCATE(z_rr_wetg(ipack)) ; z_rr_wetg(:) = 0.
1736 ALLOCATE(z_cr_wetg(ipack)) ; z_cr_wetg(:) = 0.
1737 ALLOCATE(z_ri_wetg(ipack)) ; z_ri_wetg(:) = 0.
1738 ALLOCATE(z_ci_wetg(ipack)) ; z_ci_wetg(:) = 0.
1739 ALLOCATE(z_rs_wetg(ipack)) ; z_rs_wetg(:) = 0.
1740 ALLOCATE(z_cs_wetg(ipack)) ; z_cs_wetg(:) = 0.
1741 ALLOCATE(z_rg_wetg(ipack)) ; z_rg_wetg(:) = 0.
1742 ALLOCATE(z_cg_wetg(ipack)) ; z_cg_wetg(:) = 0.
1743 ALLOCATE(z_rh_wetg(ipack)) ; z_rh_wetg(:) = 0.
1744 ALLOCATE(z_th_dryg(ipack)) ; z_th_dryg(:) = 0.
1745 ALLOCATE(z_rc_dryg(ipack)) ; z_rc_dryg(:) = 0.
1746 ALLOCATE(z_cc_dryg(ipack)) ; z_cc_dryg(:) = 0.
1747 ALLOCATE(z_rr_dryg(ipack)) ; z_rr_dryg(:) = 0.
1748 ALLOCATE(z_cr_dryg(ipack)) ; z_cr_dryg(:) = 0.
1749 ALLOCATE(z_ri_dryg(ipack)) ; z_ri_dryg(:) = 0.
1750 ALLOCATE(z_ci_dryg(ipack)) ; z_ci_dryg(:) = 0.
1751 ALLOCATE(z_rs_dryg(ipack)) ; z_rs_dryg(:) = 0.
1752 ALLOCATE(z_cs_dryg(ipack)) ; z_cs_dryg(:) = 0.
1753 ALLOCATE(z_rg_dryg(ipack)) ; z_rg_dryg(:) = 0.
1754 ALLOCATE(z_ri_hmg(ipack)) ; z_ri_hmg(:) = 0.
1755 ALLOCATE(z_ci_hmg(ipack)) ; z_ci_hmg(:) = 0.
1756 ALLOCATE(z_rg_hmg(ipack)) ; z_rg_hmg(:) = 0.
1757 ALLOCATE(z_th_gmlt(ipack)) ; z_th_gmlt(:) = 0.
1758 ALLOCATE(z_rr_gmlt(ipack)) ; z_rr_gmlt(:) = 0.
1759 ALLOCATE(z_cr_gmlt(ipack)) ; z_cr_gmlt(:) = 0.
1760 ALLOCATE(z_cg_gmlt(ipack)) ; z_cg_gmlt(:) = 0.
1761 ALLOCATE(z_th_deph(ipack)) ; z_th_deph(:) = 0.
1762 ALLOCATE(z_rh_deph(ipack)) ; z_rh_deph(:) = 0.
1763 ALLOCATE(z_th_weth(ipack)) ; z_th_weth(:) = 0.
1764 ALLOCATE(z_rc_weth(ipack)) ; z_rc_weth(:) = 0.
1765 ALLOCATE(z_cc_weth(ipack)) ; z_cc_weth(:) = 0.
1766 ALLOCATE(z_rr_weth(ipack)) ; z_rr_weth(:) = 0.
1767 ALLOCATE(z_cr_weth(ipack)) ; z_cr_weth(:) = 0.
1768 ALLOCATE(z_ri_weth(ipack)) ; z_ri_weth(:) = 0.
1769 ALLOCATE(z_ci_weth(ipack)) ; z_ci_weth(:) = 0.
1770 ALLOCATE(z_rs_weth(ipack)) ; z_rs_weth(:) = 0.
1771 ALLOCATE(z_cs_weth(ipack)) ; z_cs_weth(:) = 0.
1772 ALLOCATE(z_rg_weth(ipack)) ; z_rg_weth(:) = 0.
1773 ALLOCATE(z_cg_weth(ipack)) ; z_cg_weth(:) = 0.
1774 ALLOCATE(z_rh_weth(ipack)) ; z_rh_weth(:) = 0.
1775 ALLOCATE(z_rg_cohg(ipack)) ; z_rg_cohg(:) = 0.
1776 ALLOCATE(z_cg_cohg(ipack)) ; z_cg_cohg(:) = 0.
1777 ALLOCATE(z_th_hmlt(ipack)) ; z_th_hmlt(:) = 0.
1778 ALLOCATE(z_rr_hmlt(ipack)) ; z_rr_hmlt(:) = 0.
1779 ALLOCATE(z_cr_hmlt(ipack)) ; z_cr_hmlt(:) = 0.
1780 ALLOCATE(z_ch_hmlt(ipack)) ; z_ch_hmlt(:) = 0.
1782 ALLOCATE(z_rv_corr2(ipack)) ; z_rv_corr2(:) = 0.
1783 ALLOCATE(z_rc_corr2(ipack)) ; z_rc_corr2(:) = 0.
1784 ALLOCATE(z_rr_corr2(ipack)) ; z_rr_corr2(:) = 0.
1785 ALLOCATE(z_ri_corr2(ipack)) ; z_ri_corr2(:) = 0.
1786 ALLOCATE(z_cc_corr2(ipack)) ; z_cc_corr2(:) = 0.
1787 ALLOCATE(z_cr_corr2(ipack)) ; z_cr_corr2(:) = 0.
1788 ALLOCATE(z_ci_corr2(ipack)) ; z_ci_corr2(:) = 0.
1790 IF (limap%LCRYSTAL_SHAPE)
THEN
1791 ALLOCATE(za_ci_shape(ipack,limap%NNB_CRYSTAL_SHAPE)) ; za_ci_shape(:,:) = 0.
1792 ALLOCATE(zb_ci_shape(ipack,limap%NNB_CRYSTAL_SHAPE)) ; zb_ci_shape(:,:) = 0.
1793 ALLOCATE(z_shci_imlt(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_imlt(:,:) = 0.
1794 ALLOCATE(z_shci_honc(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_honc(:,:) = 0.
1795 ALLOCATE(z_shci_cnvi(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_cnvi(:,:) = 0.
1796 ALLOCATE(z_shci_hach(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_hach(:,:) = 0.
1797 ALLOCATE(z_shci_cnvs(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_cnvs(:,:) = 0.
1798 ALLOCATE(z_shci_aggs(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_aggs(:,:) = 0.
1799 ALLOCATE(z_shci_hms(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_hms(:,:) = 0.
1800 ALLOCATE(z_shci_cfrz(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_cfrz(:,:) = 0.
1801 ALLOCATE(z_shci_cibu(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_cibu(:,:) = 0.
1802 ALLOCATE(z_shci_rdsf(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_rdsf(:,:) = 0.
1803 ALLOCATE(z_shci_wetg(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_wetg(:,:) = 0.
1804 ALLOCATE(z_shci_dryg(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_dryg(:,:) = 0.
1805 ALLOCATE(z_shci_hmg(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_hmg(:,:) = 0.
1806 ALLOCATE(z_shci_corr2(ipack,limap%NNB_CRYSTAL_SHAPE)); z_shci_corr2(:,:) = 0.
1807 ALLOCATE(z_shci_isc(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_isc(:,:) = 0.
1808 ALLOCATE(z_shci_iscs(ipack,limap%NNB_CRYSTAL_SHAPE)) ; z_shci_iscs(:,:) = 0.
1809 ALLOCATE(z_shri_iscs(ipack)) ; z_shri_iscs(:) = 0.
1811 ALLOCATE(za_ci_shape(0,0))
1812 ALLOCATE(zb_ci_shape(0,0))
1813 ALLOCATE(z_shci_imlt(0,0))
1814 ALLOCATE(z_shci_honc(0,0))
1815 ALLOCATE(z_shci_cnvi(0,0))
1816 ALLOCATE(z_shci_hach(0,0))
1817 ALLOCATE(z_shci_cnvs(0,0))
1818 ALLOCATE(z_shci_aggs(0,0))
1819 ALLOCATE(z_shci_hms(0,0))
1820 ALLOCATE(z_shci_cfrz(0,0))
1821 ALLOCATE(z_shci_cibu(0,0))
1822 ALLOCATE(z_shci_rdsf(0,0))
1823 ALLOCATE(z_shci_wetg(0,0))
1824 ALLOCATE(z_shci_dryg(0,0))
1825 ALLOCATE(z_shci_hmg(0,0))
1826 ALLOCATE(z_shci_corr2(0,0))
1827 ALLOCATE(z_shci_isc(0,0))
1828 ALLOCATE(z_shci_iscs(0,0))
1829 ALLOCATE(z_shri_iscs(0))
1834 CALL lima_inst_procs (cst, limap, limaw, ipack, ptstep, glcompute1d, &
1836 ztht1d, zrvt1d, zrct1d, zrrt1d, zrit1d, zrst1d, zrgt1d, &
1837 zcct1d, zcrt1d, zcit1d, zcit1d_shape, &
1840 z_th_honr, z_rr_honr, z_cr_honr, &
1841 z_th_imlt, z_rc_imlt, z_cc_imlt, &
1843 zb_th, zb_rv, zb_rc, zb_rr, zb_ri, zb_rg, &
1844 zb_cc, zb_cr, zb_ci, zb_ci_shape, zb_cg, &
1846 zcf1d, zif1d, zpf1d )
1848 CALL lima_tendencies (cst, limap, limaw, limac, limam, ipack, ptstep, glcompute1d, &
1849 zexnref1d, zrhodref1d, zp1d, ztht1d, &
1850 zrvt1d, zrct1d, zrrt1d, zrit1d, zrst1d, zrgt1d, zrht1d, &
1851 zcct1d, zcrt1d, zcit1d, zcit1d_shape, zcst1d, zcgt1d, zcht1d, &
1852 z_th_honc, z_rc_honc, z_cc_honc, z_shci_honc, &
1854 z_rc_auto, z_cc_auto, z_cr_auto, &
1855 z_rc_accr, z_cc_accr, &
1857 z_th_evap, z_rr_evap, z_cr_evap, &
1858 z_ri_cnvi, z_ci_cnvi, z_shci_cnvi, &
1859 z_th_deps, z_rs_deps, &
1860 z_th_depi, z_ri_depi, z_shci_hach, &
1861 z_ri_cnvs, z_ci_cnvs, z_shci_cnvs, &
1862 z_cs_ssc, z_ci_isc, z_shci_isc, z_shri_iscs, z_shci_iscs, &
1863 z_ri_aggs, z_ci_aggs, z_shci_aggs, &
1864 z_th_depg, z_rg_depg, &
1865 z_th_berfi, z_rc_berfi, &
1866 z_th_rim, z_cc_rim, z_cs_rim, z_rc_rimss, z_rc_rimsg, z_rs_rimcg, &
1867 z_ri_hms, z_ci_hms, z_rs_hms, z_shci_hms, &
1868 z_th_acc, z_cr_acc, z_cs_acc, z_rr_accss, z_rr_accsg, z_rs_accrg, &
1869 z_rs_cmel, z_cs_cmel, &
1870 z_th_cfrz, z_rr_cfrz, z_cr_cfrz, z_ri_cfrz, z_ci_cfrz, z_shci_cfrz,&
1871 z_ri_cibu, z_ci_cibu, z_shci_cibu, &
1872 z_ri_rdsf, z_ci_rdsf, z_shci_rdsf, &
1873 z_th_wetg, z_rc_wetg, z_cc_wetg, z_rr_wetg, z_cr_wetg, &
1874 z_ri_wetg, z_ci_wetg, z_rs_wetg, z_cs_wetg, z_rg_wetg, z_cg_wetg, &
1875 z_rh_wetg, z_shci_wetg, &
1876 z_th_dryg, z_rc_dryg, z_cc_dryg, z_rr_dryg, z_cr_dryg, &
1877 z_ri_dryg, z_ci_dryg, z_rs_dryg, z_cs_dryg, z_rg_dryg, z_shci_dryg,&
1878 z_ri_hmg, z_ci_hmg, z_rg_hmg, z_shci_hmg, &
1879 z_th_gmlt, z_rr_gmlt, z_cr_gmlt, z_cg_gmlt, &
1880 z_th_deph, z_rh_deph, &
1881 z_th_weth, z_rc_weth, z_cc_weth, z_rr_weth, z_cr_weth, &
1882 z_ri_weth, z_ci_weth, z_rs_weth, z_cs_weth, z_rg_weth, &
1883 z_cg_weth, z_rh_weth, &
1884 z_rg_cohg, z_cg_cohg, &
1885 z_th_hmlt, z_rr_hmlt, z_cr_hmlt, z_ch_hmlt, &
1886 za_th, za_rv, za_rc, za_cc, za_rr, za_cr, &
1887 za_ri, za_ci, za_ci_shape, za_rs, za_cs, za_rg, za_cg, &
1890 zcf1d, zif1d, zpf1d, &
1891 zhlc_hcf1d, zhlc_lcf1d, zhlc_hrc1d, zhlc_lrc1d, &
1892 zhli_hcf1d, zhli_lcf1d, zhli_hri1d, zhli_lri1d, &
1899 zmaxtime(:)=ptstep-ztime1d(:)
1902 IF(limap%LFEEDBACKT)
THEN
1904 WHERE( ((ztht1d(:) - cst%XTT/zexn1d(:)) * (ztht1d(:) + zb_th(:) - cst%XTT/zexn1d(:))) < 0. )
1908 ztime_threshold(:)=-1.
1909 WHERE(abs(za_th(:))>1.e-20)
1910 ztime_threshold(:)=(cst%XTT/zexn1d(:) - zb_th(:) - ztht1d(:))/za_th(:)
1912 WHERE(ztime_threshold(:)>0.)
1913 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
1919 WHERE(za_rv(:)<-1.e-20 .AND. zrvt1d(:)>limap%XRTMIN(1))
1920 zmaxtime(:)=min(zmaxtime(:), -(zb_rv(:)+zrvt1d(:))/za_rv(:))
1922 WHERE(za_rc(:)<-1.e-20 .AND. zrct1d(:)>limap%XRTMIN(2))
1923 zmaxtime(:)=min(zmaxtime(:), -(zb_rc(:)+zrct1d(:))/za_rc(:))
1925 IF (limap%NMOM_C.GE.2)
THEN
1926 WHERE(za_cc(:)<-1.e-20 .AND. zcct1d(:)>limap%XCTMIN(2))
1927 zmaxtime(:)=min(zmaxtime(:), -(zb_cc(:)+zcct1d(:))/za_cc(:))
1930 WHERE(za_rr(:)<-1.e-20 .AND. zrrt1d(:)>limap%XRTMIN(3))
1931 zmaxtime(:)=min(zmaxtime(:), -(zb_rr(:)+zrrt1d(:))/za_rr(:))
1933 IF (limap%NMOM_R.GE.2)
THEN
1934 WHERE(za_cr(:)<-1.e-20 .AND. zcrt1d(:)>limap%XCTMIN(3))
1935 zmaxtime(:)=min(zmaxtime(:), -(zb_cr(:)+zcrt1d(:))/za_cr(:))
1938 WHERE(za_ri(:)<-1.e-20 .AND. zrit1d(:)>limap%XRTMIN(4))
1939 zmaxtime(:)=min(zmaxtime(:), -(zb_ri(:)+zrit1d(:))/za_ri(:))
1941 IF (limap%NMOM_I.GE.2)
THEN
1942 WHERE(za_ci(:)<-1.e-20 .AND. zcit1d(:)>limap%XCTMIN(4))
1943 zmaxtime(:)=min(zmaxtime(:), -(zb_ci(:)+zcit1d(:))/za_ci(:))
1946 WHERE(za_rs(:)<-1.e-20 .AND. zrst1d(:)>limap%XRTMIN(5))
1947 zmaxtime(:)=min(zmaxtime(:), -(zb_rs(:)+zrst1d(:))/za_rs(:))
1949 IF (limap%NMOM_S.GE.2)
THEN
1950 WHERE(za_cs(:)<-1.e-20 .AND. zcst1d(:)>limap%XCTMIN(5))
1951 zmaxtime(:)=min(zmaxtime(:), -(zb_cs(:)+zcst1d(:))/za_cs(:))
1954 WHERE(za_rg(:)<-1.e-20 .AND. zrgt1d(:)>limap%XRTMIN(6))
1955 zmaxtime(:)=min(zmaxtime(:), -(zb_rg(:)+zrgt1d(:))/za_rg(:))
1957 IF (limap%NMOM_G.GE.2)
THEN
1958 WHERE(za_cg(:)<-1.e-20 .AND. zcgt1d(:)>limap%XCTMIN(6))
1959 zmaxtime(:)=min(zmaxtime(:), -(zb_cg(:)+zcgt1d(:))/za_cg(:))
1962 WHERE(za_rh(:)<-1.e-20 .AND. zrht1d(:)>limap%XRTMIN(7))
1963 zmaxtime(:)=min(zmaxtime(:), -(zb_rh(:)+zrht1d(:))/za_rh(:))
1965 IF (limap%NMOM_H.GE.2)
THEN
1966 WHERE(za_ch(:)<-1.e-20 .AND. zcht1d(:)>limap%XCTMIN(7))
1967 zmaxtime(:)=min(zmaxtime(:), -(zb_ch(:)+zcht1d(:))/za_ch(:))
1972 WHERE(ptstep-ztime1d(:)-zmaxtime(:)<=0.)
1973 glcompute1d(:)=.false.
1977 IF(limap%XTSTEP_TS/=0.)
THEN
1978 WHERE(iiter1d(:)<inb_iter_max .AND. ztime1d(:)+zmaxtime(:)>ztime_lastcall1d(:)+ztstep)
1979 zmaxtime(:)=ztime_lastcall1d(:)-ztime1d(:)+ztstep
1980 glcompute1d(:)=.false.
1988 IF(limap%XMRSTEP/=0.)
THEN
1989 ztime_threshold(:)=-1.
1990 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_rv(:))>1.e-20)
1991 ztime_threshold(:)=(sign(1., za_rv(:))*limap%XMRSTEP+z0rvt1d(:)-zrvt1d(:)-zb_rv(:))/za_rv(:)
1993 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
1994 &(zrvt1d(:)>limap%XRTMIN(1) .OR. za_rv(:)>0.))
1995 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
1996 glcompute1d(:)=.false.
1999 ztime_threshold(:)=-1.
2000 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_rc(:))>1.e-20)
2001 ztime_threshold(:)=(sign(1., za_rc(:))*limap%XMRSTEP+z0rct1d(:)-zrct1d(:)-zb_rc(:))/za_rc(:)
2003 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
2004 &(zrct1d(:)>limap%XRTMIN(2) .OR. za_rc(:)>0.))
2005 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
2006 glcompute1d(:)=.false.
2009 ztime_threshold(:)=-1.
2010 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_rr(:))>1.e-20)
2011 ztime_threshold(:)=(sign(1., za_rr(:))*limap%XMRSTEP+z0rrt1d(:)-zrrt1d(:)-zb_rr(:))/za_rr(:)
2013 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
2014 &(zrrt1d(:)>limap%XRTMIN(3) .OR. za_rr(:)>0.))
2015 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
2016 glcompute1d(:)=.false.
2019 ztime_threshold(:)=-1.
2020 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_ri(:))>1.e-20)
2021 ztime_threshold(:)=(sign(1., za_ri(:))*limap%XMRSTEP+z0rit1d(:)-zrit1d(:)-zb_ri(:))/za_ri(:)
2023 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
2024 &(zrit1d(:)>limap%XRTMIN(4) .OR. za_ri(:)>0.))
2025 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
2026 glcompute1d(:)=.false.
2029 ztime_threshold(:)=-1.
2030 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_rs(:))>1.e-20)
2031 ztime_threshold(:)=(sign(1., za_rs(:))*limap%XMRSTEP+z0rst1d(:)-zrst1d(:)-zb_rs(:))/za_rs(:)
2033 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
2034 &(zrst1d(:)>limap%XRTMIN(5) .OR. za_rs(:)>0.))
2035 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
2036 glcompute1d(:)=.false.
2039 ztime_threshold(:)=-1.
2040 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_rg(:))>1.e-20)
2041 ztime_threshold(:)=(sign(1., za_rg(:))*limap%XMRSTEP+z0rgt1d(:)-zrgt1d(:)-zb_rg(:))/za_rg(:)
2043 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
2044 &(zrgt1d(:)>limap%XRTMIN(6) .OR. za_rg(:)>0.))
2045 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
2046 glcompute1d(:)=.false.
2049 ztime_threshold(:)=-1.
2050 WHERE(iiter1d(:)<inb_iter_max .AND. abs(za_rh(:))>1.e-20)
2051 ztime_threshold(:)=(sign(1., za_rh(:))*limap%XMRSTEP+z0rht1d(:)-zrht1d(:)-zb_rh(:))/za_rh(:)
2053 WHERE(ztime_threshold(:)>=0. .AND. ztime_threshold(:)<zmaxtime(:) .AND. &
2054 &(zrht1d(:)>limap%XRTMIN(7) .OR. za_rh(:)>0.))
2055 zmaxtime(:)=min(zmaxtime(:), ztime_threshold(:))
2056 glcompute1d(:)=.false.
2059 WHERE(iiter1d(:)<inb_iter_max .AND. max(abs(zb_rv(:)), &
2060 abs(zb_rc(:)), abs(zb_rr(:)), abs(zb_ri(:)), &
2061 abs(zb_rs(:)), abs(zb_rg(:)), abs(zb_rh(:)))>limap%XMRSTEP)
2063 glcompute1d(:)=.false.
2069 ztht1d = ztht1d + za_th(:) * zmaxtime(:) + zb_th(:)
2070 zrvt1d = zrvt1d + za_rv(:) * zmaxtime(:) + zb_rv(:)
2071 zrct1d = zrct1d + za_rc(:) * zmaxtime(:) + zb_rc(:)
2072 IF (limap%NMOM_C.GE.2) zcct1d = zcct1d + za_cc(:) * zmaxtime(:) + zb_cc(:)
2073 zrrt1d = zrrt1d + za_rr(:) * zmaxtime(:) + zb_rr(:)
2074 IF (limap%NMOM_R.GE.2) zcrt1d = zcrt1d + za_cr(:) * zmaxtime(:) + zb_cr(:)
2075 zrit1d = zrit1d + za_ri(:) * zmaxtime(:) + zb_ri(:)
2076 IF (limap%NMOM_I.GE.2) zcit1d = zcit1d + za_ci(:) * zmaxtime(:) + zb_ci(:)
2077 zrst1d = zrst1d + za_rs(:) * zmaxtime(:) + zb_rs(:)
2078 IF (limap%NMOM_S.GE.2) zcst1d = zcst1d + za_cs(:) * zmaxtime(:) + zb_cs(:)
2079 zrgt1d = zrgt1d + za_rg(:) * zmaxtime(:) + zb_rg(:)
2080 IF (limap%NMOM_G.GE.2) zcgt1d = zcgt1d + za_cg(:) * zmaxtime(:) + zb_cg(:)
2081 zrht1d = zrht1d + za_rh(:) * zmaxtime(:) + zb_rh(:)
2082 IF (limap%NMOM_H.GE.2) zcht1d = zcht1d + za_ch(:) * zmaxtime(:) + zb_ch(:)
2083 IF (limap%LCRYSTAL_SHAPE)
THEN
2084 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
2085 zcit1d_shape(:,ish) = zcit1d_shape(:,ish) + &
2086 za_ci_shape(:,ish) * zmaxtime(:) + zb_ci_shape(:,ish)
2088 zcit1d(:) = sum(zcit1d_shape,dim=2)
2091 DO ii=1,limap%NMOD_IFN
2092 zifnn1d(:,ii) = zifnn1d(:,ii) + zb_ifnn(:,ii)
2097 WHERE (zrct1d .LE. limap%XRTMIN(2))
2098 z_rv_corr2(:) = zrct1d(:)
2099 z_rc_corr2(:) = -zrct1d(:)
2100 z_cc_corr2(:) = -zcct1d(:)
2102 zrvt1d = zrvt1d + zrct1d
2106 WHERE (zrrt1d .LE. limap%XRTMIN(3))
2107 z_rv_corr2(:) = z_rv_corr2(:) + zrrt1d(:)
2108 z_rr_corr2(:) = -zrrt1d(:)
2109 z_cr_corr2(:) = -zcrt1d(:)
2111 zrvt1d = zrvt1d + zrrt1d
2116 IF (limap%LCRYSTAL_SHAPE)
THEN
2117 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
2118 WHERE (zrit1d .LE. limap%XRTMIN(4))
2119 z_shci_corr2(:,ish) = -zcit1d_shape(:,ish)
2120 zcit1d_shape(:,ish) = 0.
2123 zcit1d(:) = sum(zcit1d_shape,dim=2)
2125 WHERE (zrit1d .LE. limap%XRTMIN(4))
2126 z_rv_corr2(:) = z_rv_corr2(:) + zrit1d(:)
2127 z_ri_corr2(:) = -zrit1d(:)
2128 z_ci_corr2(:) = -zcit1d(:)
2130 zrvt1d = zrvt1d + zrit1d
2137 ztime1d(:)=ztime1d(:)+zmaxtime(:)
2142 ztht(i1(ii),i3(ii)) = ztht1d(ii)
2143 zrvt(i1(ii),i3(ii)) = zrvt1d(ii)
2144 zrct(i1(ii),i3(ii)) = zrct1d(ii)
2145 zrrt(i1(ii),i3(ii)) = zrrt1d(ii)
2146 zrit(i1(ii),i3(ii)) = zrit1d(ii)
2147 zrst(i1(ii),i3(ii)) = zrst1d(ii)
2148 zrgt(i1(ii),i3(ii)) = zrgt1d(ii)
2149 zrht(i1(ii),i3(ii)) = zrht1d(ii)
2150 IF (limap%NMOM_C.GE.2) zcct(i1(ii),i3(ii)) = zcct1d(ii)
2151 IF (limap%NMOM_R.GE.2) zcrt(i1(ii),i3(ii)) = zcrt1d(ii)
2152 IF (limap%NMOM_I.GE.1) zcit(i1(ii),i3(ii)) = zcit1d(ii)
2153 IF (limap%NMOM_S.GE.2) zcst(i1(ii),i3(ii)) = zcst1d(ii)
2154 IF (limap%NMOM_G.GE.2) zcgt(i1(ii),i3(ii)) = zcgt1d(ii)
2155 IF (limap%NMOM_H.GE.2) zcht(i1(ii),i3(ii)) = zcht1d(ii)
2156 IF (limap%LCRYSTAL_SHAPE)
THEN
2157 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
2158 zcit_shape(i1(ii),i3(ii),ish) = zcit1d_shape(ii,ish)
2161 zifnnt(i1(ii),i3(ii),:) = zifnn1d(ii,:)
2162 pevap3d(i1(ii),i3(ii)) = zevap1d(ii)
2163 ztime(i1(ii),i3(ii)) = ztime1d(ii)
2164 glcompute(i1(ii),i3(ii)) = glcompute1d(ii)
2165 iiter(i1(ii),i3(ii)) = iiter1d(ii)
2179 IF(buconf%LBU_ENABLE .OR. oelec)
THEN
2180 ztot_rr_cvrc(d%NIJB:d%NIJE,:) = ztot_rr_cvrc(d%NIJB:d%NIJE,:) + z_rr_cvrc(d%NIJB:d%NIJE,:)
2181 ztot_cr_cvrc(d%NIJB:d%NIJE,:) = ztot_cr_cvrc(d%NIJB:d%NIJE,:) + z_cr_cvrc(d%NIJB:d%NIJE,:)
2185 ztot_cr_brku(i1(ii),i3(ii)) = ztot_cr_brku(i1(ii),i3(ii)) + z_cr_brku(ii)
2186 ztot_th_honr(i1(ii),i3(ii)) = ztot_th_honr(i1(ii),i3(ii)) + z_th_honr(ii)
2187 ztot_rr_honr(i1(ii),i3(ii)) = ztot_rr_honr(i1(ii),i3(ii)) + z_rr_honr(ii)
2188 ztot_cr_honr(i1(ii),i3(ii)) = ztot_cr_honr(i1(ii),i3(ii)) + z_cr_honr(ii)
2189 ztot_th_imlt(i1(ii),i3(ii)) = ztot_th_imlt(i1(ii),i3(ii)) + z_th_imlt(ii)
2190 ztot_rc_imlt(i1(ii),i3(ii)) = ztot_rc_imlt(i1(ii),i3(ii)) + z_rc_imlt(ii)
2191 ztot_cc_imlt(i1(ii),i3(ii)) = ztot_cc_imlt(i1(ii),i3(ii)) + z_cc_imlt(ii)
2192 DO in = 1, limap%NMOD_IFN
2193 ztot_ifnn_imlt(i1(ii),i3(ii),in) = ztot_ifnn_imlt(i1(ii),i3(ii),in) + zb_ifnn(ii,in)
2197 ztot_th_honc(i1(ii),i3(ii)) = ztot_th_honc(i1(ii),i3(ii)) + z_th_honc(ii) * zmaxtime(ii)
2198 ztot_rc_honc(i1(ii),i3(ii)) = ztot_rc_honc(i1(ii),i3(ii)) + z_rc_honc(ii) * zmaxtime(ii)
2199 ztot_cc_honc(i1(ii),i3(ii)) = ztot_cc_honc(i1(ii),i3(ii)) + z_cc_honc(ii) * zmaxtime(ii)
2200 ztot_cc_self(i1(ii),i3(ii)) = ztot_cc_self(i1(ii),i3(ii)) + z_cc_self(ii) * zmaxtime(ii)
2201 ztot_rc_auto(i1(ii),i3(ii)) = ztot_rc_auto(i1(ii),i3(ii)) + z_rc_auto(ii) * zmaxtime(ii)
2202 ztot_cc_auto(i1(ii),i3(ii)) = ztot_cc_auto(i1(ii),i3(ii)) + z_cc_auto(ii) * zmaxtime(ii)
2203 ztot_cr_auto(i1(ii),i3(ii)) = ztot_cr_auto(i1(ii),i3(ii)) + z_cr_auto(ii) * zmaxtime(ii)
2204 ztot_rc_accr(i1(ii),i3(ii)) = ztot_rc_accr(i1(ii),i3(ii)) + z_rc_accr(ii) * zmaxtime(ii)
2205 ztot_cc_accr(i1(ii),i3(ii)) = ztot_cc_accr(i1(ii),i3(ii)) + z_cc_accr(ii) * zmaxtime(ii)
2206 ztot_cr_scbu(i1(ii),i3(ii)) = ztot_cr_scbu(i1(ii),i3(ii)) + z_cr_scbu(ii) * zmaxtime(ii)
2207 ztot_th_evap(i1(ii),i3(ii)) = ztot_th_evap(i1(ii),i3(ii)) + z_th_evap(ii) * zmaxtime(ii)
2210 ztot_rr_evap(i1(ii),i3(ii)) = ztot_rr_evap(i1(ii),i3(ii)) + z_rr_evap(ii) * zmaxtime(ii)
2211 ztot_cr_evap(i1(ii),i3(ii)) = ztot_cr_evap(i1(ii),i3(ii)) + z_cr_evap(ii) * zmaxtime(ii)
2212 ztot_ri_cnvi(i1(ii),i3(ii)) = ztot_ri_cnvi(i1(ii),i3(ii)) + z_ri_cnvi(ii) * zmaxtime(ii)
2213 ztot_ci_cnvi(i1(ii),i3(ii)) = ztot_ci_cnvi(i1(ii),i3(ii)) + z_ci_cnvi(ii) * zmaxtime(ii)
2214 ztot_th_deps(i1(ii),i3(ii)) = ztot_th_deps(i1(ii),i3(ii)) + z_th_deps(ii) * zmaxtime(ii)
2215 ztot_rs_deps(i1(ii),i3(ii)) = ztot_rs_deps(i1(ii),i3(ii)) + z_rs_deps(ii) * zmaxtime(ii)
2216 ztot_th_depi(i1(ii),i3(ii)) = ztot_th_depi(i1(ii),i3(ii)) + z_th_depi(ii) * zmaxtime(ii)
2217 ztot_ri_depi(i1(ii),i3(ii)) = ztot_ri_depi(i1(ii),i3(ii)) + z_ri_depi(ii) * zmaxtime(ii)
2218 ztot_ri_cnvs(i1(ii),i3(ii)) = ztot_ri_cnvs(i1(ii),i3(ii)) + z_ri_cnvs(ii) * zmaxtime(ii)
2219 ztot_ci_cnvs(i1(ii),i3(ii)) = ztot_ci_cnvs(i1(ii),i3(ii)) + z_ci_cnvs(ii) * zmaxtime(ii)
2220 ztot_cs_ssc(i1(ii),i3(ii)) = ztot_cs_ssc(i1(ii),i3(ii)) + z_cs_ssc(ii) * zmaxtime(ii)
2221 ztot_ci_isc(i1(ii),i3(ii)) = ztot_ci_isc(i1(ii),i3(ii)) + z_ci_isc(ii) * zmaxtime(ii)
2222 ztot_ri_aggs(i1(ii),i3(ii)) = ztot_ri_aggs(i1(ii),i3(ii)) + z_ri_aggs(ii) * zmaxtime(ii)
2223 ztot_ci_aggs(i1(ii),i3(ii)) = ztot_ci_aggs(i1(ii),i3(ii)) + z_ci_aggs(ii) * zmaxtime(ii)
2224 ztot_th_depg(i1(ii),i3(ii)) = ztot_th_depg(i1(ii),i3(ii)) + z_th_depg(ii) * zmaxtime(ii)
2225 ztot_rg_depg(i1(ii),i3(ii)) = ztot_rg_depg(i1(ii),i3(ii)) + z_rg_depg(ii) * zmaxtime(ii)
2226 ztot_th_berfi(i1(ii),i3(ii))= ztot_th_berfi(i1(ii),i3(ii)) + z_th_berfi(ii) * zmaxtime(ii)
2227 ztot_rc_berfi(i1(ii),i3(ii))= ztot_rc_berfi(i1(ii),i3(ii)) + z_rc_berfi(ii) * zmaxtime(ii)
2228 ztot_th_rim(i1(ii),i3(ii)) = ztot_th_rim(i1(ii),i3(ii)) + z_th_rim(ii) * zmaxtime(ii)
2229 ztot_cc_rim(i1(ii),i3(ii)) = ztot_cc_rim(i1(ii),i3(ii)) + z_cc_rim(ii) * zmaxtime(ii)
2230 ztot_cs_rim(i1(ii),i3(ii)) = ztot_cs_rim(i1(ii),i3(ii)) + z_cs_rim(ii) * zmaxtime(ii)
2231 ztot_rc_rimss(i1(ii),i3(ii))= ztot_rc_rimss(i1(ii),i3(ii)) + z_rc_rimss(ii) * zmaxtime(ii)
2232 ztot_rc_rimsg(i1(ii),i3(ii))= ztot_rc_rimsg(i1(ii),i3(ii)) + z_rc_rimsg(ii) * zmaxtime(ii)
2233 ztot_rs_rimcg(i1(ii),i3(ii))= ztot_rs_rimcg(i1(ii),i3(ii)) + z_rs_rimcg(ii) * zmaxtime(ii)
2234 ztot_ri_hms(i1(ii),i3(ii)) = ztot_ri_hms(i1(ii),i3(ii)) + z_ri_hms(ii) * zmaxtime(ii)
2235 ztot_ci_hms(i1(ii),i3(ii)) = ztot_ci_hms(i1(ii),i3(ii)) + z_ci_hms(ii) * zmaxtime(ii)
2236 ztot_rs_hms(i1(ii),i3(ii)) = ztot_rs_hms(i1(ii),i3(ii)) + z_rs_hms(ii) * zmaxtime(ii)
2237 ztot_th_acc(i1(ii),i3(ii)) = ztot_th_acc(i1(ii),i3(ii)) + z_th_acc(ii) * zmaxtime(ii)
2238 ztot_cr_acc(i1(ii),i3(ii)) = ztot_cr_acc(i1(ii),i3(ii)) + z_cr_acc(ii) * zmaxtime(ii)
2239 ztot_cs_acc(i1(ii),i3(ii)) = ztot_cs_acc(i1(ii),i3(ii)) + z_cs_acc(ii) * zmaxtime(ii)
2240 ztot_rr_accss(i1(ii),i3(ii))= ztot_rr_accss(i1(ii),i3(ii)) + z_rr_accss(ii) * zmaxtime(ii)
2241 ztot_rr_accsg(i1(ii),i3(ii))= ztot_rr_accsg(i1(ii),i3(ii)) + z_rr_accsg(ii) * zmaxtime(ii)
2242 ztot_rs_accrg(i1(ii),i3(ii))= ztot_rs_accrg(i1(ii),i3(ii)) + z_rs_accrg(ii) * zmaxtime(ii)
2243 ztot_cs_cmel(i1(ii),i3(ii)) = ztot_cs_cmel(i1(ii),i3(ii)) + z_cs_cmel(ii) * zmaxtime(ii)
2244 ztot_rs_cmel(i1(ii),i3(ii)) = ztot_rs_cmel(i1(ii),i3(ii)) + z_rs_cmel(ii) * zmaxtime(ii)
2245 ztot_th_cfrz(i1(ii),i3(ii)) = ztot_th_cfrz(i1(ii),i3(ii)) + z_th_cfrz(ii) * zmaxtime(ii)
2246 ztot_rr_cfrz(i1(ii),i3(ii)) = ztot_rr_cfrz(i1(ii),i3(ii)) + z_rr_cfrz(ii) * zmaxtime(ii)
2247 ztot_cr_cfrz(i1(ii),i3(ii)) = ztot_cr_cfrz(i1(ii),i3(ii)) + z_cr_cfrz(ii) * zmaxtime(ii)
2248 ztot_ri_cfrz(i1(ii),i3(ii)) = ztot_ri_cfrz(i1(ii),i3(ii)) + z_ri_cfrz(ii) * zmaxtime(ii)
2249 ztot_ci_cfrz(i1(ii),i3(ii)) = ztot_ci_cfrz(i1(ii),i3(ii)) + z_ci_cfrz(ii) * zmaxtime(ii)
2250 ztot_ri_cibu(i1(ii),i3(ii)) = ztot_ri_cibu(i1(ii),i3(ii)) + z_ri_cibu(ii) * zmaxtime(ii)
2251 ztot_ci_cibu(i1(ii),i3(ii)) = ztot_ci_cibu(i1(ii),i3(ii)) + z_ci_cibu(ii) * zmaxtime(ii)
2252 ztot_ri_rdsf(i1(ii),i3(ii)) = ztot_ri_rdsf(i1(ii),i3(ii)) + z_ri_rdsf(ii) * zmaxtime(ii)
2253 ztot_ci_rdsf(i1(ii),i3(ii)) = ztot_ci_rdsf(i1(ii),i3(ii)) + z_ci_rdsf(ii) * zmaxtime(ii)
2254 ztot_th_wetg(i1(ii),i3(ii)) = ztot_th_wetg(i1(ii),i3(ii)) + z_th_wetg(ii) * zmaxtime(ii)
2255 ztot_rc_wetg(i1(ii),i3(ii)) = ztot_rc_wetg(i1(ii),i3(ii)) + z_rc_wetg(ii) * zmaxtime(ii)
2256 ztot_cc_wetg(i1(ii),i3(ii)) = ztot_cc_wetg(i1(ii),i3(ii)) + z_cc_wetg(ii) * zmaxtime(ii)
2257 ztot_rr_wetg(i1(ii),i3(ii)) = ztot_rr_wetg(i1(ii),i3(ii)) + z_rr_wetg(ii) * zmaxtime(ii)
2258 ztot_cr_wetg(i1(ii),i3(ii)) = ztot_cr_wetg(i1(ii),i3(ii)) + z_cr_wetg(ii) * zmaxtime(ii)
2259 ztot_ri_wetg(i1(ii),i3(ii)) = ztot_ri_wetg(i1(ii),i3(ii)) + z_ri_wetg(ii) * zmaxtime(ii)
2260 ztot_ci_wetg(i1(ii),i3(ii)) = ztot_ci_wetg(i1(ii),i3(ii)) + z_ci_wetg(ii) * zmaxtime(ii)
2261 ztot_rs_wetg(i1(ii),i3(ii)) = ztot_rs_wetg(i1(ii),i3(ii)) + z_rs_wetg(ii) * zmaxtime(ii)
2262 ztot_cs_wetg(i1(ii),i3(ii)) = ztot_cs_wetg(i1(ii),i3(ii)) + z_cs_wetg(ii) * zmaxtime(ii)
2263 ztot_rg_wetg(i1(ii),i3(ii)) = ztot_rg_wetg(i1(ii),i3(ii)) + z_rg_wetg(ii) * zmaxtime(ii)
2264 ztot_cg_wetg(i1(ii),i3(ii)) = ztot_cg_wetg(i1(ii),i3(ii)) + z_cg_wetg(ii) * zmaxtime(ii)
2265 ztot_rh_wetg(i1(ii),i3(ii)) = ztot_rh_wetg(i1(ii),i3(ii)) + z_rh_wetg(ii) * zmaxtime(ii)
2266 ztot_th_dryg(i1(ii),i3(ii)) = ztot_th_dryg(i1(ii),i3(ii)) + z_th_dryg(ii) * zmaxtime(ii)
2267 ztot_rc_dryg(i1(ii),i3(ii)) = ztot_rc_dryg(i1(ii),i3(ii)) + z_rc_dryg(ii) * zmaxtime(ii)
2268 ztot_cc_dryg(i1(ii),i3(ii)) = ztot_cc_dryg(i1(ii),i3(ii)) + z_cc_dryg(ii) * zmaxtime(ii)
2269 ztot_rr_dryg(i1(ii),i3(ii)) = ztot_rr_dryg(i1(ii),i3(ii)) + z_rr_dryg(ii) * zmaxtime(ii)
2270 ztot_cr_dryg(i1(ii),i3(ii)) = ztot_cr_dryg(i1(ii),i3(ii)) + z_cr_dryg(ii) * zmaxtime(ii)
2271 ztot_ri_dryg(i1(ii),i3(ii)) = ztot_ri_dryg(i1(ii),i3(ii)) + z_ri_dryg(ii) * zmaxtime(ii)
2272 ztot_ci_dryg(i1(ii),i3(ii)) = ztot_ci_dryg(i1(ii),i3(ii)) + z_ci_dryg(ii) * zmaxtime(ii)
2273 ztot_rs_dryg(i1(ii),i3(ii)) = ztot_rs_dryg(i1(ii),i3(ii)) + z_rs_dryg(ii) * zmaxtime(ii)
2274 ztot_cs_dryg(i1(ii),i3(ii)) = ztot_cs_dryg(i1(ii),i3(ii)) + z_cs_dryg(ii) * zmaxtime(ii)
2275 ztot_rg_dryg(i1(ii),i3(ii)) = ztot_rg_dryg(i1(ii),i3(ii)) + z_rg_dryg(ii) * zmaxtime(ii)
2276 ztot_ri_hmg(i1(ii),i3(ii)) = ztot_ri_hmg(i1(ii),i3(ii)) + z_ri_hmg(ii) * zmaxtime(ii)
2277 ztot_ci_hmg(i1(ii),i3(ii)) = ztot_ci_hmg(i1(ii),i3(ii)) + z_ci_hmg(ii) * zmaxtime(ii)
2278 ztot_rg_hmg(i1(ii),i3(ii)) = ztot_rg_hmg(i1(ii),i3(ii)) + z_rg_hmg(ii) * zmaxtime(ii)
2279 ztot_th_gmlt(i1(ii),i3(ii)) = ztot_th_gmlt(i1(ii),i3(ii)) + z_th_gmlt(ii) * zmaxtime(ii)
2280 ztot_rr_gmlt(i1(ii),i3(ii)) = ztot_rr_gmlt(i1(ii),i3(ii)) + z_rr_gmlt(ii) * zmaxtime(ii)
2281 ztot_cr_gmlt(i1(ii),i3(ii)) = ztot_cr_gmlt(i1(ii),i3(ii)) + z_cr_gmlt(ii) * zmaxtime(ii)
2282 ztot_cg_gmlt(i1(ii),i3(ii)) = ztot_cg_gmlt(i1(ii),i3(ii)) + z_cg_gmlt(ii) * zmaxtime(ii)
2283 ztot_th_deph(i1(ii),i3(ii)) = ztot_th_deph(i1(ii),i3(ii)) + z_th_deph(ii) * zmaxtime(ii)
2284 ztot_rh_deph(i1(ii),i3(ii)) = ztot_rh_deph(i1(ii),i3(ii)) + z_rh_deph(ii) * zmaxtime(ii)
2285 ztot_th_weth(i1(ii),i3(ii)) = ztot_th_weth(i1(ii),i3(ii)) + z_th_weth(ii) * zmaxtime(ii)
2286 ztot_rc_weth(i1(ii),i3(ii)) = ztot_rc_weth(i1(ii),i3(ii)) + z_rc_weth(ii) * zmaxtime(ii)
2287 ztot_cc_weth(i1(ii),i3(ii)) = ztot_cc_weth(i1(ii),i3(ii)) + z_cc_weth(ii) * zmaxtime(ii)
2288 ztot_rr_weth(i1(ii),i3(ii)) = ztot_rr_weth(i1(ii),i3(ii)) + z_rr_weth(ii) * zmaxtime(ii)
2289 ztot_cr_weth(i1(ii),i3(ii)) = ztot_cr_weth(i1(ii),i3(ii)) + z_cr_weth(ii) * zmaxtime(ii)
2290 ztot_ri_weth(i1(ii),i3(ii)) = ztot_ri_weth(i1(ii),i3(ii)) + z_ri_weth(ii) * zmaxtime(ii)
2291 ztot_ci_weth(i1(ii),i3(ii)) = ztot_ci_weth(i1(ii),i3(ii)) + z_ci_weth(ii) * zmaxtime(ii)
2292 ztot_rs_weth(i1(ii),i3(ii)) = ztot_rs_weth(i1(ii),i3(ii)) + z_rs_weth(ii) * zmaxtime(ii)
2293 ztot_cs_weth(i1(ii),i3(ii)) = ztot_cs_weth(i1(ii),i3(ii)) + z_cs_weth(ii) * zmaxtime(ii)
2294 ztot_rg_weth(i1(ii),i3(ii)) = ztot_rg_weth(i1(ii),i3(ii)) + z_rg_weth(ii) * zmaxtime(ii)
2295 ztot_cg_weth(i1(ii),i3(ii)) = ztot_cg_weth(i1(ii),i3(ii)) + z_cg_weth(ii) * zmaxtime(ii)
2296 ztot_rh_weth(i1(ii),i3(ii)) = ztot_rh_weth(i1(ii),i3(ii)) + z_rh_weth(ii) * zmaxtime(ii)
2297 ztot_rg_cohg(i1(ii),i3(ii)) = ztot_rg_cohg(i1(ii),i3(ii)) + z_rg_cohg(ii) * zmaxtime(ii)
2298 ztot_cg_cohg(i1(ii),i3(ii)) = ztot_cg_cohg(i1(ii),i3(ii)) + z_cg_cohg(ii) * zmaxtime(ii)
2299 ztot_th_hmlt(i1(ii),i3(ii)) = ztot_rr_hmlt(i1(ii),i3(ii)) + z_rr_hmlt(ii) * zmaxtime(ii)
2300 ztot_rr_hmlt(i1(ii),i3(ii)) = ztot_rr_hmlt(i1(ii),i3(ii)) + z_rr_hmlt(ii) * zmaxtime(ii)
2301 ztot_cr_hmlt(i1(ii),i3(ii)) = ztot_cr_hmlt(i1(ii),i3(ii)) + z_cr_hmlt(ii) * zmaxtime(ii)
2302 ztot_ch_hmlt(i1(ii),i3(ii)) = ztot_ch_hmlt(i1(ii),i3(ii)) + z_ch_hmlt(ii) * zmaxtime(ii)
2305 ztot_rv_corr2(i1(ii),i3(ii)) = ztot_rv_corr2(i1(ii),i3(ii)) + z_rv_corr2(ii)
2306 ztot_rc_corr2(i1(ii),i3(ii)) = ztot_rc_corr2(i1(ii),i3(ii)) + z_rc_corr2(ii)
2307 ztot_rr_corr2(i1(ii),i3(ii)) = ztot_rr_corr2(i1(ii),i3(ii)) + z_rr_corr2(ii)
2308 ztot_ri_corr2(i1(ii),i3(ii)) = ztot_ri_corr2(i1(ii),i3(ii)) + z_ri_corr2(ii)
2309 ztot_cc_corr2(i1(ii),i3(ii)) = ztot_cc_corr2(i1(ii),i3(ii)) + z_cc_corr2(ii)
2310 ztot_cr_corr2(i1(ii),i3(ii)) = ztot_cr_corr2(i1(ii),i3(ii)) + z_cr_corr2(ii)
2311 ztot_ci_corr2(i1(ii),i3(ii)) = ztot_ci_corr2(i1(ii),i3(ii)) + z_ci_corr2(ii)
2314 IF (limap%LCRYSTAL_SHAPE)
THEN
2315 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
2317 ztot_shci_imlt(i1(ii),i3(ii),ish) = ztot_shci_imlt(i1(ii),i3(ii),ish) + z_shci_imlt(ii,ish)
2319 ztot_shci_honc(i1(ii),i3(ii),ish) = ztot_shci_honc(i1(ii),i3(ii),ish) + &
2320 z_shci_honc(ii,ish) * zmaxtime(ii)
2321 ztot_shci_cnvi(i1(ii),i3(ii),ish) = ztot_shci_cnvi(i1(ii),i3(ii),ish) + &
2322 z_shci_cnvi(ii,ish) * zmaxtime(ii)
2323 ztot_shci_hach(i1(ii),i3(ii),ish) = ztot_shci_hach(i1(ii),i3(ii),ish) + &
2324 z_shci_hach(ii,ish) * zmaxtime(ii)
2325 ztot_shci_cnvs(i1(ii),i3(ii),ish) = ztot_shci_cnvs(i1(ii),i3(ii),ish) + &
2326 z_shci_cnvs(ii,ish) * zmaxtime(ii)
2327 ztot_shci_aggs(i1(ii),i3(ii),ish) = ztot_shci_aggs(i1(ii),i3(ii),ish) + &
2328 z_shci_aggs(ii,ish) * zmaxtime(ii)
2329 ztot_shci_hms(i1(ii),i3(ii),ish) = ztot_shci_hms(i1(ii),i3(ii),ish) + &
2330 z_shci_hms(ii,ish) * zmaxtime(ii)
2331 ztot_shci_cfrz(i1(ii),i3(ii),ish) = ztot_shci_cfrz(i1(ii),i3(ii),ish) + &
2332 z_shci_cfrz(ii,ish) * zmaxtime(ii)
2333 ztot_shci_cibu(i1(ii),i3(ii),ish) = ztot_shci_cibu(i1(ii),i3(ii),ish) + &
2334 z_shci_cibu(ii,ish) * zmaxtime(ii)
2335 ztot_shci_rdsf(i1(ii),i3(ii),ish) = ztot_shci_rdsf(i1(ii),i3(ii),ish) + &
2336 z_shci_rdsf(ii,ish) * zmaxtime(ii)
2337 ztot_shci_wetg(i1(ii),i3(ii),ish) = ztot_shci_wetg(i1(ii),i3(ii),ish) + &
2338 z_shci_wetg(ii,ish) * zmaxtime(ii)
2339 ztot_shci_dryg(i1(ii),i3(ii),ish) = ztot_shci_dryg(i1(ii),i3(ii),ish) + &
2340 z_shci_dryg(ii,ish) * zmaxtime(ii)
2341 ztot_shci_hmg(i1(ii),i3(ii),ish) = ztot_shci_hmg(i1(ii),i3(ii),ish) + &
2342 z_shci_hmg(ii,ish) * zmaxtime(ii)
2343 ztot_shci_isc(i1(ii),i3(ii),ish) = ztot_shci_isc(i1(ii),i3(ii),ish) + &
2344 z_shci_isc(ii,ish) * zmaxtime(ii)
2345 ztot_shci_iscs(i1(ii),i3(ii),ish) = ztot_shci_iscs(i1(ii),i3(ii),ish) + &
2346 z_shci_iscs(ii,ish) * zmaxtime(ii)
2348 ztot_shci_corr2(i1(ii),i3(ii),ish) = ztot_shci_corr2(i1(ii),i3(ii),ish) + &
2349 z_shci_corr2(ii,ish)
2351 ztot_shri_iscs(i1(ii),i3(ii)) = ztot_shri_iscs(i1(ii),i3(ii)) + &
2352 z_shri_iscs(ii) * zmaxtime(ii)
2362 DEALLOCATE(zrhodref1d)
2363 DEALLOCATE(zexnref1d)
2383 DEALLOCATE(glcompute1d)
2385 DEALLOCATE(ztime_lastcall1d)
2396 DEALLOCATE(zlatham_iaggs)
2397 DEALLOCATE(zhlc_hrc1d)
2398 DEALLOCATE(zhlc_hcf1d)
2399 DEALLOCATE(zhli_hri1d)
2400 DEALLOCATE(zhli_hcf1d)
2401 DEALLOCATE(zhlc_lrc1d)
2402 DEALLOCATE(zhlc_lcf1d)
2403 DEALLOCATE(zhli_lri1d)
2404 DEALLOCATE(zhli_lcf1d)
2406 DEALLOCATE(zmaxtime)
2407 DEALLOCATE(ztime_threshold)
2440 DEALLOCATE(z_cr_brku)
2441 DEALLOCATE(z_th_honr)
2442 DEALLOCATE(z_rr_honr)
2443 DEALLOCATE(z_cr_honr)
2444 DEALLOCATE(z_th_imlt)
2445 DEALLOCATE(z_rc_imlt)
2446 DEALLOCATE(z_cc_imlt)
2447 DEALLOCATE(z_th_honc)
2448 DEALLOCATE(z_rc_honc)
2449 DEALLOCATE(z_cc_honc)
2450 DEALLOCATE(z_cc_self)
2451 DEALLOCATE(z_rc_auto)
2452 DEALLOCATE(z_cc_auto)
2453 DEALLOCATE(z_cr_auto)
2454 DEALLOCATE(z_rc_accr)
2455 DEALLOCATE(z_cc_accr)
2456 DEALLOCATE(z_cr_scbu)
2457 DEALLOCATE(z_th_evap)
2458 DEALLOCATE(z_rr_evap)
2459 DEALLOCATE(z_cr_evap)
2460 DEALLOCATE(z_ri_cnvi)
2461 DEALLOCATE(z_ci_cnvi)
2462 DEALLOCATE(z_th_deps)
2463 DEALLOCATE(z_rs_deps)
2464 DEALLOCATE(z_th_depi)
2465 DEALLOCATE(z_ri_depi)
2466 DEALLOCATE(z_ri_cnvs)
2467 DEALLOCATE(z_ci_cnvs)
2468 DEALLOCATE(z_cs_ssc)
2469 DEALLOCATE(z_ci_isc)
2470 DEALLOCATE(z_ri_aggs)
2471 DEALLOCATE(z_ci_aggs)
2472 DEALLOCATE(z_th_depg)
2473 DEALLOCATE(z_rg_depg)
2474 DEALLOCATE(z_th_berfi)
2475 DEALLOCATE(z_rc_berfi)
2476 DEALLOCATE(z_th_rim)
2477 DEALLOCATE(z_cc_rim)
2478 DEALLOCATE(z_cs_rim)
2479 DEALLOCATE(z_rc_rimss)
2480 DEALLOCATE(z_rc_rimsg)
2481 DEALLOCATE(z_rs_rimcg)
2482 DEALLOCATE(z_ri_hms)
2483 DEALLOCATE(z_ci_hms)
2484 DEALLOCATE(z_rs_hms)
2485 DEALLOCATE(z_th_acc)
2486 DEALLOCATE(z_cr_acc)
2487 DEALLOCATE(z_cs_acc)
2488 DEALLOCATE(z_rr_accss)
2489 DEALLOCATE(z_rr_accsg)
2490 DEALLOCATE(z_rs_accrg)
2491 DEALLOCATE(z_cs_cmel)
2492 DEALLOCATE(z_rs_cmel)
2493 DEALLOCATE(z_th_cfrz)
2494 DEALLOCATE(z_rr_cfrz)
2495 DEALLOCATE(z_cr_cfrz)
2496 DEALLOCATE(z_ri_cfrz)
2497 DEALLOCATE(z_ci_cfrz)
2498 DEALLOCATE(z_ri_cibu)
2499 DEALLOCATE(z_ci_cibu)
2500 DEALLOCATE(z_ri_rdsf)
2501 DEALLOCATE(z_ci_rdsf)
2502 DEALLOCATE(z_th_wetg)
2503 DEALLOCATE(z_rc_wetg)
2504 DEALLOCATE(z_cc_wetg)
2505 DEALLOCATE(z_rr_wetg)
2506 DEALLOCATE(z_cr_wetg)
2507 DEALLOCATE(z_ri_wetg)
2508 DEALLOCATE(z_ci_wetg)
2509 DEALLOCATE(z_rs_wetg)
2510 DEALLOCATE(z_cs_wetg)
2511 DEALLOCATE(z_rg_wetg)
2512 DEALLOCATE(z_cg_wetg)
2513 DEALLOCATE(z_rh_wetg)
2514 DEALLOCATE(z_th_dryg)
2515 DEALLOCATE(z_rc_dryg)
2516 DEALLOCATE(z_cc_dryg)
2517 DEALLOCATE(z_rr_dryg)
2518 DEALLOCATE(z_cr_dryg)
2519 DEALLOCATE(z_ri_dryg)
2520 DEALLOCATE(z_ci_dryg)
2521 DEALLOCATE(z_rs_dryg)
2522 DEALLOCATE(z_cs_dryg)
2523 DEALLOCATE(z_rg_dryg)
2524 DEALLOCATE(z_ri_hmg)
2525 DEALLOCATE(z_ci_hmg)
2526 DEALLOCATE(z_rg_hmg)
2527 DEALLOCATE(z_th_gmlt)
2528 DEALLOCATE(z_rr_gmlt)
2529 DEALLOCATE(z_cr_gmlt)
2530 DEALLOCATE(z_cg_gmlt)
2531 DEALLOCATE(z_th_deph)
2532 DEALLOCATE(z_rh_deph)
2533 DEALLOCATE(z_th_weth)
2534 DEALLOCATE(z_rc_weth)
2535 DEALLOCATE(z_cc_weth)
2536 DEALLOCATE(z_rr_weth)
2537 DEALLOCATE(z_cr_weth)
2538 DEALLOCATE(z_ri_weth)
2539 DEALLOCATE(z_ci_weth)
2540 DEALLOCATE(z_rs_weth)
2541 DEALLOCATE(z_cs_weth)
2542 DEALLOCATE(z_rg_weth)
2543 DEALLOCATE(z_cg_weth)
2544 DEALLOCATE(z_rh_weth)
2545 DEALLOCATE(z_rg_cohg)
2546 DEALLOCATE(z_cg_cohg)
2547 DEALLOCATE(z_th_hmlt)
2548 DEALLOCATE(z_rr_hmlt)
2549 DEALLOCATE(z_cr_hmlt)
2550 DEALLOCATE(z_ch_hmlt)
2552 DEALLOCATE(z_rv_corr2)
2553 DEALLOCATE(z_rc_corr2)
2554 DEALLOCATE(z_rr_corr2)
2555 DEALLOCATE(z_ri_corr2)
2556 DEALLOCATE(z_cc_corr2)
2557 DEALLOCATE(z_cr_corr2)
2558 DEALLOCATE(z_ci_corr2)
2560 DEALLOCATE(zcit1d_shape)
2561 DEALLOCATE(za_ci_shape)
2562 DEALLOCATE(zb_ci_shape)
2563 DEALLOCATE(z_shci_imlt)
2564 DEALLOCATE(z_shci_isc)
2565 DEALLOCATE(z_shci_iscs)
2566 DEALLOCATE(z_shri_iscs)
2567 DEALLOCATE(z_shci_honc)
2568 DEALLOCATE(z_shci_cnvi)
2569 DEALLOCATE(z_shci_hach)
2570 DEALLOCATE(z_shci_cnvs)
2571 DEALLOCATE(z_shci_aggs)
2572 DEALLOCATE(z_shci_hms)
2573 DEALLOCATE(z_shci_cfrz)
2574 DEALLOCATE(z_shci_cibu)
2575 DEALLOCATE(z_shci_rdsf)
2576 DEALLOCATE(z_shci_wetg)
2577 DEALLOCATE(z_shci_dryg)
2578 DEALLOCATE(z_shci_hmg)
2579 DEALLOCATE(z_shci_corr2)
2593 ALLOCATE(gmask_elec(d%NIJT,d%NKT))
2594 gmask_elec(:,:) = .false.
2595 gmask_elec(d%NIJB:d%NIJE,:) = ztot_ri_hind(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rr_honr(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2596 ztot_rc_imlt(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rc_honc(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2597 ztot_rs_deps(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_aggs(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2598 ztot_ri_cnvs(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rg_depg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2599 ztot_rc_auto(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rc_accr(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2600 ztot_rr_evap(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rc_rimss(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2601 ztot_rc_rimsg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rs_rimcg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2602 ztot_rr_accss(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rr_accsg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2603 ztot_rs_accrg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rs_cmel(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2604 ztot_rr_cfrz(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_cfrz(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2605 ztot_ri_cibu(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_rdsf(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2606 ztot_rc_wetg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_wetg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2607 ztot_rr_wetg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rs_wetg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2608 ztot_rc_dryg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_dryg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2609 ztot_rr_dryg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rs_dryg(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2610 ztot_rh_wetg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rr_gmlt(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2611 ztot_rc_berfi(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rv_henu(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2612 ztot_rc_hinc(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rv_honh(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2613 ztot_rr_cvrc(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_cnvi(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2614 ztot_ri_depi(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_hms(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2615 ztot_ri_hmg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rc_corr2(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2616 ztot_rr_corr2(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_corr2(d%NIJB:d%NIJE,:) .NE. 0.
2617 IF (limap%NMOM_H .GE. 1) &
2618 gmask_elec(d%NIJB:d%NIJE,:) = gmask_elec(d%NIJB:d%NIJE,:) .OR. &
2619 ztot_rc_weth(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_ri_weth(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2620 ztot_rs_weth(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rg_weth(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2621 ztot_rr_weth(d%NIJB:d%NIJE,:) .NE. 0. .OR. &
2625 ztot_rg_cohg(d%NIJB:d%NIJE,:) .NE. 0. .OR. ztot_rr_hmlt(d%NIJB:d%NIJE,:) .NE. 0.
2627 ielec = count(gmask_elec)
2635 IF (limap%NMOM_H .GE. 1)
THEN
2636 ztot_ri_hind_ots(:,:) = ztot_ri_hind(:,:) * zinv_tstep
2637 ztot_rr_honr_ots(:,:) = -ztot_rr_honr(:,:) * zinv_tstep
2638 ztot_rc_imlt_ots(:,:) = ztot_rc_imlt(:,:) * zinv_tstep
2639 ztot_rc_honc_ots(:,:) = -ztot_rc_honc(:,:) * zinv_tstep
2640 ztot_rs_deps_ots(:,:) = ztot_rs_deps(:,:) * zinv_tstep
2641 ztot_ri_aggs_ots(:,:) = -ztot_ri_aggs(:,:) * zinv_tstep
2642 ztot_ri_cnvs_ots(:,:) = -ztot_ri_cnvs(:,:) * zinv_tstep
2643 ztot_rg_depg_ots(:,:) = ztot_rg_depg(:,:) * zinv_tstep
2644 ztot_rc_auto_ots(:,:) = -ztot_rc_auto(:,:) * zinv_tstep
2645 ztot_rc_accr_ots(:,:) = -ztot_rc_accr(:,:) * zinv_tstep
2646 ztot_rr_evap_ots(:,:) = -ztot_rr_evap(:,:) * zinv_tstep
2647 ztot_rc_rimss_ots(:,:) = ztot_rc_rimss(:,:) * zinv_tstep
2648 ztot_rc_rimsg_ots(:,:) = ztot_rc_rimsg(:,:) * zinv_tstep
2649 ztot_rs_rimcg_ots(:,:) = ztot_rs_rimcg(:,:) * zinv_tstep
2650 ztot_rr_accss_ots(:,:) = ztot_rr_accss(:,:) * zinv_tstep
2651 ztot_rr_accsg_ots(:,:) = ztot_rr_accsg(:,:) * zinv_tstep
2652 ztot_rs_accrg_ots(:,:) = ztot_rs_accrg(:,:) * zinv_tstep
2653 ztot_rs_cmel_ots(:,:) = -ztot_rs_cmel(:,:) * zinv_tstep
2654 ztot_ri_cfrz_ots(:,:) = -ztot_ri_cfrz(:,:) * zinv_tstep
2655 ztot_rr_cfrz_ots(:,:) = -ztot_rr_cfrz(:,:) * zinv_tstep
2656 ztot_rc_wetg_ots(:,:) = -ztot_rc_wetg(:,:) * zinv_tstep
2657 ztot_ri_wetg_ots(:,:) = -ztot_ri_wetg(:,:) * zinv_tstep
2658 ztot_rr_wetg_ots(:,:) = -ztot_rr_wetg(:,:) * zinv_tstep
2659 ztot_rs_wetg_ots(:,:) = -ztot_rs_wetg(:,:) * zinv_tstep
2660 ztot_rc_dryg_ots(:,:) = -ztot_rc_dryg(:,:) * zinv_tstep
2661 ztot_ri_dryg_ots(:,:) = -ztot_ri_dryg(:,:) * zinv_tstep
2662 ztot_rr_dryg_ots(:,:) = -ztot_rr_dryg(:,:) * zinv_tstep
2663 ztot_rs_dryg_ots(:,:) = -ztot_rs_dryg(:,:) * zinv_tstep
2664 ztot_rr_gmlt_ots(:,:) = ztot_rr_gmlt(:,:) * zinv_tstep
2665 ztot_rc_berfi_ots(:,:) = -ztot_rc_berfi(:,:) * zinv_tstep
2666 ztot_rh_wetg_ots(:,:) = ztot_rh_wetg(:,:) * zinv_tstep
2667 ztot_rv_henu_ots(:,:) = ztot_rv_henu(:,:) * zinv_tstep
2668 ztot_rc_hinc_ots(:,:) = -ztot_rc_hinc(:,:) * zinv_tstep
2669 ztot_rv_honh_ots(:,:) = -ztot_rv_honh(:,:) * zinv_tstep
2670 ztot_rr_cvrc_ots(:,:) = -ztot_rr_cvrc(:,:) * zinv_tstep
2671 ztot_ri_cnvi_ots(:,:) = ztot_ri_cnvi(:,:) * zinv_tstep
2672 ztot_ri_depi_ots(:,:) = ztot_ri_depi(:,:) * zinv_tstep
2673 ztot_ri_hms_ots(:,:) = ztot_ri_hms(:,:) * zinv_tstep
2674 ztot_ri_hmg_ots(:,:) = ztot_ri_hmg(:,:) * zinv_tstep
2675 ztot_ri_cibu_ots(:,:) = ztot_ri_cibu(:,:) * zinv_tstep
2676 ztot_ri_rdsf_ots(:,:) = ztot_ri_rdsf(:,:) * zinv_tstep
2677 ztot_rc_corr2_ots(:,:) = -ztot_rc_corr2(:,:) * zinv_tstep
2678 ztot_rr_corr2_ots(:,:) = -ztot_rr_corr2(:,:) * zinv_tstep
2679 ztot_ri_corr2_ots(:,:) = -ztot_ri_corr2(:,:) * zinv_tstep
2680 CALL elec_tendencies(d, cst, iced, icep, elecd, elecp, &
2681 limap, limac, limam, &
2682 krr, ielec, ptstep, gmask_elec, &
2683 buconf, tbudgets, kbudgets, &
2684 'LIMA', pthvrefzikb, &
2685 prhodref, prhodj, zt, zcit_elec, &
2686 zrvt_elec, zrct_elec, zrrt_elec, zrit_elec, zrst_elec, zrgt_elec, &
2687 zqpit, zqct, zqrt, zqit, zqst, zqgt, zqnit, &
2688 zqpis, zqcs, zqrs, zqis, zqss, zqgs, zqnis, &
2689 ztot_ri_hind_ots, ztot_rr_honr_ots, ztot_rc_imlt_ots, &
2690 ztot_rc_honc_ots, ztot_rs_deps_ots, ztot_ri_aggs_ots, &
2691 ztot_ri_cnvs_ots, ztot_rg_depg_ots, ztot_rc_auto_ots, &
2692 ztot_rc_accr_ots, ztot_rr_evap_ots, &
2693 ztot_rc_rimss_ots, ztot_rc_rimsg_ots, ztot_rs_rimcg_ots,&
2694 ztot_rr_accss_ots, ztot_rr_accsg_ots, ztot_rs_accrg_ots,&
2695 ztot_rs_cmel_ots, ztot_ri_cfrz_ots, ztot_rr_cfrz_ots, &
2696 ztot_rc_wetg_ots, ztot_ri_wetg_ots, ztot_rr_wetg_ots, &
2698 ztot_rc_dryg_ots, ztot_ri_dryg_ots, ztot_rr_dryg_ots, &
2700 ztot_rr_gmlt_ots, ztot_rc_berfi_ots, &
2702 prwetgh=ztot_rh_wetg_ots, &
2703 prcweth=ztot_rc_weth, priweth=ztot_ri_weth, prsweth=ztot_rs_weth, &
2704 prgweth=ztot_rg_weth, prrweth=ztot_rr_weth, &
2707 prdryhg=ztot_rg_cohg, prhmltr=ztot_rr_hmlt, &
2708 prht=zrht, pqht=zqht, pqhs=zqhs, pcht=zcht, &
2710 pcct=zcct_elec, pcrt=zcrt_elec, pcst=zcst_elec, pcgt=zcgt_elec, &
2711 prvhenc=ztot_rv_henu_ots, prchinc=ztot_rc_hinc_ots, &
2712 prvhonh=ztot_rv_honh_ots, prrcvrc=ztot_rr_cvrc_ots, &
2713 pricnvi=ztot_ri_cnvi_ots, prvdepi=ztot_ri_depi_ots, &
2714 prshmsi=ztot_ri_hms_ots, prghmgi=ztot_ri_hmg_ots, &
2715 pricibu=ztot_ri_cibu_ots, prirdsf=ztot_ri_rdsf_ots, &
2716 prccorr2=ztot_rc_corr2_ots, prrcorr2=ztot_rr_corr2_ots, &
2717 pricorr2=ztot_ri_corr2_ots)
2719 ztot_ri_hind_ots(:,:) = ztot_ri_hind(:,:) * zinv_tstep
2720 ztot_rr_honr_ots(:,:) = -ztot_rr_honr(:,:) * zinv_tstep
2721 ztot_rc_imlt_ots(:,:) = ztot_rc_imlt(:,:) * zinv_tstep
2722 ztot_rc_honc_ots(:,:) = -ztot_rc_honc(:,:) * zinv_tstep
2723 ztot_rs_deps_ots(:,:) = ztot_rs_deps(:,:) * zinv_tstep
2724 ztot_ri_aggs_ots(:,:) = -ztot_ri_aggs(:,:) * zinv_tstep
2725 ztot_ri_cnvs_ots(:,:) = -ztot_ri_cnvs(:,:) * zinv_tstep
2726 ztot_rg_depg_ots(:,:) = ztot_rg_depg(:,:) * zinv_tstep
2727 ztot_rc_auto_ots(:,:) = -ztot_rc_auto(:,:) * zinv_tstep
2728 ztot_rc_accr_ots(:,:) = -ztot_rc_accr(:,:) * zinv_tstep
2729 ztot_rr_evap_ots(:,:) = -ztot_rr_evap(:,:) * zinv_tstep
2730 ztot_rc_rimss_ots(:,:) = ztot_rc_rimss(:,:) * zinv_tstep
2731 ztot_rc_rimsg_ots(:,:) = ztot_rc_rimsg(:,:) * zinv_tstep
2732 ztot_rs_rimcg_ots(:,:) = ztot_rs_rimcg(:,:) * zinv_tstep
2733 ztot_rr_accss_ots(:,:) = ztot_rr_accss(:,:) * zinv_tstep
2734 ztot_rr_accsg_ots(:,:) = ztot_rr_accsg(:,:) * zinv_tstep
2735 ztot_rs_accrg_ots(:,:) = ztot_rs_accrg(:,:) * zinv_tstep
2736 ztot_rs_cmel_ots(:,:) = -ztot_rs_cmel(:,:) * zinv_tstep
2737 ztot_ri_cfrz_ots(:,:) = -ztot_ri_cfrz(:,:) * zinv_tstep
2738 ztot_rr_cfrz_ots(:,:) = -ztot_rr_cfrz(:,:) * zinv_tstep
2739 ztot_rc_wetg_ots(:,:) = -ztot_rc_wetg(:,:) * zinv_tstep
2740 ztot_ri_wetg_ots(:,:) = -ztot_ri_wetg(:,:) * zinv_tstep
2741 ztot_rr_wetg_ots(:,:) = -ztot_rr_wetg(:,:) * zinv_tstep
2742 ztot_rs_wetg_ots(:,:) = -ztot_rs_wetg(:,:) * zinv_tstep
2743 ztot_rc_dryg_ots(:,:) = -ztot_rc_dryg(:,:) * zinv_tstep
2744 ztot_ri_dryg_ots(:,:) = -ztot_ri_dryg(:,:) * zinv_tstep
2745 ztot_rr_dryg_ots(:,:) = -ztot_rr_dryg(:,:) * zinv_tstep
2746 ztot_rs_dryg_ots(:,:) = -ztot_rs_dryg(:,:) * zinv_tstep
2747 ztot_rr_gmlt_ots(:,:) = ztot_rr_gmlt(:,:) * zinv_tstep
2748 ztot_rc_berfi_ots(:,:) = -ztot_rc_berfi(:,:) * zinv_tstep
2749 ztot_rv_henu_ots(:,:) = ztot_rv_henu(:,:) * zinv_tstep
2750 ztot_rc_hinc_ots(:,:) = -ztot_rc_hinc(:,:) * zinv_tstep
2751 ztot_rv_honh_ots(:,:) = -ztot_rv_honh(:,:) * zinv_tstep
2752 ztot_rr_cvrc_ots(:,:) = -ztot_rr_cvrc(:,:) * zinv_tstep
2753 ztot_ri_cnvi_ots(:,:) = ztot_ri_cnvi(:,:) * zinv_tstep
2754 ztot_ri_depi_ots(:,:) = ztot_ri_depi(:,:) * zinv_tstep
2755 ztot_ri_hms_ots(:,:) = ztot_ri_hms(:,:) * zinv_tstep
2756 ztot_ri_hmg_ots(:,:) = ztot_ri_hmg(:,:) * zinv_tstep
2757 ztot_ri_cibu_ots(:,:) = ztot_ri_cibu(:,:) * zinv_tstep
2758 ztot_ri_rdsf_ots(:,:) = ztot_ri_rdsf(:,:) * zinv_tstep
2759 ztot_rc_corr2_ots(:,:) = -ztot_rc_corr2(:,:) * zinv_tstep
2760 ztot_rr_corr2_ots(:,:) = -ztot_rr_corr2(:,:) * zinv_tstep
2761 ztot_ri_corr2_ots(:,:) = -ztot_ri_corr2(:,:) * zinv_tstep
2762 CALL elec_tendencies(d, cst, iced, icep, elecd, elecp, &
2763 limap, limac, limam, &
2764 krr, ielec, ptstep, gmask_elec, &
2765 buconf, tbudgets, kbudgets, &
2766 'LIMA', pthvrefzikb, &
2767 prhodref, prhodj, zt, zcit_elec, &
2768 zrvt_elec, zrct_elec, zrrt_elec, zrit_elec, zrst_elec, zrgt_elec, &
2769 zqpit, zqct, zqrt, zqit, zqst, zqgt, zqnit, &
2770 zqpis, zqcs, zqrs, zqis, zqss, zqgs, zqnis, &
2771 ztot_ri_hind_ots, ztot_rr_honr_ots, ztot_rc_imlt_ots, &
2772 ztot_rc_honc_ots, ztot_rs_deps_ots, ztot_ri_aggs_ots, &
2773 ztot_ri_cnvs_ots, ztot_rg_depg_ots, ztot_rc_auto_ots, &
2774 ztot_rc_accr_ots, ztot_rr_evap_ots, &
2775 ztot_rc_rimss_ots, ztot_rc_rimsg_ots, ztot_rs_rimcg_ots,&
2776 ztot_rr_accss_ots, ztot_rr_accsg_ots, ztot_rs_accrg_ots,&
2777 ztot_rs_cmel_ots, ztot_ri_cfrz_ots, ztot_rr_cfrz_ots, &
2778 ztot_rc_wetg_ots, ztot_ri_wetg_ots, ztot_rr_wetg_ots, &
2780 ztot_rc_dryg_ots, ztot_ri_dryg_ots, ztot_rr_dryg_ots, &
2782 ztot_rr_gmlt_ots, ztot_rc_berfi_ots, &
2784 pcct=zcct, pcrt=zcrt, pcst=zcst, pcgt=zcgt, &
2785 prvhenc=ztot_rv_henu_ots, prchinc=ztot_rc_hinc_ots, &
2786 prvhonh=ztot_rv_honh_ots, prrcvrc=ztot_rr_cvrc_ots, &
2787 pricnvi=ztot_ri_cnvi_ots, prvdepi=ztot_ri_depi_ots, &
2788 prshmsi=ztot_ri_hms_ots, prghmgi=ztot_ri_hmg_ots, &
2789 pricibu=ztot_ri_cibu_ots, prirdsf=ztot_ri_rdsf_ots, &
2790 prccorr2=ztot_rc_corr2_ots, prrcorr2=ztot_rr_corr2_ots, &
2791 pricorr2=ztot_ri_corr2_ots)
2795 psv_elec_s(d%NIJB:d%NIJE,:,1) = zqpis(d%NIJB:d%NIJE,:)
2796 psv_elec_s(d%NIJB:d%NIJE,:,2) = zqcs(d%NIJB:d%NIJE,:)
2797 psv_elec_s(d%NIJB:d%NIJE,:,3) = zqrs(d%NIJB:d%NIJE,:)
2798 psv_elec_s(d%NIJB:d%NIJE,:,4) = zqis(d%NIJB:d%NIJE,:)
2799 psv_elec_s(d%NIJB:d%NIJE,:,5) = zqss(d%NIJB:d%NIJE,:)
2800 psv_elec_s(d%NIJB:d%NIJE,:,6) = zqgs(d%NIJB:d%NIJE,:)
2802 psv_elec_s(d%NIJB:d%NIJE,:,7) = zqnis(d%NIJB:d%NIJE,:)
2803 ELSE IF (krr == 7)
THEN
2804 psv_elec_s(d%NIJB:d%NIJE,:,7) = zqhs(d%NIJB:d%NIJE,:)
2805 psv_elec_s(d%NIJB:d%NIJE,:,8) = zqnis(d%NIJB:d%NIJE,:)
2808 DEALLOCATE(gmask_elec)
2817 IF (
ALLOCATED(zqht))
DEALLOCATE(zqht)
2825 IF (
ALLOCATED(zqhs))
DEALLOCATE(zqhs)
2827 DEALLOCATE(zrvt_elec)
2828 DEALLOCATE(zrct_elec)
2829 DEALLOCATE(zrrt_elec)
2830 DEALLOCATE(zrit_elec)
2831 DEALLOCATE(zrst_elec)
2832 DEALLOCATE(zrgt_elec)
2833 IF (
ALLOCATED(zrht_elec))
DEALLOCATE(zrht_elec)
2834 IF (
ALLOCATED(zcct_elec))
DEALLOCATE(zcct_elec)
2835 IF (
ALLOCATED(zcrt_elec))
DEALLOCATE(zcrt_elec)
2836 IF (
ALLOCATED(zcit_elec))
DEALLOCATE(zcit_elec)
2837 IF (
ALLOCATED(zcst_elec))
DEALLOCATE(zcst_elec)
2838 IF (
ALLOCATED(zcgt_elec))
DEALLOCATE(zcgt_elec)
2839 IF (
ALLOCATED(zcht_elec))
DEALLOCATE(zcht_elec)
2841 DEALLOCATE(ztot_ri_hind_ots)
2842 DEALLOCATE(ztot_rr_honr_ots)
2843 DEALLOCATE(ztot_rc_imlt_ots)
2844 DEALLOCATE(ztot_rc_honc_ots)
2845 DEALLOCATE(ztot_rs_deps_ots)
2846 DEALLOCATE(ztot_ri_aggs_ots)
2847 DEALLOCATE(ztot_ri_cnvs_ots)
2848 DEALLOCATE(ztot_rg_depg_ots)
2849 DEALLOCATE(ztot_rc_auto_ots)
2850 DEALLOCATE(ztot_rc_accr_ots)
2851 DEALLOCATE(ztot_rr_evap_ots)
2852 DEALLOCATE(ztot_rc_rimss_ots)
2853 DEALLOCATE(ztot_rc_rimsg_ots)
2854 DEALLOCATE(ztot_rs_rimcg_ots)
2855 DEALLOCATE(ztot_rr_accss_ots)
2856 DEALLOCATE(ztot_rr_accsg_ots)
2857 DEALLOCATE(ztot_rs_accrg_ots)
2858 DEALLOCATE(ztot_rs_cmel_ots)
2859 DEALLOCATE(ztot_ri_cfrz_ots)
2860 DEALLOCATE(ztot_rr_cfrz_ots)
2861 DEALLOCATE(ztot_rc_wetg_ots)
2862 DEALLOCATE(ztot_ri_wetg_ots)
2863 DEALLOCATE(ztot_rr_wetg_ots)
2864 DEALLOCATE(ztot_rs_wetg_ots)
2865 DEALLOCATE(ztot_rc_dryg_ots)
2866 DEALLOCATE(ztot_ri_dryg_ots)
2867 DEALLOCATE(ztot_rr_dryg_ots)
2868 DEALLOCATE(ztot_rs_dryg_ots)
2869 DEALLOCATE(ztot_rr_gmlt_ots)
2870 DEALLOCATE(ztot_rc_berfi_ots)
2871 DEALLOCATE(ztot_rh_wetg_ots)
2872 DEALLOCATE(ztot_rv_henu_ots)
2873 DEALLOCATE(ztot_rc_hinc_ots)
2874 DEALLOCATE(ztot_rv_honh_ots)
2875 DEALLOCATE(ztot_rr_cvrc_ots)
2876 DEALLOCATE(ztot_ri_cnvi_ots)
2877 DEALLOCATE(ztot_ri_depi_ots)
2878 DEALLOCATE(ztot_ri_hms_ots)
2879 DEALLOCATE(ztot_ri_hmg_ots)
2880 DEALLOCATE(ztot_ri_cibu_ots)
2881 DEALLOCATE(ztot_ri_rdsf_ots)
2882 DEALLOCATE(ztot_rc_corr2_ots)
2883 DEALLOCATE(ztot_rr_corr2_ots)
2884 DEALLOCATE(ztot_ri_corr2_ots)
2888DEALLOCATE(ztot_ri_hind)
2889DEALLOCATE(ztot_rc_hinc)
2890DEALLOCATE(ztot_rv_henu)
2891DEALLOCATE(ztot_rv_honh)
2908pths(d%NIJB:d%NIJE,:) = ztht(d%NIJB:d%NIJE,:) * zinv_tstep
2910prs(d%NIJB:d%NIJE,:,1) = zrvt(d%NIJB:d%NIJE,:) *zinv_tstep
2911IF ( krr .GE. 2 ) prs(d%NIJB:d%NIJE,:,2) = zrct(d%NIJB:d%NIJE,:) *zinv_tstep
2912IF ( krr .GE. 3 ) prs(d%NIJB:d%NIJE,:,3) = zrrt(d%NIJB:d%NIJE,:) *zinv_tstep
2913IF ( krr .GE. 4 ) prs(d%NIJB:d%NIJE,:,4) = zrit(d%NIJB:d%NIJE,:) *zinv_tstep
2914IF ( krr .GE. 5 ) prs(d%NIJB:d%NIJE,:,5) = zrst(d%NIJB:d%NIJE,:) *zinv_tstep
2915IF ( krr .GE. 6 ) prs(d%NIJB:d%NIJE,:,6) = zrgt(d%NIJB:d%NIJE,:) *zinv_tstep
2916IF ( krr .GE. 7 ) prs(d%NIJB:d%NIJE,:,7) = zrht(d%NIJB:d%NIJE,:) *zinv_tstep
2918IF ( limap%NMOM_C.GE.2 ) psvs(d%NIJB:d%NIJE,:,isv_lima_nc) = zcct(d%NIJB:d%NIJE,:) *zinv_tstep
2919IF ( limap%NMOM_R.GE.2 ) psvs(d%NIJB:d%NIJE,:,isv_lima_nr) = zcrt(d%NIJB:d%NIJE,:) *zinv_tstep
2920IF ( limap%NMOM_I.GE.2 )
THEN
2921 IF (.NOT. limap%LCRYSTAL_SHAPE)
THEN
2922 psvs(d%NIJB:d%NIJE,:,isv_lima_ni) = zcit(d%NIJB:d%NIJE,:) *zinv_tstep
2924 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
2925 psvs(d%NIJB:d%NIJE,:,isv_lima_ni+ish-1) = zcit_shape(d%NIJB:d%NIJE,:,ish) *zinv_tstep
2929IF ( limap%NMOM_S.GE.2 ) psvs(d%NIJB:d%NIJE,:,isv_lima_ns) = zcst(d%NIJB:d%NIJE,:) *zinv_tstep
2930IF ( limap%NMOM_G.GE.2 ) psvs(d%NIJB:d%NIJE,:,isv_lima_ng) = zcgt(d%NIJB:d%NIJE,:) *zinv_tstep
2931IF ( limap%NMOM_H.GE.2 ) psvs(d%NIJB:d%NIJE,:,isv_lima_nh) = zcht(d%NIJB:d%NIJE,:) *zinv_tstep
2933IF ( limap%NMOD_CCN .GE. 1 ) psvs(d%NIJB:d%NIJE,:,isv_lima_ccn_free:isv_lima_ccn_free+limap%NMOD_CCN-1) = &
2934 & zccnft(d%NIJB:d%NIJE,:,:) *zinv_tstep
2935IF ( limap%NMOD_CCN .GE. 1 ) psvs(d%NIJB:d%NIJE,:,isv_lima_ccn_acti:isv_lima_ccn_acti+limap%NMOD_CCN-1) = &
2936 & zccnat(d%NIJB:d%NIJE,:,:) *zinv_tstep
2937IF ( limap%NMOD_IFN .GE. 1 ) psvs(d%NIJB:d%NIJE,:,isv_lima_ifn_free:isv_lima_ifn_free+limap%NMOD_IFN-1) = &
2938 & zifnft(d%NIJB:d%NIJE,:,:) *zinv_tstep
2939IF ( limap%NMOD_IFN .GE. 1 ) psvs(d%NIJB:d%NIJE,:,isv_lima_ifn_nucl:isv_lima_ifn_nucl+limap%NMOD_IFN-1) = &
2940 & zifnnt(d%NIJB:d%NIJE,:,:) *zinv_tstep
2941IF ( limap%NMOD_IMM .GE. 1 ) psvs(d%NIJB:d%NIJE,:,isv_lima_imm_nucl:isv_lima_imm_nucl+limap%NMOD_IMM-1) = &
2942 & zimmnt(d%NIJB:d%NIJE,:,:) *zinv_tstep
2943IF ( limap%LHHONI) psvs(d%NIJB:d%NIJE,:,isv_lima_hom_haze) = zhomft(d%NIJB:d%NIJE,:) *zinv_tstep
2945IF ( limap%NMOM_I.EQ.1 ) pcit(:,:) = zcit(:,:)*prhodref(:,:)
2950IF ( buconf%LBU_ENABLE )
then
2951 ALLOCATE(zrhodjontstep(d%NIJT,d%NKT))
2952 zrhodjontstep(d%NIJB:d%NIJE,:) = zinv_tstep * prhodj(d%NIJB:d%NIJE,:)
2954 IF ( buconf%LBUDGET_TH )
then
2955 zwkbud(:,:) = ztot_th_evap(:,:) * zrhodjontstep(:,:)
2956 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'REVA', zwkbud )
2957 zwkbud(:,:) = ztot_th_honc(:,:) * zrhodjontstep(:,:)
2958 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'HONC', zwkbud )
2959 zwkbud(:,:) = ztot_th_honr(:,:) * zrhodjontstep(:,:)
2960 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'HONR', zwkbud )
2961 zwkbud(:,:) = ztot_th_deps(:,:) * zrhodjontstep(:,:)
2962 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'DEPS', zwkbud )
2963 zwkbud(:,:) = ztot_th_depi(:,:) * zrhodjontstep(:,:)
2964 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'DEPI', zwkbud )
2965 zwkbud(:,:) = ztot_th_depg(:,:) * zrhodjontstep(:,:)
2966 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'DEPG', zwkbud )
2967 zwkbud(:,:) = ztot_th_imlt(:,:) * zrhodjontstep(:,:)
2968 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
2969 zwkbud(:,:) = ztot_th_berfi(:,:) * zrhodjontstep(:,:)
2970 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'BERFI', zwkbud )
2971 zwkbud(:,:) = ztot_th_rim(:,:) * zrhodjontstep(:,:)
2972 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'RIM', zwkbud )
2973 zwkbud(:,:) = ztot_th_acc(:,:) * zrhodjontstep(:,:)
2974 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'ACC', zwkbud )
2975 zwkbud(:,:) = ztot_th_cfrz(:,:) * zrhodjontstep(:,:)
2976 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
2977 zwkbud(:,:) = ztot_th_wetg(:,:) * zrhodjontstep(:,:)
2978 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'WETG', zwkbud )
2979 zwkbud(:,:) = ztot_th_dryg(:,:) * zrhodjontstep(:,:)
2980 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
2981 zwkbud(:,:) = ztot_th_gmlt(:,:) * zrhodjontstep(:,:)
2982 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'GMLT', zwkbud )
2983 zwkbud(:,:) = ztot_th_deph(:,:) * zrhodjontstep(:,:)
2984 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'DEPH', zwkbud )
2985 zwkbud(:,:) = ztot_th_weth(:,:) * zrhodjontstep(:,:)
2986 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'WETH', zwkbud )
2987 zwkbud(:,:) = ztot_th_hmlt(:,:) * zrhodjontstep(:,:)
2988 CALL tbudgets(nbudget_th)%PTR%ADD_PHY(d,
'HMLT', zwkbud )
2991 IF ( buconf%LBUDGET_RV )
then
2992 zwkbud(:,:) = -ztot_rr_evap(:,:) * zrhodjontstep(:,:)
2993 CALL tbudgets(nbudget_rv)%PTR%ADD_PHY(d,
'REVA', zwkbud )
2994 zwkbud(:,:) = -ztot_rs_deps(:,:) * zrhodjontstep(:,:)
2995 CALL tbudgets(nbudget_rv)%PTR%ADD_PHY(d,
'DEPS', zwkbud )
2996 zwkbud(:,:) = -ztot_ri_depi(:,:) * zrhodjontstep(:,:)
2997 CALL tbudgets(nbudget_rv)%PTR%ADD_PHY(d,
'DEPI', zwkbud )
2998 zwkbud(:,:) = -ztot_rg_depg(:,:) * zrhodjontstep(:,:)
2999 CALL tbudgets(nbudget_rv)%PTR%ADD_PHY(d,
'DEPG', zwkbud )
3000 zwkbud(:,:) = ztot_rv_corr2(:,:) * zrhodjontstep(:,:)
3001 CALL tbudgets(nbudget_rv)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3002 zwkbud(:,:) = -ztot_rh_deph(:,:) * zrhodjontstep(:,:)
3003 CALL tbudgets(nbudget_rv)%PTR%ADD_PHY(d,
'DEPH', zwkbud )
3006 IF ( buconf%LBUDGET_RC )
then
3007 zwkbud(:,:) = ztot_rc_auto(:,:) * zrhodjontstep(:,:)
3008 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'AUTO', zwkbud )
3009 zwkbud(:,:) = ztot_rc_accr(:,:) * zrhodjontstep(:,:)
3010 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'ACCR', zwkbud )
3011 zwkbud(:,:) = ztot_rc_honc(:,:) * zrhodjontstep(:,:)
3012 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'HONC', zwkbud )
3013 zwkbud(:,:) = ztot_rc_imlt(:,:) * zrhodjontstep(:,:)
3014 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
3015 zwkbud(:,:) = ztot_rc_berfi(:,:) * zrhodjontstep(:,:)
3016 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'BERFI', zwkbud )
3017 zwkbud(:,:) = (ztot_rc_rimss(:,:) + ztot_rc_rimsg(:,:)) * zrhodjontstep(:,:)
3018 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'RIM', zwkbud )
3019 zwkbud(:,:) = ztot_rc_wetg(:,:) * zrhodjontstep(:,:)
3020 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3021 zwkbud(:,:) = ztot_rc_dryg(:,:) * zrhodjontstep(:,:)
3022 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3023 zwkbud(:,:) = -ztot_rr_cvrc(:,:) * zrhodjontstep(:,:)
3024 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'CVRC', zwkbud )
3025 zwkbud(:,:) = ztot_rc_corr2(:,:) * zrhodjontstep(:,:)
3026 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3027 zwkbud(:,:) = ztot_rc_weth(:,:) * zrhodjontstep(:,:)
3028 CALL tbudgets(nbudget_rc)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3031 IF ( buconf%LBUDGET_RR )
then
3032 zwkbud(:,:) = -ztot_rc_auto(:,:) * zrhodjontstep(:,:)
3033 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'AUTO', zwkbud )
3034 zwkbud(:,:) = -ztot_rc_accr(:,:) * zrhodjontstep(:,:)
3035 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'ACCR', zwkbud )
3036 zwkbud(:,:) = ztot_rr_evap(:,:) * zrhodjontstep(:,:)
3037 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'REVA', zwkbud )
3038 zwkbud(:,:) = ztot_rr_honr(:,:) * zrhodjontstep(:,:)
3039 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'HONR', zwkbud )
3040 zwkbud(:,:) = (-ztot_rr_accss(:,:) - ztot_rr_accsg(:,:)) * zrhodjontstep(:,:)
3041 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'ACC', zwkbud )
3042 zwkbud(:,:) = ztot_rr_cfrz(:,:) * zrhodjontstep(:,:)
3043 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3044 zwkbud(:,:) = ztot_rr_wetg(:,:) * zrhodjontstep(:,:)
3045 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3046 zwkbud(:,:) = ztot_rr_dryg(:,:) * zrhodjontstep(:,:)
3047 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3048 zwkbud(:,:) = ztot_rr_gmlt(:,:) * zrhodjontstep(:,:)
3049 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'GMLT', zwkbud )
3050 zwkbud(:,:) = ztot_rr_cvrc(:,:) * zrhodjontstep(:,:)
3051 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'CVRC', zwkbud )
3052 zwkbud(:,:) = ztot_rr_corr2(:,:)* zrhodjontstep(:,:)
3053 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3054 zwkbud(:,:) = ztot_rr_weth(:,:) * zrhodjontstep(:,:)
3055 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3056 zwkbud(:,:) = ztot_rr_hmlt(:,:) * zrhodjontstep(:,:)
3057 CALL tbudgets(nbudget_rr)%PTR%ADD_PHY(d,
'HMLT', zwkbud )
3060 IF ( buconf%LBUDGET_RI )
then
3061 zwkbud(:,:) = -ztot_rc_honc(:,:) * zrhodjontstep(:,:)
3062 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'HONC', zwkbud )
3063 zwkbud(:,:) = ztot_ri_cnvi(:,:) * zrhodjontstep(:,:)
3064 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'CNVI', zwkbud )
3065 zwkbud(:,:) = ztot_ri_cnvs(:,:) * zrhodjontstep(:,:)
3066 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'CNVS', zwkbud )
3067 zwkbud(:,:) = ztot_ri_aggs(:,:) * zrhodjontstep(:,:)
3068 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'AGGS', zwkbud )
3069 zwkbud(:,:) = -ztot_rc_imlt(:,:) * zrhodjontstep(:,:)
3070 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
3071 zwkbud(:,:) = -ztot_rc_berfi(:,:) * zrhodjontstep(:,:)
3072 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'BERFI', zwkbud )
3073 zwkbud(:,:) = ztot_ri_hms(:,:) * zrhodjontstep(:,:)
3074 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'HMS', zwkbud )
3075 zwkbud(:,:) = ztot_ri_cfrz(:,:) * zrhodjontstep(:,:)
3076 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3077 zwkbud(:,:) = ztot_ri_depi(:,:) * zrhodjontstep(:,:)
3078 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'DEPI', zwkbud )
3079 zwkbud(:,:) = ztot_ri_cibu(:,:) * zrhodjontstep(:,:)
3080 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'CIBU', zwkbud )
3081 zwkbud(:,:) = ztot_ri_rdsf(:,:) * zrhodjontstep(:,:)
3082 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'RDSF', zwkbud )
3083 zwkbud(:,:) = ztot_ri_wetg(:,:) * zrhodjontstep(:,:)
3084 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3085 zwkbud(:,:) = ztot_ri_dryg(:,:) * zrhodjontstep(:,:)
3086 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3087 zwkbud(:,:) = ztot_ri_hmg(:,:) * zrhodjontstep(:,:)
3088 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'HMG', zwkbud )
3089 zwkbud(:,:) = ztot_ri_corr2(:,:) * zrhodjontstep(:,:)
3090 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3091 zwkbud(:,:) = ztot_ri_weth(:,:) * zrhodjontstep(:,:)
3092 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3093 IF (limap%LCRYSTAL_SHAPE)
THEN
3094 zwkbud(:,:) = ztot_shri_iscs(:,:) * zrhodjontstep(:,:)
3095 CALL tbudgets(nbudget_ri)%PTR%ADD_PHY(d,
'ISCS', zwkbud )
3099 IF ( buconf%LBUDGET_RS )
then
3100 zwkbud(:,:) = -ztot_ri_cnvi(:,:) * zrhodjontstep(:,:)
3101 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'CNVI', zwkbud )
3102 zwkbud(:,:) = ztot_rs_deps(:,:) * zrhodjontstep(:,:)
3103 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'DEPS', zwkbud )
3104 zwkbud(:,:) = -ztot_ri_cnvs(:,:) * zrhodjontstep(:,:)
3105 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'CNVS', zwkbud )
3106 zwkbud(:,:) = -ztot_ri_aggs(:,:) * zrhodjontstep(:,:)
3107 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'AGGS', zwkbud )
3110 zwkbud(:,:) = (-ztot_rc_rimss(:,:) - ztot_rs_rimcg(:,:)) * zrhodjontstep(:,:)
3111 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'RIM', zwkbud )
3112 zwkbud(:,:) = ztot_rs_hms(:,:) * zrhodjontstep(:,:)
3113 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'HMS', zwkbud )
3116 zwkbud(:,:) = (ztot_rr_accss(:,:) - ztot_rs_accrg(:,:)) * zrhodjontstep(:,:)
3117 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'ACC', zwkbud )
3118 zwkbud(:,:) = ztot_rs_cmel(:,:) * zrhodjontstep(:,:)
3119 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'CMEL', zwkbud )
3120 zwkbud(:,:) = -ztot_ri_cibu(:,:) * zrhodjontstep(:,:)
3121 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'CIBU', zwkbud )
3122 zwkbud(:,:) = ztot_rs_wetg(:,:) * zrhodjontstep(:,:)
3123 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3124 zwkbud(:,:) = ztot_rs_dryg(:,:) * zrhodjontstep(:,:)
3125 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3126 zwkbud(:,:) = ztot_rs_weth(:,:) * zrhodjontstep(:,:)
3127 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3128 IF (limap%LCRYSTAL_SHAPE)
THEN
3129 zwkbud(:,:) = -ztot_shri_iscs(:,:) * zrhodjontstep(:,:)
3130 CALL tbudgets(nbudget_rs)%PTR%ADD_PHY(d,
'ISCS', zwkbud )
3134 IF ( buconf%LBUDGET_RG )
then
3135 zwkbud(:,:) = -ztot_rr_honr(:,:) * zrhodjontstep(:,:)
3136 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'HONR', zwkbud )
3137 zwkbud(:,:) = ztot_rg_depg(:,:) * zrhodjontstep(:,:)
3138 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'DEPG', zwkbud )
3139 zwkbud(:,:) = (-ztot_rc_rimsg(:,:) + ztot_rs_rimcg(:,:) ) * zrhodjontstep(:,:)
3140 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'RIM', zwkbud )
3141 zwkbud(:,:) = (ztot_rr_accsg(:,:) + ztot_rs_accrg(:,:)) * zrhodjontstep(:,:)
3142 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'ACC', zwkbud )
3143 zwkbud(:,:) = -ztot_rs_cmel(:,:) * zrhodjontstep(:,:)
3144 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'CMEL', zwkbud )
3145 zwkbud(:,:) = ( -ztot_rr_cfrz(:,:) - ztot_ri_cfrz(:,:) ) * zrhodjontstep(:,:)
3146 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3147 zwkbud(:,:) = -ztot_ri_rdsf(:,:) * zrhodjontstep(:,:)
3148 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'RDSF', zwkbud )
3149 zwkbud(:,:) = ztot_rg_wetg(:,:) * zrhodjontstep(:,:)
3150 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3151 zwkbud(:,:) = ztot_rg_dryg(:,:) * zrhodjontstep(:,:)
3152 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3153 zwkbud(:,:) = ztot_rg_hmg(:,:) * zrhodjontstep(:,:)
3154 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'HMG', zwkbud )
3155 zwkbud(:,:) = -ztot_rr_gmlt(:,:) * zrhodjontstep(:,:)
3156 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'GMLT', zwkbud )
3157 zwkbud(:,:) = ztot_rg_weth(:,:) * zrhodjontstep(:,:)
3158 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3159 zwkbud(:,:) = ztot_rg_cohg(:,:) * zrhodjontstep(:,:)
3160 CALL tbudgets(nbudget_rg)%PTR%ADD_PHY(d,
'COHG', zwkbud )
3163 IF ( buconf%LBUDGET_RH )
then
3164 zwkbud(:,:) = ztot_rh_wetg(:,:) * zrhodjontstep(:,:)
3165 CALL tbudgets(nbudget_rh)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3166 zwkbud(:,:) = ztot_rh_deph(:,:) * zrhodjontstep(:,:)
3167 CALL tbudgets(nbudget_rh)%PTR%ADD_PHY(d,
'DEPH', zwkbud )
3168 zwkbud(:,:) = ztot_rh_weth(:,:) * zrhodjontstep(:,:)
3169 CALL tbudgets(nbudget_rh)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3170 zwkbud(:,:) = -ztot_rg_cohg(:,:) * zrhodjontstep(:,:)
3171 CALL tbudgets(nbudget_rh)%PTR%ADD_PHY(d,
'COHG', zwkbud )
3172 zwkbud(:,:) = -ztot_rr_hmlt(:,:) * zrhodjontstep(:,:)
3173 CALL tbudgets(nbudget_rh)%PTR%ADD_PHY(d,
'HMLT', zwkbud )
3176 IF ( buconf%LBUDGET_SV )
then
3180 IF (limap%NMOM_C.GE.2)
then
3181 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NC
3182 zwkbud(:,:) = ztot_cc_self(:,:) * zrhodjontstep(:,:)
3183 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'SELF', zwkbud )
3184 zwkbud(:,:) = ztot_cc_auto(:,:) * zrhodjontstep(:,:)
3185 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'AUTO', zwkbud )
3186 zwkbud(:,:) = ztot_cc_accr(:,:) * zrhodjontstep(:,:)
3187 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ACCR', zwkbud )
3190 zwkbud(:,:) = ztot_cc_honc(:,:) * zrhodjontstep(:,:)
3191 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HONC', zwkbud )
3192 zwkbud(:,:) = ztot_cc_imlt(:,:) * zrhodjontstep(:,:)
3193 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
3194 zwkbud(:,:) = ztot_cc_rim(:,:) * zrhodjontstep(:,:)
3195 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'RIM', zwkbud )
3196 zwkbud(:,:) = ztot_cc_wetg(:,:) * zrhodjontstep(:,:)
3197 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3198 zwkbud(:,:) = ztot_cc_dryg(:,:) * zrhodjontstep(:,:)
3199 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3200 zwkbud(:,:) = -ztot_cr_cvrc(:,:) * zrhodjontstep(:,:)
3201 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CVRC', zwkbud )
3202 zwkbud(:,:) = ztot_cc_corr2(:,:) * zrhodjontstep(:,:)
3203 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3204 zwkbud(:,:) = ztot_cc_weth(:,:) * zrhodjontstep(:,:)
3205 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3210 IF (limap%NMOM_R.GE.2)
then
3211 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NR
3212 zwkbud(:,:) = ztot_cr_auto(:,:) * zrhodjontstep(:,:)
3213 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'AUTO', zwkbud )
3214 zwkbud(:,:) = ztot_cr_scbu(:,:) * zrhodjontstep(:,:)
3215 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'SCBU', zwkbud )
3216 zwkbud(:,:) = ztot_cr_evap(:,:) * zrhodjontstep(:,:)
3217 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'REVA', zwkbud )
3218 zwkbud(:,:) = ztot_cr_brku(:,:) * zrhodjontstep(:,:)
3219 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'BRKU', zwkbud )
3220 zwkbud(:,:) = ztot_cr_honr(:,:) * zrhodjontstep(:,:)
3221 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HONR', zwkbud )
3222 zwkbud(:,:) = ztot_cr_acc(:,:) * zrhodjontstep(:,:)
3223 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ACC', zwkbud )
3224 zwkbud(:,:) = ztot_cr_cfrz(:,:) * zrhodjontstep(:,:)
3225 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3226 zwkbud(:,:) = ztot_cr_wetg(:,:) * zrhodjontstep(:,:)
3227 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3228 zwkbud(:,:) = ztot_cr_dryg(:,:) * zrhodjontstep(:,:)
3229 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3230 zwkbud(:,:) = ztot_cr_gmlt(:,:) * zrhodjontstep(:,:)
3231 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'GMLT', zwkbud )
3232 zwkbud(:,:) = ztot_cr_cvrc(:,:) * zrhodjontstep(:,:)
3233 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CVRC', zwkbud )
3234 zwkbud(:,:) = ztot_cr_corr2(:,:) * zrhodjontstep(:,:)
3235 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3236 zwkbud(:,:) = ztot_cr_weth(:,:) * zrhodjontstep(:,:)
3237 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3238 zwkbud(:,:) = ztot_cr_hmlt(:,:) * zrhodjontstep(:,:)
3239 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HMLT', zwkbud )
3244 IF (limap%NMOM_I.GE.2)
then
3245 IF (.NOT. limap%LCRYSTAL_SHAPE)
THEN
3246 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NI
3247 zwkbud(:,:) = -ztot_cc_honc(:,:) * zrhodjontstep(:,:)
3248 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HONC', zwkbud )
3249 zwkbud(:,:) = ztot_ci_cnvi(:,:) * zrhodjontstep(:,:)
3250 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CNVI', zwkbud )
3251 zwkbud(:,:) = ztot_ci_cnvs(:,:) * zrhodjontstep(:,:)
3252 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CNVS', zwkbud )
3253 zwkbud(:,:) = ztot_ci_aggs(:,:) * zrhodjontstep(:,:)
3254 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'AGGS', zwkbud )
3255 zwkbud(:,:) = -ztot_cc_imlt(:,:) * zrhodjontstep(:,:)
3256 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
3257 zwkbud(:,:) = ztot_ci_hms(:,:) * zrhodjontstep(:,:)
3258 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HMS', zwkbud )
3259 zwkbud(:,:) = ztot_ci_cfrz(:,:) * zrhodjontstep(:,:)
3260 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3261 zwkbud(:,:) = ztot_ci_cibu(:,:) * zrhodjontstep(:,:)
3262 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CIBU', zwkbud )
3263 zwkbud(:,:) = ztot_ci_rdsf(:,:) * zrhodjontstep(:,:)
3264 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'RDSF', zwkbud )
3265 zwkbud(:,:) = ztot_ci_wetg(:,:) * zrhodjontstep(:,:)
3266 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3267 zwkbud(:,:) = ztot_ci_dryg(:,:) * zrhodjontstep(:,:)
3268 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3269 zwkbud(:,:) = ztot_ci_hmg(:,:) * zrhodjontstep(:,:)
3270 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HMG', zwkbud )
3271 zwkbud(:,:) = ztot_ci_corr2(:,:) * zrhodjontstep(:,:)
3272 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3273 zwkbud(:,:) = ztot_ci_weth(:,:) * zrhodjontstep(:,:)
3274 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3276 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
3277 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NI + ish - 1
3278 zwkbud(:,:) = ztot_shci_honc(:,:,ish) * zrhodjontstep(:,:)
3279 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HONC', zwkbud )
3280 zwkbud(:,:) = ztot_shci_cnvi(:,:,ish) * zrhodjontstep(:,:)
3281 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CNVI', zwkbud )
3282 zwkbud(:,:) = ztot_shci_hach(:,:,ish) * zrhodjontstep(:,:)
3283 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HACH', zwkbud )
3284 zwkbud(:,:) = ztot_shci_cnvs(:,:,ish) * zrhodjontstep(:,:)
3285 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CNVS', zwkbud )
3286 zwkbud(:,:) = ztot_shci_aggs(:,:,ish) * zrhodjontstep(:,:)
3287 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'AGGS', zwkbud )
3288 zwkbud(:,:) = ztot_shci_imlt(:,:,ish) * zrhodjontstep(:,:)
3289 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
3290 zwkbud(:,:) = ztot_shci_hms(:,:,ish) * zrhodjontstep(:,:)
3291 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HMS', zwkbud )
3292 zwkbud(:,:) = ztot_shci_cfrz(:,:,ish) * zrhodjontstep(:,:)
3293 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3294 zwkbud(:,:) = ztot_shci_cibu(:,:,ish) * zrhodjontstep(:,:)
3295 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CIBU', zwkbud )
3296 zwkbud(:,:) = ztot_shci_rdsf(:,:,ish) * zrhodjontstep(:,:)
3297 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'RDSF', zwkbud )
3298 zwkbud(:,:) = ztot_shci_wetg(:,:,ish) * zrhodjontstep(:,:)
3299 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3300 zwkbud(:,:) = ztot_shci_dryg(:,:,ish) * zrhodjontstep(:,:)
3301 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3302 zwkbud(:,:) = ztot_shci_hmg(:,:,ish) * zrhodjontstep(:,:)
3303 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HMG', zwkbud )
3304 zwkbud(:,:) = ztot_shci_corr2(:,:,ish) * zrhodjontstep(:,:)
3305 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CORR2', zwkbud )
3306 zwkbud(:,:) = ztot_shci_isc(:,:,ish) * zrhodjontstep(:,:)
3307 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ISC', zwkbud )
3308 zwkbud(:,:) = ztot_shci_iscs(:,:,ish) * zrhodjontstep(:,:)
3309 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ISCS', zwkbud )
3316 IF (limap%NMOM_S.GE.2)
then
3317 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NS
3318 zwkbud(:,:) = -ztot_ci_cnvi(:,:) * zrhodjontstep(:,:)
3319 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CNVI', zwkbud )
3320 zwkbud(:,:) = -ztot_ci_cnvs(:,:) * zrhodjontstep(:,:)
3321 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CNVS', zwkbud )
3322 zwkbud(:,:) = ztot_cs_rim(:,:) * zrhodjontstep(:,:)
3323 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'RIM', zwkbud )
3324 zwkbud(:,:) = ztot_cs_acc(:,:) * zrhodjontstep(:,:)
3325 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ACC', zwkbud )
3326 zwkbud(:,:) = ztot_cs_cmel(:,:) * zrhodjontstep(:,:)
3327 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CMEL', zwkbud )
3328 zwkbud(:,:) = ztot_cs_ssc(:,:) * zrhodjontstep(:,:)
3329 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'SSC', zwkbud )
3330 zwkbud(:,:) = ztot_cs_wetg(:,:) * zrhodjontstep(:,:)
3331 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3332 zwkbud(:,:) = ztot_cs_dryg(:,:) * zrhodjontstep(:,:)
3333 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'DRYG', zwkbud )
3334 zwkbud(:,:) = ztot_cs_weth(:,:) * zrhodjontstep(:,:)
3335 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3336 IF (limap%LCRYSTAL_SHAPE)
THEN
3337 ALLOCATE(zaux_iscs(d%NIJT,d%NKT)) ; zaux_iscs(:,:) = 0.
3338 DO ish = 1, limap%NNB_CRYSTAL_SHAPE
3339 zaux_iscs(:,:) = sum(ztot_shci_iscs,dim=3)
3341 zwkbud(:,:) = -zaux_iscs(:,:) * zrhodjontstep(:,:)
3342 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ISCS', zwkbud )
3343 DEALLOCATE(zaux_iscs)
3349 IF (limap%NMOM_G.GE.2)
then
3350 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NG
3351 zwkbud(:,:) = -ztot_cs_rim(:,:) * zrhodjontstep(:,:)
3352 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'RIM', zwkbud )
3353 zwkbud(:,:) = -ztot_cs_acc(:,:) * zrhodjontstep(:,:)
3354 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'ACC', zwkbud )
3355 zwkbud(:,:) = -ztot_cs_cmel(:,:) * zrhodjontstep(:,:)
3356 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CMEL', zwkbud )
3357 zwkbud(:,:) = -ztot_cr_cfrz(:,:) * zrhodjontstep(:,:)
3358 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'CFRZ', zwkbud )
3359 zwkbud(:,:) = ztot_cg_wetg(:,:) * zrhodjontstep(:,:)
3360 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3361 zwkbud(:,:) = ztot_cg_gmlt(:,:) * zrhodjontstep(:,:)
3362 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'GMLT', zwkbud )
3363 zwkbud(:,:) = ztot_cg_weth(:,:) * zrhodjontstep(:,:)
3364 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETH', zwkbud )
3365 zwkbud(:,:) = ztot_cg_cohg(:,:) * zrhodjontstep(:,:)
3366 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'COHG', zwkbud )
3371 IF (limap%NMOM_H.GE.2)
then
3372 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_NH
3373 zwkbud(:,:) = -ztot_cg_wetg(:,:) * zrhodjontstep(:,:)
3374 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'WETG', zwkbud )
3375 zwkbud(:,:) = -ztot_cg_cohg(:,:) * zrhodjontstep(:,:)
3376 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'COHG', zwkbud )
3377 zwkbud(:,:) = ztot_ch_hmlt(:,:) * zrhodjontstep(:,:)
3378 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'HMLT', zwkbud )
3381 DO ii = 1, limap%NMOD_IFN
3382 idx = nbudget_sv1 - 1 + tnsv%NSV_LIMA_IFN_NUCL + ii - 1
3383 zwkbud(:,:) = ztot_ifnn_imlt(:, :, ii) * zrhodjontstep(:,:)
3384 CALL tbudgets(idx)%PTR%ADD_PHY(d,
'IMLT', zwkbud )
3388 DEALLOCATE( zrhodjontstep )
3391IF (
ALLOCATED(zcit_shape))
DEALLOCATE(zcit_shape)
3392IF (
ALLOCATED(zcis_shape))
DEALLOCATE(zcis_shape)
3393IF (
ALLOCATED(zrit_shape))
DEALLOCATE(zrit_shape)
3394IF (
ALLOCATED(zris_shape))
DEALLOCATE(zris_shape)
3395IF (
ALLOCATED(ztot_cr_brku))
DEALLOCATE(ztot_cr_brku)
3396IF (
ALLOCATED(ztot_th_honr))
DEALLOCATE(ztot_th_honr)
3397IF (
ALLOCATED(ztot_rr_honr))
DEALLOCATE(ztot_rr_honr)
3398IF (
ALLOCATED(ztot_cr_honr))
DEALLOCATE(ztot_cr_honr)
3399IF (
ALLOCATED(ztot_th_imlt))
DEALLOCATE(ztot_th_imlt)
3400IF (
ALLOCATED(ztot_rc_imlt))
DEALLOCATE(ztot_rc_imlt)
3401IF (
ALLOCATED(ztot_cc_imlt))
DEALLOCATE(ztot_cc_imlt)
3402IF (
ALLOCATED(ztot_th_honc))
DEALLOCATE(ztot_th_honc)
3403IF (
ALLOCATED(ztot_rc_honc))
DEALLOCATE(ztot_rc_honc)
3404IF (
ALLOCATED(ztot_cc_honc))
DEALLOCATE(ztot_cc_honc)
3405IF (
ALLOCATED(ztot_cc_self))
DEALLOCATE(ztot_cc_self)
3406IF (
ALLOCATED(ztot_rc_auto))
DEALLOCATE(ztot_rc_auto)
3407IF (
ALLOCATED(ztot_cc_auto))
DEALLOCATE(ztot_cc_auto)
3408IF (
ALLOCATED(ztot_cr_auto))
DEALLOCATE(ztot_cr_auto)
3409IF (
ALLOCATED(ztot_rc_accr))
DEALLOCATE(ztot_rc_accr)
3410IF (
ALLOCATED(ztot_cc_accr))
DEALLOCATE(ztot_cc_accr)
3411IF (
ALLOCATED(ztot_cr_scbu))
DEALLOCATE(ztot_cr_scbu)
3412IF (
ALLOCATED(ztot_th_evap))
DEALLOCATE(ztot_th_evap)
3413IF (
ALLOCATED(ztot_rr_evap))
DEALLOCATE(ztot_rr_evap)
3414IF (
ALLOCATED(ztot_cr_evap))
DEALLOCATE(ztot_cr_evap)
3415IF (
ALLOCATED(ztot_ri_cnvi))
DEALLOCATE(ztot_ri_cnvi)
3416IF (
ALLOCATED(ztot_ci_cnvi))
DEALLOCATE(ztot_ci_cnvi)
3417IF (
ALLOCATED(ztot_th_deps))
DEALLOCATE(ztot_th_deps)
3418IF (
ALLOCATED(ztot_rs_deps))
DEALLOCATE(ztot_rs_deps)
3419IF (
ALLOCATED(ztot_th_depi))
DEALLOCATE(ztot_th_depi)
3420IF (
ALLOCATED(ztot_ri_depi))
DEALLOCATE(ztot_ri_depi)
3421IF (
ALLOCATED(ztot_ri_cnvs))
DEALLOCATE(ztot_ri_cnvs)
3422IF (
ALLOCATED(ztot_ci_cnvs))
DEALLOCATE(ztot_ci_cnvs)
3423IF (
ALLOCATED(ztot_cs_ssc))
DEALLOCATE(ztot_cs_ssc)
3424IF (
ALLOCATED(ztot_ci_isc))
DEALLOCATE(ztot_ci_isc)
3425IF (
ALLOCATED(ztot_ri_aggs))
DEALLOCATE(ztot_ri_aggs)
3426IF (
ALLOCATED(ztot_ci_aggs))
DEALLOCATE(ztot_ci_aggs)
3427IF (
ALLOCATED(ztot_th_depg))
DEALLOCATE(ztot_th_depg)
3428IF (
ALLOCATED(ztot_rg_depg))
DEALLOCATE(ztot_rg_depg)
3429IF (
ALLOCATED(ztot_th_berfi))
DEALLOCATE(ztot_th_berfi)
3430IF (
ALLOCATED(ztot_rc_berfi))
DEALLOCATE(ztot_rc_berfi)
3431IF (
ALLOCATED(ztot_th_rim))
DEALLOCATE(ztot_th_rim)
3432IF (
ALLOCATED(ztot_cc_rim))
DEALLOCATE(ztot_cc_rim)
3433IF (
ALLOCATED(ztot_cs_rim))
DEALLOCATE(ztot_cs_rim)
3434IF (
ALLOCATED(ztot_rc_rimss))
DEALLOCATE(ztot_rc_rimss)
3435IF (
ALLOCATED(ztot_rc_rimsg))
DEALLOCATE(ztot_rc_rimsg)
3436IF (
ALLOCATED(ztot_rs_rimcg))
DEALLOCATE(ztot_rs_rimcg)
3437IF (
ALLOCATED(ztot_ri_hms))
DEALLOCATE(ztot_ri_hms)
3438IF (
ALLOCATED(ztot_ci_hms))
DEALLOCATE(ztot_ci_hms)
3439IF (
ALLOCATED(ztot_rs_hms))
DEALLOCATE(ztot_rs_hms)
3440IF (
ALLOCATED(ztot_th_acc))
DEALLOCATE(ztot_th_acc)
3441IF (
ALLOCATED(ztot_cr_acc))
DEALLOCATE(ztot_cr_acc)
3442IF (
ALLOCATED(ztot_cs_acc))
DEALLOCATE(ztot_cs_acc)
3443IF (
ALLOCATED(ztot_rr_accss))
DEALLOCATE(ztot_rr_accss)
3444IF (
ALLOCATED(ztot_rr_accsg))
DEALLOCATE(ztot_rr_accsg)
3445IF (
ALLOCATED(ztot_rs_accrg))
DEALLOCATE(ztot_rs_accrg)
3446IF (
ALLOCATED(ztot_rs_cmel))
DEALLOCATE(ztot_rs_cmel)
3447IF (
ALLOCATED(ztot_cs_cmel))
DEALLOCATE(ztot_cs_cmel)
3448IF (
ALLOCATED(ztot_th_cfrz))
DEALLOCATE(ztot_th_cfrz)
3449IF (
ALLOCATED(ztot_rr_cfrz))
DEALLOCATE(ztot_rr_cfrz)
3450IF (
ALLOCATED(ztot_cr_cfrz))
DEALLOCATE(ztot_cr_cfrz)
3451IF (
ALLOCATED(ztot_ri_cfrz))
DEALLOCATE(ztot_ri_cfrz)
3452IF (
ALLOCATED(ztot_ci_cfrz))
DEALLOCATE(ztot_ci_cfrz)
3453IF (
ALLOCATED(ztot_ri_cibu))
DEALLOCATE(ztot_ri_cibu)
3454IF (
ALLOCATED(ztot_ci_cibu))
DEALLOCATE(ztot_ci_cibu)
3455IF (
ALLOCATED(ztot_ri_rdsf))
DEALLOCATE(ztot_ri_rdsf)
3456IF (
ALLOCATED(ztot_ci_rdsf))
DEALLOCATE(ztot_ci_rdsf)
3457IF (
ALLOCATED(ztot_th_wetg))
DEALLOCATE(ztot_th_wetg)
3458IF (
ALLOCATED(ztot_rc_wetg))
DEALLOCATE(ztot_rc_wetg)
3459IF (
ALLOCATED(ztot_cc_wetg))
DEALLOCATE(ztot_cc_wetg)
3460IF (
ALLOCATED(ztot_rr_wetg))
DEALLOCATE(ztot_rr_wetg)
3461IF (
ALLOCATED(ztot_cr_wetg))
DEALLOCATE(ztot_cr_wetg)
3462IF (
ALLOCATED(ztot_ri_wetg))
DEALLOCATE(ztot_ri_wetg)
3463IF (
ALLOCATED(ztot_ci_wetg))
DEALLOCATE(ztot_ci_wetg)
3464IF (
ALLOCATED(ztot_rs_wetg))
DEALLOCATE(ztot_rs_wetg)
3465IF (
ALLOCATED(ztot_cs_wetg))
DEALLOCATE(ztot_cs_wetg)
3466IF (
ALLOCATED(ztot_rg_wetg))
DEALLOCATE(ztot_rg_wetg)
3467IF (
ALLOCATED(ztot_cg_wetg))
DEALLOCATE(ztot_cg_wetg)
3468IF (
ALLOCATED(ztot_rh_wetg))
DEALLOCATE(ztot_rh_wetg)
3469IF (
ALLOCATED(ztot_th_dryg))
DEALLOCATE(ztot_th_dryg)
3470IF (
ALLOCATED(ztot_rc_dryg))
DEALLOCATE(ztot_rc_dryg)
3471IF (
ALLOCATED(ztot_cc_dryg))
DEALLOCATE(ztot_cc_dryg)
3472IF (
ALLOCATED(ztot_rr_dryg))
DEALLOCATE(ztot_rr_dryg)
3473IF (
ALLOCATED(ztot_cr_dryg))
DEALLOCATE(ztot_cr_dryg)
3474IF (
ALLOCATED(ztot_ri_dryg))
DEALLOCATE(ztot_ri_dryg)
3475IF (
ALLOCATED(ztot_ci_dryg))
DEALLOCATE(ztot_ci_dryg)
3476IF (
ALLOCATED(ztot_rs_dryg))
DEALLOCATE(ztot_rs_dryg)
3477IF (
ALLOCATED(ztot_cs_dryg))
DEALLOCATE(ztot_cs_dryg)
3478IF (
ALLOCATED(ztot_rg_dryg))
DEALLOCATE(ztot_rg_dryg)
3479IF (
ALLOCATED(ztot_ri_hmg))
DEALLOCATE(ztot_ri_hmg)
3480IF (
ALLOCATED(ztot_ci_hmg))
DEALLOCATE(ztot_ci_hmg)
3481IF (
ALLOCATED(ztot_rg_hmg))
DEALLOCATE(ztot_rg_hmg)
3482IF (
ALLOCATED(ztot_th_gmlt))
DEALLOCATE(ztot_th_gmlt)
3483IF (
ALLOCATED(ztot_rr_gmlt))
DEALLOCATE(ztot_rr_gmlt)
3484IF (
ALLOCATED(ztot_cr_gmlt))
DEALLOCATE(ztot_cr_gmlt)
3485IF (
ALLOCATED(ztot_cg_gmlt))
DEALLOCATE(ztot_cg_gmlt)
3486IF (
ALLOCATED(ztot_th_deph))
DEALLOCATE(ztot_th_deph)
3487IF (
ALLOCATED(ztot_rh_deph))
DEALLOCATE(ztot_rh_deph)
3488IF (
ALLOCATED(ztot_th_weth))
DEALLOCATE(ztot_th_weth)
3489IF (
ALLOCATED(ztot_rc_weth))
DEALLOCATE(ztot_rc_weth)
3490IF (
ALLOCATED(ztot_cc_weth))
DEALLOCATE(ztot_cc_weth)
3491IF (
ALLOCATED(ztot_rr_weth))
DEALLOCATE(ztot_rr_weth)
3492IF (
ALLOCATED(ztot_cr_weth))
DEALLOCATE(ztot_cr_weth)
3493IF (
ALLOCATED(ztot_ri_weth))
DEALLOCATE(ztot_ri_weth)
3494IF (
ALLOCATED(ztot_ci_weth))
DEALLOCATE(ztot_ci_weth)
3495IF (
ALLOCATED(ztot_rs_weth))
DEALLOCATE(ztot_rs_weth)
3496IF (
ALLOCATED(ztot_cs_weth))
DEALLOCATE(ztot_cs_weth)
3497IF (
ALLOCATED(ztot_rg_weth))
DEALLOCATE(ztot_rg_weth)
3498IF (
ALLOCATED(ztot_cg_weth))
DEALLOCATE(ztot_cg_weth)
3499IF (
ALLOCATED(ztot_rh_weth))
DEALLOCATE(ztot_rh_weth)
3500IF (
ALLOCATED(ztot_rg_cohg))
DEALLOCATE(ztot_rg_cohg)
3501IF (
ALLOCATED(ztot_cg_cohg))
DEALLOCATE(ztot_cg_cohg)
3502IF (
ALLOCATED(ztot_th_hmlt))
DEALLOCATE(ztot_th_hmlt)
3503IF (
ALLOCATED(ztot_rr_hmlt))
DEALLOCATE(ztot_rr_hmlt)
3504IF (
ALLOCATED(ztot_cr_hmlt))
DEALLOCATE(ztot_cr_hmlt)
3505IF (
ALLOCATED(ztot_ch_hmlt))
DEALLOCATE(ztot_ch_hmlt)
3506IF (
ALLOCATED(ztot_rr_cvrc))
DEALLOCATE(ztot_rr_cvrc)
3507IF (
ALLOCATED(ztot_cr_cvrc))
DEALLOCATE(ztot_cr_cvrc)
3508IF (
ALLOCATED(ztot_rv_corr2))
DEALLOCATE(ztot_rv_corr2)
3509IF (
ALLOCATED(ztot_rc_corr2))
DEALLOCATE(ztot_rc_corr2)
3510IF (
ALLOCATED(ztot_rr_corr2))
DEALLOCATE(ztot_rr_corr2)
3511IF (
ALLOCATED(ztot_ri_corr2))
DEALLOCATE(ztot_ri_corr2)
3512IF (
ALLOCATED(ztot_cc_corr2))
DEALLOCATE(ztot_cc_corr2)
3513IF (
ALLOCATED(ztot_cr_corr2))
DEALLOCATE(ztot_cr_corr2)
3514IF (
ALLOCATED(ztot_ci_corr2))
DEALLOCATE(ztot_ci_corr2)
3515IF (
ALLOCATED(ztot_ifnn_imlt))
DEALLOCATE(ztot_ifnn_imlt)
3516IF (
ALLOCATED(ztot_shci_honc))
DEALLOCATE(ztot_shci_honc)
3517IF (
ALLOCATED(ztot_shci_cnvi))
DEALLOCATE(ztot_shci_cnvi)
3518IF (
ALLOCATED(ztot_shci_hms))
DEALLOCATE(ztot_shci_hms)
3519IF (
ALLOCATED(ztot_shci_hmg))
DEALLOCATE(ztot_shci_hmg)
3520IF (
ALLOCATED(ztot_shci_cfrz))
DEALLOCATE(ztot_shci_cfrz)
3521IF (
ALLOCATED(ztot_shci_cibu))
DEALLOCATE(ztot_shci_cibu)
3522IF (
ALLOCATED(ztot_shci_rdsf))
DEALLOCATE(ztot_shci_rdsf)
3523IF (
ALLOCATED(ztot_shci_wetg))
DEALLOCATE(ztot_shci_wetg)
3524IF (
ALLOCATED(ztot_shci_dryg))
DEALLOCATE(ztot_shci_dryg)
3525IF (
ALLOCATED(ztot_shci_corr2))
DEALLOCATE(ztot_shci_corr2)
3526IF (
ALLOCATED(ztot_shci_imlt))
DEALLOCATE(ztot_shci_imlt)
3527IF (
ALLOCATED(ztot_shci_hach))
DEALLOCATE(ztot_shci_hach)
3528IF (
ALLOCATED(ztot_shci_cnvs))
DEALLOCATE(ztot_shci_cnvs)
3529IF (
ALLOCATED(ztot_shci_aggs))
DEALLOCATE(ztot_shci_aggs)
3530IF (
ALLOCATED(ztot_shci_isc))
DEALLOCATE(ztot_shci_isc)
3531IF (
ALLOCATED(ztot_shci_iscs))
DEALLOCATE(ztot_shci_iscs)
3532IF (
ALLOCATED(ztot_shri_iscs))
DEALLOCATE(ztot_shri_iscs)
3534IF (lhook)
CALL dr_hook(
'LIMA', 1, zhook_handle)