Ignore:
Timestamp:
Jan 30, 2019, 5:55:48 PM (5 years ago)
Author:
lguez
Message:

Introduce variable activate_ocean_skin in module config_ocean_skin_m.

Bug fix in phys_state_var_end: we need to deallocate variables for
lmdz1d (although it is useless for a 3D run).

File:
1 edited

Legend:

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

    r3432 r3458  
    3333    USE limit_read_mod
    3434    use sens_heat_rain_m, only: sens_heat_rain
     35    use config_ocean_skin_m, only: activate_ocean_skin
    3536    !
    3637    ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force,
     
    103104    REAL, intent(out):: t_int(:) ! (knon) interface temperature, in K
    104105    real, intent(out):: s_int(:) ! (knon) interface salinity, in ppt
    105    
     106
    106107    REAL, intent(out):: dter(:) ! (knon)
    107108    ! Temperature variation in the diffusive microlayer, that is
     
    311312    ENDIF
    312313
    313     rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon)))
    314     xlv = rlvtt
    315     precip_tot = precip_rain(:knon) + precip_snow(:knon)
    316     rf =  sens_heat_rain(precip_tot, temp_air(:knon), spechum(:knon), rhoa, &
    317          xlv, tsurf_new(:knon), ps(:knon))
    318     s1 = 35.
    319     call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
    320          u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = s1, &
    321          rain = precip_tot, hf = - fluxsens(:knon), hlb = - fluxlat(:knon), &
    322          rnl = - lwnet(:knon), &
    323          tau = sqrt(flux_u1(:knon)**2 + flux_v1(:knon)**2), rhoa = rhoa, &
    324          xlv = xlv, rf = rf, dtime = dtime, rns = swnet(:knon))
     314    if (activate_ocean_skin >= 1) then
     315       rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon)))
     316       xlv = rlvtt
     317       precip_tot = precip_rain(:knon) + precip_snow(:knon)
     318       rf =  sens_heat_rain(precip_tot, temp_air(:knon), spechum(:knon), rhoa, &
     319            xlv, tsurf_new(:knon), ps(:knon))
     320       s1 = 35.
     321       call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
     322            u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = s1, &
     323            rain = precip_tot, hf = - fluxsens(:knon), hlb = - fluxlat(:knon), &
     324            rnl = - lwnet(:knon), &
     325            tau = sqrt(flux_u1(:knon)**2 + flux_v1(:knon)**2), rhoa = rhoa, &
     326            xlv = xlv, rf = rf, dtime = dtime, rns = swnet(:knon))
     327    end if
     328   
     329    if (activate_ocean_skin == 2) tsurf_new(:knon) = t_int
    325330
    326331  END SUBROUTINE surf_ocean
    327   !******************************************************************************
     332  !****************************************************************************
    328333  !
    329334END MODULE surf_ocean_mod
Note: See TracChangeset for help on using the changeset viewer.