/[lmdze]/trunk/Sources/phylmd/coefkz2.f
ViewVC logotype

Annotation of /trunk/Sources/phylmd/coefkz2.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 38 - (hide annotations)
Thu Jan 6 17:52:19 2011 UTC (13 years, 4 months ago) by guez
Original Path: trunk/libf/phylmd/coefkz2.f
File size: 3102 byte(s)
Extracted ASCII art from "inigeom" into a separate text file in the
documentation.

"test_disvert" now creates a separate file for layer thicknesses.

Moved variables from module "yomcst" to module "suphec_m" because this
is where those variables are defined. Kept in "yomcst" only parameters
of Earth orbit. Gave the attribute "parameter" to some variables of
module "suphec_m".

Variables of module "yoethf" were defined in procedure "suphec". Moved
these definitions to a new procedure "yoethf" in module "yoethf_m".

1 guez 3 SUBROUTINE coefkz2(nsrf, knon, paprs, pplay,t,
2     . pcfm, pcfh)
3     use dimens_m
4     use indicesol
5     use dimphy
6     use iniprint
7 guez 38 use SUPHEC_M
8 guez 3 IMPLICIT none
9     c======================================================================
10     c J'introduit un peu de diffusion sauf dans les endroits
11     c ou une forte inversion est presente
12     c On peut dire qu'il represente la convection peu profonde
13     c
14     c Arguments:
15     c nsrf-----input-I- indicateur de la nature du sol
16     c knon-----input-I- nombre de points a traiter
17     c paprs----input-R- pression a chaque intercouche (en Pa)
18     c pplay----input-R- pression au milieu de chaque couche (en Pa)
19     c t--------input-R- temperature (K)
20     c
21     c pcfm-----output-R- coefficients a calculer (vitesse)
22     c pcfh-----output-R- coefficients a calculer (chaleur et humidite)
23     c======================================================================
24     c
25     c Arguments:
26     c
27     INTEGER knon, nsrf
28     REAL paprs(klon,klev+1), pplay(klon,klev)
29     REAL t(klon,klev)
30     c
31     REAL pcfm(klon,klev), pcfh(klon,klev)
32     c
33     c Quelques constantes et options:
34     c
35     REAL prandtl
36     PARAMETER (prandtl=0.4)
37     REAL kstable
38     PARAMETER (kstable=0.002)
39     ccc PARAMETER (kstable=0.001)
40     REAL mixlen ! constante controlant longueur de melange
41     PARAMETER (mixlen=35.0)
42     REAL seuil ! au-dela l'inversion est consideree trop faible
43     PARAMETER (seuil=-0.02)
44     ccc PARAMETER (seuil=-0.04)
45     ccc PARAMETER (seuil=-0.06)
46     ccc PARAMETER (seuil=-0.09)
47     c
48     c Variables locales:
49     c
50     INTEGER i, k, invb(knon)
51     REAL zl2(knon)
52     REAL zdthmin(knon), zdthdp
53     c
54     c Initialiser les sorties
55     c
56     DO k = 1, klev
57     DO i = 1, knon
58     pcfm(i,k) = 0.0
59     pcfh(i,k) = 0.0
60     ENDDO
61     ENDDO
62     c
63     c Chercher la zone d'inversion forte
64     c
65     DO i = 1, knon
66     invb(i) = klev
67     zdthmin(i)=0.0
68     ENDDO
69     DO k = 2, klev/2-1
70     DO i = 1, knon
71     zdthdp = (t(i,k)-t(i,k+1))/(pplay(i,k)-pplay(i,k+1))
72     . - RD * 0.5*(t(i,k)+t(i,k+1))/RCPD/paprs(i,k+1)
73     zdthdp = zdthdp * 100.0
74     IF (pplay(i,k).GT.0.8*paprs(i,1) .AND.
75     . zdthdp.LT.zdthmin(i) ) THEN
76     zdthmin(i) = zdthdp
77     invb(i) = k
78     ENDIF
79     ENDDO
80     ENDDO
81     c
82     c Introduire une diffusion:
83     c
84     DO k = 2, klev
85     DO i = 1, knon
86     cIM cf FH/GK IF ( (nsrf.NE.is_oce) .OR. ! si ce n'est pas sur l'ocean
87     cIM cf FH/GK . (invb(i).EQ.klev) .OR. ! s'il n'y a pas d'inversion
88     !IM cf JLD/ GKtest TERkz2
89     ! IF ( (nsrf.EQ.is_ter) .OR. ! si on est sur la terre
90     ! fin GKtest
91     IF ( (nsrf.EQ.is_oce) .AND. ! si on est sur ocean et si
92     . ( (invb(i).EQ.klev) .OR. ! s'il n'y a pas d'inversion
93     . (zdthmin(i).GT.seuil) ) )THEN ! si l'inversion est trop faible
94     zl2(i)=(mixlen*MAX(0.0,(paprs(i,k)-paprs(i,klev+1))
95     . /(paprs(i,2)-paprs(i,klev+1)) ))**2
96     pcfm(i,k)= zl2(i)* kstable
97     pcfh(i,k) = pcfm(i,k) /prandtl ! h et m different
98     ENDIF
99     ENDDO
100     ENDDO
101     c
102     RETURN
103     END

  ViewVC Help
Powered by ViewVC 1.1.21