Ignore:
Timestamp:
Feb 22, 2021, 12:44:07 PM (4 years ago)
Author:
dcugnet
Message:

Update the branch to the current trunk.

Location:
LMDZ6/branches/LMDZ-tracers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ-tracers

  • LMDZ6/branches/LMDZ-tracers/libf/phylmd/calcul_fluxs_mod.F90

    r3319 r3851  
    1313       fqsat, petAcoef, peqAcoef, petBcoef, peqBcoef, &
    1414       tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
    15        sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     15       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
    1616 
    1717   
    1818    USE dimphy, ONLY : klon
    1919    USE indice_sol_mod
     20    use sens_heat_rain_m, only: sens_heat_rain
    2021
    2122    INCLUDE "clesphys.h"
     
    7172    REAL, DIMENSION(klon), INTENT(IN)    :: ps, q1lay
    7273    REAL, DIMENSION(klon), INTENT(IN)    :: tsurf, p1lay, cal, beta, cdragh,cdragq
    73     REAL, DIMENSION(klon), INTENT(IN)    :: precip_rain, precip_snow ! pas utiles
     74    REAL, DIMENSION(klon), INTENT(IN)    :: precip_rain, precip_snow
    7475    REAL, DIMENSION(klon), INTENT(IN)    :: radsol, dif_grnd
    7576    REAL, DIMENSION(klon), INTENT(IN)    :: t1lay, u1lay, v1lay,gustiness
    7677    REAL,                  INTENT(IN)    :: fqsat ! correction factor on qsat (generally 0.98 over salty water, 1 everywhere else)
    7778
     79    real, intent(in), optional:: rhoa(:) ! (knon)
     80    ! density of moist air  (kg / m3)
     81
    7882! Parametres entree-sorties
    7983!****************************************************************************************
     
    8589    REAL, DIMENSION(klon), INTENT(OUT)   :: tsurf_new, evap, fluxsens, fluxlat
    8690    REAL, DIMENSION(klon), INTENT(OUT)   :: dflux_s, dflux_l
    87     REAL, DIMENSION(klon), OPTIONAL      :: sens_prec_liq, sens_prec_sol
     91    REAL, intent(out), OPTIONAL:: sens_prec_liq(:), sens_prec_sol(:) ! (knon)
    8892    REAL, DIMENSION(klon), OPTIONAL      :: lat_prec_liq, lat_prec_sol
    8993
     
    140144    dflux_s = 0.
    141145    dflux_l = 0.
    142     if (PRESENT(sens_prec_liq)) sens_prec_liq = 0.
    143     if (PRESENT(sens_prec_sol)) sens_prec_sol = 0.
    144146    if (PRESENT(lat_prec_liq)) lat_prec_liq = 0.
    145147    if (PRESENT(lat_prec_sol)) lat_prec_sol = 0.
     
    259261!
    260262! calcul de l'enthalpie des precipitations liquides et solides
    261 !
    262 !       if (PRESENT(enth_prec_liq))                   &
    263 !       enth_prec_liq(i) = rcw * (t1lay(i) - tsurf(i)) * &
    264 !                          precip_rain(i)
    265 !       if (PRESENT(enth_prec_sol))                  &
    266 !       enth_prec_sol(i) = rcs * (t1lay(i) - tsurf(i)) * &
    267 !                          precip_snow(i)
    268 ! On calcule par rapport a T=0
    269        if (PRESENT(sens_prec_liq))                   &
    270          sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * &
    271                           precip_rain(i)
    272        if (PRESENT(sens_prec_sol))                   &
    273          sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * &
    274                           precip_snow(i)
     263       if (PRESENT(sens_prec_liq)) sens_prec_liq(i) &
     264            = - sens_heat_rain(precip_rain(i) + precip_snow(i), t1lay(i), &
     265            q1lay(i), rhoa(i), rlvtt, tsurf_new(i), ps(i))
     266       if (PRESENT(sens_prec_sol)) sens_prec_sol(i) = 0.
     267       ! On calcule par rapport a T=0
     268       !! sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * precip_rain(i)
     269       !! sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * precip_snow(i)
     270
    275271       if (PRESENT(lat_prec_liq))                    &
    276272         lat_prec_liq(i) =  precip_rain(i) * (RLVTT - RLVTT)
     
    280276
    281277   
    282 !       if (PRESENT(sens_prec_liq))                  &
    283 !          WRITE(*,*)' calculs_fluxs sens_prec_liq (min, max)', &
    284 !          MINVAL(sens_prec_liq(1:knon)), MAXVAL(sens_prec_liq(1:knon))
    285 !       if (PRESENT(sens_prec_sol))                  &
    286 !          WRITE(*,*)' calculs_fluxs sens_prec_sol (min, max)', &
    287 !          MINVAL(sens_prec_sol(1:knon)), MAXVAL(sens_prec_sol(1:knon))
    288  
    289 !
    290 !****************************************************************************************
     278!**************************************************************************
    291279!
    292280  END SUBROUTINE calcul_fluxs
Note: See TracChangeset for help on using the changeset viewer.