source: LMDZ5/trunk/libf/phylmd/add_pbl_tend.F90 @ 2654

Last change on this file since 2654 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
RevLine 
[2611]1SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
[1992]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  ! ======================================================================
[1973]8
9
[1992]10  ! ======================================================================
11  ! Declarations
12  ! ======================================================================
[1973]13
[1992]14  USE dimphy
15  USE phys_local_var_mod
16  USE phys_state_var_mod
[2346]17  USE mod_grid_phy_lmdz, ONLY: nbp_lev
[1992]18  IMPLICIT NONE
[2346]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)
[2235]26  INTEGER abortphy
[2346]27!  COMMON /turb_forcing/dtime_frcg, hthturb_gcssold, hqturb_gcssold, &
28!    turb_fcg_gcssold
[1973]29
[1992]30  ! Arguments :
31  ! ------------
32  REAL zdu(klon, klev), zdv(klon, klev)
[2086]33  REAL zdt(klon, klev), zdq(klon, klev), zdql(klon, klev), zdqi(klon, klev)
[1992]34  CHARACTER *(*) text
[1998]35  REAL paprs(klon,klev+1)
[2611]36  INTEGER flag_inhib_tend ! if flag_inhib_tend != 0, tendencies are not added
[1973]37
[1992]38  ! Local :
39  ! --------
40  REAL zzdt(klon, klev), zzdq(klon, klev)
41  INTEGER i, k
[1973]42
[2346]43  IF (firstcall) THEN
44    ALLOCATE(hthturb_gcssold(nbp_lev))
45    ALLOCATE(hqturb_gcssold(nbp_lev))
46    firstcall=.false.
47  ENDIF
48
[1992]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
[2611]59    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
[1992]60  ELSE
[2611]61    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
[1992]62  END IF
63
64
65  RETURN
66END SUBROUTINE add_pbl_tend
Note: See TracBrowser for help on using the repository browser.