4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE coefkz2(nsrf, knon, paprs, pplay, t, pcfm, pcfh) |
SUBROUTINE coefkz2(nsrf, paprs, pplay, t, pcfm, pcfh) |
8 |
|
|
9 |
! J'introduit un peu de diffusion sauf dans les endroits |
! J'introduit un peu de diffusion sauf dans les endroits o\`u une |
10 |
! ou une forte inversion est presente |
! forte inversion est pr\'esente. On peut dire que la diffusion |
11 |
! On peut dire qu'il represente la convection peu profonde |
! repr\'esente la convection peu profonde. |
|
|
|
|
use dimens_m |
|
|
use indicesol |
|
|
use dimphy |
|
|
use conf_gcm_m |
|
|
use SUPHEC_M |
|
|
|
|
|
! Arguments: |
|
|
! nsrf-----input-I- indicateur de la nature du sol |
|
|
! knon-----input-I- nombre de points a traiter |
|
|
! paprs----input-R- pression a chaque intercouche (en Pa) |
|
|
! pplay----input-R- pression au milieu de chaque couche (en Pa) |
|
|
! t--------input-R- temperature (K) |
|
|
|
|
|
! pcfm-----output-R- coefficients a calculer (vitesse) |
|
|
! pcfh-----output-R- coefficients a calculer (chaleur et humidite) |
|
|
|
|
|
! Arguments: |
|
|
|
|
|
INTEGER knon |
|
|
integer, intent(in):: nsrf |
|
|
REAL, intent(in):: paprs(klon, klev+1), pplay(klon, klev) |
|
|
REAL, intent(in):: t(klon, klev) |
|
12 |
|
|
13 |
REAL, intent(out):: pcfm(:, 2:), pcfh(:, 2:) ! (knon, 2:klev) |
use indicesol, only: is_oce |
14 |
|
use dimphy, only: klev |
15 |
|
use SUPHEC_M, only: RCPD, rd |
16 |
|
|
17 |
|
integer, intent(in):: nsrf ! indicateur de la nature du sol |
18 |
|
|
19 |
|
REAL, intent(in):: paprs(:, :) ! (knon, klev+1) |
20 |
|
! pression a chaque intercouche (en Pa) |
21 |
|
|
22 |
|
REAL, intent(in):: pplay(:, :) ! (knon, klev) |
23 |
|
! pression au milieu de chaque couche (en Pa) |
24 |
|
|
25 |
|
REAL, intent(in):: t(:, :) ! (knon, klev) temperature (K) |
26 |
|
|
27 |
|
REAL, intent(out):: pcfm(:, 2:) ! (knon, 2:klev) coefficient vitesse |
28 |
|
|
29 |
|
REAL, intent(out):: pcfh(:, 2:) ! (knon, 2:klev) |
30 |
|
! coefficient chaleur et humidite) |
31 |
|
|
32 |
|
! Local: |
33 |
|
|
34 |
! Quelques constantes et options: |
! Quelques constantes et options: |
35 |
|
|
36 |
REAL prandtl |
REAL prandtl |
42 |
REAL seuil ! au-dela l'inversion est consideree trop faible |
REAL seuil ! au-dela l'inversion est consideree trop faible |
43 |
PARAMETER (seuil=-0.02) |
PARAMETER (seuil=-0.02) |
44 |
|
|
45 |
! Variables locales: |
INTEGER knon ! nombre de points a traiter |
46 |
|
INTEGER i, k |
47 |
INTEGER i, k, invb(knon) |
INTEGER invb(size(paprs, 1)) ! (knon) |
48 |
REAL zl2(knon) |
REAL zl2(size(paprs, 1)) ! (knon) |
49 |
REAL zdthmin(knon), zdthdp |
REAL zdthmin(size(paprs, 1)) ! (knon) |
50 |
|
real zdthdp |
51 |
|
|
52 |
!---------------------------------------------------------- |
!---------------------------------------------------------- |
53 |
|
|
54 |
|
knon = size(paprs, 1) |
55 |
|
|
56 |
! Initialiser les sorties |
! Initialiser les sorties |
57 |
DO k = 2, klev |
DO k = 2, klev |
58 |
DO i = 1, knon |
DO i = 1, knon |