- Timestamp:
- Jul 24, 2024, 2:54:37 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.f90
r5113 r5116 30 30 REAL :: snorm 31 31 REAL :: alpha,beta,gama,delta,deltaz 32 real:: quoi,quand32 REAL :: quoi,quand 33 33 REAL :: zsig(llm),sig(llm+1) 34 34 INTEGER :: np,ierr 35 integer:: ierr1,ierr2,ierr3,ierr435 INTEGER :: ierr1,ierr2,ierr3,ierr4 36 36 REAL :: x 37 37 38 38 REAL :: SSUM 39 39 EXTERNAL SSUM 40 real:: newsig40 REAL :: newsig 41 41 REAL :: dz0,dz1,nhaut,sig1,esig,csig,zz 42 real:: tt,rr,gg, prevz43 real:: s(llm),dsig(llm)44 45 integer:: iz46 real:: z, ps,p47 character(len=*),parameter :: modname="disvert_noterre"42 REAL :: tt,rr,gg, prevz 43 REAL :: s(llm),dsig(llm) 44 45 INTEGER :: iz 46 REAL :: z, ps,p 47 CHARACTER(LEN=*),parameter :: modname="disvert_noterre" 48 48 49 49 ! … … 55 55 hybrid=.TRUE. ! default value for hybrid (ie: use hybrid coordinates) 56 56 CALL getin('hybrid',hybrid) 57 write(lunout,*) trim(modname),': hybrid=',hybrid57 WRITE(lunout,*) trim(modname),': hybrid=',hybrid 58 58 59 59 ! Ouverture possible de fichiers typiquement E.T. … … 61 61 open(99,file="esasig.def",status='old',form='formatted', & 62 62 iostat=ierr2) 63 if(ierr2/=0) then63 IF(ierr2/=0) THEN 64 64 close(99) 65 65 open(99,file="z2sig.def",status='old',form='formatted', & … … 71 71 ! ---------------------------------------- 72 72 73 IF(ierr2==0) then 74 73 IF(ierr2==0) THEN 75 74 ! Lecture de esasig.def : 76 75 ! Systeme peu souple, mais qui respecte en theorie … … 78 77 ! <-> energie cinetique, d'apres la note de Frederic Hourdin... 79 78 80 write(lunout,*)'*****************************'81 write(lunout,*)'WARNING reading esasig.def'82 write(lunout,*)'*****************************'79 WRITE(lunout,*)'*****************************' 80 WRITE(lunout,*)'WARNING reading esasig.def' 81 WRITE(lunout,*)'*****************************' 83 82 READ(99,*) scaleheight 84 83 READ(99,*) dz0 … … 126 125 ! ---------------------------------------- 127 126 128 ELSE IF(ierr4==0) then129 write(lunout,*)'****************************'130 write(lunout,*)'Reading z2sig.def'131 write(lunout,*)'****************************'127 ELSE IF(ierr4==0) THEN 128 WRITE(lunout,*)'****************************' 129 WRITE(lunout,*)'Reading z2sig.def' 130 WRITE(lunout,*)'****************************' 132 131 133 132 READ(99,*) scaleheight … … 146 145 !----------------------------------------------------------------------- 147 146 ELSE 148 write(lunout,*) 'didn t you forget something ??? '149 write(lunout,*) 'We need file z2sig.def ! (OR esasig.def)'147 WRITE(lunout,*) 'didn t you forget something ??? ' 148 WRITE(lunout,*) 'We need file z2sig.def ! (OR esasig.def)' 150 149 stop 151 150 ENDIF … … 170 169 171 170 if (hybrid) then ! use hybrid coordinates 172 write(lunout,*) "*********************************"173 write(lunout,*) "Using hybrid vertical coordinates"174 write(lunout,*)171 WRITE(lunout,*) "*********************************" 172 WRITE(lunout,*) "Using hybrid vertical coordinates" 173 WRITE(lunout,*) 175 174 ! Coordonnees hybrides avec mod 176 175 DO l = 1, llm … … 183 182 ap(llmp1) = 0. 184 183 else ! use sigma coordinates 185 write(lunout,*) "********************************"186 write(lunout,*) "Using sigma vertical coordinates"187 write(lunout,*)184 WRITE(lunout,*) "********************************" 185 WRITE(lunout,*) "Using sigma vertical coordinates" 186 WRITE(lunout,*) 188 187 ! Pour ne pas passer en coordonnees hybrides 189 188 DO l = 1, llm … … 196 195 bp(llmp1) = 0. 197 196 198 write(lunout,*) trim(modname),': BP '199 write(lunout,*) bp200 write(lunout,*) trim(modname),': AP '201 write(lunout,*) ap197 WRITE(lunout,*) trim(modname),': BP ' 198 WRITE(lunout,*) bp 199 WRITE(lunout,*) trim(modname),': AP ' 200 WRITE(lunout,*) ap 202 201 203 202 ! Calcul au milieu des couches : … … 214 213 ENDDO 215 214 216 if (hybrid) then215 if (hybrid) THEN 217 216 aps(llm) = aps(llm-1)**2 / aps(llm-2) 218 217 bps(llm) = 0.5*(bp(llm) + bp(llm+1)) … … 222 221 end if 223 222 224 write(lunout,*) trim(modname),': BPs '225 write(lunout,*) bps226 write(lunout,*) trim(modname),': APs'227 write(lunout,*) aps223 WRITE(lunout,*) trim(modname),': BPs ' 224 WRITE(lunout,*) bps 225 WRITE(lunout,*) trim(modname),': APs' 226 WRITE(lunout,*) aps 228 227 229 228 DO l = 1, llm … … 232 231 ENDDO 233 232 234 write(lunout,*)trim(modname),' : PRESNIVS'235 write(lunout,*)presnivs236 write(lunout,*)'Pseudo altitude of Presnivs : (for a scale ', &233 WRITE(lunout,*)trim(modname),' : PRESNIVS' 234 WRITE(lunout,*)presnivs 235 WRITE(lunout,*)'Pseudo altitude of Presnivs : (for a scale ', & 237 236 'height of ',scaleheight,' km)' 238 write(lunout,*)pseudoalt237 WRITE(lunout,*)pseudoalt 239 238 240 239 ! -------------------------------------------------- … … 252 251 ! do l=2,llm 253 252 ! approximation of scale height for Venus 254 ! if (zsig(l-1).le.55.) then253 ! if (zsig(l-1).le.55.) THEN 255 254 ! scaleheight = 15.5 - zsig(l-1)/55.*10. 256 255 ! else … … 260 259 ! . log((aps(l) + bps(l)*ps)/(aps(l-1) + bps(l-1)*ps)) 261 260 ! END DO 262 ! write(53,'(I3,50F10.5)') iz, zsig261 ! WRITE(53,'(I3,50F10.5)') iz, zsig 263 262 ! END DO 264 263 ! close(53) … … 296 295 297 296 IMPLICIT NONE 298 real:: x1, x2, sig,pa,preff, newsig, F299 integer:: j297 REAL :: x1, x2, sig,pa,preff, newsig, F 298 INTEGER :: j 300 299 301 300 newsig = sig 302 301 x1=0 303 302 x2=1 304 if (sig>=1) then303 if (sig>=1) THEN 305 304 newsig= sig 306 else if (sig*preff/pa>=0.25) then305 else if (sig*preff/pa>=0.25) THEN 307 306 DO J=1,9999 ! nombre d''iteration max 308 307 F=((1 -pa/preff)*exp(1-1./newsig**2)+(pa/preff)*newsig)/sig 309 ! write(0,*) J, ' newsig =', newsig, ' F= ', F310 if (F>1) then308 ! WRITE(0,*) J, ' newsig =', newsig, ' F= ', F 309 if (F>1) THEN 311 310 X2 = newsig 312 311 newsig=(X1+newsig)*0.5 … … 319 318 IF(abs(10.*log(F))<1.E-5) goto 999 320 319 END DO 321 else ! if (sig*preff/pa.le.0.25) then320 else ! if (sig*preff/pa.le.0.25) THEN 322 321 newsig= sig*preff/pa 323 322 end if
Note: See TracChangeset
for help on using the changeset viewer.