SURFEX v8.1
General documentation of Surfex
trip_diag_init.F90
Go to the documentation of this file.
1 SUBROUTINE trip_diag_init(PSOUT,PSIN,PVEL,PHS,PGOUT,PGNEG,PHG_OLD, &
2  PWTD,PFWTD,PQGCELL,PHGHS, &
3  PQFR,PQRF,PVFIN,PVFOUT,PHSF,PDISCHARGE, &
4  PGSTO_ALL,PGSTO2_ALL,PGIN_ALL,PGOUT_ALL )
5 ! #####################################################
6 !
7 !!**** *TRIP_DIAG_INIT*
8 !!
9 !! PURPOSE
10 !! -------
11 !
12 ! TRIP diag compuation
13 !
14 !!
15 !! AUTHOR
16 !! ------
17 !! B. Decharme
18 !!
19 !! MODIFICATIONS
20 !! -------------
21 !! Original 12/12/13
22 !-------------------------------------------------------------------------------
23 !
24 !* 0. DECLARATIONS
25 ! ------------
26 !
27 USE modn_trip_run, ONLY : ldiag_misc
28 USE modn_trip, ONLY : cgroundw, cvit, lflood
29 USE modd_trip_par, ONLY : xundef
30 !
31 USE yomhook ,ONLY : lhook, dr_hook
32 USE parkind1 ,ONLY : jprb
33 !
34 IMPLICIT NONE
35 !
36 !* 0.1 declarations of arguments
37 !
38 REAL, DIMENSION(:,:), INTENT(OUT) :: PSOUT !streamflow [kg/s]
39 REAL, DIMENSION(:,:), INTENT(OUT) :: PSIN !grid-cell input streamflow [kg/s]
40 REAL, DIMENSION(:,:), INTENT(OUT) :: PVEL !river velocity [m/s]
41 REAL, DIMENSION(:,:), INTENT(OUT) :: PHS !River heigh [m]
42 REAL, DIMENSION(:,:), INTENT(OUT) :: PGOUT !Groundwater outflow [kg/s]
43 REAL, DIMENSION(:,:), INTENT(OUT) :: PGNEG !Groundwater intflow (neg) [kg/s]
44 REAL, DIMENSION(:,:), INTENT(OUT) :: PWTD !Water table depth for coupling[m]
45 REAL, DIMENSION(:,:), INTENT(OUT) :: PFWTD !Fraction of water table to rise
46 REAL, DIMENSION(:,:), INTENT(OUT) :: PQGCELL !lateral groundwater exchanges [kg/s]
47 REAL, DIMENSION(:,:), INTENT(OUT) :: PHGHS !groundwater minus river heigh [m]
48 REAL, DIMENSION(:,:), INTENT(OUT) :: PQFR !floodplains to river exchange [kg/s]
49 REAL, DIMENSION(:,:), INTENT(OUT) :: PQRF !river to floodplains exchange [kg/s]
50 REAL, DIMENSION(:,:), INTENT(OUT) :: PVFIN !QRF velocity [m/s]
51 REAL, DIMENSION(:,:), INTENT(OUT) :: PVFOUT !QFR velocity [m/s]
52 REAL, DIMENSION(:,:), INTENT(OUT) :: PHSF !river minus flodd heigh [m]
53 REAL, DIMENSION(:,:), INTENT(OUT) :: PDISCHARGE !Cumulated river discharges [kg]
54 REAL, DIMENSION(:,:), INTENT(OUT) :: PHG_OLD ! Water table depth before
55 ! water mass conservation [m]
56 !
57 REAL , INTENT(OUT) :: PGSTO_ALL !Global groundwater storage at t [kg]
58 REAL , INTENT(OUT) :: PGSTO2_ALL !Global groundwater storage at t-1 [kg]
59 REAL , INTENT(OUT) :: PGIN_ALL !Global gw recharge + lateral input [kg/m2/s]
60 REAL , INTENT(OUT) :: PGOUT_ALL !Global gw outflow [kg/m2/s]
61 !
62 !* 0.2 declarations of local variables
63 !
64 REAL(KIND=JPRB) :: ZHOOK_HANDLE
65 !
66 !-------------------------------------------------------------------------------
67 IF (lhook) CALL dr_hook('TRIP_DIAG_INIT',0,zhook_handle)
68 !
69 !
70 pdischarge(:,:) = 0.0
71 psout(:,:) = 0.0
72 psin(:,:) = 0.0
73 pgout(:,:) = 0.0
74 pgneg(:,:) = 0.0
75 !
76 pvel(:,:) = xundef
77 phs(:,:) = xundef
78 pqfr(:,:) = xundef
79 pqrf(:,:) = xundef
80 pvfin(:,:) = xundef
81 pvfout(:,:) = xundef
82 phsf(:,:) = xundef
83 pqgcell(:,:) = xundef
84 pwtd(:,:) = xundef
85 pfwtd(:,:) = xundef
86 phghs(:,:) = xundef
87 phg_old(:,:) = xundef
88 !
89 IF(cgroundw=='DIF')THEN
90  IF(ldiag_misc)THEN
91  pqgcell(:,:) = 0.0
92  phghs(:,:) = 0.0
93  ENDIF
94 ENDIF
95 !
96 IF(cvit=='VAR')THEN
97  pvel(:,:) = 0.0
98  phs(:,:) = 0.0
99 ENDIF
100 !
101 IF(lflood)THEN
102  pqfr(:,:) = 0.0
103  pqrf(:,:) = 0.0
104  pvfin(:,:) = 0.0
105  pvfout(:,:) = 0.0
106  phsf(:,:) = 0.0
107 ENDIF
108 !
109 pgsto_all = xundef
110 pgsto2_all = xundef
111 pgin_all = xundef
112 pgout_all = xundef
113 !
114 !
115 IF (lhook) CALL dr_hook('TRIP_DIAG_INIT',1,zhook_handle)
116 !-------------------------------------------------------------------------------
117 !
118 END SUBROUTINE trip_diag_init
logical lflood
Definition: modn_trip.F90:62
subroutine trip_diag_init(PSOUT, PSIN, PVEL, PHS, PGOUT, PGNEG, PHG_OLD, PWTD, PFWTD, PQGCELL, PHGHS, PQFR, PQRF, PVFIN, PVFOUT, PHSF, PDISCHARGE, PGSTO_ALL, PGSTO2_ALL, PGIN_ALL, PGOUT_ALL)
integer, parameter jprb
Definition: parkind1.F90:32
character(len=3) cvit
Definition: modn_trip.F90:41
character(len=3) cgroundw
Definition: modn_trip.F90:49
logical lhook
Definition: yomhook.F90:15
logical ldiag_misc
real, save xundef