[1191] | 1 | ! $Id $ |
---|
[5099] | 2 | |
---|
[5144] | 3 | SUBROUTINE cltrac(dtime, coef, t, tr, flux, paprs, pplay, delp, & |
---|
| 4 | d_tr, d_tr_dry, flux_tr_dry) !jyg |
---|
[1742] | 5 | |
---|
[1191] | 6 | USE dimphy |
---|
[5144] | 7 | USE lmdz_yomcst |
---|
| 8 | |
---|
[1191] | 9 | IMPLICIT NONE |
---|
[5144] | 10 | !====================================================================== |
---|
| 11 | ! Auteur(s): O. Boucher (LOA/LMD) date: 19961127 |
---|
| 12 | ! inspire de clvent |
---|
| 13 | ! Objet: diffusion verticale de traceurs avec flux fixe a la surface |
---|
| 14 | ! ou/et flux du type c-drag |
---|
[5099] | 15 | |
---|
[5144] | 16 | ! Arguments: |
---|
| 17 | !----------- |
---|
| 18 | ! dtime.......input-R- intervalle du temps (en secondes) |
---|
| 19 | ! coef........input-R- le coefficient d'echange (m**2/s) l>1 |
---|
| 20 | ! t...........input-R- temperature (K) |
---|
| 21 | ! tr..........input-R- la q. de traceurs |
---|
| 22 | ! flux........input-R- le flux de traceurs a la surface |
---|
| 23 | ! paprs.......input-R- pression a inter-couche (Pa) |
---|
| 24 | ! pplay.......input-R- pression au milieu de couche (Pa) |
---|
| 25 | ! delp........input-R- epaisseur de couche (Pa) |
---|
| 26 | ! cdrag.......input-R- cdrag pour le flux de surface (non active) |
---|
| 27 | ! tr0.........input-R- traceurs a la surface ou dans l'ocean (non active) |
---|
| 28 | ! d_tr........output-R- le changement de tr |
---|
| 29 | ! d_tr_dry....output-R- le changement de tr du au depot sec (1st layer) |
---|
| 30 | ! flux_tr_dry.output-R- depot sec |
---|
| 31 | !!! flux_tr..output-R- flux de tr |
---|
| 32 | !====================================================================== |
---|
[5099] | 33 | |
---|
[5144] | 34 | ! Entree |
---|
[5099] | 35 | |
---|
[5144] | 36 | REAL, INTENT(IN) :: dtime |
---|
| 37 | REAL, DIMENSION(klon, klev), INTENT(IN) :: coef |
---|
| 38 | REAL, DIMENSION(klon, klev), INTENT(IN) :: t, tr |
---|
| 39 | REAL, DIMENSION(klon), INTENT(IN) :: flux !(at/s/m2) |
---|
| 40 | REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: paprs |
---|
| 41 | REAL, DIMENSION(klon, klev), INTENT(IN) :: pplay, delp |
---|
[5099] | 42 | |
---|
[5144] | 43 | ! Sorties |
---|
[5099] | 44 | |
---|
[5144] | 45 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_tr |
---|
| 46 | REAL, DIMENSION(klon), INTENT(OUT) :: d_tr_dry !jyg |
---|
| 47 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_tr_dry !jyg |
---|
| 48 | ! REAL ,DIMENSION(klon,klev),INTENT(OUT) :: flux_tr |
---|
[5099] | 49 | |
---|
[5144] | 50 | ! Local |
---|
[5099] | 51 | |
---|
[5144] | 52 | INTEGER :: i, k |
---|
| 53 | REAL, DIMENSION(klon) :: cdrag, tr0 |
---|
| 54 | REAL, DIMENSION(klon, klev) :: zx_ctr |
---|
| 55 | REAL, DIMENSION(klon, klev) :: zx_dtr |
---|
| 56 | REAL, DIMENSION(klon) :: zx_buf |
---|
| 57 | REAL, DIMENSION(klon, klev) :: zx_coef |
---|
| 58 | REAL, DIMENSION(klon, klev) :: local_tr |
---|
| 59 | REAL, DIMENSION(klon) :: zx_alf1, zx_alf2, zx_flux |
---|
[524] | 60 | |
---|
[5144] | 61 | !====================================================================== |
---|
[1191] | 62 | |
---|
| 63 | DO k = 1, klev |
---|
[5144] | 64 | DO i = 1, klon |
---|
| 65 | local_tr(i, k) = tr(i, k) |
---|
| 66 | ENDDO |
---|
[1191] | 67 | ENDDO |
---|
| 68 | |
---|
[5144] | 69 | !====================================================================== |
---|
[1191] | 70 | |
---|
| 71 | DO i = 1, klon |
---|
[5144] | 72 | zx_alf1(i) = (paprs(i, 1) - pplay(i, 2)) / (pplay(i, 1) - pplay(i, 2)) |
---|
| 73 | zx_alf2(i) = 1.0 - zx_alf1(i) |
---|
| 74 | flux_tr_dry(i) = -flux(i) * dtime !jyg |
---|
| 75 | zx_flux(i) = flux_tr_dry(i) * RG !jyg |
---|
| 76 | !! zx_flux(i) = -flux(i)*dtime*RG !jyg |
---|
| 77 | ! Pour le moment le flux est prescrit cdrag et zx_coef(1) vaut 0 |
---|
| 78 | cdrag(i) = 0.0 |
---|
| 79 | tr0(i) = 0.0 |
---|
| 80 | zx_coef(i, 1) = cdrag(i) * dtime * RG |
---|
| 81 | zx_ctr(i, 1) = 0. |
---|
| 82 | zx_dtr(i, 1) = 0. |
---|
[1191] | 83 | ENDDO |
---|
| 84 | |
---|
[5144] | 85 | !====================================================================== |
---|
[1191] | 86 | |
---|
| 87 | DO k = 2, klev |
---|
[5144] | 88 | DO i = 1, klon |
---|
| 89 | zx_coef(i, k) = coef(i, k) * RG / (pplay(i, k - 1) - pplay(i, k)) & |
---|
| 90 | * (paprs(i, k) * 2 / (t(i, k) + t(i, k - 1)) / RD)**2 |
---|
| 91 | zx_coef(i, k) = zx_coef(i, k) * dtime * RG |
---|
| 92 | ENDDO |
---|
[1191] | 93 | ENDDO |
---|
| 94 | |
---|
[5144] | 95 | !====================================================================== |
---|
[1191] | 96 | |
---|
| 97 | DO i = 1, klon |
---|
[5144] | 98 | zx_buf(i) = delp(i, 1) + zx_coef(i, 1) * zx_alf1(i) + zx_coef(i, 2) |
---|
[5099] | 99 | |
---|
[5144] | 100 | zx_ctr(i, 2) = (local_tr(i, 1) * delp(i, 1) + & |
---|
| 101 | zx_coef(i, 1) * tr0(i) - zx_flux(i)) / zx_buf(i) |
---|
[5099] | 102 | |
---|
[5144] | 103 | zx_dtr(i, 2) = (zx_coef(i, 2) - zx_alf2(i) * zx_coef(i, 1)) / & |
---|
| 104 | zx_buf(i) |
---|
| 105 | d_tr_dry(i) = -zx_flux(i) / zx_buf(i) !jyg |
---|
[1191] | 106 | ENDDO |
---|
| 107 | |
---|
| 108 | DO k = 3, klev |
---|
[5144] | 109 | DO i = 1, klon |
---|
| 110 | zx_buf(i) = delp(i, k - 1) + zx_coef(i, k) & |
---|
| 111 | + zx_coef(i, k - 1) * (1. - zx_dtr(i, k - 1)) |
---|
| 112 | zx_ctr(i, k) = (local_tr(i, k - 1) * delp(i, k - 1) & |
---|
| 113 | + zx_coef(i, k - 1) * zx_ctr(i, k - 1)) / zx_buf(i) |
---|
| 114 | zx_dtr(i, k) = zx_coef(i, k) / zx_buf(i) |
---|
| 115 | ENDDO |
---|
[1191] | 116 | ENDDO |
---|
| 117 | |
---|
| 118 | DO i = 1, klon |
---|
[5144] | 119 | local_tr(i, klev) = (local_tr(i, klev) * delp(i, klev) & |
---|
| 120 | + zx_coef(i, klev) * zx_ctr(i, klev)) & |
---|
| 121 | / (delp(i, klev) + zx_coef(i, klev) & |
---|
| 122 | - zx_coef(i, klev) * zx_dtr(i, klev)) |
---|
[1191] | 123 | ENDDO |
---|
| 124 | |
---|
[5144] | 125 | DO k = klev - 1, 1, -1 |
---|
| 126 | DO i = 1, klon |
---|
| 127 | local_tr(i, k) = zx_ctr(i, k + 1) + zx_dtr(i, k + 1) * local_tr(i, k + 1) |
---|
| 128 | ENDDO |
---|
[1191] | 129 | ENDDO |
---|
| 130 | |
---|
[5144] | 131 | !====================================================================== |
---|
| 132 | !== flux_tr est le flux de traceur (positif vers bas) |
---|
| 133 | ! DO i = 1, klon |
---|
| 134 | ! flux_tr(i,1) = zx_coef(i,1)/(RG*dtime) |
---|
| 135 | ! ENDDO |
---|
| 136 | ! DO k = 2, klev |
---|
| 137 | ! DO i = 1, klon |
---|
| 138 | ! flux_tr(i,k) = zx_coef(i,k)/(RG*dtime) |
---|
| 139 | ! . * (local_tr(i,k)-local_tr(i,k-1)) |
---|
| 140 | ! ENDDO |
---|
| 141 | ! ENDDO |
---|
| 142 | !====================================================================== |
---|
[1191] | 143 | DO k = 1, klev |
---|
[5144] | 144 | DO i = 1, klon |
---|
| 145 | d_tr(i, k) = local_tr(i, k) - tr(i, k) |
---|
| 146 | ENDDO |
---|
[1191] | 147 | ENDDO |
---|
[5144] | 148 | |
---|
[1191] | 149 | END SUBROUTINE cltrac |
---|