Changeset 73 for trunk/SOURCES/Temperature-routines/temp_col.f90
- Timestamp:
- 06/22/16 15:43:40 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SOURCES/Temperature-routines/temp_col.f90
r24 r73 14 14 !> 15 15 16 Subroutine Temp_col(Ii,Jj,Newtempcol_m,Ct_m,Flot_m,H_m,Tbmer_m) 17 18 Use Icetemp_declar 16 Subroutine Temp_col(Nz,Nzm,Nn,Newtempcol,Ctij,Flotij,Hij,Tbmerij,Ibase,Tij,Tpmpij,Aa,Bb,Cc,Rr,Hh,Ncond,Dee,Cm, & 17 Dzm,Phidij,Ghfij,Ifail1,Tbdotij,DTT,Dou,Tsij,Bmeltij) 18 19 ! Use Icetemp_declar 19 20 Use Tridiagmod 20 21 21 22 22 23 Implicit None 23 integer :: Ii,Jj 24 Real,Dimension(Nx,Ny,Nz+Nzm),Intent(Out) :: Newtempcol_m !< Tableau 1d Vert. Des Temperatures En Sortie 25 Real,Dimension(Nz),Intent(In) :: Ct_m !< Tableau 1d Vert. Conductivite Thermique 26 Logical,Intent(In) :: Flot_m !< Vrai Si Flot_mtant (Test D'Archimede) 'O' 27 Real,Intent(In) :: H_m !< Ice Thickness 'O' 28 Real,Intent(In) :: Tbmer_m !< Temperature De La Mer A La Base De L'Ice Shelf 29 30 31 If (H_m.Gt.10.) Then 24 integer,intent(in) :: Nz,Nzm,Nn 25 Real,Dimension(Nz+Nzm),Intent(Out) :: Newtempcol !< Tableau 1d Vert. Des Temperatures En Sortie 26 Real,Dimension(Nz),Intent(In) :: Ctij !< Tableau 1d Vert. Conductivite Thermique 27 Logical,Intent(In) :: Flotij !< Vrai Si Flotijtant (Test D'Archimede) 'O' 28 Real,Intent(In) :: Hij !< Ice Thickness 'O' 29 Real,Intent(In) :: Tbmerij !< Temperature De La Mer A La Base De L'Ice Shelf 30 integer,intent(inout) :: Ibase 31 real,dimension(Nz+Nzm),intent(inout) :: Tij !< Temperature sur la colonne 32 real,dimension(Nz),intent(in) :: Tpmpij !< pressure melting point temperature in ice sheet 'o' 33 Real,Dimension(Nn),intent(inout) :: Aa !< Work Arrays For Tridiag !Dim Nn 34 Real,Dimension(Nn),intent(inout) :: Bb !< Work Arrays For Tridiag !Dim Nn 35 Real,Dimension(Nn),intent(inout) :: Cc !< Work Arrays For Tridiag !Dim Nn 36 Real,Dimension(Nn),intent(inout) :: Rr !< Work Arrays For Tridiag !Dim Nn 37 Real,Dimension(Nn),intent(inout) :: Hh !< Work Arrays For Tridiag !Dim Nn 38 Integer,intent(in) :: Ncond !< Switch : Ncond=1 Thermal Conductivity In Mantle 39 real, intent(in) :: Dee 40 real,intent(in) :: Cm 41 real,intent(in) :: Dzm 42 real,intent(inout) :: Phidij !< flux de chaleur lie a la deformation et glissement basal 43 real,intent(in) :: Ghfij !< flux geothermique 44 integer,intent(out) :: Ifail1 !< Diagnostique erreur dans Tridiag 45 real, intent(out) :: Tbdotij !< variation in time of basal temperature 46 real, intent(in) :: DTT 47 Real, intent(inout) :: Dou 48 real, intent(in) :: Tsij !< surface ice temperature 'o' 49 real, intent(out) :: Bmeltij !< fonte basale 50 51 52 53 ! variables locales 54 integer :: K 55 Real :: Dzi,Tss 56 Real,Dimension(Nzm+1) :: Abis,Bbis,Cbis,Rbis,Hbis 57 58 If (Hij.Gt.10.) Then 32 59 33 60 ! Conditions Aux Limites a La Base De La Glace … … 35 62 36 63 ! Base Froide 37 If ( ((Ibase (Ii,Jj).Eq.1).Or.(Ibase(Ii,Jj).Eq.4) &38 .Or. ((Ibase (Ii,Jj).Eq.5).And.(T(Ii,Jj,Nz).Lt.Tpmp(Ii,Jj,Nz)))) &39 .And..Not.Flot _m) Then40 41 Ibase (Ii,Jj)=164 If ( ((Ibase.Eq.1).Or.(Ibase.Eq.4) & 65 .Or. ((Ibase.Eq.5).And.(Tij(Nz).Lt.Tpmpij(Nz)))) & 66 .And..Not.Flotij) Then 67 68 Ibase=1 42 69 Bb(Nz)=1. 43 70 44 71 If (Ncond.Eq.1) Then ! Avec Socle 45 Dzi=H _m*Dee*Cm/Ct_m(Nz)72 Dzi=Hij*Dee*Cm/Ctij(Nz) 46 73 Aa(Nz)=-Dzm/(Dzm+Dzi) 47 74 Cc(Nz)=-Dzi/(Dzm+Dzi) 48 Rr(Nz)=H _m*Dee*Phid(Ii,Jj)*Dzm/Ct_m(Nz)/(Dzm+Dzi)75 Rr(Nz)=Hij*Dee*Phidij*Dzm/Ctij(Nz)/(Dzm+Dzi) 49 76 Else ! Sans Socle 50 77 Aa(Nz)=-1. 51 78 Cc(Nz)=0. 52 Rr(Nz)=-(Ghf (Ii,Jj)-Phid(Ii,Jj))/Ct_m(Nz)*H_m*Dee79 Rr(Nz)=-(Ghfij-Phidij)/Ctij(Nz)*Hij*Dee 53 80 Endif 54 81 … … 57 84 ! Base Temperee Ou Shelf 58 85 ! ---------------------- 59 If (Ibase (Ii,Jj).Eq.5) Ibase(Ii,Jj)=260 Ibase (Ii,Jj)=Max(Ibase(Ii,Jj),2)86 If (Ibase.Eq.5) Ibase=2 87 Ibase=Max(Ibase,2) 61 88 Aa(Nz)=0. 62 89 Bb(Nz)=1. 63 90 Cc(Nz)=0. 64 91 65 If (.Not.Flot _m) Then66 Rr(Nz)=Tpmp (Ii,Jj,Nz)67 Else 68 Rr(Nz)=Tbmer _m92 If (.Not.Flotij) Then 93 Rr(Nz)=Tpmpij(Nz) 94 Else 95 Rr(Nz)=Tbmerij 69 96 End If 70 97 … … 74 101 If (Ncond.Eq.1) Then ! Avec Socle 75 102 Do K=Nz+1,nz+nzm-1 76 Rr(K)=T (Ii,Jj,K)103 Rr(K)=Tij(K) 77 104 End Do 78 105 Call Tridiag (Aa,Bb,Cc,Rr,Hh,nz+nzm,Ifail1) … … 87 114 If (Ncond.Eq.0) Then 88 115 Do K=Nz+1,nz+nzm 89 Hh(K)=Hh(Nz)-Dzm*(K-Nz)*Ghf (Ii,Jj)/Cm116 Hh(K)=Hh(Nz)-Dzm*(K-Nz)*Ghfij/Cm 90 117 End Do 91 118 Endif 92 119 93 120 Do K=1,nz+nzm 94 Newtempcol _m(Ii,Jj,K)=Hh(K)121 Newtempcol(K)=Hh(K) 95 122 End Do 96 Tbdot (Ii,Jj)=(Newtempcol_m(Ii,Jj,Nz)-T(Ii,Jj,Nz))/Dtt123 Tbdotij=(Newtempcol(Nz)-Tij(Nz))/Dtt 97 124 98 125 ! ------------------------------------------------- Glace Tres Fine (H<10m Ou H=0) 99 Else If (H _m.Le.10.) Then126 Else If (Hij.Le.10.) Then 100 127 101 128 ! Pour Eviter Des Problemes Lorsque H Est Inferieur A 10 M … … 104 131 105 132 ! ........................................ Avec Calcul Dans Le Socle 106 If (Ncond.Eq.1.And..Not.Flot _m) Then107 If (H _m.Gt.0.) Then133 If (Ncond.Eq.1.And..Not.Flotij) Then 134 If (Hij.Gt.0.) Then 108 135 ! Gradient Dans Le Socle 109 Dou=(T (Ii,Jj,Nz+1)-T(Ii,Jj,Nz))/Dzm*Cm110 Dou=Dou/Ct _m(Nz)*Dee*H_m111 112 Tss=Min(0.,Ts (Ii,Jj))113 Do K=1,Nz 114 Newtempcol _m(Ii,Jj,K)=Tss+Dou*(K-1.)136 Dou=(Tij(Nz+1)-Tij(Nz))/Dzm*Cm 137 Dou=Dou/Ctij(Nz)*Dee*Hij 138 139 Tss=Min(0.,Tsij) 140 Do K=1,Nz 141 Newtempcol(K)=Tss+Dou*(K-1.) 115 142 End Do 116 143 117 144 Else 118 145 ! Pas De Glace 119 Tss=Ts (Ii,Jj)120 Do K=1,Nz 121 Newtempcol _m(Ii,Jj,K)=Tss146 Tss=Tsij 147 Do K=1,Nz 148 Newtempcol(K)=Tss 122 149 End Do 123 150 End If 124 151 125 152 ! Calcul Dans Le Socle Meme S'Il N'Y A Pas De Glace 126 Rr(Nz)=Newtempcol _m(Ii,Jj,Nz)153 Rr(Nz)=Newtempcol(Nz) 127 154 Aa(Nz)=0 128 155 Bb(Nz)=1 … … 130 157 131 158 Do K=Nz+1,nz+nzm-1 132 Rr(K)=T (Ii,Jj,K)159 Rr(K)=Tij(K) 133 160 End Do 134 161 … … 150 177 Else 151 178 ! Calotte Posee 152 If ((H _m.Gt.0.).And..Not.Flot_m) Then153 Dou=-Ghf (Ii,Jj)/Ct_m(Nz)*Dee*H_m154 Tss=Min(0.,Ts (Ii,Jj))155 Do K=1,Nz 156 Newtempcol _m(Ii,Jj,K)=Tss+Dou*(K-1.)179 If ((Hij.Gt.0.).And..Not.Flotij) Then 180 Dou=-Ghfij/Ctij(Nz)*Dee*Hij 181 Tss=Min(0.,Tsij) 182 Do K=1,Nz 183 Newtempcol(K)=Tss+Dou*(K-1.) 157 184 End Do 158 185 159 186 ! Shelf 160 Else If ((H _m.Gt.0.).And.Flot_m) Then161 Tss=Min(0.,Ts (Ii,Jj))162 Dou=(Tbmer _m-Tss)*Dee163 Do K=1,Nz 164 Newtempcol _m(Ii,Jj,K)=Tss+Dou*(K-1.)187 Else If ((Hij.Gt.0.).And.Flotij) Then 188 Tss=Min(0.,Tsij) 189 Dou=(Tbmerij-Tss)*Dee 190 Do K=1,Nz 191 Newtempcol(K)=Tss+Dou*(K-1.) 165 192 End Do 166 193 167 194 ! Pas De Glace 168 195 Else 169 Tss=Ts (Ii,Jj)170 Do K=1,Nz 171 Newtempcol _m(Ii,Jj,K)=Tss196 Tss=Tsij 197 Do K=1,Nz 198 Newtempcol(K)=Tss 172 199 End Do 173 200 End If 174 201 175 202 ! Temperature Dans Le Socle, Lineaire Avec Le Gradient Ghf 176 If (.Not.Flot _m) Then203 If (.Not.Flotij) Then 177 204 Do K=Nz+1,nz+nzm 178 Hh(K)=Newtempcol _m(Ii,Jj,Nz)-Dzm*(K-Nz)*Ghf(Ii,Jj)/Cm205 Hh(K)=Newtempcol(Nz)-Dzm*(K-Nz)*Ghfij/Cm 179 206 End Do 180 207 Else 181 208 Do K=Nz+1,nz+nzm 182 Hh(K)=Tbmer _m-Dzm*(K-Nz)*Ghf(Ii,Jj)/Cm209 Hh(K)=Tbmerij-Dzm*(K-Nz)*Ghfij/Cm 183 210 End Do 184 211 End If … … 189 216 190 217 Do K=Nz+1,nz+nzm 191 Newtempcol _m(Ii,Jj,K)=Hh(K)218 Newtempcol(K)=Hh(K) 192 219 End Do 193 220 194 Tbdot (Ii,Jj)=(Newtempcol_m(Ii,Jj,Nz)-T(Ii,Jj,Nz))/Dtt195 Bmelt (Ii,Jj)=0.196 Ibase (Ii,Jj)=5197 Phid (Ii,Jj)=0.221 Tbdotij=(Newtempcol(Nz)-Tij(Nz))/Dtt 222 Bmeltij=0. 223 Ibase=5 224 Phidij=0. 198 225 199 226
Note: See TracChangeset
for help on using the changeset viewer.