Changeset 2547
- Timestamp:
- Jun 7, 2016, 3:48:13 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 3 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. -
LMDZ5/trunk/libf/phylmd/conf_phys_m.F90
r2530 r2547 165 165 INTEGER,SAVE :: iflag_ice_thermo_omp 166 166 INTEGER,SAVE :: iflag_t_glace_omp 167 INTEGER,SAVE :: iflag_cloudth_vert_omp 167 168 REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp 168 169 REAL,SAVE :: t_glace_min_omp, t_glace_max_omp … … 1161 1162 1162 1163 ! 1164 !Config Key = iflag_cloudth_vert 1165 !Config Desc = 1166 !Config Def = 0 1167 !Config Help = 1168 ! 1169 iflag_cloudth_vert_omp = 0 1170 call getin('iflag_cloudth_vert',iflag_cloudth_vert_omp) 1171 1172 ! 1163 1173 !Config Key = iflag_ice_thermo 1164 1174 !Config Desc = … … 2044 2054 exposant_glace = exposant_glace_omp 2045 2055 iflag_t_glace = iflag_t_glace_omp 2056 iflag_cloudth_vert=iflag_cloudth_vert_omp 2046 2057 iflag_ice_thermo = iflag_ice_thermo_omp 2047 2058 rei_min = rei_min_omp … … 2361 2372 write(lunout,*)' exposant_glace = ',exposant_glace 2362 2373 write(lunout,*)' iflag_t_glace = ',iflag_t_glace 2374 write(lunout,*)' iflag_cloudth_vert = ',iflag_cloudth_vert 2363 2375 write(lunout,*)' iflag_ice_thermo = ',iflag_ice_thermo 2364 2376 write(lunout,*)' rei_min = ',rei_min -
LMDZ5/trunk/libf/phylmd/nuage.h
r2287 r2547 9 9 REAL tmax_fonte_cv 10 10 11 INTEGER iflag_t_glace, iflag_cld_cv11 INTEGER iflag_t_glace, iflag_cloudth_vert, iflag_cld_cv 12 12 13 13 common /nuagecom/ rad_froid,rad_chau1, rad_chau2,t_glace_max, & 14 14 & t_glace_min,exposant_glace,rei_min,rei_max, & 15 15 & tau_cld_cv,coefw_cld_cv, & 16 & iflag_t_glace,iflag_cld_cv,tmax_fonte_cv 16 & iflag_t_glace,iflag_cloudth_vert,iflag_cld_cv, & 17 & tmax_fonte_cv 17 18 !$OMP THREADPRIVATE(/nuagecom/)
Note: See TracChangeset
for help on using the changeset viewer.