SURFEX v8.1
General documentation of Surfex
diag_surf_budgetc.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE diag_surf_budgetc (D, DC, PTSTEP, ONOTICE)
7 ! #########################################################################
8 !
9 !!**** *DIAG_SURF_BUDGETC * - Computes cumulated diagnostics
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! B. Decharme
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 08/2009
28 !!------------------------------------------------------------------
29 !
30 USE modd_diag_n, ONLY : diag_t
31 !
32 USE yomhook ,ONLY : lhook, dr_hook
33 USE parkind1 ,ONLY : jprb
34 !
35 IMPLICIT NONE
36 !
37 !* 0.1 declarations of arguments
38 !
39 !
40 TYPE(diag_t), INTENT(INOUT) :: D
41 TYPE(diag_t), INTENT(INOUT) :: DC
42 !
43 REAL, INTENT(IN) :: PTSTEP
44 !
45 LOGICAL, INTENT(IN) :: ONOTICE
46 !
47 !* 0.2 declarations of local variables
48 !
49 REAL(KIND=JPRB) :: ZHOOK_HANDLE
50 !
51 !-------------------------------------------------------------------------------------
52 !
53 !* total incoming and outgoing SW
54 !
55 IF (lhook) CALL dr_hook('DIAG_SURF_BUDGETC_FLAKE',0,zhook_handle)
56 !
57 IF (onotice) dc%XSWD(:) = dc%XSWD(:) + d%XSWD(:) * ptstep
58 dc%XSWU(:) = dc%XSWU(:) + d%XSWU(:) * ptstep
59 !
60 !*incoming outgoing LW
61 !
62 IF (onotice) dc%XLWD(:) = dc%XLWD(:) + d%XLWD(:) * ptstep
63 dc%XLWU(:) = dc%XLWU(:) + d%XLWU(:) * ptstep
64 !
65 !* net radiation
66 !
67 dc%XRN(:) = dc%XRN(:) + d%XRN(:) * ptstep
68 !
69 !* sensible heat flux
70 !
71 dc%XH(:) = dc%XH(:) + d%XH(:) * ptstep
72 !
73 IF (onotice) THEN
74  !
75  !* latent heat flux
76  !
77  dc%XLE (:) = dc%XLE (:) + d%XLE (:) * ptstep
78  dc%XLEI(:) = dc%XLEI(:) + d%XLEI(:) * ptstep
79  !
80  !* evaporation and sublimation (kg/m2)
81  !
82  dc%XEVAP(:) = dc%XEVAP(:) + d%XEVAP(:) * ptstep
83  dc%XSUBL(:) = dc%XSUBL(:) + d%XSUBL(:) * ptstep
84  !
85 ENDIF
86 !
87 !* storage flux
88 !
89 dc%XGFLUX(:) = dc%XGFLUX(:) + d%XGFLUX(:) * ptstep
90 !
91 !* wind stress
92 !
93 dc%XFMU(:) = dc%XFMU(:) + d%XFMU(:) * ptstep
94 dc%XFMV(:) = dc%XFMV(:) + d%XFMV(:) * ptstep
95 !
96 IF (lhook) CALL dr_hook('DIAG_SURF_BUDGETC',1,zhook_handle)
97 !
98 !-------------------------------------------------------------------------------------
99 !
100 END SUBROUTINE diag_surf_budgetc
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine diag_surf_budgetc(D, DC, PTSTEP, ONOTICE)