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

Last change on this file since 5099 was 5099, checked in by abarral, 2 months ago

Replace most uses of CPP_DUST by the corresponding logical defined in lmdz_cppkeys_wrapper.F90
Convert several files from .F to .f90 to allow Dust to compile w/o rrtm/ecrad
Create lmdz_yoerad.f90
(lint) Remove "!" on otherwise empty line

  • 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 
1  SUBROUTINE stratocu_if(klon,klev,pctsrf,paprs, pplay,t &
2,seuil_inversion,weak_inversion,dthmin)
3
4  USE indice_sol_mod
5
6IMPLICIT NONE
7
8!======================================================================
9! J'introduit un peu de diffusion sauf dans les endroits
10! ou une forte inversion est presente
11! On peut dire qu'il represente la convection peu profonde
12
13! Arguments:
14! klon-----input-I- nombre de points a traiter
15! paprs----input-R- pression a chaque intercouche (en Pa)
16! pplay----input-R- pression au milieu de chaque couche (en Pa)
17! t--------input-R- temperature (K)
18
19! weak_inversion-----logical
20!======================================================================
21
22! Arguments:
23
24    INTEGER, INTENT(IN)                       :: klon,klev
25    REAL, DIMENSION(klon, klev+1), INTENT(IN) ::  paprs
26    REAL, DIMENSION(klon, klev), INTENT(IN)   ::  pplay
27    REAL, DIMENSION(klon, 4), INTENT(IN)   ::  pctsrf
28    REAL, DIMENSION(klon, klev), INTENT(IN)   :: t
29   
30    REAL, DIMENSION(klon), INTENT(OUT)  :: weak_inversion
31
32! Quelques constantes et options:
33
34    REAL seuil_inversion ! au-dela l'inversion est consideree trop faible
35!    PARAMETER (seuil=-0.1)
36
37! Variables locales:
38
39    INTEGER i, k, invb(klon)
40    REAL zl2(klon)
41    REAL dthmin(klon), zdthdp
42
43    INCLUDE "YOMCST.h"
44
45! Chercher la zone d'inversion forte
46
47    DO i = 1, klon
48       invb(i) = klev
49       dthmin(i)=0.0
50    ENDDO
51    DO k = 2, klev/2-1
52       DO i = 1, klon
53          zdthdp = (t(i,k)-t(i,k+1))/(pplay(i,k)-pplay(i,k+1)) &
54               - RD * 0.5*(t(i,k)+t(i,k+1))/RCPD/paprs(i,k+1)
55          zdthdp = zdthdp * 100.0
56          IF (pplay(i,k)>0.8*paprs(i,1) .AND. &
57               zdthdp<dthmin(i) ) THEN
58             dthmin(i) = zdthdp
59             invb(i) = k
60          ENDIF
61       ENDDO
62    ENDDO
63
64! Introduire une diffusion:
65
66    DO i = 1, klon
67       IF ( (pctsrf(i,is_oce) < 0.5) .OR. &
68          (invb(i) == klev) .OR. (dthmin(i) > seuil_inversion) ) THEN
69          weak_inversion(i)=1.
70       ELSE
71          weak_inversion(i)=0.
72       ENDIF
73    ENDDO
74
75  END SUBROUTINE stratocu_if
Note: See TracBrowser for help on using the repository browser.