Changeset 2544 for LMDZ5/branches
- Timestamp:
- Jun 7, 2016, 8:55:31 AM (8 years ago)
- Location:
- LMDZ5/branches/testing/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing/libf/phylmd/cloudth.F90
r2543 r2544 20 20 #include "FCTTRE.h" 21 21 #include "thermcell.h" 22 23 #include "nuage.h"24 25 26 27 28 22 29 23 INTEGER itap,ind1,ind2 … … 68 62 REAL erf 69 63 70 71 72 ! LOGICAL, SAVE :: first=.true. 64 REAL, SAVE :: iflag_cloudth_vert, iflag_cloudth_vert_omp=0 65 66 67 LOGICAL, SAVE :: first=.true. 73 68 74 69 … … 80 75 ! de converger sur une version nouvelle 81 76 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 82 ! IF (first) THEN 83 ! !$OMP MASTER 84 ! CALL getin('iflag_cloudth_vert',iflag_cloudth_vert_omp) 85 ! !$OMP END MASTER 86 ! !$OMP BARRIER 87 ! iflag_cloudth_vert=iflag_cloudth_vert_omp 88 ! first=.false. 89 ! ENDIF 90 91 IF (iflag_cloudth_vert.GE.1) THEN 92 CALL cloudth_vert(ngrid,klev,ind2, & 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, & 93 87 & ztv,po,zqta,fraca, & 94 88 & qcloud,ctot,zpspsk,paprs,ztla,zthl, & 95 89 & ratqs,zqs,t) 96 RETURN97 ENDIF90 RETURN 91 ENDIF 98 92 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 93 99 94 100 95 … … 290 285 #include "thermcell.h" 291 286 292 293 #include "nuage.h"294 295 296 297 287 INTEGER itap,ind1,ind2 298 288 INTEGER ngrid,klev,klon,l,ig … … 448 438 449 439 450 451 452 453 454 455 IF (iflag_cloudth_vert == 1) THEN456 440 !------------------------------------------------------------------------------- 457 441 ! Version 2: Modification selon J.-Louis. On condense ?? partir de qsat-ratqs … … 495 479 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2) 496 480 497 498 499 500 501 ELSE IF (iflag_cloudth_vert == 2) THEN502 503 !-------------------------------------------------------------------------------504 ! Version 3: Modification Jean Jouhaud. On condense a partir de -delta s505 !-------------------------------------------------------------------------------506 ! deltasenv=aenv*ratqs(ind1,ind2)*po(ind1)507 ! deltasth=ath*ratqs(ind1,ind2)*zqta(ind1,ind2)508 ! deltasenv=aenv*ratqs(ind1,ind2)*zqsatenv(ind1,ind2)509 ! deltasth=ath*ratqs(ind1,ind2)*zqsatth(ind1,ind2)510 deltasenv=aenv*0.5*sigma1s511 deltasth=ath*0.5*sigma2s512 513 xenv1=-(senv+deltasenv)/(sqrt(2.)*sigma1s)514 xenv2=-(senv-deltasenv)/(sqrt(2.)*sigma1s)515 xth1=-(sth+deltasth)/(sqrt(2.)*sigma2s)516 xth2=-(sth-deltasth)/(sqrt(2.)*sigma2s)517 ! coeffqlenv=(sigma1s)**2/(2*sqrtpi*deltasenv)518 ! coeffqlth=(sigma2s)**2/(2*sqrtpi*deltasth)519 520 cth(ind1,ind2)=0.5*(1.-1.*erf(xth1))521 cenv(ind1,ind2)=0.5*(1.-1.*erf(xenv1))522 ctot(ind1,ind2)=fraca(ind1,ind2)*cth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*cenv(ind1,ind2)523 524 IntJ=0.5*senv*(1-erf(xenv2))+(sigma1s/sqrt2pi)*exp(-1.*xenv2**2)525 IntI1=(((senv+deltasenv)**2+(sigma1s)**2)/(8*deltasenv))*(erf(xenv2)-erf(xenv1))526 IntI2=(sigma1s**2/(4*deltasenv*sqrtpi))*(xenv1*exp(-1.*xenv1**2)-xenv2*exp(-1.*xenv2**2))527 IntI3=((sqrt2*sigma1s*(senv+deltasenv))/(4*sqrtpi*deltasenv))*(exp(-1.*xenv1**2)-exp(-1.*xenv2**2))528 529 ! IntI1=0.5*(0.5*sqrtpi*(erf(xenv2)-erf(xenv1))+xenv1*exp(-1.*xenv1**2)-xenv2*exp(-1.*xenv2**2))530 ! IntI2=xenv2*(exp(-1.*xenv2**2)-exp(-1.*xenv1**2))531 ! IntI3=0.5*sqrtpi*xenv2**2*(erf(xenv2)-erf(xenv1))532 533 qlenv(ind1,ind2)=IntJ+IntI1+IntI2+IntI3534 ! qlenv(ind1,ind2)=IntJ535 ! print*, qlenv(ind1,ind2),'VERIF EAU'536 537 IntJ=0.5*sth*(1-erf(xth2))+(sigma2s/sqrt2pi)*exp(-1.*xth2**2)538 IntI1=(((sth+deltasth)**2+(sigma2s)**2)/(8*deltasth))*(erf(xth2)-erf(xth1))539 IntI2=(sigma2s**2/(4*deltasth*sqrtpi))*(xth1*exp(-1.*xth1**2)-xth2*exp(-1.*xth2**2))540 IntI3=((sqrt2*sigma2s*(sth+deltasth))/(4*sqrtpi*deltasth))*(exp(-1.*xth1**2)-exp(-1.*xth2**2))541 542 qlth(ind1,ind2)=IntJ+IntI1+IntI2+IntI3543 ! qlth(ind1,ind2)=IntJ544 ! print*, IntJ,IntI1,IntI2,IntI3,qlth(ind1,ind2),'VERIF EAU2'545 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2)546 547 548 549 550 ENDIF ! of if (iflag_cloudth_vert==1 or 2)551 552 553 554 481 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 555 556 557 558 482 if (cenv(ind1,ind2).lt.1.e-10.or.cth(ind1,ind2).lt.1.e-10) then 559 483 ctot(ind1,ind2)=0. -
LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90
r2543 r2544 165 165 INTEGER,SAVE :: iflag_ice_thermo_omp 166 166 INTEGER,SAVE :: iflag_t_glace_omp 167 168 169 170 INTEGER,SAVE :: iflag_cloudth_vert_omp171 172 173 174 167 REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp 175 168 REAL,SAVE :: t_glace_min_omp, t_glace_max_omp … … 1167 1160 call getin('iflag_t_glace',iflag_t_glace_omp) 1168 1161 1169 1170 1171 1172 1173 !1174 !Config Key = iflag_cloudth_vert1175 !Config Desc =1176 !Config Def = 01177 !Config Help =1178 !1179 iflag_cloudth_vert_omp = 01180 call getin('iflag_cloudth_vert',iflag_cloudth_vert_omp)1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1162 ! 1192 1163 !Config Key = iflag_ice_thermo … … 2073 2044 exposant_glace = exposant_glace_omp 2074 2045 iflag_t_glace = iflag_t_glace_omp 2075 2076 2077 iflag_cloudth_vert=iflag_cloudth_vert_omp2078 2079 2080 2081 2046 iflag_ice_thermo = iflag_ice_thermo_omp 2082 2047 rei_min = rei_min_omp … … 2396 2361 write(lunout,*)' exposant_glace = ',exposant_glace 2397 2362 write(lunout,*)' iflag_t_glace = ',iflag_t_glace 2398 2399 2400 2401 write(lunout,*)' iflag_cloudth_vert = ',iflag_cloudth_vert2402 2403 2404 2405 2363 write(lunout,*)' iflag_ice_thermo = ',iflag_ice_thermo 2406 2364 write(lunout,*)' rei_min = ',rei_min -
LMDZ5/branches/testing/libf/phylmd/nuage.h
r2543 r2544 9 9 REAL tmax_fonte_cv 10 10 11 INTEGER iflag_t_glace, iflag_cloudth_vert,iflag_cld_cv11 INTEGER iflag_t_glace,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_cloudth_vert,iflag_cld_cv, & 17 & tmax_fonte_cv 16 & iflag_t_glace,iflag_cld_cv,tmax_fonte_cv 18 17 !$OMP THREADPRIVATE(/nuagecom/)
Note: See TracChangeset
for help on using the changeset viewer.