- Timestamp:
- Mar 24, 2010, 1:41:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/thermcell_flux2.F90
r1299 r1330 41 41 REAL zfm 42 42 43 integer igout 43 integer igout,lout 44 44 integer lev_out 45 45 integer lunout1 … … 49 49 REAL fomass_max,alphamax 50 50 save fomass_max,alphamax 51 52 logical check_debug,labort_gcm 51 53 52 54 character (len=20) :: modname='thermcell_flux2' … … 84 86 ! Verification de la nullite des entrainement et detrainement au dessus 85 87 ! de lmax(ig) 86 !------------------------------------------------------------------------- 87 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 88 94 do l=1,klev 89 95 do ig=1,ngrid … … 102 108 print*,'detr_star(ig,l)',detr_star(ig,l) 103 109 abort_message = '' 110 labort_gcm=.true. 104 111 CALL abort_gcm (modname,abort_message,1) 105 112 endif … … 107 114 enddo 108 115 enddo 116 endif 109 117 110 118 !------------------------------------------------------------------------- … … 259 267 260 268 ! do l=1,klev 269 270 271 272 labort_gcm=.false. 261 273 do ig=1,ngrid 262 274 if (entr(ig,l)<0.) then 263 print*,'N1 ig,l,entr',ig,l,entr(ig,l) 264 abort_message = 'entr negatif' 265 CALL abort_gcm (modname,abort_message,1) 266 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 267 288 if (detr(ig,l).gt.fm(ig,l)) then 268 289 ncorecfm6=ncorecfm6+1 … … 287 308 entr(ig,l)=0. 288 309 endif 289 310 enddo 311 312 labort_gcm=.false. 313 do ig=1,ngrid 290 314 if (entr(ig,l).lt.0.) then 291 print*,'ig,l,lmax(ig)',ig,l,lmax(ig) 292 print*,'entr(ig,l)',entr(ig,l) 293 print*,'fm(ig,l)',fm(ig,l) 294 abort_message = 'probleme dans thermcell flux' 295 CALL abort_gcm (modname,abort_message,1) 296 endif 297 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 298 329 ! enddo 299 330 endif … … 313 344 detr(ig,l)=detr(ig,l)+fm(ig,l+1) 314 345 fm(ig,l+1)=0. 315 ! print*,'fm2<0',l+1,lmax(ig)316 346 ncorecfm2=ncorecfm2+1 317 347 endif 348 enddo 349 350 labort_gcm=.false. 351 do ig=1,ngrid 318 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 319 359 print*,'cas 2 : ig,l,lmax(ig)',ig,l,lmax(ig) 320 360 print*,'detr(ig,l)',detr(ig,l) … … 322 362 abort_message = 'probleme dans thermcell flux' 323 363 CALL abort_gcm (modname,abort_message,1) 324 endif 325 enddo 364 endif 326 365 ! enddo 327 366 … … 388 427 389 428 if (1.eq.1) then 429 labort_gcm=.false. 390 430 do l=1,klev-1 391 431 do ig=1,ngrid … … 408 448 else 409 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 410 466 print*,'ig,l',ig,l 411 467 print*,'eee0',eee0 … … 424 480 abort_message = 'probleme dans thermcell_flux' 425 481 CALL abort_gcm (modname,abort_message,1) 426 endif 427 entr(ig,l+1)=entr(ig,l+1)-ddd 428 detr(ig,l)=0. 429 fm(ig,l+1)=fm(ig,l)+entr(ig,l) 430 detr(ig,l)=0. 431 endif 432 endif 433 endif 434 enddo 435 enddo 482 endif 436 483 endif 437 484 !
Note: See TracChangeset
for help on using the changeset viewer.