source: LMDZ5/branches/IPSLCM5A2.1/libf/phylmd/add_pbl_tend.F90 @ 5416

Last change on this file since 5416 was 2611, checked in by jyg, 8 years ago

Introduction of a new option inhibiting the
evolution of the state variables, while calling
all parametrizations. The option is controlled by
the parameter flag_inhib_tend.

For the time being the flag is set to 0 (= no

inhibition of tendencies).

jyg for jld.

File size: 2.1 KB
Line 
1SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
2  ! ======================================================================
3  ! Ajoute les tendances de couche limite, soit determinees par la
4  ! parametrisation
5  ! physique, soit forcees,  aux variables d etat de la dynamique t_seri,
6  ! q_seri ...
7  ! ======================================================================
8
9
10  ! ======================================================================
11  ! Declarations
12  ! ======================================================================
13
14  USE dimphy
15  USE phys_local_var_mod
16  USE phys_state_var_mod
17  USE mod_grid_phy_lmdz, ONLY: nbp_lev
18  IMPLICIT NONE
19  REAL,SAVE,ALLOCATABLE :: hthturb_gcssold(:)
20  REAL,SAVE,ALLOCATABLE :: hqturb_gcssold(:)
21!$OMP THREADPRIVATE(hthturb_gcssold,hqturb_gcssold)
22  REAL,SAVE :: dtime_frcg
23  LOGICAL,SAVE :: turb_fcg_gcssold
24  LOGICAL,SAVE :: firstcall=.true.
25!$OMP THREADPRIVATE(firstcall,turb_fcg_gcssold,dtime_frcg)
26  INTEGER abortphy
27!  COMMON /turb_forcing/dtime_frcg, hthturb_gcssold, hqturb_gcssold, &
28!    turb_fcg_gcssold
29
30  ! Arguments :
31  ! ------------
32  REAL zdu(klon, klev), zdv(klon, klev)
33  REAL zdt(klon, klev), zdq(klon, klev), zdql(klon, klev), zdqi(klon, klev)
34  CHARACTER *(*) text
35  REAL paprs(klon,klev+1)
36  INTEGER flag_inhib_tend ! if flag_inhib_tend != 0, tendencies are not added
37
38  ! Local :
39  ! --------
40  REAL zzdt(klon, klev), zzdq(klon, klev)
41  INTEGER i, k
42
43  IF (firstcall) THEN
44    ALLOCATE(hthturb_gcssold(nbp_lev))
45    ALLOCATE(hqturb_gcssold(nbp_lev))
46    firstcall=.false.
47  ENDIF
48
49  IF (turb_fcg_gcssold) THEN
50    DO k = 1, klev
51      DO i = 1, klon
52        zzdt(i, k) = hthturb_gcssold(k)*dtime_frcg
53        zzdq(i, k) = hqturb_gcssold(k)*dtime_frcg
54      END DO
55    END DO
56    PRINT *, ' add_pbl_tend, dtime_frcg ', dtime_frcg
57    PRINT *, ' add_pbl_tend, zzdt ', zzdt
58    PRINT *, ' add_pbl_tend, zzdq ', zzdq
59    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
60  ELSE
61    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
62  END IF
63
64
65  RETURN
66END SUBROUTINE add_pbl_tend
Note: See TracBrowser for help on using the repository browser.