Changeset 4818
- Timestamp:
- Feb 14, 2024, 4:44:16 PM (11 months ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_lscp.F90
r4803 r4818 946 946 zqn(i) = zq(i) 947 947 rneb(i,k) = 1.0 948 zcond(i) = MAX(0.0,zqn(i)- gammasat(i)*zqs(i))948 zcond(i) = MAX(0.0,zqn(i)-zqs(i)) 949 949 rhcl(i,k)=1.0 950 950 ELSE 951 zcond(i) = MAX(0.0,zqn(i)- gammasat(i)*zqs(i))*rneb(i,k)951 zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k) 952 952 ! following line is very strange and probably wrong: 953 953 rhcl(i,k)=(zqs(i)+zq(i))/2./zqs(i) -
LMDZ6/trunk/libf/phylmd/lmdz_lscp_ini.F90
r4809 r4818 6 6 !-------------------- 7 7 8 REAL RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG 9 !$OMP THREADPRIVATE(RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG )8 REAL RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI 9 !$OMP THREADPRIVATE(RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI) 10 10 11 11 REAL, SAVE, PROTECTED :: seuil_neb=0.001 ! cloud fraction threshold: a cloud really exists when exceeded … … 164 164 !$OMP THREADPRIVATE(r_snow) 165 165 166 REAL, SAVE, PROTECTED :: Eff_rain_liq=1.0 ! A COMMENTER TODO [-]167 !$OMP THREADPRIVATE(Eff_rain_liq)168 169 REAL, SAVE, PROTECTED :: Eff_snow_ice=0.5 ! A COMMENTER TODO [-]170 !$OMP THREADPRIVATE(Eff_snow_ice)171 172 REAL, SAVE, PROTECTED :: Eff_snow_liq=1.0 ! A COMMENTER TODO [-]173 !$OMP THREADPRIVATE(Eff_snow_liq)174 175 166 REAL, SAVE, PROTECTED :: tau_auto_snow_min=1800. ! A COMMENTER TODO [s] 176 167 !$OMP THREADPRIVATE(tau_auto_snow_min) … … 181 172 REAL, SAVE, PROTECTED :: eps=1.E-10 ! A COMMENTER TODO [-] 182 173 !$OMP THREADPRIVATE(eps) 174 175 REAL, SAVE, PROTECTED :: air_thermal_conduct=2.4e-2 ! A COMMENTER TODO [-] 176 !$OMP THREADPRIVATE(air_thermal_conduct) 177 178 REAL, SAVE, PROTECTED :: coef_ventil=1. ! A COMMENTER TODO [-] 179 !$OMP THREADPRIVATE(coef_ventil) 180 181 REAL, SAVE, PROTECTED :: alpha_freez=4. ! A COMMENTER TODO [-] 182 !$OMP THREADPRIVATE(alpha_freez) 183 184 REAL, SAVE, PROTECTED :: gamma_freez=0.1 ! A COMMENTER TODO [m-3.s-1] 185 !$OMP THREADPRIVATE(gamma_freez) 183 186 !--End of the parameters for poprecip 184 187 … … 190 193 191 194 SUBROUTINE lscp_ini(dtime,lunout_in,prt_level_in,ok_ice_sursat, iflag_ratqs, fl_cor_ebil_in, RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, & 192 RVTMP2_in, RTT_in,RD_in,RG_in )195 RVTMP2_in, RTT_in,RD_in,RG_in,RPI_in) 193 196 194 197 … … 202 205 203 206 REAL, INTENT(IN) :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in 204 REAL, INTENT(IN) :: RVTMP2_in, RTT_in, RD_in, RG_in 207 REAL, INTENT(IN) :: RVTMP2_in, RTT_in, RD_in, RG_in, RPI_in 205 208 character (len=20) :: modname='lscp_ini_mod' 206 209 character (len=80) :: abort_message … … 220 223 RG=RG_in 221 224 RVTMP2=RVTMP2_in 225 RPI=RPI_in 222 226 223 227 … … 262 266 CALL getin_p('gamma_agg',gamma_agg) 263 267 CALL getin_p('gamma_col',gamma_col) 268 CALL getin_p('gamma_rim',gamma_rim) 264 269 265 270 … … 303 308 WRITE(lunout,*) 'lscp_ini, gamma_agg:', gamma_agg 304 309 WRITE(lunout,*) 'lscp_ini, gamma_col:', gamma_col 310 WRITE(lunout,*) 'lscp_ini, gamma_rim:', gamma_rim 305 311 306 312 -
LMDZ6/trunk/libf/phylmd/lmdz_lscp_poprecip.F90
r4809 r4818 232 232 precipfracclr, precipfraccld, & 233 233 rain, rainclr, raincld, snow, snowclr, snowcld, & 234 dqrauto,dqrcol,dqrmelt,dqrfreez,dqsauto,dqsagg,dqsrim,dqsmelt,dqsfreez) 234 dqrauto, dqrcol, dqrmelt, dqrfreez, dqsauto, dqsagg, & 235 dqsrim, dqsmelt, dqsfreez) 235 236 236 237 USE lmdz_lscp_ini, ONLY : prt_level, lunout 237 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG 238 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI 238 239 USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf 239 240 … … 241 242 cld_lc_lsc, cld_tau_lsc, cld_expo_lsc, rain_int_min, & 242 243 thresh_precip_frac, gamma_col, gamma_agg, gamma_rim, & 243 rho_rain, rho_snow, r_rain, r_snow, Eff_rain_liq, & 244 Eff_snow_ice, Eff_snow_liq, tau_auto_snow_min, & 245 tau_auto_snow_max, thresh_precip_frac, eps, & 244 rho_rain, rho_snow, r_rain, r_snow, & 245 tau_auto_snow_min, tau_auto_snow_max, & 246 thresh_precip_frac, eps, air_thermal_conduct, & 247 coef_ventil, alpha_freez, gamma_freez, temp_nowater, & 246 248 iflag_cloudth_vert, iflag_rain_incloud_vol 249 247 250 248 251 IMPLICIT NONE … … 292 295 293 296 INTEGER :: i 294 295 REAL :: hum_to_flux 297 REAL, DIMENSION(klon) :: hum_to_flux 298 REAL, DIMENSION(klon) :: qtot !--includes vap, liq, ice and precip 299 300 ! partition of the fluxes 296 301 REAL :: dcldfra 297 302 REAL :: precipfractot … … 299 304 REAL :: drainclr, dsnowclr 300 305 REAL :: draincld, dsnowcld 306 307 ! collection, aggregation and riming 301 308 REAL :: eff_cldfra 302 REAL :: coef_col, coef_agg, coef_tmp, qrain 309 REAL :: coef_col, coef_agg, coef_rim, coef_tmp, qrain 310 REAL :: Eff_rain_liq, Eff_snow_ice, Eff_snow_liq 311 REAL :: dqlcol ! loss of liquid cloud content due to collection by rain [kg/kg/s] 312 REAL :: dqiagg ! loss of ice cloud content due to collection by aggregation [kg/kg/s] 313 REAL :: dqlrim ! loss of liquid cloud content due to riming on snow[kg/kg/s] 314 315 ! autoconversion 303 316 REAL :: qthresh_auto_rain, tau_auto_rain, expo_auto_rain 304 317 REAL :: qthresh_auto_snow, tau_auto_snow, expo_auto_snow 305 REAL :: dqlcol ! loss of liquid cloud content due to collection by rain [kg/kg/s] 306 REAL :: dqiagg ! loss of ice cloud content due to collection by aggregation [kg/kg/s] 307 REAL :: dqlauto ! loss of liquid cloud content due to autoconversion to rain [kg/kg/s] 308 REAL :: dqiauto ! loss of ice cloud content due to autoconversion to snow [kg/kg/s] 309 REAL :: dqlrim ! loss of liquid cloud content due to riming on snow[kg/kg/s] 318 REAL :: dqlauto ! loss of liquid cloud content due to autoconversion to rain [kg/kg/s] 319 REAL :: dqiauto ! loss of ice cloud content due to autoconversion to snow [kg/kg/s] 320 321 ! melting 322 REAL :: dqsmelt_max 323 REAL :: fallice_clr, fallice_cld 324 REAL :: nb_snowflake_clr, nb_snowflake_cld 325 REAL :: capa_snowflake, temp_wetbulb 326 REAL :: dqsclrmelt, dqscldmelt, dqstotmelt 327 REAL, DIMENSION(klon) :: qzero, qsat, dqsat 328 329 ! freezing 330 REAL :: dqrfreez_max 331 REAL :: tau_freez 332 REAL :: dqrclrfreez, dqrcldfreez, dqrtotfreez 310 333 311 334 312 335 !--Initialisation of variables 313 336 314 dqrcol(:) = 0. 315 dqsagg(:) = 0. 316 dqsauto(:) = 0. 317 dqrauto(:) = 0. 318 dqsrim(:) = 0. 319 dqrmelt(:) = 0. 320 dqsmelt(:) = 0. 337 qzero(:) = 0. 338 339 dqrcol(:) = 0. 340 dqsagg(:) = 0. 341 dqsauto(:) = 0. 342 dqrauto(:) = 0. 343 dqsrim(:) = 0. 344 dqrmelt(:) = 0. 345 dqsmelt(:) = 0. 321 346 dqrfreez(:) = 0. 322 347 dqsfreez(:) = 0. … … 325 350 DO i = 1, klon 326 351 327 328 352 ! variables initialisation 329 dqlrim = 0.0 330 dqlcol = 0.0 331 dqiagg = 0.0 332 dqiauto = 0.0 333 dqlauto = 0.0 353 dqlrim = 0. 354 dqlcol = 0. 355 dqiagg = 0. 356 dqiauto = 0. 357 dqlauto = 0. 358 359 !--hum_to_flux: coef to convert a specific quantity to a flux 360 !-- hum_to_flux = rho * dz/dt = 1 / g * dP/dt 361 hum_to_flux(i) = ( paprsdn(i) - paprsup(i) ) / RG / dtime 362 qtot(i) = qvap(i) + qliq(i) + qice(i) & 363 + ( raincld(i) + rainclr(i) + snowcld(i) + snowclr(i) ) / hum_to_flux(i) 334 364 335 365 !------------------------------------------------------------ … … 344 374 345 375 !--Initialisation 346 !--hum_to_flux: coef to convert a specific quantity to a flux347 !-- hum_to_flux = rho * dz/dt = 1 / g * dP/dt348 hum_to_flux = ( paprsdn(i) - paprsup(i) ) / RG / dtime349 376 precipfractot = precipfracclr(i) + precipfraccld(i) 350 377 … … 446 473 !--get in-cloud mean quantities. The two divisions by eff_cldfra are 447 474 !--then simplified. 448 475 Eff_rain_liq = 1. 449 476 coef_col = gamma_col * 3. / 4. / rho_rain / r_rain * Eff_rain_liq 450 477 IF ((raincld(i) .GT. 0.) .AND. (coef_col .GT. 0.)) THEN 451 !--Explicit version 452 !dqlcol = - coef_col * qliq(i) * raincld(i) / precipfraccld(i) *dtime 453 !--Semi-implicit version 454 !dqlcol = qliq(i) * ( 1. / ( 1. + coef_col * raincld(i) / precipfraccld(i)*dtime ) - 1. ) 455 !--Implicit version 456 !qrain = raincld(i) / hum_to_flux 457 !coef_tmp = coef_col * dtime *( qrain / precipfraccld(i) + qliq(i) / eff_cldfra ) 458 !dqlcol = qliq(i) * ( 1. / ( 1. + 0.5 * ( coef_tmp - 1. + SQRT( & 459 ! ( 1. - coef_tmp )**2. + 4. * coef_col * dtime *qrain / precipfraccld(i) ) & 460 ! ) ) - 1. ) 461 !dqlcol=max(dqlcol,-qliq(i)) 462 ! Exact version 463 dqlcol=qliq(i)*(exp(-dtime * coef_col * raincld(i) / precipfraccld(i))-1.) 478 !--Explicit version 479 !dqlcol = - coef_col * qliq(i) * raincld(i) / precipfraccld(i) *dtime 480 !--Semi-implicit version 481 !dqlcol = qliq(i) * ( 1. / ( 1. + coef_col * raincld(i) / precipfraccld(i)*dtime ) - 1. ) 482 !--Implicit version 483 !qrain = raincld(i) / hum_to_flux(i) 484 !coef_tmp = coef_col * dtime * ( qrain / precipfraccld(i) + qliq(i) / eff_cldfra ) 485 !dqlcol = qliq(i) * ( 1. / ( 1. + 0.5 * ( coef_tmp - 1. + SQRT( & 486 ! ( 1. - coef_tmp )**2. + 4. * coef_col * dtime * qrain / precipfraccld(i) ) & 487 ! ) ) - 1. ) 488 !--Barriers so that the processes do not consume more liquid/ice than 489 !--available. 490 !dqlcol = MAX( - qliq(i), dqlcol ) 491 !--Exact version 492 dqlcol = qliq(i) * ( EXP( - dtime * coef_col * raincld(i) / precipfraccld(i) ) - 1. ) 493 494 !--Add tendencies 495 qliq(i) = qliq(i) + dqlcol 496 raincld(i) = raincld(i) - dqlcol * hum_to_flux(i) 497 498 !--Outputs 499 dqrcol(i) = - dqlcol / dtime 464 500 ENDIF 465 501 466 502 !--Same as for aggregation 467 coef_agg=gamma_agg * 3. / 4. / rho_snow / r_snow * Eff_snow_ice 503 !--Following Milbrandt and Yau 2005, it s a product of a collection 504 !--efficiency and a sticking efficiency 505 Eff_snow_ice = 0.05 * EXP( 0.1 * ( temp(i) - RTT ) ) 506 coef_agg = gamma_agg * 3. / 4. / rho_snow / r_snow * Eff_snow_ice 468 507 IF ((snowcld(i) .GT. 0.) .AND. (coef_agg .GT. 0.)) THEN 469 !--Explicit version470 471 472 ! Exact version473 dqiagg=qice(i)*(exp(-dtime * coef_agg * snowcld(i) / precipfraccld(i))-1.)474 ENDIF475 !--Barriers so that the processes do not consume more liquid/ice than476 !--available.477 dqlcol = MAX( - qliq(i), dqlcol ) 478 dqiagg = MAX( - qice(i), dqiagg )479 480 !--Add tendencies481 qliq(i) = qliq(i) + dqlcol 482 qice(i) = qice(i) + dqiagg483 raincld(i) = raincld(i) - dqlcol * hum_to_flux484 snowcld(i) = snowcld(i) - dqiagg * hum_to_flux508 !--Explicit version 509 !dqiagg = - coef_agg & 510 ! * qice(i) * snowcld(i) / precipfraccld(i) * dtime 511 !--Barriers so that the processes do not consume more liquid/ice than 512 !--available. 513 !dqiagg = MAX( - qice(i), dqiagg ) 514 !--Exact version 515 dqiagg = qice(i) * ( EXP( - dtime * coef_agg * snowcld(i) / precipfraccld(i) ) - 1. ) 516 517 !--Add tendencies 518 qice(i) = qice(i) + dqiagg 519 snowcld(i) = snowcld(i) - dqiagg * hum_to_flux(i) 520 521 !--Outputs 522 dqsagg(i) = - dqiagg / dtime 523 ENDIF 485 524 486 525 … … 532 571 qice(i) = qice(i) + dqiauto 533 572 534 raincld(i) = raincld(i) - dqlauto * hum_to_flux 535 snowcld(i) = snowcld(i) - dqiauto * hum_to_flux 573 raincld(i) = raincld(i) - dqlauto * hum_to_flux(i) 574 snowcld(i) = snowcld(i) - dqiauto * hum_to_flux(i) 575 576 !--Outputs 577 dqsauto(i) = - dqiauto / dtime 578 dqrauto(i) = - dqlauto / dtime 536 579 537 580 … … 543 586 !--------------------------------------------------------- 544 587 545 dqlrim=0.0 546 547 ! remplacer la premiere ligne par "coef_rim" ? 548 IF (snowcld(i) .GT. 0.) THEN 549 dqlrim = - gamma_rim * 3. / 4. / rho_snow / r_snow * Eff_snow_liq & 550 * qliq(i) * snowcld(i) / precipfraccld(i) * dtime 551 ENDIF 552 dqlrim = MAX( - qliq(i), dqlrim ) 553 554 qliq(i) = qliq(i) + dqlrim 555 556 snowcld(i) = snowcld(i) - dqlrim * hum_to_flux 557 588 !--Following Seifert and Beheng 2006, assuming a cloud droplet diameter 589 !--of 20 microns. 590 Eff_snow_liq = 0.2 591 coef_rim = gamma_rim * 3. / 4. / rho_snow / r_snow * Eff_snow_liq 592 IF ((snowcld(i) .GT. 0.) .AND. (coef_rim .GT. 0.)) THEN 593 !--Explicit version 594 !dqlrim = - gamma_rim * 3. / 4. / rho_snow / r_snow * Eff_snow_liq & 595 ! * qliq(i) * snowcld(i) / precipfraccld(i) * dtime 596 !--Barriers so that the processes do not consume more liquid than 597 !--available. 598 !dqlrim = MAX( - qliq(i), dqlrim ) 599 !--Exact version 600 dqlrim = qliq(i) * ( EXP( - dtime * coef_col * snowcld(i) / precipfraccld(i) ) - 1. ) 601 602 qliq(i) = qliq(i) + dqlrim 603 snowcld(i) = snowcld(i) - dqlrim * hum_to_flux(i) 604 605 ! Latent heat of melting with precipitation thermalization 606 temp(i) = temp(i) - dqlrim * RLMLT / RCPD & 607 / ( 1. + RVTMP2 * qtot(i) ) 608 609 !--Outputs 610 dqsrim(i) = - dqlrim / dtime 611 ENDIF 558 612 559 613 ENDIF ! rneb .GE. seuil_neb 560 614 615 ENDDO ! iteration on klon 616 617 618 ! Calculation of saturation specific humidity 619 ! depending on temperature: 620 CALL calc_qsat_ecmwf(klon, temp, qzero, pplay, RTT, 0, .FALSE., qsat, dqsat) 621 622 DO i = 1, klon 623 624 !--------------------------------------------------------- 625 !-- MELTING 626 !--------------------------------------------------------- 627 628 IF ( ( snowclr(i) + snowcld(i) ) .GT. 0. ) THEN 629 dqsmelt_max = MIN(0., ( RTT - temp(i) ) / RLMLT * RCPD & 630 * ( 1. + RVTMP2 * qtot(i) )) 631 632 dqsclrmelt = 0. 633 dqscldmelt = 0. 634 635 capa_snowflake = r_snow 636 ! ATTENTION POUR L'INSTANT C'EST UN WBULB SELON FORMULE ECMWF 637 ! ATTENTION EST-CE QVAP ????? 638 temp_wetbulb = temp(i) - ( qsat(i) - qvap(i) ) & 639 * ( 1329.31 + 0.0074615 * ( pplay(i) - 0.85e5 ) & 640 - 40.637 * ( temp(i) - 275. ) ) 641 642 IF ( snowclr(i) .GT. 0. ) THEN 643 ! ATTENTION ATTENTION ATTENTION 644 fallice_clr = 1. 645 nb_snowflake_clr = snowclr(i) / precipfracclr(i) / fallice_clr & 646 / ( 4. / 3. * RPI * r_snow**3. * rho_snow ) 647 dqsclrmelt = - nb_snowflake_clr * 4. * RPI * air_thermal_conduct & 648 * capa_snowflake / RLMLT * coef_ventil & 649 * MAX(0., temp_wetbulb - RTT) * dtime 650 ENDIF 651 652 IF ( snowcld(i) .GT. 0. ) THEN 653 ! ATTENTION ATTENTION ATTENTION 654 fallice_cld = 1. 655 nb_snowflake_cld = snowcld(i) / precipfraccld(i) / fallice_cld & 656 / ( 4. / 3. * RPI * r_snow**3. * rho_snow ) 657 dqscldmelt = - nb_snowflake_cld * 4. * RPI * air_thermal_conduct & 658 * capa_snowflake / RLMLT * coef_ventil & 659 * MAX(0., temp_wetbulb - RTT) * dtime 660 ENDIF 661 662 ! barrier 663 ! lower than bec. negative values 664 dqstotmelt = dqsclrmelt + dqscldmelt 665 IF ( dqstotmelt .LT. dqsmelt_max ) THEN 666 dqsclrmelt = dqsmelt_max * dqsclrmelt / dqstotmelt 667 dqscldmelt = dqsmelt_max * dqscldmelt / dqstotmelt 668 dqstotmelt = dqsmelt_max 669 ENDIF 670 671 ! update of rainfall and snowfall due to melting 672 rainclr(i) = rainclr(i) - dqsclrmelt * hum_to_flux(i) 673 raincld(i) = raincld(i) - dqscldmelt * hum_to_flux(i) 674 snowclr(i) = snowclr(i) + dqsclrmelt * hum_to_flux(i) 675 snowcld(i) = snowcld(i) + dqscldmelt * hum_to_flux(i) 676 677 ! Latent heat of melting with precipitation thermalization 678 temp(i) = temp(i) + dqstotmelt * RLMLT / RCPD & 679 / ( 1. + RVTMP2 * qtot(i) ) 680 681 dqrmelt(i) = - dqstotmelt / dtime 682 dqsmelt(i) = dqstotmelt / dtime 683 684 ENDIF 561 685 562 686 … … 565 689 !--------------------------------------------------------- 566 690 567 !dqrfree_max = MINOUMAX(0., ( RTT - temp(i) ) / RLMLT * RCPD / ( 1. + RVTMP2 * ( qtot(i) + qprecip(i) ) )) 568 569 !--------------------------------------------------------- 570 !-- MELTING 571 !--------------------------------------------------------- 572 573 !flux = velocity * N_0 * 4. / 3. * PI * r_snow**3. * rho_snow 574 575 !IF ( ( snowclr(i) + snowcld(i) ) .GT. 0. ) THEN 576 ! dqsmelt_max = MIN(0., ( RTT - temp(i) ) / RLMLT * RCPD / ( 1. + RVTMP2 * ( qtot(i) + qprecip(i) ) )) 577 ! dsnowtotmelt_max = dqsmelt_max * hum_to_flux(i) 578 ! 579 ! dsnowtotmelt = - nb_snowflake * 4. * PI * mol_diff_vap * snowflake_capa / RLMLT * coef_ventil & 580 ! * MAX(0., ticebulb - RTT) & 581 ! * ( paprsdn(i) - paprsup(i) ) / RG 582 ! ! max bec. negative values 583 ! dsnowtotmelt = MAX(dsnowtotmelt, dsnowmelt_max) 584 ! dsnowclrmelt = dsnowtotmelt * snowclr(i) / ( snowclr(i) + snowcld(i) ) 585 ! dsnowcldmelt = dsnowtotmelt - dsnowclrmelt 586 587 588 ! ! update of rainfall and snowfall due to melting 589 ! rainclr(i) = rainclr(i) - dsnowclrmelt(i) 590 ! raincld(i) = raincld(i) - dsnowcldmelt(i) 591 ! snowclr(i) = snowclr(i) + dsnowclrmelt(i) 592 ! snowcld(i) = snowcld(i) + dsnowcldmelt(i) 593 !ENDIF 594 ! 595 !! Latent heat of melting with precipitation thermalization 596 !zt(i)=zt(i)-zifl(i)*zmelt*(RG*dtime)/(paprs(i,k)-paprs(i,k+1)) & 597 !*RLMLT/RCPD/(1.0+RVTMP2*(zq(i)+zmqc(i))) 691 IF ( ( rainclr(i) + raincld(i) ) .GT. 0. ) THEN 692 693 dqrfreez_max = MIN(0., ( temp(i) - RTT ) / RLMLT * RCPD & 694 * ( 1. + RVTMP2 * qtot(i) )) 695 696 tau_freez = 1. / ( gamma_freez & 697 * EXP( - alpha_freez * ( temp(i) - temp_nowater ) / ( RTT - temp_nowater ) ) ) 698 dqrtotfreez = raincld(i) / hum_to_flux(i) * ( EXP( - dtime / tau_freez ) - 1. ) 699 700 ! barrier 701 ! max bec. those are negative values 702 dqrtotfreez = MAX(dqrtotfreez, dqrfreez_max) 703 704 ! partition between clear and cloudy air 705 ! proportionnal to the rain fluxes in clear / cloud 706 dqrclrfreez = dqrtotfreez * rainclr(i) / ( rainclr(i) + raincld(i) ) 707 dqrcldfreez = dqrtotfreez - dqrclrfreez 708 709 ! update of rainfall and snowfall due to melting 710 rainclr(i) = rainclr(i) + dqrclrfreez * hum_to_flux(i) 711 raincld(i) = raincld(i) + dqrcldfreez * hum_to_flux(i) 712 snowclr(i) = snowclr(i) - dqrclrfreez * hum_to_flux(i) 713 snowcld(i) = snowcld(i) - dqrcldfreez * hum_to_flux(i) 714 715 ! Latent heat of melting with precipitation thermalization 716 temp(i) = temp(i) - dqrtotfreez * RLMLT / RCPD & 717 / ( 1. + RVTMP2 * qtot(i) ) 718 719 dqrfreez(i) = dqrtotfreez / dtime 720 dqsfreez(i) = - dqrtotfreez / dtime 721 722 ENDIF 598 723 599 724 … … 609 734 ! write output tendencies for rain and snow 610 735 611 dqsrim(i) = -dqlrim/dtime612 dqrcol(i) = -dqlcol/dtime613 dqsagg(i) = -dqiagg/dtime614 dqsauto(i) = -dqiauto/dtime615 dqrauto(i) = -dqlauto/dtime616 617 618 619 736 ENDDO 620 737 -
LMDZ6/trunk/libf/phylmd/lmdz_lscp_tools.F90
r4665 r4818 359 359 ! 'Cirrus regime' 360 360 fcirrus=acirrus-temp(i)/bcirrus 361 IF (fcirrus . LT. qsl(i)/qsi(i)) THEN361 IF (fcirrus .GT. qsl(i)/qsi(i)) THEN 362 362 gammasat(i)=qsl(i)/qsi(i) 363 363 dgammasatdt(i)=(dqsl(i)*qsi(i)-dqsi(i)*qsl(i))/qsi(i)/qsi(i) -
LMDZ6/trunk/libf/phylmd/lmdz_wake.F90
r4816 r4818 2485 2485 2486 2486 ! - 1/ Pressure of the level where dth changes sign. 2487 print*,'WAKE LJYF'2487 !print*,'WAKE LJYF' 2488 2488 2489 2489 DO i = 1, klon -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4806 r4818 1857 1857 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1858 1858 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1859 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_sursat,iflag_ratqs,fl_cor_ebil,RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG)1859 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_sursat,iflag_ratqs,fl_cor_ebil,RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RG,RPI) 1860 1860 CALL blowing_snow_ini(prt_level,lunout, & 1861 1861 RCPD, RLSTT, RLVTT, RLMLT, & -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r4803 r4818 1949 1949 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1950 1950 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1951 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_sursat,iflag_ratqs,fl_cor_ebil,RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG)1951 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_sursat,iflag_ratqs,fl_cor_ebil,RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RG,RPI) 1952 1952 CALL blowing_snow_ini(prt_level,lunout, & 1953 1953 RCPD, RLSTT, RLVTT, RLMLT, &
Note: See TracChangeset
for help on using the changeset viewer.