Changeset 2547 for LMDZ5/trunk/libf/phylmd/cloudth.F90
- Timestamp:
- Jun 7, 2016, 3:48:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/cloudth.F90
r2311 r2547 20 20 #include "FCTTRE.h" 21 21 #include "thermcell.h" 22 #include "nuage.h" 22 23 23 24 INTEGER itap,ind1,ind2 … … 62 63 REAL erf 63 64 64 REAL, SAVE :: iflag_cloudth_vert, iflag_cloudth_vert_omp=065 66 67 LOGICAL, SAVE :: first=.true.68 69 70 65 71 66 72 67 73 68 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 74 ! Astuce pour gérer deux versions de cloudth en attendant 75 ! de converger sur une version nouvelle 69 ! Gestion de deux versions de cloudth 76 70 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 77 IF (first) THEN 78 !$OMP MASTER 79 CALL getin('iflag_cloudth_vert',iflag_cloudth_vert_omp) 80 !$OMP END MASTER 81 !$OMP BARRIER 82 iflag_cloudth_vert=iflag_cloudth_vert_omp 83 first=.false. 84 ENDIF 85 IF (iflag_cloudth_vert==1) THEN 86 CALL cloudth_vert(ngrid,klev,ind2, & 71 72 IF (iflag_cloudth_vert.GE.1) THEN 73 CALL cloudth_vert(ngrid,klev,ind2, & 87 74 & ztv,po,zqta,fraca, & 88 75 & qcloud,ctot,zpspsk,paprs,ztla,zthl, & 89 76 & ratqs,zqs,t) 90 91 77 RETURN 78 ENDIF 92 79 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 93 94 80 95 81 … … 284 270 #include "FCTTRE.h" 285 271 #include "thermcell.h" 286 272 #include "nuage.h" 273 287 274 INTEGER itap,ind1,ind2 288 275 INTEGER ngrid,klev,klon,l,ig … … 438 425 439 426 427 IF (iflag_cloudth_vert == 1) THEN 440 428 !------------------------------------------------------------------------------- 441 429 ! Version 2: Modification selon J.-Louis. On condense ?? partir de qsat-ratqs … … 479 467 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2) 480 468 469 ELSE IF (iflag_cloudth_vert == 2) THEN 470 471 !------------------------------------------------------------------------------- 472 ! Version 3: Modification Jean Jouhaud. On condense a partir de -delta s 473 !------------------------------------------------------------------------------- 474 ! deltasenv=aenv*ratqs(ind1,ind2)*po(ind1) 475 ! deltasth=ath*ratqs(ind1,ind2)*zqta(ind1,ind2) 476 ! deltasenv=aenv*ratqs(ind1,ind2)*zqsatenv(ind1,ind2) 477 ! deltasth=ath*ratqs(ind1,ind2)*zqsatth(ind1,ind2) 478 deltasenv=aenv*0.5*sigma1s 479 deltasth=ath*0.5*sigma2s 480 481 xenv1=-(senv+deltasenv)/(sqrt(2.)*sigma1s) 482 xenv2=-(senv-deltasenv)/(sqrt(2.)*sigma1s) 483 xth1=-(sth+deltasth)/(sqrt(2.)*sigma2s) 484 xth2=-(sth-deltasth)/(sqrt(2.)*sigma2s) 485 ! coeffqlenv=(sigma1s)**2/(2*sqrtpi*deltasenv) 486 ! coeffqlth=(sigma2s)**2/(2*sqrtpi*deltasth) 487 488 cth(ind1,ind2)=0.5*(1.-1.*erf(xth1)) 489 cenv(ind1,ind2)=0.5*(1.-1.*erf(xenv1)) 490 ctot(ind1,ind2)=fraca(ind1,ind2)*cth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*cenv(ind1,ind2) 491 492 IntJ=0.5*senv*(1-erf(xenv2))+(sigma1s/sqrt2pi)*exp(-1.*xenv2**2) 493 IntI1=(((senv+deltasenv)**2+(sigma1s)**2)/(8*deltasenv))*(erf(xenv2)-erf(xenv1)) 494 IntI2=(sigma1s**2/(4*deltasenv*sqrtpi))*(xenv1*exp(-1.*xenv1**2)-xenv2*exp(-1.*xenv2**2)) 495 IntI3=((sqrt2*sigma1s*(senv+deltasenv))/(4*sqrtpi*deltasenv))*(exp(-1.*xenv1**2)-exp(-1.*xenv2**2)) 496 497 ! IntI1=0.5*(0.5*sqrtpi*(erf(xenv2)-erf(xenv1))+xenv1*exp(-1.*xenv1**2)-xenv2*exp(-1.*xenv2**2)) 498 ! IntI2=xenv2*(exp(-1.*xenv2**2)-exp(-1.*xenv1**2)) 499 ! IntI3=0.5*sqrtpi*xenv2**2*(erf(xenv2)-erf(xenv1)) 500 501 qlenv(ind1,ind2)=IntJ+IntI1+IntI2+IntI3 502 ! qlenv(ind1,ind2)=IntJ 503 ! print*, qlenv(ind1,ind2),'VERIF EAU' 504 505 IntJ=0.5*sth*(1-erf(xth2))+(sigma2s/sqrt2pi)*exp(-1.*xth2**2) 506 IntI1=(((sth+deltasth)**2+(sigma2s)**2)/(8*deltasth))*(erf(xth2)-erf(xth1)) 507 IntI2=(sigma2s**2/(4*deltasth*sqrtpi))*(xth1*exp(-1.*xth1**2)-xth2*exp(-1.*xth2**2)) 508 IntI3=((sqrt2*sigma2s*(sth+deltasth))/(4*sqrtpi*deltasth))*(exp(-1.*xth1**2)-exp(-1.*xth2**2)) 509 510 qlth(ind1,ind2)=IntJ+IntI1+IntI2+IntI3 511 ! qlth(ind1,ind2)=IntJ 512 ! print*, IntJ,IntI1,IntI2,IntI3,qlth(ind1,ind2),'VERIF EAU2' 513 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2) 514 515 516 517 518 ENDIF ! of if (iflag_cloudth_vert==1 or 2) 519 481 520 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 521 482 522 if (cenv(ind1,ind2).lt.1.e-10.or.cth(ind1,ind2).lt.1.e-10) then 483 523 ctot(ind1,ind2)=0.
Note: See TracChangeset
for help on using the changeset viewer.