Changeset 4809 for LMDZ6/trunk
- Timestamp:
- Feb 8, 2024, 4:49:33 PM (10 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_lscp_ini.F90
r4803 r4809 158 158 !$OMP THREADPRIVATE(rho_snow) 159 159 160 REAL, SAVE, PROTECTED :: r_rain= 100.E-6 ! A COMMENTER TODO [m]160 REAL, SAVE, PROTECTED :: r_rain=500.E-6 ! A COMMENTER TODO [m] 161 161 !$OMP THREADPRIVATE(r_rain) 162 162 163 REAL, SAVE, PROTECTED :: r_snow=1 00.E-6! A COMMENTER TODO [m]163 REAL, SAVE, PROTECTED :: r_snow=1.E-3 ! A COMMENTER TODO [m] 164 164 !$OMP THREADPRIVATE(r_snow) 165 165 -
LMDZ6/trunk/libf/phylmd/lmdz_lscp_poprecip.F90
r4803 r4809 48 48 REAL, INTENT(INOUT), DIMENSION(klon) :: precipfraccld !--fraction of precipitation in the cloudy air IN THE LAYER ABOVE [-] 49 49 50 REAL, INTENT(INOUT), DIMENSION(klon) :: rain !--flux of rain coming from the layer above [kg/s/m2]51 REAL, INTENT(INOUT), DIMENSION(klon) :: rainclr !--flux of rain in clear sky coming from the layer above [kg/s/m2]52 REAL, INTENT(IN), DIMENSION(klon) :: raincld !--flux of rain in cloudy air coming from the layer above [kg/s/m2]53 REAL, INTENT(INOUT), DIMENSION(klon) :: snow !--flux of snow coming from the layer above [kg/s/m2]54 REAL, INTENT(INOUT), DIMENSION(klon) :: snowclr !--flux of snow in clear sky coming from the layer above [kg/s/m2]55 REAL, INTENT(IN), DIMENSION(klon) :: snowcld !--flux of snow in cloudy air coming from the layer above [kg/s/m2]50 REAL, INTENT(INOUT), DIMENSION(klon) :: rain !--flux of rain gridbox-mean coming from the layer above [kg/s/m2] 51 REAL, INTENT(INOUT), DIMENSION(klon) :: rainclr !--flux of rain gridbox-mean in clear sky coming from the layer above [kg/s/m2] 52 REAL, INTENT(IN), DIMENSION(klon) :: raincld !--flux of rain gridbox-mean in cloudy air coming from the layer above [kg/s/m2] 53 REAL, INTENT(INOUT), DIMENSION(klon) :: snow !--flux of snow gridbox-mean coming from the layer above [kg/s/m2] 54 REAL, INTENT(INOUT), DIMENSION(klon) :: snowclr !--flux of snow gridbox-mean in clear sky coming from the layer above [kg/s/m2] 55 REAL, INTENT(IN), DIMENSION(klon) :: snowcld !--flux of snow gridbox-mean in cloudy air coming from the layer above [kg/s/m2] 56 56 57 57 REAL, INTENT(OUT), DIMENSION(klon) :: dqreva !--rain tendency due to evaporation [kg/kg/s] … … 110 110 ! layer's air so that precipitation at the ground has the 111 111 ! same temperature as the lowermost layer 112 ! we convert the flux into a specific quantity qprecip 112 113 qprecip(i) = (rain(i)+snow(i))*dtime/((paprsdn(i)-paprsup(i))/RG) 113 114 ! t(i,k+1)+d_t(i,k+1): new temperature of the overlying layer … … 269 270 !--in the current layer 270 271 271 REAL, INTENT(INOUT), DIMENSION(klon) :: rain !--flux of rain coming from the layer above [kg/s/m2]272 REAL, INTENT(INOUT), DIMENSION(klon) :: rainclr !--flux of rain in clear sky coming from the layer above [kg/s/m2]273 REAL, INTENT(INOUT), DIMENSION(klon) :: raincld !--flux of rain in cloudy air coming from the layer above [kg/s/m2]274 REAL, INTENT(INOUT), DIMENSION(klon) :: snow !--flux of snow coming from the layer above [kg/s/m2]275 REAL, INTENT(INOUT), DIMENSION(klon) :: snowclr !--flux of snow in clear sky coming from the layer above [kg/s/m2]276 REAL, INTENT(INOUT), DIMENSION(klon) :: snowcld !--flux of snow in cloudy air coming from the layer above [kg/s/m2]272 REAL, INTENT(INOUT), DIMENSION(klon) :: rain !--flux of rain gridbox-mean coming from the layer above [kg/s/m2] 273 REAL, INTENT(INOUT), DIMENSION(klon) :: rainclr !--flux of rain gridbox-mean in clear sky coming from the layer above [kg/s/m2] 274 REAL, INTENT(INOUT), DIMENSION(klon) :: raincld !--flux of rain gridbox-mean in cloudy air coming from the layer above [kg/s/m2] 275 REAL, INTENT(INOUT), DIMENSION(klon) :: snow !--flux of snow gridbox-mean coming from the layer above [kg/s/m2] 276 REAL, INTENT(INOUT), DIMENSION(klon) :: snowclr !--flux of snow gridbox-mean in clear sky coming from the layer above [kg/s/m2] 277 REAL, INTENT(INOUT), DIMENSION(klon) :: snowcld !--flux of snow gridbox-mean in cloudy air coming from the layer above [kg/s/m2] 277 278 278 279 REAL, INTENT(OUT), DIMENSION(klon) :: dqrcol !-- rain tendendy due to collection by rain of liquid cloud droplets [kg/kg/s] … … 299 300 REAL :: draincld, dsnowcld 300 301 REAL :: eff_cldfra 302 REAL :: coef_col, coef_agg, coef_tmp, qrain 301 303 REAL :: qthresh_auto_rain, tau_auto_rain, expo_auto_rain 302 304 REAL :: qthresh_auto_snow, tau_auto_snow, expo_auto_snow … … 309 311 310 312 !--Initialisation of variables 311 312 313 dqlrim=0.0314 dqlcol=0.0315 dqiagg=0.0316 dqiauto=0.0317 dqlauto=0.0318 319 313 320 314 dqrcol(:) = 0. … … 329 323 330 324 331 332 !Partitionning between precipitation coming from clouds and that coming from CS333 334 !0) Calculate tot_zneb, total cloud fraction above the cloud335 !assuming a maximum-random overlap (voir Jakob and Klein, 2000)336 337 325 DO i = 1, klon 338 326 327 328 ! variables initialisation 329 dqlrim = 0.0 330 dqlcol = 0.0 331 dqiagg = 0.0 332 dqiauto = 0.0 333 dqlauto = 0.0 334 335 !------------------------------------------------------------ 336 !-- PRECIPITATION FRACTIONS UPDATE 337 !------------------------------------------------------------ 338 !--The goal of this routine is to reattribute precipitation fractions 339 !--and fluxes to clear or cloudy air, depending on the variation of 340 !--the cloud fraction on the vertical dimension. We assume a 341 !--maximum-random overlap of the cloud cover (see Jakob and Klein, 2000, 342 !--and LTP thesis, 2021) 343 !--NB. in fact, we assume a maximum-random overlap of the total precip. frac 344 339 345 !--Initialisation 340 drainclr = 0.341 dsnowclr = 0.346 !--hum_to_flux: coef to convert a specific quantity to a flux 347 !-- hum_to_flux = rho * dz/dt = 1 / g * dP/dt 342 348 hum_to_flux = ( paprsdn(i) - paprsup(i) ) / RG / dtime 343 349 precipfractot = precipfracclr(i) + precipfraccld(i) 344 350 345 ! formule maximum random 351 !--Instead of using the cloud cover which was use in LTP thesis, we use the 352 !--total precip. fraction to compute the maximum-random overlap. This is 353 !--because all the information of the cloud cover is embedded into 354 !--precipfractot, and this allows for taking into account the potential 355 !--reduction of the precipitation fraction because either the flux is too 356 !--small (see barrier at the end of poprecip_postcld) or the flux is completely 357 !--evaporated (see barrier at the end of poprecip_precld) 358 !--NB. precipfraccld(i) is here the cloud fraction of the layer above 346 359 precipfractot = 1. - ( 1. - precipfractot ) * & 347 360 ( 1. - MAX( cldfra(i), precipfraccld(i) ) ) & … … 349 362 350 363 351 ! precipfraccld est égal a rneb au niveau d'au dessus364 !--precipfraccld(i) is here the cloud fraction of the layer above 352 365 dcldfra = cldfra(i) - precipfraccld(i) 353 ! add max to guaranttee precip fraction >=0 354 dprecipfracclr = MAX(0., ( precipfractot - cldfra(i) ) ) - precipfracclr(i) 355 dprecipfraccld = MAX( dcldfra , -precipfraccld(i) ) 356 357 366 !--Tendency of the clear-sky precipitation fraction. We add a MAX on the 367 !--calculation of the current CS precip. frac. 368 dprecipfracclr = MAX( 0., ( precipfractot - cldfra(i) ) ) - precipfracclr(i) 369 !--Tendency of the cloudy precipitation fraction. We add a MAX on the 370 !--calculation of the current CS precip. frac. 371 !dprecipfraccld = MAX( dcldfra , - precipfraccld(i) ) 372 !--We remove it, because cldfra is guaranteed to be > O (the MAX is activated 373 !--if cldfra < 0) 374 dprecipfraccld = dcldfra 375 376 377 !--If the cloud extends 358 378 IF ( dprecipfraccld .GT. 0. ) THEN 359 IF ( precipfracclr(i) .GT. 0. ) THEN 379 !--If there is no CS precip, nothing happens. 380 !--If there is, we reattribute some of the CS precip flux 381 !--to the cloud precip flux, proportionnally to the 382 !--decrease of the CS precip fraction 383 IF ( precipfracclr(i) .LE. 0. ) THEN 384 drainclr = 0. 385 dsnowclr = 0. 386 ELSE 360 387 drainclr = dprecipfracclr / precipfracclr(i) * rainclr(i) 361 388 dsnowclr = dprecipfracclr / precipfracclr(i) * snowclr(i) 362 389 ENDIF 390 !--If the cloud narrows 391 ELSEIF ( dprecipfraccld .LT. 0. ) THEN 392 !--We reattribute some of the cloudy precip flux 393 !--to the CS precip flux, proportionnally to the 394 !--decrease of the cloud precip fraction 395 draincld = dprecipfraccld / precipfraccld(i) * raincld(i) 396 dsnowcld = dprecipfraccld / precipfraccld(i) * snowcld(i) 397 drainclr = - draincld 398 dsnowclr = - dsnowcld 399 !--If the cloud stays the same or if there is no cloud above and 400 !--in the current layer, nothing happens 363 401 ELSE 364 IF ( precipfraccld(i) .GT. 0. ) THEN 365 draincld = dprecipfraccld / precipfraccld(i) * raincld(i) 366 dsnowcld = dprecipfraccld / precipfraccld(i) * snowcld(i) 367 drainclr = - draincld 368 dsnowclr = - dsnowcld 369 ENDIF 402 drainclr = 0. 403 dsnowclr = 0. 370 404 ENDIF 371 405 372 406 !--We add the tendencies 373 407 precipfraccld(i) = precipfraccld(i) + dprecipfraccld 374 408 precipfracclr(i) = precipfracclr(i) + dprecipfracclr … … 378 412 snowcld(i) = snowcld(i) - dsnowclr 379 413 380 414 415 ! if vertical heterogeneity is taken into account, we use 416 ! the "true" volume fraction instead of a modified 417 ! surface fraction (which is larger and artificially 418 ! reduces the in-cloud water). 381 419 IF ( ( iflag_cloudth_vert .GE. 3 ) .AND. ( iflag_rain_incloud_vol .EQ. 1 ) ) THEN 382 420 eff_cldfra = ctot_vol(i) … … 385 423 ENDIF 386 424 425 426 ! Start precipitation growth processes 427 428 !--If the cloud is big enough, the precipitation processes activate 387 429 IF ( cldfra(i) .GE. seuil_neb ) THEN 388 430 389 ! if vertical heterogeneity is taken into account, we use390 ! the "true" volume fraction instead of a modified391 ! surface fraction (which is larger and artificially392 ! reduces the in-cloud water).393 394 ! agg et col avant autoconv car on ne veut pas agg et col la nouvelle precip395 431 !--------------------------------------------------------- 396 432 !-- COLLECTION AND AGGREGATION 397 433 !--------------------------------------------------------- 398 399 ! remplacer la premiere ligne par "coef_col" ? 400 dqlcol = - gamma_col * 3. / 4. / rho_rain / r_rain * Eff_rain_liq & 401 * qliq(i) / eff_cldfra * raincld(i) * dtime 402 403 ! remplacer la premiere ligne par "coef_agg" ? 404 dqiagg = - gamma_agg * 3. / 4. / rho_snow / r_snow * Eff_snow_ice & 405 * qice(i) / eff_cldfra * snowcld(i) * dtime 406 434 !--Collection: processus through which rain collects small liquid droplets 435 !--in suspension, and add it to the rain flux 436 !--Aggregation: same for snow (precip flux) and ice crystals (in suspension) 437 !--Those processes are treated before autoconversion because we do not 438 !--want to collect/aggregate the newly formed fluxes, which already 439 !--"saw" the cloud as they come from it 440 !--gamma_col: tuning coefficient [-] 441 !--rho_rain: volumic mass of rain [kg/m3] 442 !--r_rain: size of the rain droplets [m] 443 !--Eff_rain_liq: efficiency of the collection process [-] (between 0 and 1) 444 !--dqlcol is a gridbox-mean quantity, as is qliq and raincld. They are 445 !--divided by respectively eff_cldfra, eff_cldfra and precipfraccld to 446 !--get in-cloud mean quantities. The two divisions by eff_cldfra are 447 !--then simplified. 448 449 coef_col = gamma_col * 3. / 4. / rho_rain / r_rain * Eff_rain_liq 450 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.) 464 ENDIF 465 466 !--Same as for aggregation 467 coef_agg=gamma_agg * 3. / 4. / rho_snow / r_snow * Eff_snow_ice 468 IF ((snowcld(i) .GT. 0.) .AND. (coef_agg .GT. 0.)) THEN 469 !--Explicit version 470 !dqiagg = - coef_agg & 471 ! * qice(i) * snowcld(i) / precipfraccld(i) * dtime 472 ! Exact version 473 dqiagg=qice(i)*(exp(-dtime * coef_agg * snowcld(i) / precipfraccld(i))-1.) 474 ENDIF 475 !--Barriers so that the processes do not consume more liquid/ice than 476 !--available. 477 dqlcol = MAX( - qliq(i), dqlcol ) 407 478 dqiagg = MAX( - qice(i), dqiagg ) 408 dqlcol = MAX( - qliq(i), dqlcol ) 409 479 480 !--Add tendencies 410 481 qliq(i) = qliq(i) + dqlcol 411 482 qice(i) = qice(i) + dqiagg 412 413 483 raincld(i) = raincld(i) - dqlcol * hum_to_flux 414 484 snowcld(i) = snowcld(i) - dqiagg * hum_to_flux … … 443 513 444 514 445 ! Liquid water quantity to remove : zchau(Sundqvist, 1978)515 ! Liquid water quantity to remove according to (Sundqvist, 1978) 446 516 ! dqliq/dt=-qliq/tau*(1-exp(-qcin/clw)**2) 447 517 !......................................................... … … 473 543 !--------------------------------------------------------- 474 544 545 dqlrim=0.0 546 475 547 ! remplacer la premiere ligne par "coef_rim" ? 476 dqlrim = - gamma_rim * 3. / 4. / rho_snow / r_snow * Eff_snow_liq & 477 * qliq(i) / eff_cldfra * snowcld(i) * dtime 478 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 479 552 dqlrim = MAX( - qliq(i), dqlrim ) 480 553
Note: See TracChangeset
for help on using the changeset viewer.