Changeset 4830 for LMDZ6/trunk/libf/phylmd/lmdz_lscp_poprecip.F90
- Timestamp:
- Feb 22, 2024, 5:29:02 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_lscp_poprecip.F90
r4823 r4830 23 23 24 24 USE lmdz_lscp_ini, ONLY : prt_level, lunout 25 USE lmdz_lscp_ini, ONLY : coef_eva, coef_ eva_i, expo_eva, expo_eva_i, thresh_precip_frac25 USE lmdz_lscp_ini, ONLY : coef_eva, coef_sub, expo_eva, expo_sub, thresh_precip_frac 26 26 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG 27 27 USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf … … 149 149 !--Sublimation of the solid precipitation coming from above 150 150 !--(same formula as for liquid precip) 151 dsnowsub = - precipfracclr(i) * coef_ eva_i* (1. - qvap(i) / qsati(i)) &152 * ( snowclr(i) / MAX(thresh_precip_frac, precipfracclr(i)) ) ** expo_ eva_i&151 dsnowsub = - precipfracclr(i) * coef_sub * (1. - qvap(i) / qsati(i)) & 152 * ( snowclr(i) / MAX(thresh_precip_frac, precipfracclr(i)) ) ** expo_sub & 153 153 * temp(i) * RD / pplay(i) & 154 154 * ( paprsdn(i) - paprsup(i) ) / RG … … 229 229 ! - aggregation (agg) 230 230 ! - riming (rim) 231 ! - collection (col l)231 ! - collection (col) 232 232 ! - melting (melt) 233 ! - freezing (free )233 ! - freezing (freez) 234 234 ! 235 235 SUBROUTINE poprecip_postcld( & … … 238 238 precipfracclr, precipfraccld, & 239 239 rain, rainclr, raincld, snow, snowclr, snowcld, & 240 qrain , qsnow, dqrauto, dqrcol, dqrmelt, dqrfreez, &240 qraindiag, qsnowdiag, dqrauto, dqrcol, dqrmelt, dqrfreez, & 241 241 dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez) 242 242 … … 251 251 tau_auto_snow_min, tau_auto_snow_max, & 252 252 thresh_precip_frac, eps, air_thermal_conduct, & 253 coef_ventil, alpha_freez, gamma_freez, temp_nowater, & 254 iflag_cloudth_vert, iflag_rain_incloud_vol 253 coef_ventil, alpha_freez, beta_freez, temp_nowater, & 254 iflag_cloudth_vert, iflag_rain_incloud_vol, & 255 cld_lc_lsc_snow, cld_lc_con_snow, gamma_freez, & 256 rain_fallspeed_clr, rain_fallspeed_cld, & 257 snow_fallspeed_clr, snow_fallspeed_cld 255 258 256 259 … … 286 289 REAL, INTENT(INOUT), DIMENSION(klon) :: snowcld !--flux of snow gridbox-mean in cloudy air coming from the layer above [kg/s/m2] 287 290 288 REAL, INTENT(OUT), DIMENSION(klon) :: qrain !--specific rain content [kg/kg]289 REAL, INTENT(OUT), DIMENSION(klon) :: qsnow !--specific snow content [kg/kg]291 REAL, INTENT(OUT), DIMENSION(klon) :: qraindiag !--DIAGNOSTIC specific rain content [kg/kg] 292 REAL, INTENT(OUT), DIMENSION(klon) :: qsnowdiag !--DIAGNOSTIC specific snow content [kg/kg] 290 293 REAL, INTENT(OUT), DIMENSION(klon) :: dqrcol !--rain tendendy due to collection by rain of liquid cloud droplets [kg/kg/s] 291 294 REAL, INTENT(OUT), DIMENSION(klon) :: dqsagg !--snow tendency due to collection of lcoud ice by aggregation [kg/kg/s] … … 306 309 REAL, DIMENSION(klon) :: qtot !--includes vap, liq, ice and precip 307 310 308 ! partition of the fluxes311 !--Partition of the fluxes 309 312 REAL :: dcldfra 310 313 REAL :: precipfractot … … 313 316 REAL :: draincld, dsnowcld 314 317 315 ! collection, aggregation and riming318 !--Collection, aggregation and riming 316 319 REAL :: eff_cldfra 317 320 REAL :: coef_col, coef_agg, coef_rim, coef_tmp, qrain_tmp 318 321 REAL :: Eff_rain_liq, Eff_snow_ice, Eff_snow_liq 319 REAL :: dqlcol ! 320 REAL :: dqiagg ! 321 REAL :: dqlrim ! loss of liquid cloud content due to riming on snow[kg/kg/s]322 323 ! autoconversion322 REAL :: dqlcol !--loss of liquid cloud content due to collection by rain [kg/kg/s] 323 REAL :: dqiagg !--loss of ice cloud content due to collection by aggregation [kg/kg/s] 324 REAL :: dqlrim !--loss of liquid cloud content due to riming on snow [kg/kg/s] 325 326 !--Autoconversion 324 327 REAL :: qthresh_auto_rain, tau_auto_rain, expo_auto_rain 325 328 REAL :: qthresh_auto_snow, tau_auto_snow, expo_auto_snow 326 REAL :: dqlauto ! 327 REAL :: dqiauto ! 328 329 ! melting329 REAL :: dqlauto !--loss of liquid cloud content due to autoconversion to rain [kg/kg/s] 330 REAL :: dqiauto !--loss of ice cloud content due to autoconversion to snow [kg/kg/s] 331 332 !--Melting 330 333 REAL :: dqsmelt_max 331 REAL :: fallice_clr, fallice_cld332 334 REAL :: nb_snowflake_clr, nb_snowflake_cld 333 335 REAL :: capa_snowflake, temp_wetbulb … … 335 337 REAL, DIMENSION(klon) :: qzero, qsat, dqsat 336 338 337 ! freezing339 !--Freezing 338 340 REAL :: dqrfreez_max 339 341 REAL :: tau_freez 340 342 REAL :: dqrclrfreez, dqrcldfreez, dqrtotfreez 343 REAL :: coef_freez 344 REAL :: dqifreez !--loss of ice cloud content due to collection of ice from rain [kg/kg/s] 345 REAL :: Eff_rain_ice 341 346 342 347 … … 358 363 DO i = 1, klon 359 364 360 ! variables initialisation 361 dqlrim = 0. 365 !--Variables initialisation 362 366 dqlcol = 0. 363 367 dqiagg = 0. 364 368 dqiauto = 0. 365 369 dqlauto = 0. 370 dqlrim = 0. 371 dqifreez= 0. 366 372 367 373 !--hum_to_flux: coef to convert a specific quantity to a flux … … 401 407 !--Tendency of the clear-sky precipitation fraction. We add a MAX on the 402 408 !--calculation of the current CS precip. frac. 403 dprecipfracclr = MAX( 0., ( precipfractot - cldfra(i) ) ) - precipfracclr(i) 409 !dprecipfracclr = MAX( 0., ( precipfractot - cldfra(i) ) ) - precipfracclr(i) 410 !--We remove it, because precipfractot is guaranteed to be > cldfra (the MAX is activated 411 !--if precipfractot < cldfra) 412 dprecipfracclr = ( precipfractot - cldfra(i) ) - precipfracclr(i) 404 413 !--Tendency of the cloudy precipitation fraction. We add a MAX on the 405 414 !--calculation of the current CS precip. frac. 406 415 !dprecipfraccld = MAX( dcldfra , - precipfraccld(i) ) 407 !--We remove it, because cldfra is guaranteed to be > O(the MAX is activated416 !--We remove it, because cldfra is guaranteed to be > 0 (the MAX is activated 408 417 !--if cldfra < 0) 409 418 dprecipfraccld = dcldfra … … 448 457 449 458 450 ! if vertical heterogeneity is taken into account, we use451 ! 452 ! 453 ! 459 !--If vertical heterogeneity is taken into account, we use 460 !--the "true" volume fraction instead of a modified 461 !--surface fraction (which is larger and artificially 462 !--reduces the in-cloud water). 454 463 IF ( ( iflag_cloudth_vert .GE. 3 ) .AND. ( iflag_rain_incloud_vol .EQ. 1 ) ) THEN 455 464 eff_cldfra = ctot_vol(i) … … 459 468 460 469 461 ! 470 !--Start precipitation growth processes 462 471 463 472 !--If the cloud is big enough, the precipitation processes activate … … 483 492 !--get in-cloud mean quantities. The two divisions by eff_cldfra are 484 493 !--then simplified. 494 495 !--The sticking efficacy is perfect. 485 496 Eff_rain_liq = 1. 486 497 coef_col = gamma_col * 3. / 4. / rho_rain / r_rain * Eff_rain_liq 487 498 IF ((raincld(i) .GT. 0.) .AND. (coef_col .GT. 0.)) THEN 488 499 !-- ATTENTION Double implicit version 500 !-- BEWARE the formule below is FALSE (because raincld is a flux, not a delta flux) 489 501 !qrain_tmp = raincld(i) / hum_to_flux(i) 490 502 !coef_tmp = coef_col * dtime * ( qrain_tmp / precipfraccld(i) + qliq(i) / eff_cldfra ) … … 495 507 !--available. 496 508 !dqlcol = MAX( - qliq(i), dqlcol ) 497 !--Exact version, which does not need a barrier because of509 !--Exact explicit version, which does not need a barrier because of 498 510 !--the exponential decrease 499 511 dqlcol = qliq(i) * ( EXP( - dtime * coef_col * raincld(i) / precipfraccld(i) ) - 1. ) … … 517 529 !--available. 518 530 !dqiagg = MAX( - qice(i), dqiagg ) 519 !--Exact version, which does not need a barrier because of531 !--Exact explicit version, which does not need a barrier because of 520 532 !--the exponential decrease 521 533 dqiagg = qice(i) * ( EXP( - dtime * coef_agg * snowcld(i) / precipfraccld(i) ) - 1. ) … … 536 548 !--rain drops/snowflakes. It relies on the formulations by 537 549 !--Sundqvist 1978. 538 ! TODO what else?539 550 540 551 !--If we are in a convective point, we have different parameters 541 552 !--for the autoconversion 542 553 IF ( ptconv(i) ) THEN 543 ! ATTENTION voir les constantes ici qui ne devraient pas etre identiques544 554 qthresh_auto_rain = cld_lc_con 545 qthresh_auto_snow = cld_lc_con 555 qthresh_auto_snow = cld_lc_con_snow 546 556 547 557 tau_auto_rain = cld_tau_con … … 553 563 expo_auto_snow = cld_expo_con 554 564 ELSE 555 ! ATTENTION voir les constantes ici qui ne devraient pas etre identiques556 565 qthresh_auto_rain = cld_lc_lsc 557 qthresh_auto_snow = cld_lc_lsc 566 qthresh_auto_snow = cld_lc_lsc_snow 558 567 559 568 tau_auto_rain = cld_tau_lsc … … 568 577 569 578 ! Liquid water quantity to remove according to (Sundqvist, 1978) 570 ! dqliq/dt = -qliq/tau * ( 1-exp(-(qcin/clw)**2) ) 571 !......................................................... 572 ! we first treat the second term (with exponential) in an explicit way 573 ! and then treat the first term (-q/tau) in an exact way 579 ! dqliq/dt = -qliq/tau * ( 1-exp(-(qliqincld/qthresh)**2) ) 580 ! 581 !--And same formula for ice 582 ! 583 !--We first treat the second term (with exponential) in an explicit way 584 !--and then treat the first term (-q/tau) in an exact way 574 585 575 586 dqlauto = - qliq(i) * ( 1. - exp( - dtime / tau_auto_rain * ( 1. - exp( & … … 602 613 !--snow (graupel in fact) because of the collision between 603 614 !--those and falling snowflakes. 604 !--The formula come from Muench and Lohmann 2020615 !--The formula comes from Muench and Lohmann 2020 605 616 !--NB.: this process needs a temperature adjustment 606 617 … … 631 642 ENDIF 632 643 633 ! ATTENTION veut on faire un processus similaire et symetrique qui634 ! convertirait la pluie en surfusion qui tombe sur des cristaux de glace635 ! en flux de neige ? (si la temperature est negative)636 637 644 ENDIF ! cldfra .GE. seuil_neb 638 645 … … 658 665 !-- the radius if the snowflake is a sphere [m] 659 666 !--temp_wetbulb: wet-bulb temperature [K] 660 !-- fallice: snow fall velocity (in clear/cloudy sky) [m/s]667 !--snow_fallspeed: snow fall velocity (in clear/cloudy sky) [m/s] 661 668 !--air_thermal_conduct: thermal conductivity of the air [J/m/K/s] 662 669 !--coef_ventil: ventilation coefficient [-] … … 682 689 !--In clear air 683 690 IF ( snowclr(i) .GT. 0. ) THEN 684 ! ATTENTION fallice a definir685 fallice_clr = 1.686 691 !--Calculated according to 687 692 !-- flux = velocity_snowflakes * nb_snowflakes * volume_snowflakes * rho_snow 688 nb_snowflake_clr = snowclr(i) / precipfracclr(i) / fallice_clr &693 nb_snowflake_clr = snowclr(i) / precipfracclr(i) / snow_fallspeed_clr & 689 694 / ( 4. / 3. * RPI * r_snow**3. * rho_snow ) 690 695 dqsclrmelt = - nb_snowflake_clr * 4. * RPI * air_thermal_conduct & 691 696 * capa_snowflake / RLMLT * coef_ventil & 692 697 * MAX(0., temp_wetbulb - RTT) * dtime 698 699 !--Barrier to limit the melting flux to the clr snow flux in the mesh 693 700 dqsclrmelt = MAX( dqsclrmelt , -snowclr(i) / hum_to_flux(i)) 694 ELSE695 dqsclrmelt = 0.696 701 ENDIF 697 702 698 703 !--In cloudy air 699 704 IF ( snowcld(i) .GT. 0. ) THEN 700 ! ATTENTION fallice a definir701 fallice_cld = 1.702 705 !--Calculated according to 703 706 !-- flux = velocity_snowflakes * nb_snowflakes * volume_snowflakes * rho_snow 704 nb_snowflake_cld = snowcld(i) / precipfraccld(i) / fallice_cld &707 nb_snowflake_cld = snowcld(i) / precipfraccld(i) / snow_fallspeed_cld & 705 708 / ( 4. / 3. * RPI * r_snow**3. * rho_snow ) 706 709 dqscldmelt = - nb_snowflake_cld * 4. * RPI * air_thermal_conduct & 707 710 * capa_snowflake / RLMLT * coef_ventil & 708 711 * MAX(0., temp_wetbulb - RTT) * dtime 712 713 !--Barrier to limit the melting flux to the cld snow flux in the mesh 709 714 dqscldmelt = MAX( dqscldmelt , -snowcld(i) / hum_to_flux(i)) 710 ELSE711 dqscldmelt = 0.712 715 ENDIF 713 716 714 !--Barriers 717 !--Barrier on temperature. If the total melting flux leads to a 718 !--positive temperature, it is limited to keep temperature above 0 degC. 715 719 !--It is activated if the total is LOWER than the max 716 720 !--because everything is negative … … 769 773 * ( 1. + RVTMP2 * qtot(i) )) 770 774 771 tau_freez = 1. / ( gamma_freez &775 tau_freez = 1. / ( beta_freez & 772 776 * EXP( - alpha_freez * ( temp(i) - temp_nowater ) / ( RTT - temp_nowater ) ) ) 777 778 !--Initialisation 779 dqrclrfreez = 0. 780 dqrcldfreez = 0. 773 781 774 782 !--In clear air 775 783 IF ( rainclr(i) .GT. 0. ) THEN 776 !--Exact solution of dqrain/dt = -qrain/tau_freez 777 dqrclrfreez = rainclr(i) / hum_to_flux(i) * ( EXP( - dtime / tau_freez ) - 1. ) 778 dqrclrfreez = MAX(dqrclrfreez, -rainclr(i) / hum_to_flux(i)) 779 ELSE 780 dqrclrfreez = 0. 784 !--Exact solution of dqrain/dt = -qrain/tau_freez 785 dqrclrfreez = rainclr(i) / hum_to_flux(i) * ( EXP( - dtime / tau_freez ) - 1. ) 781 786 ENDIF 782 787 783 788 !--In cloudy air 784 789 IF ( raincld(i) .GT. 0. ) THEN 785 !--Exact solution of dqrain/dt = -qrain/tau_freez 786 dqrcldfreez = raincld(i) / hum_to_flux(i) * ( EXP( - dtime / tau_freez ) - 1. ) 787 dqrcldfreez = MAX(dqrcldfreez, -raincld(i) / hum_to_flux(i)) 788 ELSE 789 dqrcldfreez = 0. 790 !--Exact solution of dqrain/dt = -qrain/tau_freez 791 dqrcldfreez = raincld(i) / hum_to_flux(i) * ( EXP( - dtime / tau_freez ) - 1. ) 792 793 !--------------------------------------------------------- 794 !-- FREEZING OF RAIN WITH CONTACT OF ICE CRYSTALS 795 !--------------------------------------------------------- 796 !--Sub-process of freezing which quantifies the collision between 797 !--ice crystals in suspension and falling rain droplets. 798 !--The rain droplets freeze, becoming graupel, and carrying 799 !--the ice crystal (which acted as an ice nucleating particle). 800 !--The formula is adapted from the riming formula. 801 802 !--The sticking efficacy is perfect. 803 Eff_rain_ice = 1. 804 coef_freez = gamma_freez * 3. / 4. / rho_rain / r_rain * Eff_rain_ice 805 !-- ATTENTION Double implicit version? + barriers if needed 806 !--Exact version, which does not need a barrier because of 807 !--the exponential decrease 808 dqifreez = qice(i) * ( EXP( - dtime * coef_freez * raincld(i) / precipfraccld(i) ) - 1. ) 809 810 !--We add the two freezing processes in cloud 811 dqrcldfreez = dqrcldfreez - dqifreez 790 812 ENDIF 791 813 … … 838 860 839 861 !--Diagnostics 840 ! ATTENTION A REPRENDRE 841 qrain(i) = rain(i) / hum_to_flux(i) 842 qsnow(i) = snow(i) / hum_to_flux(i) 862 !--BEWARE this is indeed a diagnostic: this is an estimation from 863 !--the value of the flux at the bottom interface of the mesh and 864 !--and assuming an upstream numerical calculation 865 !--If ok_radocond_snow is TRUE, then the diagnostic qsnowdiag is 866 !--used for computing the total ice water content in the mesh 867 !--for radiation only 868 qraindiag(i) = ( rainclr(i) / ( pplay(i) / RD / temp(i) ) / rain_fallspeed_clr & 869 + raincld(i) / ( pplay(i) / RD / temp(i) ) / rain_fallspeed_cld ) 870 qsnowdiag(i) = ( snowclr(i) / ( pplay(i) / RD / temp(i) ) / snow_fallspeed_clr & 871 + snowcld(i) / ( pplay(i) / RD / temp(i) ) / snow_fallspeed_cld ) 843 872 844 873 ENDDO ! loop on klon
Note: See TracChangeset
for help on using the changeset viewer.