source: LMDZ6/branches/Amaury_dev/libf/phylmd/stratocu_if.F90 @ 5209

Last change on this file since 5209 was 5144, checked in by abarral, 8 weeks ago

Put YOMCST.h into modules

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1SUBROUTINE stratocu_if(klon, klev, pctsrf, paprs, pplay, t &
2        , seuil_inversion, weak_inversion, dthmin)
3
4  USE indice_sol_mod
5  USE lmdz_yomcst
6
7  IMPLICIT NONE
8
9  !======================================================================
10  ! J'introduit un peu de diffusion sauf dans les endroits
11  ! ou une forte inversion est presente
12  ! On peut dire qu'il represente la convection peu profonde
13
14  ! Arguments:
15  ! klon-----input-I- nombre de points a traiter
16  ! paprs----input-R- pression a chaque intercouche (en Pa)
17  ! pplay----input-R- pression au milieu de chaque couche (en Pa)
18  ! t--------input-R- temperature (K)
19
20  ! weak_inversion-----logical
21  !======================================================================
22
23  ! Arguments:
24
25  INTEGER, INTENT(IN) :: klon, klev
26  REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: paprs
27  REAL, DIMENSION(klon, klev), INTENT(IN) :: pplay
28  REAL, DIMENSION(klon, 4), INTENT(IN) :: pctsrf
29  REAL, DIMENSION(klon, klev), INTENT(IN) :: t
30
31  REAL, DIMENSION(klon), INTENT(OUT) :: weak_inversion
32
33  ! Quelques constantes et options:
34
35  REAL seuil_inversion ! au-dela l'inversion est consideree trop faible
36  !    PARAMETER (seuil=-0.1)
37
38  ! Variables locales:
39
40  INTEGER i, k, invb(klon)
41  REAL zl2(klon)
42  REAL dthmin(klon), zdthdp
43
44  ! Chercher la zone d'inversion forte
45
46  DO i = 1, klon
47    invb(i) = klev
48    dthmin(i) = 0.0
49  ENDDO
50  DO k = 2, klev / 2 - 1
51    DO i = 1, klon
52      zdthdp = (t(i, k) - t(i, k + 1)) / (pplay(i, k) - pplay(i, k + 1)) &
53              - RD * 0.5 * (t(i, k) + t(i, k + 1)) / RCPD / paprs(i, k + 1)
54      zdthdp = zdthdp * 100.0
55      IF (pplay(i, k)>0.8 * paprs(i, 1) .AND. &
56              zdthdp<dthmin(i)) THEN
57        dthmin(i) = zdthdp
58        invb(i) = k
59      ENDIF
60    ENDDO
61  ENDDO
62
63  ! Introduire une diffusion:
64
65  DO i = 1, klon
66    IF ((pctsrf(i, is_oce) < 0.5) .OR. &
67            (invb(i) == klev) .OR. (dthmin(i) > seuil_inversion)) THEN
68      weak_inversion(i) = 1.
69    ELSE
70      weak_inversion(i) = 0.
71    ENDIF
72  ENDDO
73
74END SUBROUTINE stratocu_if
Note: See TracBrowser for help on using the repository browser.