Changeset 1146 for LMDZ4/trunk/libf/phylmd/cv3_cine.F
- Timestamp:
- Apr 9, 2009, 12:11:35 PM (15 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
-
Property
svn:mergeinfo
set to
/LMDZ4/branches/LMDZ4-dev merged eligible
-
Property
svn:mergeinfo
set to
-
LMDZ4/trunk/libf/phylmd/cv3_cine.F
r879 r1146 33 33 integer ifst(nloc),isublcl(nloc) 34 34 logical lswitch(nloc),lswitch1(nloc),lswitch2(nloc) 35 logical exist_lfc(nloc) 36 real plfc(nloc) 35 37 real dpmax 36 38 real deltap,dcin 37 39 real buoylcl(nloc),tvplcl(nloc),tvlcl(nloc) 38 real p lfc(nloc),p0(nloc)40 real p0(nloc) 39 41 real buoyz(nloc), buoy(nloc,nd) 40 42 c … … 50 52 c Recompute buoyancies 51 53 c-------------------------------------------------------------- 52 DO k = 1,n l54 DO k = 1,nd 53 55 DO il = 1,ncum 56 ! print*,'tvp tv=',tvp(il,k),tv(il,k) 54 57 buoy(il,k) = tvp(il,k) - tv(il,k) 55 58 ENDDO 56 59 ENDDO 57 c58 c---------------------------------------------------------------59 c premiere couche contenant un niveau de flotabilite positive60 c et premiere couche contenant un niveau de flotabilite negative61 c au dessus du niveau de condensation62 c---------------------------------------------------------------63 do il = 1,ncum64 itop(il) =nl-165 ineg(il) = nl-166 enddo67 do 100 k=nl,1,-168 do 110 il=1,ncum69 if (k .ge. icb(il)) then70 if (buoy(il,k) .gt. 0.) then71 itop(il)=k72 else73 ineg(il)=k74 endif75 endif76 110 continue77 100 continue78 c print *,' itop, ineg, icb ',itop(1),ineg(1), icb(1)79 c80 60 c--------------------------------------------------------------- 81 61 c … … 109 89 c 110 90 c--------------------------------------------------------------- 91 c premiere couche contenant un niveau de flotabilite positive 92 c et premiere couche contenant un niveau de flotabilite negative 93 c au dessus du niveau de condensation 94 c--------------------------------------------------------------- 95 do il = 1,ncum 96 itop(il) =nl-1 97 ineg(il) = nl-1 98 exist_lfc(il) = .FALSE. 99 enddo 100 do 100 k=nl-1,1,-1 101 do 110 il=1,ncum 102 if (k .ge. ifst(il)) then 103 if (buoy(il,k) .gt. 0.) then 104 itop(il)=k 105 exist_lfc(il) = .TRUE. 106 else 107 ineg(il)=k 108 endif 109 endif 110 110 continue 111 100 continue 112 c 113 c--------------------------------------------------------------- 114 c When there is no positive buoyancy level, set Plfc, Cina and Cinb 115 c to arbitrary extreme values. 116 c--------------------------------------------------------------- 117 DO il = 1,ncum 118 IF (.NOT.exist_lfc(il)) THEN 119 Plfc(il) = 1.111 120 Cinb(il) = -1111. 121 Cina(il) = -1112. 122 ENDIF 123 ENDDO 124 c 125 c 126 c--------------------------------------------------------------- 111 127 c -- Two cases : BUOYlcl >= 0 and BUOYlcl < 0. 112 128 c--------------------------------------------------------------- … … 118 134 DPMAX = 50. 119 135 DO il = 1,ncum 120 lswitch1(il)=BUOYlcl(il) .GE. 0. 136 lswitch1(il)=BUOYlcl(il) .GE. 0. .AND. exist_lfc(il) 121 137 lswitch(il) = lswitch1(il) 122 138 ENDDO … … 233 249 C 234 250 DO il = 1,ncum 235 lswitch1(il)=BUOYlcl(il) .LT. 0. 251 lswitch1(il)=BUOYlcl(il) .LT. 0. .AND. exist_lfc(il) 236 252 lswitch(il) = lswitch1(il) 237 253 ENDDO … … 239 255 c 2.0.1 Premiere couche ou la flotabilite est negative au dessus du sol 240 256 c ---------------------------------------------------- 241 c au cas ou ilexiste sinon ilow=1 (nk apres)257 c au cas ou elle existe sinon ilow=1 (nk apres) 242 258 c on suppose que la parcelle part de la premiere couche 243 259 c … … 248 264 ENDDO 249 265 c 250 do 200 i=nl,1,-1266 do 200 k=nl,1,-1 251 267 DO il = 1,ncum 252 268 IF (lswitch(il) .AND. k .LE.icb(il)-1) THEN … … 292 308 dcin = RD*(BUOYz(il)+BUOYlcl(il))*deltap/(P0(il)+Plcl(il)) 293 309 CINB(il) = min(0.,dcin) 294 cc print *,'buoyz(il),buoylcl(il),deltap,p0(il),plcl(il),dcin ', 295 cc $ buoyz(il),buoylcl(il),deltap,p0(il),plcl(il),dcin 296 ENDIF 297 ENDDO 298 c print*, 'CINB ',CINB(1),'DCIN ',DCIN,I,BUOYz(1),BUOYlcl(1) 310 ENDIF 311 ENDDO 299 312 c 300 313 DO il = 1,ncum … … 316 329 ENDDO 317 330 c 318 IF (lswitch(1)) THEN319 c print*,'ilow= ',ilow(1),'DCIN0 ',DCIN,P0(1),P(1,ilow(1))320 c print*,'buoy',(BUOY(1,k),k=1,itop(1))321 ENDIF322 331 c 323 332 C Middle part of CINB : integral from P(ilow) to P(isublcl) … … 332 341 ENDIF 333 342 ENDDO 334 c print*, 'CINB ', CINB(1), 'DCIN',DCIN,k,BUOY(1,k),BUOY(1,k+1)335 343 ENDDO 336 344 c … … 345 353 ENDDO 346 354 C 347 c print*, ' CINB ', CINB(1), 'Dcin ',dcin348 355 c 349 356 cc ENDIF … … 439 446 ENDDO 440 447 cc ENDIF 441 c Print *,' Plcl,P(itop-1),P(itop),PLFC,BUOYlcl'442 c $ ,Plcl(1),P(1,itop(1)-1),P(1,itop(1)),PLFC(1),BUOYlcl(1)443 C444 c print*, 'CIN above', CINA(1), 'CIN below',CINB(1)445 448 c 446 449
Note: See TracChangeset
for help on using the changeset viewer.