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

Last change on this file since 2548 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
RevLine 
[2235]1SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
[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)
[1973]36
[1992]37  ! Local :
38  ! --------
39  REAL zzdt(klon, klev), zzdq(klon, klev)
40  INTEGER i, k
[1973]41
[2346]42  IF (firstcall) THEN
43    ALLOCATE(hthturb_gcssold(nbp_lev))
44    ALLOCATE(hqturb_gcssold(nbp_lev))
45    firstcall=.false.
46  ENDIF
47
[1992]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
[2235]58    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy)
[1992]59  ELSE
[2235]60    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
[1992]61  END IF
62
63
64  RETURN
65END SUBROUTINE add_pbl_tend
Note: See TracBrowser for help on using the repository browser.