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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57 - (hide annotations)
Mon Jan 30 12:54:02 2012 UTC (12 years, 3 months ago) by guez
Original Path: trunk/libf/phylmd/coefkz2.f90
File size: 2515 byte(s)
Write used namelists to file "" instead of standard output.

Avoid aliasing in "inidissip" in calls to "divgrad2", "divgrad",
"gradiv2", "gradiv", "nxgraro2" and "nxgrarot". Add a degenerate
dimension to arrays so they have rank 3, like the dummy arguments in
"divgrad2", "divgrad", "gradiv2", "gradiv", "nxgraro2" and "nxgrarot".

Extract the initialization part from "bilan_dyn" and make a separate
procedure, "init_dynzon", from it.

Move variables from modules "iniprint" and "logic" to module
"conf_gcm_m".

Promote internal procedures of "fxy" to private procedures of module
"fxy_m".

Extracted documentation from "inigeom". Removed useless "save"
attributes. Removed useless intermediate variables. Extracted
processing of poles from loop on latitudes. Write coordinates to file
"longitude_latitude.txt" instead of standard output.

Do not use ozone tracer for radiative transfer.

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

  ViewVC Help
Powered by ViewVC 1.1.21