Changeset 3687


Ignore:
Timestamp:
May 27, 2020, 4:52:16 PM (4 years ago)
Author:
lguez
Message:

Modify sensible heat due to rain sent to the ocean

Modify the sensible heat flux due to rain which is sent to the
ocean. Replace the computation of sens_prec_liq in procedure
calcul_fluxs by a call to sens_heat_rain. Set sens_prec_sol in
procedure calcul_fluxs to 0 because, for now, sens_heat_rain is
supposed to account for both rain and snow.

For the call to sens_heat_rain in procedure calcul_fluxs, we need
an additional dummy argument rhoa of calcul_fluxs. Add dummy
argument rhoa to ocean_cpl_noice, ocean_forced_noice,
ocean_forced_ice and ocean_cpl_ice because we need to pass it down
to calcul_fluxs.

Change the dimension of sens_prec_liq and sens_prec_sol in
procedures calcul_fluxs, ocean_cpl_noice, ocean_cpl_ice,
ocean_forced_noice, ocean_forced_ice, cpl_send_ocean_fields and
cpl_send_seaice_fields to knon.

In procedures ocean_forced_noice and ocean_cpl_noice, promote
sens_prec_liq from local variable to dummy argument because we need
it in surf_ocean. Remove useless initialization of sens_prec_liq
and sens_prec_sol in ocean_cpl_noice, ocean_cpl_ice,
ocean_forced_ice and ocean_forced_noice: they are intent out in
calcul_fluxs.

Remove variable rf of module phys_output_var_mod, we use
sens_prec_liq instead. Remove local variable yrf of procedure
pbl_surface. rf and yrf appeared in pbl_surface only to be output.
Remove variable o_rf of module phys_output_ctrlout_mod. Remove
dummy argument rf of procedure surf_ocean.

Do not call sens_heat_rain in surf_ocean since we now call it
from calcul_fluxs. Move the computation of rhoa in surf_ocean
before the calls to ocean_cpl_noice and ocean_forced_noice.

Add the computation of rhoa in surf_seaice, to pass it down to
ocean_cpl_ice and ocean_forced_ice.

If activate_ocean_skin == 1 then the results are changed because the
call to sens_heat_rain in calcul_fluxs now uses the SST from the
current time step of physics. On this point, the present revision
reverses revision [3463].

