Changeset 2543 for LMDZ5/branches
- Timestamp:
- Jun 6, 2016, 6:51:37 PM (8 years ago)
- Location:
- LMDZ5/branches/testing/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing/libf/phylmd/cloudth.F90
r2408 r2543 20 20 #include "FCTTRE.h" 21 21 #include "thermcell.h" 22 23 #include "nuage.h" 24 25 26 27 22 28 23 29 INTEGER itap,ind1,ind2 … … 62 68 REAL erf 63 69 64 REAL, SAVE :: iflag_cloudth_vert, iflag_cloudth_vert_omp=0 65 66 67 LOGICAL, SAVE :: first=.true. 70 71 72 ! LOGICAL, SAVE :: first=.true. 68 73 69 74 … … 75 80 ! de converger sur une version nouvelle 76 81 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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, & 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, & 87 93 & ztv,po,zqta,fraca, & 88 94 & qcloud,ctot,zpspsk,paprs,ztla,zthl, & 89 95 & ratqs,zqs,t) 90 91 96 RETURN 97 ENDIF 92 98 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 93 94 99 95 100 … … 285 290 #include "thermcell.h" 286 291 292 293 #include "nuage.h" 294 295 296 287 297 INTEGER itap,ind1,ind2 288 298 INTEGER ngrid,klev,klon,l,ig … … 438 448 439 449 450 451 452 453 454 455 IF (iflag_cloudth_vert == 1) THEN 440 456 !------------------------------------------------------------------------------- 441 457 ! Version 2: Modification selon J.-Louis. On condense ?? partir de qsat-ratqs … … 479 495 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2) 480 496 497 498 499 500 501 ELSE IF (iflag_cloudth_vert == 2) THEN 502 503 !------------------------------------------------------------------------------- 504 ! Version 3: Modification Jean Jouhaud. On condense a partir de -delta s 505 !------------------------------------------------------------------------------- 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*sigma1s 511 deltasth=ath*0.5*sigma2s 512 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+IntI3 534 ! qlenv(ind1,ind2)=IntJ 535 ! 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+IntI3 543 ! qlth(ind1,ind2)=IntJ 544 ! 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 481 554 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 555 556 557 482 558 if (cenv(ind1,ind2).lt.1.e-10.or.cth(ind1,ind2).lt.1.e-10) then 483 559 ctot(ind1,ind2)=0. -
LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90
r2542 r2543 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_omp 171 172 173 167 174 REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp 168 175 REAL,SAVE :: t_glace_min_omp, t_glace_max_omp … … 1160 1167 call getin('iflag_t_glace',iflag_t_glace_omp) 1161 1168 1169 1170 1171 1172 1173 ! 1174 !Config Key = iflag_cloudth_vert 1175 !Config Desc = 1176 !Config Def = 0 1177 !Config Help = 1178 ! 1179 iflag_cloudth_vert_omp = 0 1180 call getin('iflag_cloudth_vert',iflag_cloudth_vert_omp) 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1162 1191 ! 1163 1192 !Config Key = iflag_ice_thermo … … 2044 2073 exposant_glace = exposant_glace_omp 2045 2074 iflag_t_glace = iflag_t_glace_omp 2075 2076 2077 iflag_cloudth_vert=iflag_cloudth_vert_omp 2078 2079 2080 2046 2081 iflag_ice_thermo = iflag_ice_thermo_omp 2047 2082 rei_min = rei_min_omp … … 2361 2396 write(lunout,*)' exposant_glace = ',exposant_glace 2362 2397 write(lunout,*)' iflag_t_glace = ',iflag_t_glace 2398 2399 2400 2401 write(lunout,*)' iflag_cloudth_vert = ',iflag_cloudth_vert 2402 2403 2404 2363 2405 write(lunout,*)' iflag_ice_thermo = ',iflag_ice_thermo 2364 2406 write(lunout,*)' rei_min = ',rei_min -
LMDZ5/branches/testing/libf/phylmd/nuage.h
r2298 r2543 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.