uEMEP_disperse_local_source Subroutine

public subroutine uEMEP_disperse_local_source(source_index)

Uses

  • proc~~uemep_disperse_local_source~~UsesGraph proc~uemep_disperse_local_source uEMEP_disperse_local_source module~uemep_definitions uEMEP_definitions proc~uemep_disperse_local_source->module~uemep_definitions

Arguments

Type IntentOptional Attributes Name
integer :: source_index

Called by

proc~~uemep_disperse_local_source~~CalledByGraph proc~uemep_disperse_local_source uEMEP_disperse_local_source program~uemep uEMEP program~uemep->proc~uemep_disperse_local_source

Source Code

    subroutine uEMEP_disperse_local_source(source_index)

        use uEMEP_definitions

        implicit none

        integer source_index

        !allocate (sum_integral(subgrid_dim(1),subgrid_dim(2))) !Can just be a scalar
        !allocate (scaling_factor_traffic_subgrid(subgrid_dim(1),subgrid_dim(2))) !Can just be a scalar
        !allocate (traffic_redistributed_local_subgrid(subgrid_dim(1),subgrid_dim(2))) !Can just be a scalar

        if (local_subgrid_method_flag.ne.2.and.local_subgrid_method_flag.ne.3.and.local_subgrid_method_flag.ne.4) return

        write(unit_logfile,'(A)') ''
        write(unit_logfile,'(A)') '================================================================'
        write(unit_logfile,'(A)') 'Redistribute local source using dispersion (uEMEP_disperse_local_source)'
        write(unit_logfile,'(A)') '================================================================'


        !do subsource_index=1,n_subsource(source_index)

        !Calculate redistributed subgrid source concentrations
        subgrid(:,:,:,scaling_factor_subgrid_index,source_index,:)=1.
        subgrid(:,:,:,local_subgrid_index,source_index,:)=subgrid(:,:,:,scaling_factor_subgrid_index,source_index,:)*subgrid(:,:,:,proxy_subgrid_index,source_index,:)
        if (trace_emissions_from_in_region) then
            subgrid_local_from_in_region(:,:,:,source_index,:)=subgrid(:,:,:,scaling_factor_subgrid_index,source_index,:)*subgrid_proxy_from_in_region(:,:,:,source_index,:)
        end if

        !enddo !Subsource loop

    end subroutine uEMEP_disperse_local_source