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
RevLine 
[5144]1SUBROUTINE stratocu_if(klon, klev, pctsrf, paprs, pplay, t &
2        , seuil_inversion, weak_inversion, dthmin)
[878]3
[1785]4  USE indice_sol_mod
[5144]5  USE lmdz_yomcst
[1785]6
[5144]7  IMPLICIT NONE
[1785]8
[5144]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
[5099]13
[5144]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)
[5099]19
[5144]20  ! weak_inversion-----logical
21  !======================================================================
[5099]22
[5144]23  ! Arguments:
[5099]24
[5144]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
[5099]30
[5144]31  REAL, DIMENSION(klon), INTENT(OUT) :: weak_inversion
[5099]32
[5144]33  ! Quelques constantes et options:
[878]34
[5144]35  REAL seuil_inversion ! au-dela l'inversion est consideree trop faible
36  !    PARAMETER (seuil=-0.1)
[5099]37
[5144]38  ! Variables locales:
[878]39
[5144]40  INTEGER i, k, invb(klon)
41  REAL zl2(klon)
42  REAL dthmin(klon), zdthdp
[878]43
[5144]44  ! Chercher la zone d'inversion forte
[878]45
[5144]46  DO i = 1, klon
47    invb(i) = klev
48    dthmin(i) = 0.0
49  ENDDO
50  DO k = 2, klev / 2 - 1
[878]51    DO i = 1, klon
[5144]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
[878]60    ENDDO
[5144]61  ENDDO
[878]62
[5144]63  ! Introduire une diffusion:
[878]64
[5144]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
[878]73
[5144]74END SUBROUTINE stratocu_if
Note: See TracBrowser for help on using the repository browser.