source: LMDZ5/branches/AI-cosp/libf/phylmd/add_pbl_tend.F90 @ 5444

Last change on this file since 5444 was 2346, checked in by Ehouarn Millour, 9 years ago

Physics/dynamics separation:

  • remove all references to dimensions.h from physics. nbp_lon (==iim) , nbp_lat (==jjm+1) and nbp_lev (==llm) from mod_grid_phy_lmdz should be used instead.
  • added module regular_lonlat_mod in phy_common to store information about the global (lon-lat) grid cell boundaries and centers.

EM

File size: 2.0 KB
Line 
1SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
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
37  ! Local :
38  ! --------
39  REAL zzdt(klon, klev), zzdq(klon, klev)
40  INTEGER i, k
41
42  IF (firstcall) THEN
43    ALLOCATE(hthturb_gcssold(nbp_lev))
44    ALLOCATE(hqturb_gcssold(nbp_lev))
45    firstcall=.false.
46  ENDIF
47
48  IF (turb_fcg_gcssold) THEN
49    DO k = 1, klev
50      DO i = 1, klon
51        zzdt(i, k) = hthturb_gcssold(k)*dtime_frcg
52        zzdq(i, k) = hqturb_gcssold(k)*dtime_frcg
53      END DO
54    END DO
55    PRINT *, ' add_pbl_tend, dtime_frcg ', dtime_frcg
56    PRINT *, ' add_pbl_tend, zzdt ', zzdt
57    PRINT *, ' add_pbl_tend, zzdq ', zzdq
58    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy)
59  ELSE
60    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
61  END IF
62
63
64  RETURN
65END SUBROUTINE add_pbl_tend
Note: See TracBrowser for help on using the repository browser.