[3331] | 1 | ! |
---|
| 2 | ! $Id $ |
---|
| 3 | ! |
---|
| 4 | SUBROUTINE cvltr_noscav(it,pdtime,da, phi, mp,wght_cvfd,paprs,pplay,x,upd,dnd,dx) |
---|
| 5 | USE dimphy |
---|
| 6 | USE infotrac_phy, ONLY : nbtr |
---|
| 7 | IMPLICIT NONE |
---|
| 8 | !===================================================================== |
---|
| 9 | ! Objet : convection des traceurs / KE |
---|
| 10 | ! Auteurs: M-A Filiberti and J-Y Grandpeix |
---|
| 11 | !===================================================================== |
---|
| 12 | include "YOMCST.h" |
---|
| 13 | include "YOECUMF.h" |
---|
| 14 | |
---|
| 15 | ! Entree |
---|
| 16 | REAL,INTENT(IN) :: pdtime |
---|
| 17 | INTEGER, INTENT(IN) :: it |
---|
| 18 | REAL,DIMENSION(klon,klev),INTENT(IN) :: da |
---|
| 19 | REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: phi |
---|
| 20 | REAL,DIMENSION(klon,klev),INTENT(IN) :: mp |
---|
| 21 | REAL,DIMENSION(klon,klev),INTENT(IN) :: wght_cvfd ! weights of the layers feeding convection |
---|
| 22 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression aux 1/2 couches (bas en haut) |
---|
| 23 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression pour le milieu de chaque couche |
---|
| 24 | REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: x ! q de traceur (bas en haut) |
---|
| 25 | REAL,DIMENSION(klon,klev),INTENT(IN) :: upd ! saturated updraft mass flux |
---|
| 26 | REAL,DIMENSION(klon,klev),INTENT(IN) :: dnd ! saturated downdraft mass flux |
---|
| 27 | |
---|
| 28 | ! Sortie |
---|
| 29 | REAL,DIMENSION(klon,klev,nbtr),INTENT(OUT) :: dx ! tendance de traceur (bas en haut) |
---|
| 30 | |
---|
| 31 | ! Variables locales |
---|
| 32 | ! REAL,DIMENSION(klon,klev) :: zed |
---|
| 33 | REAL,DIMENSION(klon,klev,klev) :: zmd |
---|
| 34 | REAL,DIMENSION(klon,klev,klev) :: za |
---|
| 35 | REAL,DIMENSION(klon,klev) :: zmfd,zmfa |
---|
| 36 | REAL,DIMENSION(klon,klev) :: zmfp,zmfu |
---|
| 37 | REAL,DIMENSION(klon,nbtr) :: qfeed ! tracer concentration feeding convection |
---|
| 38 | REAL,DIMENSION(klon,klev) :: deltap |
---|
| 39 | INTEGER :: i,k,j |
---|
| 40 | REAL :: pdtimeRG |
---|
| 41 | real conserv |
---|
| 42 | real smfd |
---|
| 43 | real smfu |
---|
| 44 | real smfa |
---|
| 45 | real smfp |
---|
| 46 | ! ========================================= |
---|
| 47 | ! calcul des tendances liees au downdraft |
---|
| 48 | ! ========================================= |
---|
| 49 | !cdir collapse |
---|
| 50 | qfeed(:,it) = 0. |
---|
| 51 | DO j=1,klev |
---|
| 52 | DO i=1,klon |
---|
| 53 | ! zed(i,j)=0. |
---|
| 54 | zmfd(i,j)=0. |
---|
| 55 | zmfa(i,j)=0. |
---|
| 56 | zmfu(i,j)=0. |
---|
| 57 | zmfp(i,j)=0. |
---|
| 58 | END DO |
---|
| 59 | END DO |
---|
| 60 | !cdir collapse |
---|
| 61 | DO k=1,klev |
---|
| 62 | DO j=1,klev |
---|
| 63 | DO i=1,klon |
---|
| 64 | zmd(i,j,k)=0. |
---|
| 65 | za (i,j,k)=0. |
---|
| 66 | END DO |
---|
| 67 | END DO |
---|
| 68 | END DO |
---|
| 69 | ! entrainement |
---|
| 70 | ! DO k=1,klev-1 |
---|
| 71 | ! DO i=1,klon |
---|
| 72 | ! zed(i,k)=max(0.,mp(i,k)-mp(i,k+1)) |
---|
| 73 | ! END DO |
---|
| 74 | ! END DO |
---|
| 75 | |
---|
| 76 | ! calcul de la matrice d echange |
---|
| 77 | ! matrice de distribution de la masse entrainee en k |
---|
| 78 | |
---|
| 79 | DO k=1,klev-1 |
---|
| 80 | DO i=1,klon |
---|
| 81 | zmd(i,k,k)=max(0.,mp(i,k)-mp(i,k+1)) |
---|
| 82 | END DO |
---|
| 83 | END DO |
---|
| 84 | DO k=2,klev |
---|
| 85 | DO j=k-1,1,-1 |
---|
| 86 | DO i=1,klon |
---|
| 87 | if(mp(i,j+1).ne.0) then |
---|
| 88 | zmd(i,j,k)=zmd(i,j+1,k)*min(1.,mp(i,j)/mp(i,j+1)) |
---|
| 89 | ENDif |
---|
| 90 | END DO |
---|
| 91 | END DO |
---|
| 92 | END DO |
---|
| 93 | DO k=1,klev |
---|
| 94 | DO j=1,klev-1 |
---|
| 95 | DO i=1,klon |
---|
| 96 | za(i,j,k)=max(0.,zmd(i,j+1,k)-zmd(i,j,k)) |
---|
| 97 | END DO |
---|
| 98 | END DO |
---|
| 99 | END DO |
---|
| 100 | ! |
---|
| 101 | ! rajout du terme lie a l ascendance induite |
---|
| 102 | ! |
---|
| 103 | DO j=2,klev |
---|
| 104 | DO i=1,klon |
---|
| 105 | za(i,j,j-1)=za(i,j,j-1)+mp(i,j) |
---|
| 106 | END DO |
---|
| 107 | END DO |
---|
| 108 | ! |
---|
| 109 | ! tendances |
---|
| 110 | ! |
---|
| 111 | DO k=1,klev |
---|
| 112 | DO j=1,klev |
---|
| 113 | DO i=1,klon |
---|
| 114 | zmfd(i,j)=zmfd(i,j)+za(i,j,k)*(x(i,k,it)-x(i,j,it)) |
---|
| 115 | END DO |
---|
| 116 | END DO |
---|
| 117 | END DO |
---|
| 118 | ! |
---|
| 119 | ! ========================================= |
---|
| 120 | ! calcul des tendances liees aux flux satures |
---|
| 121 | ! ========================================= |
---|
| 122 | !RL |
---|
| 123 | ! Feeding concentrations |
---|
| 124 | DO j=1,klev |
---|
| 125 | DO i=1,klon |
---|
| 126 | qfeed(i,it)=qfeed(i,it)+wght_cvfd(i,j)*x(i,j,it) |
---|
| 127 | END DO |
---|
| 128 | END DO |
---|
| 129 | !RL |
---|
| 130 | ! |
---|
| 131 | DO j=1,klev |
---|
| 132 | DO i=1,klon |
---|
| 133 | !RL |
---|
| 134 | !! zmfa(i,j,it)=da(i,j)*(x(i,1,it)-x(i,j,it)) ! da |
---|
| 135 | zmfa(i,j)=da(i,j)*(qfeed(i,it)-x(i,j,it)) ! da |
---|
| 136 | !RL |
---|
| 137 | END DO |
---|
| 138 | END DO |
---|
| 139 | ! |
---|
| 140 | !! print *,'it, qfeed(1,it), x(1,1,it) ', it, qfeed(1,it), x(1,1,it) !jyg |
---|
| 141 | !! print *,'wght_cvfd ', (j, wght_cvfd(1,j), j=1,5) !jyg |
---|
| 142 | ! |
---|
| 143 | DO k=1,klev |
---|
| 144 | DO j=1,klev |
---|
| 145 | DO i=1,klon |
---|
| 146 | zmfp(i,j)=zmfp(i,j)+phi(i,j,k)*(x(i,k,it)-x(i,j,it)) |
---|
| 147 | END DO |
---|
| 148 | END DO |
---|
| 149 | END DO |
---|
| 150 | DO j=1,klev-1 |
---|
| 151 | DO i=1,klon |
---|
| 152 | zmfu(i,j)=max(0.,upd(i,j+1)+dnd(i,j+1))*(x(i,j+1,it)-x(i,j,it)) |
---|
| 153 | END DO |
---|
| 154 | END DO |
---|
| 155 | DO j=2,klev |
---|
| 156 | DO i=1,klon |
---|
| 157 | zmfu(i,j)=zmfu(i,j)+min(0.,upd(i,j)+dnd(i,j))*(x(i,j,it)-x(i,j-1,it)) |
---|
| 158 | END DO |
---|
| 159 | END DO |
---|
| 160 | |
---|
| 161 | ! ========================================= |
---|
| 162 | ! calcul final des tendances |
---|
| 163 | ! ========================================= |
---|
| 164 | DO k=1, klev |
---|
| 165 | DO i=1, klon |
---|
| 166 | deltap(i,k)=paprs(i,k)-paprs(i,k+1) |
---|
| 167 | ENDDO |
---|
| 168 | ENDDO |
---|
| 169 | pdtimeRG=pdtime*RG |
---|
| 170 | !cdir collapse |
---|
| 171 | DO k=1, klev |
---|
| 172 | DO i=1, klon |
---|
| 173 | dx(i,k,it)=(zmfd(i,k)+zmfu(i,k) & |
---|
| 174 | +zmfa(i,k)+zmfp(i,k))*pdtimeRG/deltap(i,k) |
---|
| 175 | ENDDO |
---|
| 176 | ENDDO |
---|
| 177 | |
---|
| 178 | !! test de conservation du traceur |
---|
| 179 | conserv=0. |
---|
| 180 | smfd = 0. |
---|
| 181 | smfu = 0. |
---|
| 182 | smfa = 0. |
---|
| 183 | smfp = 0. |
---|
| 184 | DO k=1, klev |
---|
| 185 | DO i=1, klon |
---|
| 186 | conserv=conserv+dx(i,k,it)* & |
---|
| 187 | deltap(i,k)/RG |
---|
| 188 | smfd = smfd + zmfd(i,k)*pdtime |
---|
| 189 | smfu = smfu + zmfu(i,k)*pdtime |
---|
| 190 | smfa = smfa + zmfa(i,k)*pdtime |
---|
| 191 | smfp = smfp + zmfp(i,k)*pdtime |
---|
| 192 | ENDDO |
---|
| 193 | ENDDO |
---|
| 194 | !! print *,'it',it,'cvltr_noscav conserv, smfd, smfu, smfa, smfp ',conserv, & |
---|
| 195 | !! smfd, smfu, smfa, smfp |
---|
| 196 | |
---|
| 197 | END SUBROUTINE cvltr_noscav |
---|