49 |
! ptimestep physical timestep (s) |
! ptimestep physical timestep (s) |
50 |
! indice sub-surface index |
! indice sub-surface index |
51 |
! snow(klon,nbsrf) snow |
! snow(klon,nbsrf) snow |
52 |
! ptsrf(klon) surface temperature at time-step t (K) |
! ptsrf(knon) surface temperature at time-step t (K) |
53 |
! ptsoil(klon,nsoilmx) temperature inside the ground (K) |
! ptsoil(klon,nsoilmx) temperature inside the ground (K) |
54 |
! pcapcal(klon) surfacic specific heat (W*m-2*s*K-1) |
! pcapcal(klon) surfacic specific heat (W*m-2*s*K-1) |
55 |
! pfluxgrd(klon) surface diffusive flux from ground (Wm-2) |
! pfluxgrd(klon) surface diffusive flux from ground (Wm-2) |
65 |
|
|
66 |
REAL ptimestep |
REAL ptimestep |
67 |
INTEGER indice, knon |
INTEGER indice, knon |
68 |
REAL ptsrf(klon), ptsoil(klon, nsoilmx), snow(klon) |
REAL ptsrf(knon), ptsoil(klon, nsoilmx), snow(klon) |
69 |
REAL pcapcal(klon), pfluxgrd(klon) |
REAL pcapcal(klon), pfluxgrd(klon) |
70 |
|
|
71 |
! ----------------------------------------------------------------------- |
! ----------------------------------------------------------------------- |
85 |
REAL zc(klon, nsoilmx, nbsrf), zd(klon, nsoilmx, nbsrf) |
REAL zc(klon, nsoilmx, nbsrf), zd(klon, nsoilmx, nbsrf) |
86 |
REAL lambda |
REAL lambda |
87 |
SAVE dz1, dz2, zc, zd, lambda |
SAVE dz1, dz2, zc, zd, lambda |
88 |
LOGICAL firstcall, firstsurf(nbsrf) |
LOGICAL firstsurf(nbsrf) |
89 |
SAVE firstcall, firstsurf |
SAVE firstsurf |
90 |
REAL isol, isno, iice |
REAL isol, isno, iice |
91 |
SAVE isol, isno, iice |
SAVE isol, isno, iice |
92 |
|
|
|
DATA firstcall/.TRUE./ |
|
93 |
DATA firstsurf/.TRUE., .TRUE., .TRUE., .TRUE./ |
DATA firstsurf/.TRUE., .TRUE., .TRUE., .TRUE./ |
94 |
|
|
95 |
DATA isol, isno, iice/2000., 2000., 2000./ |
DATA isol, isno, iice/2000., 2000., 2000./ |
98 |
! Depthts: |
! Depthts: |
99 |
! -------- |
! -------- |
100 |
|
|
101 |
REAL fz, rk, fz1, rk1, rk2 |
REAL rk, fz1, rk1, rk2 |
102 |
|
|
|
fz(rk) = fz1*(dalph_soil**rk-1.)/(dalph_soil-1.) |
|
103 |
pfluxgrd(:) = 0. |
pfluxgrd(:) = 0. |
104 |
! calcul de l'inertie thermique a partir de la variable rnat. |
! calcul de l'inertie thermique a partir de la variable rnat. |
105 |
! on initialise a iice meme au-dessus d'un point de mer au cas |
! on initialise a iice meme au-dessus d'un point de mer au cas |
130 |
STOP 1 |
STOP 1 |
131 |
END IF |
END IF |
132 |
|
|
|
|
|
|
! $$$ IF (firstcall) THEN |
|
133 |
IF (firstsurf(indice)) THEN |
IF (firstsurf(indice)) THEN |
134 |
|
|
135 |
! ----------------------------------------------------------------------- |
! ----------------------------------------------------------------------- |
172 |
END DO |
END DO |
173 |
! PB |
! PB |
174 |
firstsurf(indice) = .FALSE. |
firstsurf(indice) = .FALSE. |
|
! $$$ firstcall =.false. |
|
175 |
|
|
176 |
! Initialisations: |
! Initialisations: |
177 |
! ---------------- |
! ---------------- |
178 |
|
|
179 |
ELSE !--not firstcall |
ELSE |
180 |
! ----------------------------------------------------------------------- |
! ----------------------------------------------------------------------- |
181 |
! Computation of the soil temperatures using the Cgrd and Dgrd |
! Computation of the soil temperatures using the Cgrd and Dgrd |
182 |
! coefficient computed at the previous time-step: |
! coefficient computed at the previous time-step: |
196 |
END DO |
END DO |
197 |
END DO |
END DO |
198 |
|
|
199 |
END IF !--not firstcall |
END IF |
200 |
! ----------------------------------------------------------------------- |
! ----------------------------------------------------------------------- |
201 |
! Computation of the Cgrd and Dgrd coefficient for the next step: |
! Computation of the Cgrd and Dgrd coefficient for the next step: |
202 |
! --------------------------------------------------------------- |
! --------------------------------------------------------------- |
243 |
lambda*zc(ig,1,indice)-ptsrf(ig))/ptimestep |
lambda*zc(ig,1,indice)-ptsrf(ig))/ptimestep |
244 |
END DO |
END DO |
245 |
|
|
246 |
|
contains |
247 |
|
|
248 |
|
real function fz(rk) |
249 |
|
real rk |
250 |
|
fz = fz1*(dalph_soil**rk-1.)/(dalph_soil-1.) |
251 |
|
end function fz |
252 |
|
|
253 |
END SUBROUTINE soil |
END SUBROUTINE soil |
254 |
|
|
255 |
end module soil_m |
end module soil_m |