delta_wind_direction Subroutine

public subroutine delta_wind_direction(i_cross, j_cross, tt, temp_FF_subgrid, angle_diff)

Uses

  • proc~~delta_wind_direction~~UsesGraph proc~delta_wind_direction delta_wind_direction module~uemep_definitions uEMEP_definitions proc~delta_wind_direction->module~uemep_definitions

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i_cross
integer, intent(in) :: j_cross
integer, intent(in) :: tt
real, intent(in) :: temp_FF_subgrid
real, intent(out) :: angle_diff

Called by

proc~~delta_wind_direction~~CalledByGraph proc~delta_wind_direction delta_wind_direction proc~uemep_subgrid_deposition uEMEP_subgrid_deposition proc~uemep_subgrid_deposition->proc~delta_wind_direction proc~uemep_subgrid_dispersion uEMEP_subgrid_dispersion proc~uemep_subgrid_dispersion->proc~delta_wind_direction proc~uemep_subgrid_dispersion_integral uEMEP_subgrid_dispersion_integral proc~uemep_subgrid_dispersion->proc~uemep_subgrid_dispersion_integral proc~uemep_subgrid_dispersion_integral->proc~delta_wind_direction program~uemep uEMEP program~uemep->proc~uemep_subgrid_deposition program~uemep->proc~uemep_subgrid_dispersion

Source Code

    subroutine delta_wind_direction (i_cross,j_cross,tt,temp_FF_subgrid,angle_diff)

        use uEMEP_definitions

        implicit none

        integer, intent(in) :: i_cross,j_cross,tt
        real, intent(in) :: temp_FF_subgrid
        real, intent(out) :: angle_diff
        real :: meandering_degree_max=20.
        real cos_subgrid_loc,sin_subgrid_loc

        if (use_last_meteo_in_dispersion) then

            cos_subgrid_loc=meteo_subgrid(i_cross,j_cross,tt,cos_subgrid_index)
            sin_subgrid_loc=meteo_subgrid(i_cross,j_cross,tt,sin_subgrid_index)
            angle_diff=abs(asin(meteo_subgrid(i_cross,j_cross,tt,sin_subgrid_index)*last_meteo_subgrid(i_cross,j_cross,cos_subgrid_index) &
                -meteo_subgrid(i_cross,j_cross,tt,cos_subgrid_index)*last_meteo_subgrid(i_cross,j_cross,sin_subgrid_index) ))/2.

            angle_diff=min(angle_diff,3.14159/4.) !Less than 45 degrees
            !write(*,*) i_cross,j_cross,angle_diff(i_cross,j_cross)*180/3.14159

        else

            angle_diff=0.

        endif

        if (use_meandering_in_dispersion) then
            angle_diff=angle_diff+(meandering_degree_max*3.14159/180.)*exp(-(temp_FF_subgrid-FF_min_dispersion)/(FF_min_dispersion*2.))
        endif

    end subroutine delta_wind_direction