Changeset 1403 for LMDZ4/trunk/libf/phylmd/thermcell_flux2.F90
- Timestamp:
- Jul 1, 2010, 11:02:53 AM (14 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/phylmd/thermcell_flux2.F90
r1146 r1403 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE thermcell_flux2(ngrid,klev,ptimestep,masse, & 2 5 & lalim,lmax,alim_star, & … … 38 41 REAL zfm 39 42 40 integer igout 43 integer igout,lout 41 44 integer lev_out 42 45 integer lunout1 … … 46 49 REAL fomass_max,alphamax 47 50 save fomass_max,alphamax 51 52 logical check_debug,labort_gcm 53 54 character (len=20) :: modname='thermcell_flux2' 55 character (len=80) :: abort_message 48 56 49 57 fomass_max=0.5 … … 78 86 ! Verification de la nullite des entrainement et detrainement au dessus 79 87 ! de lmax(ig) 80 !------------------------------------------------------------------------- 81 88 ! Active uniquement si check_debug=.true. ou prt_level>=10 89 !------------------------------------------------------------------------- 90 91 check_debug=.false..or.prt_level>=10 92 93 if (check_debug) then 82 94 do l=1,klev 83 95 do ig=1,ngrid … … 88 100 print*,'alim_star(ig,l)',alim_star(ig,l) 89 101 print*,'detr_star(ig,l)',detr_star(ig,l) 90 ! stop91 102 endif 92 103 else … … 96 107 print*,'alim_star(ig,l)',alim_star(ig,l) 97 108 print*,'detr_star(ig,l)',detr_star(ig,l) 98 stop 109 abort_message = '' 110 labort_gcm=.true. 111 CALL abort_gcm (modname,abort_message,1) 99 112 endif 100 113 endif 101 114 enddo 102 115 enddo 116 endif 103 117 104 118 !------------------------------------------------------------------------- … … 253 267 254 268 ! do l=1,klev 269 270 271 272 labort_gcm=.false. 255 273 do ig=1,ngrid 256 274 if (entr(ig,l)<0.) then 257 print*,'N1 ig,l,entr',ig,l,entr(ig,l) 258 stop 'entr negatif' 259 endif 275 labort_gcm=.true. 276 igout=ig 277 lout=l 278 endif 279 enddo 280 281 if (labort_gcm) then 282 print*,'N1 ig,l,entr',igout,lout,entr(igout,lout) 283 abort_message = 'entr negatif' 284 CALL abort_gcm (modname,abort_message,1) 285 endif 286 287 do ig=1,ngrid 260 288 if (detr(ig,l).gt.fm(ig,l)) then 261 289 ncorecfm6=ncorecfm6+1 … … 280 308 entr(ig,l)=0. 281 309 endif 282 310 enddo 311 312 labort_gcm=.false. 313 do ig=1,ngrid 283 314 if (entr(ig,l).lt.0.) then 284 print*,'ig,l,lmax(ig)',ig,l,lmax(ig) 285 print*,'entr(ig,l)',entr(ig,l) 286 print*,'fm(ig,l)',fm(ig,l) 287 stop 'probleme dans thermcell flux' 288 endif 289 enddo 315 labort_gcm=.true. 316 igout=ig 317 endif 318 enddo 319 if (labort_gcm) then 320 ig=igout 321 print*,'ig,l,lmax(ig)',ig,l,lmax(ig) 322 print*,'entr(ig,l)',entr(ig,l) 323 print*,'fm(ig,l)',fm(ig,l) 324 abort_message = 'probleme dans thermcell flux' 325 CALL abort_gcm (modname,abort_message,1) 326 endif 327 328 290 329 ! enddo 291 330 endif … … 305 344 detr(ig,l)=detr(ig,l)+fm(ig,l+1) 306 345 fm(ig,l+1)=0. 307 ! print*,'fm2<0',l+1,lmax(ig)308 346 ncorecfm2=ncorecfm2+1 309 347 endif 348 enddo 349 350 labort_gcm=.false. 351 do ig=1,ngrid 310 352 if (detr(ig,l).lt.0.) then 353 labort_gcm=.true. 354 igout=ig 355 endif 356 enddo 357 if (labort_gcm) then 358 ig=igout 311 359 print*,'cas 2 : ig,l,lmax(ig)',ig,l,lmax(ig) 312 360 print*,'detr(ig,l)',detr(ig,l) 313 361 print*,'fm(ig,l)',fm(ig,l) 314 stop'probleme dans thermcell flux'315 endif316 end do362 abort_message = 'probleme dans thermcell flux' 363 CALL abort_gcm (modname,abort_message,1) 364 endif 317 365 ! enddo 318 366 … … 379 427 380 428 if (1.eq.1) then 429 labort_gcm=.false. 381 430 do l=1,klev-1 382 431 do ig=1,ngrid … … 399 448 else 400 449 if(l.ge.lmax(ig).and.0.eq.1) then 450 igout=ig 451 lout=l 452 labort_gcm=.true. 453 endif 454 entr(ig,l+1)=entr(ig,l+1)-ddd 455 detr(ig,l)=0. 456 fm(ig,l+1)=fm(ig,l)+entr(ig,l) 457 detr(ig,l)=0. 458 endif 459 endif 460 endif 461 enddo 462 enddo 463 if (labort_gcm) then 464 ig=igout 465 l=lout 401 466 print*,'ig,l',ig,l 402 467 print*,'eee0',eee0 … … 413 478 print*,'fm(ig,l+1)',fm(ig,l+1) 414 479 print*,'fm(ig,l)',fm(ig,l) 415 stop 'probleme dans thermcell_flux' 416 endif 417 entr(ig,l+1)=entr(ig,l+1)-ddd 418 detr(ig,l)=0. 419 fm(ig,l+1)=fm(ig,l)+entr(ig,l) 420 detr(ig,l)=0. 421 endif 422 endif 423 endif 424 enddo 425 enddo 480 abort_message = 'probleme dans thermcell_flux' 481 CALL abort_gcm (modname,abort_message,1) 482 endif 426 483 endif 427 484 !
Note: See TracChangeset
for help on using the changeset viewer.