Location:
LMDZ6/branches/Ocean_skin/libf/phylmd
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin/libf/phylmd/calcul_fluxs_mod.F90

    r3319 r3687  
    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.
     
    267269!                          precip_snow(i)
    268270! 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)
     271       if (PRESENT(sens_prec_liq)) sens_prec_liq(i) &
     272            = - sens_heat_rain(precip_rain(i) + precip_snow(i), t1lay(i), &
     273            q1lay(i), rhoa(i), rlvtt, tsurf_new(i), ps(i))
     274       if (PRESENT(sens_prec_sol)) sens_prec_sol(i) = 0.
    275275       if (PRESENT(lat_prec_liq))                    &
    276276         lat_prec_liq(i) =  precip_rain(i) * (RLVTT - RLVTT)
     
    280280
    281281   
    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 !****************************************************************************************
     282!**************************************************************************
    291283!
    292284  END SUBROUTINE calcul_fluxs
  • LMDZ6/branches/Ocean_skin/libf/phylmd/cpl_mod.F90

    r3628 r3687  
    669669    REAL, DIMENSION(klon), INTENT(IN)       :: evap, tsurf, fder, albsol
    670670    REAL, DIMENSION(klon), INTENT(IN)       :: taux, tauy, windsp
    671     REAL, DIMENSION(klon), INTENT(IN)       :: sens_prec_liq, sens_prec_sol
     671    REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon)
    672672    REAL, DIMENSION(klon), INTENT(IN)       :: lat_prec_liq, lat_prec_sol
    673673    real, intent(in):: t_int(:) ! (klon) ocean-air interface temperature, in K
     
    905905    REAL, DIMENSION(klon), INTENT(IN)       :: albsol, taux, tauy
    906906    REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf
    907     REAL, DIMENSION(klon), INTENT(IN)       :: sens_prec_liq, sens_prec_sol
     907    REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon)
    908908    REAL, DIMENSION(klon), INTENT(IN)       :: lat_prec_liq, lat_prec_sol
    909909    LOGICAL, INTENT(IN)                     :: lafin
  • LMDZ6/branches/Ocean_skin/libf/phylmd/ocean_cpl_mod.F90

    r3628 r3687  
    5555       radsol, snow, agesno, &
    5656       qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    57        tsurf_new, dflux_s, dflux_l, sss, s_int)
     57       tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa)
    5858
    5959!
     
    9393    REAL, DIMENSION(klon), INTENT(IN)        :: tsurf_in
    9494    real, intent(in):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
     95    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
    9596
    9697! In/Output arguments
     
    107108    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
    108109    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l     
     110    REAL, intent(out):: sens_prec_liq(:) ! (knon)
    109111
    110112    REAL, INTENT(OUT):: sss(:) ! (klon)
     
    122124    REAL, DIMENSION(klon) :: u1_lay, v1_lay
    123125    LOGICAL               :: check=.FALSE.
    124     REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol   
     126    REAL sens_prec_sol(knon) 
    125127    REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol   
    126128
     
    145147    dif_grnd = 0.
    146148    agesno(:) = 0.
    147     sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0.
     149    lat_prec_liq = 0.; lat_prec_sol = 0.
    148150   
    149151
     
    160162         f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
    161163         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
    162          sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     164         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
    163165
    164166    if (activate_ocean_skin == 2) then
     
    226228       radsol, snow, qsurf, &
    227229       alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    228        tsurf_new, dflux_s, dflux_l)
     230       tsurf_new, dflux_s, dflux_l, rhoa)
    229231!
    230232! This subroutine treats the ocean where there is ice. The subroutine first receives
     
    261263    REAL, DIMENSION(klon), INTENT(IN)        :: u1, v1, gustiness
    262264    REAL, DIMENSION(klon,nbsrf), INTENT(IN)  :: pctsrf
     265    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
    263266
    264267! In/output arguments
     
    288291    REAL, DIMENSION(klon)   :: u0, v0
    289292    REAL, DIMENSION(klon)   :: u1_lay, v1_lay
    290     REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol    
     293    REAL sens_prec_liq(knon), sens_prec_sol(knon)   
    291294    REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol   
    292295
     
    296299    IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon
    297300
    298     sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0.
     301    lat_prec_liq = 0.; lat_prec_sol = 0.
    299302
    300303!****************************************************************************************
     
    329332         f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
    330333         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
    331          sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     334         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
    332335    do j = 1, knon
    333336      i = knindex(j)
  • LMDZ6/branches/Ocean_skin/libf/phylmd/ocean_forced_mod.F90

    r3463 r3687  
    2222       radsol, snow, agesno, &
    2323       qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    24        tsurf_new, dflux_s, dflux_l)
     24       tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa)
    2525!
    2626! This subroutine treats the "open ocean", all grid points that are not entierly covered
     
    5555    REAL, DIMENSION(klon), INTENT(IN)        :: u1, v1, gustiness
    5656    REAL, DIMENSION(klon), INTENT(IN)        :: tsurf_in
     57    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
    5758
    5859! In/Output arguments
     
    6970    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
    7071    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l
     72    REAL, intent(out):: sens_prec_liq(:) ! (knon)
    7173
    7274! Local variables
     
    7880    REAL, DIMENSION(klon)       :: u1_lay, v1_lay
    7981    LOGICAL                     :: check=.FALSE.
    80     REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol   
     82    REAL sens_prec_sol(knon)
    8183    REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol   
    8284
     
    111113    alb_neig(:) = 0.
    112114    agesno(:) = 0.
    113     sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0.
     115    lat_prec_liq = 0.; lat_prec_sol = 0.
    114116
    115117! Suppose zero surface speed
     
    127129         f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
    128130         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
    129          sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     131         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
    130132    if (activate_ocean_skin == 2) tsurf_new = tsurf_lim
    131133
     
    158160       radsol, snow, qsol, agesno, tsoil, &
    159161       qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    160        tsurf_new, dflux_s, dflux_l)
     162       tsurf_new, dflux_s, dflux_l, rhoa)
    161163!
    162164! This subroutine treats the ocean where there is ice.
     
    191193    REAL, DIMENSION(klon), INTENT(IN)    :: ps
    192194    REAL, DIMENSION(klon), INTENT(IN)    :: u1, v1, gustiness
     195    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
    193196
    194197! In/Output arguments
     
    220223    REAL, DIMENSION(klon)       :: u0, v0
    221224    REAL, DIMENSION(klon)       :: u1_lay, v1_lay
    222     REAL, DIMENSION(klon)       :: sens_prec_liq, sens_prec_sol    
     225    REAL sens_prec_liq(knon), sens_prec_sol (knon)   
    223226    REAL, DIMENSION(klon)       :: lat_prec_liq, lat_prec_sol   
    224227
     
    254257
    255258    beta = 1.0
    256     sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0.
     259    lat_prec_liq = 0.; lat_prec_sol = 0.
    257260
    258261! Suppose zero surface speed
     
    267270         f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
    268271         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
    269          sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     272         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
    270273    do j = 1, knon
    271274      i = knindex(j)
  • LMDZ6/branches/Ocean_skin/libf/phylmd/pbl_surface_mod.F90

    r3628 r3687  
    293293    USE ioipsl_getin_p_mod, ONLY : getin_p
    294294    use phys_state_var_mod, only: s_int, ds_ns, dt_ns
    295     use phys_output_var_mod, only: t_int, dter, dser, tkt, tks, rf, taur
     295    use phys_output_var_mod, only: t_int, dter, dser, tkt, tks, taur
    296296#ifdef CPP_XIOS
    297297    USE wxios, ONLY: missing_val
     
    831831
    832832    real, DIMENSION(klon):: yt_int, ys_int, yds_ns, ydt_ns, ydter, ydser, &
    833          ytkt, ytks, yrf, ytaur
    834     ! compression of t_int, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, rf,
     833         ytkt, ytks, ytaur
     834    ! compression of t_int, s_int, ds_ns, dt_ns, dter, dser, tkt, tks,
    835835    ! taur on ocean points
    836836
     
    19561956               y_flux_u1, y_flux_v1, yt_int(:knon), ys_int(:knon), &
    19571957               yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), &
    1958                ytkt(:knon), ytks(:knon), yrf(:knon), ytaur(:knon))
     1958               ytkt(:knon), ytks(:knon), ytaur(:knon))
    19591959      IF (prt_level >=10) THEN
    19601960          print *,'arg de surf_ocean: ycdragh ',ycdragh
     
    25692569          tkt = missing_val
    25702570          tks = missing_val
    2571           rf = missing_val
    25722571          taur = missing_val
    25732572         
     
    25802579          tkt(ni(:knon)) = ytkt(:knon)
    25812580          tks(ni(:knon)) = ytks(:knon)
    2582           rf(ni(:knon)) = yrf(:knon)
    25832581          taur(ni(:knon)) = ytaur(:knon)
    25842582       end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_ctrlout_mod.F90

    r3626 r3687  
    19791979        "thickness of salinity microlayer", "m", '')
    19801980
    1981    type(ctrl_out), save:: o_rf &
    1982         = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'rf', &
    1983         "sensible heat flux at the surface due to rainfall, positive upward", &
    1984         "W m-2", '')
    1985 
    19861981   type(ctrl_out), save:: o_taur &
    19871982        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'taur', &
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_var_mod.F90

    r3628 r3687  
    152152  ! épaisseur (m) de la couche de diffusion de masse (microlayer)
    153153 
    154   REAL, SAVE, ALLOCATABLE:: rf(:)
    155   ! sensible heat flux at the surface due to rainfall, in  W m-2
    156   ! positive upward
    157  
    158154  REAL, SAVE, ALLOCATABLE:: taur(:)
    159155  ! momentum flux due to rain, in Pa
    160156 
    161   !$OMP THREADPRIVATE(t_int, dter, dser, tkt, tks, rf, taur)
     157  !$OMP THREADPRIVATE(t_int, dter, dser, tkt, tks, taur)
    162158
    163159CONTAINS
     
    221217
    222218    if (activate_ocean_skin >= 1) allocate(t_int(klon), dter(klon), &
    223          dser(klon), tkt(klon), tks(klon), rf(klon), taur(klon))
     219         dser(klon), tkt(klon), tks(klon), taur(klon))
    224220
    225221  END SUBROUTINE phys_output_var_init
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90

    r3672 r3687  
    203203         o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb, &
    204204         o_t_int, o_s_int, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, o_tks, &
    205          o_rf, o_taur
     205         o_taur
    206206
    207207#ifdef CPP_StratAer
     
    360360         alt_tropo, &
    361361!Ionela
    362          ok_4xCO2atm, t_int, dter, dser, tkt, tks, rf, taur
     362         ok_4xCO2atm, t_int, dter, dser, tkt, tks, taur
    363363
    364364    USE ocean_slab_mod, ONLY: nslay, tslab, slab_bilg, tice, seaice, &
     
    23152315          CALL histwrite_phy(o_tkt, tkt)
    23162316          CALL histwrite_phy(o_tks, tks)
    2317           CALL histwrite_phy(o_rf, rf)
    23182317          CALL histwrite_phy(o_taur, taur)
    23192318       end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/surf_ocean_mod.F90

    r3628 r3687  
    2020       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &
    2121       tsurf_new, dflux_s, dflux_l, lmt_bils, &
    22        flux_u1, flux_v1, t_int, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, rf, &
    23        taur)
     22       flux_u1, flux_v1, t_int, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, taur)
    2423
    2524    use albedo, only: alboc, alboc_cd
     
    3231    USE indice_sol_mod, ONLY : nbsrf, is_oce
    3332    USE limit_read_mod
    34     use sens_heat_rain_m, only: sens_heat_rain
    3533    use config_ocean_skin_m, only: activate_ocean_skin
    3634    !
     
    122120    ! épaisseur (m) de la couche de diffusion de masse (microlayer)
    123121
    124     REAL, intent(out):: rf(:) ! (knon)
    125     ! sensible heat flux at the surface due to rainfall, in  W m-2
    126     ! positive upward
    127 
    128122    REAL, intent(out):: taur(:) ! (knon)
    129123    ! momentum flux due to rain, in Pa
     
    139133    CHARACTER(len=20),PARAMETER :: modname="surf_ocean"
    140134    real rhoa(knon) ! density of moist air  (kg / m3)
    141     real xlv(knon) ! chaleur latente d'évaporation (J / kg)
    142     real precip_tot(knon) ! rain + snow
     135    REAL sens_prec_liq(knon)
    143136
    144137    real sss(klon)
     
    175168    ENDIF
    176169
    177 
     170    rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon)))
    178171    !******************************************************************************
    179172    ! Switch according to type of ocean (couple, slab or forced)
     
    191184            radsol, snow, agesno, &
    192185            qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    193             tsurf_new, dflux_s, dflux_l, sss, s_int)
     186            tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa)
    194187
    195188    CASE('slab')
     
    214207            radsol, snow, agesno, &
    215208            qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    216             tsurf_new, dflux_s, dflux_l)
     209            tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa)
    217210    END SELECT
    218211
     
    319312
    320313    if (activate_ocean_skin >= 1) then
    321        rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon)))
    322        xlv = rlvtt
    323        precip_tot = precip_rain(:knon) + precip_snow(:knon)
    324        rf =  sens_heat_rain(precip_tot, temp_air(:knon), spechum(:knon), rhoa, &
    325             xlv, tsurf_in(:knon), ps(:knon))
    326314       if (type_ocean /= 'couple') sss(:knon) = 35.
    327315       call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
    328316            u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = sss(:knon), &
    329             rain = precip_tot, hf = - fluxsens(:knon), hlb = - fluxlat(:knon), &
     317            rain = precip_rain(:knon) + precip_snow(:knon), &
     318            hf = - fluxsens(:knon), hlb = - fluxlat(:knon), &
    330319            rnl = - lwnet(:knon), &
    331320            tau = sqrt(flux_u1(:knon)**2 + flux_v1(:knon)**2), rhoa = rhoa, &
    332             xlv = xlv, rf = rf, dtime = dtime, rns = swnet(:knon))
     321            xlv = [(rlvtt, i = 1, knon)], rf = - sens_prec_liq, dtime = dtime, &
     322            rns = swnet(:knon))
    333323       if (activate_ocean_skin == 2) tsurf_new(:knon) = t_int
    334324    end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/surf_seaice_mod.F90

    r3102 r3687  
    3737    INCLUDE "dimsoil.h"
    3838    INCLUDE "clesphys.h"
     39
     40    INCLUDE "YOMCST.h"
     41    ! for rd and retv
    3942
    4043! Input arguments
     
    8790    REAL, DIMENSION(klon) :: alb1_new,alb2_new
    8891!albedo SB <<<
    89 !
     92
     93    real rhoa(knon) ! density of moist air  (kg / m3)
     94
    9095! End definitions
    9196!****************************************************************************************
     
    98103    radsol(:) = 0.0
    99104    radsol(1:knon) = swnet(1:knon) + lwnet(1:knon)
     105
     106    rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon)))
    100107
    101108!****************************************************************************************
     
    116123            radsol, snow, qsurf, &
    117124            alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    118             tsurf_new, dflux_s, dflux_l)
     125            tsurf_new, dflux_s, dflux_l, rhoa)
    119126       
    120127    ELSE IF (type_ocean == 'slab'.AND.version_ocean=='sicINT') THEN
     
    138145            radsol, snow, qsol, agesno, tsoil, &
    139146            qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    140             tsurf_new, dflux_s, dflux_l)
     147            tsurf_new, dflux_s, dflux_l, rhoa)
    141148
    142149    END IF
Note: See TracChangeset for help on using the changeset viewer.