Changeset 2539 for trunk/LMDZ.VENUS
- Timestamp:
- Jun 23, 2021, 5:55:48 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/soil.F
r1530 r2539 46 46 c ------------- 47 47 48 use dimphy 48 use dimphy, only: klon 49 49 IMPLICIT NONE 50 #include "YOMCST.h"51 #include "dimsoil.h"52 #include "clesphys.h"50 include "YOMCST.h" 51 include "dimsoil.h" 52 include "clesphys.h" 53 53 54 54 c----------------------------------------------------------------------- … … 56 56 c --------- 57 57 58 REAL ptimestep 59 INTEGER knon 60 REAL ptsrf(klon),ptsoil(klon,nsoilmx) 61 REAL pcapcal(klon),pfluxgrd(klon) 58 REAL, intent(IN) :: ptimestep 59 INTEGER, intent(IN) :: knon 60 REAL, intent(IN) :: ptsrf(klon) 61 REAL, intent(OUT) :: ptsoil(klon,nsoilmx) 62 REAL, intent(OUT) :: pcapcal(klon),pfluxgrd(klon) 62 63 63 64 c----------------------------------------------------------------------- … … 72 73 c local saved variables: 73 74 c ---------------------- 74 REAL dz1(nsoilmx),dz2(nsoilmx) 75 REAL,allocatable :: zc(:,:),zd(:,:) 76 REAL lambda 77 SAVE dz1,dz2,zc,zd,lambda 78 LOGICAL firstcall 79 SAVE firstcall 80 81 DATA firstcall/.true./ 82 83 c----------------------------------------------------------------------- 84 c Depthts: 85 c -------- 75 REAL,SAVE :: dz1(nsoilmx),dz2(nsoilmx) 76 REAL,allocatable,save :: zc(:,:),zd(:,:) 77 REAL,SAVE :: lambda 78 LOGICAL,SAVE :: firstcall=.true. 79 80 c----------------------------------------------------------------------- 81 c Depths: 82 c ------- 86 83 87 84 REAL fz,rk,fz1,rk1,rk2 88 85 fz(rk)=fz1*(dalph_soil**rk-1.)/(dalph_soil-1.) 86 89 87 pfluxgrd(:) = 0. 90 88 89 ! on Venus thermal inertia is assumed constant over the globe 91 90 DO ig = 1, knon 92 91 ztherm_i(ig) = inertie … … 95 94 IF (firstcall) THEN 96 95 97 allocate(zc(klon,nsoilmx),zd(klon,nsoilmx))96 allocate(zc(klon,nsoilmx),zd(klon,nsoilmx)) 98 97 99 98 c----------------------------------------------------------------------- … … 103 102 104 103 c VENUS : A REVOIR !!!! 105 min_period=20000. ! en secondes106 dalph_soil=2. ! ra pport entre les epaisseurs de 2 couches succ.104 min_period=20000. ! in seconds 105 dalph_soil=2. ! ratio between successive layer sizes 107 106 108 107 OPEN(99,file='soil.def',status='old',form='formatted',err=9999) … … 115 114 9999 CONTINUE 116 115 117 c la premiere couche represente un dixieme de cycle diurne116 c The first soil layer depth, based on min_period 118 117 fz1=sqrt(min_period/3.14) 119 118 … … 137 136 . fz(rk1)*fz(rk2)*3.14,fz(rk)*fz(rk)*3.14 138 137 ENDDO 138 139 c----------------------------------------------------------------------- 140 c Computation of the Cgrd and Dgrd coefficient for the next step: 141 c --------------------------------------------------------------- 142 DO jk=1,nsoilmx 143 zdz2(jk)=dz2(jk)/ptimestep 144 ENDDO 145 146 DO ig=1,knon 147 z1(ig)=zdz2(nsoilmx)+dz1(nsoilmx-1) 148 zc(ig,nsoilmx-1)= 149 $ zdz2(nsoilmx)*ptsoil(ig,nsoilmx)/z1(ig) 150 zd(ig,nsoilmx-1)=dz1(nsoilmx-1)/z1(ig) 151 ENDDO 152 153 DO jk=nsoilmx-1,2,-1 154 DO ig=1,knon 155 z1(ig)=1./(zdz2(jk)+dz1(jk-1)+dz1(jk) 156 $ *(1.-zd(ig,jk))) 157 zc(ig,jk-1)= 158 s (ptsoil(ig,jk)*zdz2(jk)+dz1(jk)*zc(ig,jk)) 159 $ *z1(ig) 160 zd(ig,jk-1)=dz1(jk-1)*z1(ig) 161 ENDDO 162 ENDDO 139 163 firstcall =.false. 140 164 141 ELSE !--not firstcall 165 ENDIF !--not firstcall 166 142 167 c----------------------------------------------------------------------- 143 168 c Computation of the soil temperatures using the Cgrd and Dgrd … … 145 170 c ----------------------------------------------- 146 171 147 c surface temperature172 c temperature in the first soil layer 148 173 DO ig=1,knon 149 174 ptsoil(ig,1)=(lambda*zc(ig,1)+ptsrf(ig))/ … … 151 176 ENDDO 152 177 153 c other temperatures178 c temperatures in the other soil layers 154 179 DO jk=1,nsoilmx-1 155 180 DO ig=1,knon … … 158 183 ENDDO 159 184 160 ENDIF !--not firstcall161 185 c----------------------------------------------------------------------- 162 186 c Computation of the Cgrd and Dgrd coefficient for the next step: … … 204 228 ENDDO 205 229 206 RETURN230 207 231 END
Note: See TracChangeset
for help on using the changeset viewer.