[1310] | 1 | SUBROUTINE conduction(nlon, nlev,ptimestep,pplay,pplev,pt, |
---|
| 2 | $ tsurf,zzlev,zzlay,d_t_conduc) |
---|
| 3 | |
---|
| 4 | use dimphy |
---|
| 5 | use conc, only: akknew, rnew, cpnew |
---|
| 6 | IMPLICIT NONE |
---|
| 7 | |
---|
| 8 | c======================================================================= |
---|
| 9 | c |
---|
| 10 | c Molecular thermal conduction |
---|
| 11 | c |
---|
| 12 | c N. Descamp, F. Forget 05/1999 |
---|
| 13 | c |
---|
| 14 | c======================================================================= |
---|
| 15 | |
---|
| 16 | c----------------------------------------------------------------------- |
---|
| 17 | c declarations: |
---|
| 18 | c----------------------------------------------------------------------- |
---|
| 19 | |
---|
| 20 | c arguments: |
---|
| 21 | c ---------- |
---|
| 22 | |
---|
| 23 | integer,intent(in) :: nlon ! number of atmospheric columns |
---|
| 24 | integer,intent(in) :: nlev ! number of atmospheric layers |
---|
| 25 | real,intent(in) :: ptimestep |
---|
| 26 | REAL,intent(in) :: pplay(nlon,nlev) ! pressure at middle of layers (Pa) |
---|
| 27 | real,intent(in) :: pplev(nlon,nlev+1) |
---|
| 28 | REAL,intent(in) :: zzlay(nlon,nlev) ! (m) |
---|
| 29 | real,intent(in) :: zzlev(nlon,nlev+1) |
---|
| 30 | REAL,intent(in) :: pt(nlon,nlev) |
---|
| 31 | real,intent(in) :: tsurf(nlon) |
---|
| 32 | |
---|
| 33 | real,intent(out) :: d_t_conduc(nlon,nlev) |
---|
| 34 | |
---|
| 35 | c local: |
---|
| 36 | c ------ |
---|
| 37 | |
---|
| 38 | INTEGER i,ig,l |
---|
| 39 | real Akk |
---|
| 40 | real,save :: phitop |
---|
| 41 | real m,tmean |
---|
| 42 | REAL alpha(nlev) |
---|
| 43 | real zt(nlev) |
---|
| 44 | REAL lambda(nlev) |
---|
| 45 | real muvol(nlev) ! kg m-3 |
---|
| 46 | REAL C(nlev) |
---|
| 47 | real D(nlev) |
---|
| 48 | real den(nlev) |
---|
| 49 | REAL pdtc(nlev) |
---|
| 50 | real zlay(nlev) |
---|
| 51 | real zlev(nlev+1) |
---|
| 52 | |
---|
| 53 | c constants used locally |
---|
| 54 | c --------------------- |
---|
| 55 | c The atmospheric conductivity is a function of temperature T : |
---|
| 56 | c conductivity = Akk* T**skk |
---|
| 57 | REAL,PARAMETER :: skk=0.69 |
---|
| 58 | |
---|
| 59 | logical,save :: firstcall=.true. |
---|
| 60 | |
---|
| 61 | c----------------------------------------------------------------------- |
---|
| 62 | c calcul des coefficients alpha et lambda |
---|
| 63 | c----------------------------------------------------------------------- |
---|
| 64 | |
---|
| 65 | IF (firstcall) THEN |
---|
| 66 | ! write (*,*)'conduction: coeff to compute molecular', |
---|
| 67 | ! & ' conductivity Akk,skk' |
---|
| 68 | ! write(*,*) Akk,skk |
---|
| 69 | ! NB: Akk is undefined at this stage |
---|
| 70 | write (*,*)'conduction: coeff to compute molecular', |
---|
| 71 | & ' conductivity skk = ', skk |
---|
| 72 | |
---|
| 73 | ! Initialize phitop |
---|
| 74 | phitop=0.0 |
---|
| 75 | |
---|
| 76 | firstcall = .false. |
---|
| 77 | ENDIF ! of IF (firstcall) |
---|
| 78 | |
---|
| 79 | do ig=1,nlon |
---|
| 80 | |
---|
| 81 | c zt(1)=pt(ig,1)+pdt(ig,1)*ptimestep |
---|
| 82 | zt(1)=pt(ig,1) |
---|
| 83 | |
---|
| 84 | c zlay(1)=-log(pplay(ig,1)/pplev(ig,1))*Rnew(ig,1)*zt(1)/g |
---|
| 85 | c zlev(1)=0.0 |
---|
| 86 | zlay(1)=zzlay(ig,1) |
---|
| 87 | zlev(1)=zzlev(ig,1) |
---|
| 88 | |
---|
| 89 | do i=2,nlev |
---|
| 90 | |
---|
| 91 | zt(i)= pt(ig,i) |
---|
| 92 | c print*, zt(i) |
---|
| 93 | |
---|
| 94 | c tmean=zt(i) |
---|
| 95 | c if(zt(i).ne.zt(i-1)) |
---|
| 96 | c & tmean=(zt(i)-zt(i-1))/log(zt(i)/zt(i-1)) |
---|
| 97 | c zlay(i)= zlay(i-1) |
---|
| 98 | c & -log(pplay(ig,i)/pplay(ig,i-1))*Rnew(ig,i-1)*tmean/g |
---|
| 99 | c zlev(i)= zlev(i-1) |
---|
| 100 | c & -log(pplev(ig,i)/pplev(ig,i-1))*Rnew(ig,i-1)*tmean/g |
---|
| 101 | zlay(i)=zzlay(ig,i) |
---|
| 102 | zlev(i)=zzlev(ig,i) |
---|
| 103 | enddo |
---|
| 104 | zlev(nlev+1)= zzlev(ig,nlev+1) |
---|
| 105 | |
---|
| 106 | Akk=akknew(ig,1) |
---|
| 107 | lambda(1) = Akk*tsurf(ig)**skk/zlay(1) |
---|
| 108 | |
---|
| 109 | DO i = 2 , nlev |
---|
| 110 | Akk=akknew(ig,i) |
---|
| 111 | lambda(i)=Akk*zt(i)**skk/(zlay(i)-zlay(i-1)) |
---|
| 112 | ENDDO |
---|
| 113 | DO i=1,nlev-1 |
---|
| 114 | c print*, rnew(1,i) |
---|
| 115 | muvol(i)=pplay(ig,i)/(rnew(ig,i)*zt(i)) |
---|
| 116 | alpha(i)=cpnew(ig,i)*(muvol(i)/ptimestep) |
---|
| 117 | $ *(zlev(i+1)-zlev(i)) |
---|
| 118 | ENDDO |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | c if (ig .eq. 2) then |
---|
| 122 | c print*, '---conduction---' |
---|
| 123 | c print*, i, cpnew(ig,i), zt(i) |
---|
| 124 | c endif |
---|
| 125 | C stop |
---|
| 126 | |
---|
| 127 | muvol(nlev)=pplay(ig,nlev)/(rnew(ig,nlev)*zt(nlev)) |
---|
[2687] | 128 | alpha(nlev)=cpnew(ig,nlev)*(muvol(nlev)/ptimestep) |
---|
[1310] | 129 | $ *(zlev(nlev+1)-zlev(nlev)) |
---|
| 130 | |
---|
| 131 | c-------------------------------------------------------------------- |
---|
| 132 | c |
---|
| 133 | c calcul des coefficients C et D |
---|
| 134 | c |
---|
| 135 | c------------------------------------------------------------------- |
---|
| 136 | |
---|
| 137 | den(1)=alpha(1)+lambda(2)+lambda(1) |
---|
| 138 | C(1)=lambda(1)*(tsurf(ig)-zt(1))+lambda(2)*(zt(2)-zt(1)) |
---|
| 139 | C(1)=C(1)/den(1) |
---|
| 140 | D(1)=lambda(2)/den(1) |
---|
| 141 | |
---|
| 142 | DO i = 2,nlev-1 |
---|
| 143 | den(i)=alpha(i)+lambda(i+1) |
---|
| 144 | den(i)=den(i)+lambda(i)*(1-D(i-1)) |
---|
| 145 | |
---|
| 146 | C(i) =lambda(i+1)*(zt(i+1)-zt(i)) |
---|
| 147 | $ +lambda(i)*(zt(i-1)-zt(i)+C(i-1)) |
---|
| 148 | C(i) =C(i)/den(i) |
---|
| 149 | |
---|
| 150 | D(i) =lambda(i+1) / den(i) |
---|
| 151 | ENDDO |
---|
| 152 | |
---|
| 153 | den(nlev)=alpha(nlev) + lambda(nlev) * (1-D(nlev-1)) |
---|
| 154 | C(nlev)=C(nlev-1)+zt(nlev-1)-zt(nlev) |
---|
| 155 | C(nlev)=(C(nlev)*lambda(nlev)+phitop) / den(nlev) |
---|
| 156 | |
---|
| 157 | c---------------------------------------------------------------------- |
---|
| 158 | c |
---|
| 159 | c calcul de la nouvelle temperature ptconduc |
---|
| 160 | c |
---|
| 161 | c---------------------------------------------------------------------- |
---|
| 162 | |
---|
| 163 | DO i=1,nlev |
---|
| 164 | pdtc(i)=0. |
---|
| 165 | ENDDO |
---|
| 166 | pdtc(nlev)=C(nlev) |
---|
| 167 | DO i=nlev-1,1,-1 |
---|
| 168 | pdtc(i)=C(i)+D(i)*pdtc(i+1) |
---|
| 169 | ENDDO |
---|
| 170 | c----------------------------------------------------------------------- |
---|
| 171 | c |
---|
| 172 | c calcul de la tendance zdtconduc |
---|
| 173 | c |
---|
| 174 | c----------------------------------------------------------------------- |
---|
| 175 | |
---|
| 176 | DO i=1,nlev |
---|
| 177 | d_t_conduc(ig,i)=pdtc(i)/ptimestep |
---|
| 178 | c print*, i, zdtconduc(0, i) |
---|
| 179 | |
---|
| 180 | ENDDO |
---|
| 181 | c |
---|
| 182 | enddo ! of do ig=1,nlon |
---|
| 183 | |
---|
| 184 | RETURN |
---|
| 185 | END |
---|