u_profile_neutral_val_func Subroutine

public subroutine u_profile_neutral_val_func(z, u_val, z_val_in, z_pbl, z0, u, u_star0)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: z
real, intent(in) :: u_val
real, intent(in) :: z_val_in
real, intent(in) :: z_pbl
real, intent(in) :: z0
real, intent(out) :: u
real, intent(out) :: u_star0

Called by

proc~~u_profile_neutral_val_func~~CalledByGraph proc~u_profile_neutral_val_func u_profile_neutral_val_func proc~uemep_create_wind_field uEMEP_create_wind_field proc~uemep_create_wind_field->proc~u_profile_neutral_val_func proc~uemep_set_dispersion_sigma_kz uEMEP_set_dispersion_sigma_Kz proc~uemep_set_dispersion_sigma_kz->proc~u_profile_neutral_val_func proc~uemep_subgrid_deposition uEMEP_subgrid_deposition proc~uemep_subgrid_deposition->proc~u_profile_neutral_val_func proc~uemep_subgrid_deposition->proc~uemep_create_wind_field proc~uemep_subgrid_deposition->proc~uemep_set_dispersion_sigma_kz proc~uemep_subgrid_dispersion uEMEP_subgrid_dispersion proc~uemep_subgrid_dispersion->proc~u_profile_neutral_val_func proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_sigma_kz proc~uemep_subgrid_dispersion_integral uEMEP_subgrid_dispersion_integral proc~uemep_subgrid_dispersion->proc~uemep_subgrid_dispersion_integral proc~uemep_subgrid_dispersion_integral->proc~u_profile_neutral_val_func proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_sigma_kz program~uemep uEMEP program~uemep->proc~uemep_subgrid_deposition program~uemep->proc~uemep_subgrid_dispersion

Source Code

    subroutine u_profile_neutral_val_func(z,u_val,z_val_in,z_pbl,z0,u,u_star0)

        implicit none

        real, intent(in) :: z,u_val,z_val_in,z_pbl,z0
        real, intent(out) :: u,u_star0
        real kappa
        parameter (kappa=0.4)
        real z_l,z_val

        !If the input height is above the boundary layer then set the height to pbl height and calculate
        z_val=min(z_val_in,z_pbl)

        z_l=0.4*z_pbl

        u_star0=u_val*kappa/(log(z_val/z0)+kappa*z_val/z_l*(1-z_val/2./z_pbl)-z_val/z_pbl)
        u=u_star0/kappa*(log(z/z0)+kappa*z/z_l*(1-z/2./z_pbl)-z/z_pbl)

    end subroutine u_profile_neutral_val_func