uEMEP_calculate_deposition Subroutine

public subroutine uEMEP_calculate_deposition()

Uses

  • proc~~uemep_calculate_deposition~~UsesGraph proc~uemep_calculate_deposition uEMEP_calculate_deposition module~uemep_definitions uEMEP_definitions proc~uemep_calculate_deposition->module~uemep_definitions

Arguments

None

Called by

proc~~uemep_calculate_deposition~~CalledByGraph proc~uemep_calculate_deposition uEMEP_calculate_deposition program~uemep uEMEP program~uemep->proc~uemep_calculate_deposition

Source Code

    subroutine uEMEP_calculate_deposition

        use uEMEP_definitions

        implicit none

        integer source_index
        integer i,j
        !real sum_temp(subgrid_dim(x_dim_index),subgrid_dim(y_dim_index),subgrid_dim(t_dim_index))

        write(unit_logfile,'(A)')'Combining local deposition sources'

        !Calculate redistributed subgrid allsource deposition
        !
        subgrid(:,:,:,drydepo_local_subgrid_index,allsource_index,:)=0.
        !subgrid(:,:,:,drydepo_nonlocal_subgrid_index,allsource_index,:)=0.
        subgrid(:,:,:,wetdepo_local_subgrid_index,allsource_index,:)=0.
        !subgrid(:,:,:,wetdepo_nonlocal_subgrid_index,allsource_index,:)=0.
        do source_index=1,n_source_index
            if (calculate_source(source_index)) then
                do j=1,subgrid_dim(y_dim_index)
                    do i=1,subgrid_dim(x_dim_index)

                        !i_cross_deposition=crossreference_target_to_deposition_subgrid(i,j,x_dim_index)
                        !j_cross_deposition=crossreference_target_to_deposition_subgrid(i,j,y_dim_index)
                        !subgrid(i,j,:,drydepo_nonlocal_subgrid_index,source_index,:)=subgrid(i,j,:,emep_nonlocal_subgrid_index,source_index,:) &
                        !     *deposition_subgrid(i_cross_deposition,j_cross_deposition,:,vd_index,:)

                        !subgrid(i,j,:,drydepo_nonlocal_subgrid_index,allsource_index,:)=subgrid(i,j,:,drydepo_nonlocal_subgrid_index,allsource_index,:)+subgrid(i,j,:,drydepo_nonlocal_subgrid_index,source_index,:)
                        subgrid(i,j,:,drydepo_local_subgrid_index,allsource_index,:)=subgrid(i,j,:,drydepo_local_subgrid_index,allsource_index,:)+subgrid(i,j,:,drydepo_local_subgrid_index,source_index,:)
                        !write(*,*) subgrid(i,j,:,emep_nonlocal_subgrid_index,source_index,1),deposition_subgrid(i_cross_deposition,j_cross_deposition,:,vd_index,1)
                        !subgrid(i,j,:,wetdepo_nonlocal_subgrid_index,allsource_index,:)=subgrid(i,j,:,wetdepo_nonlocal_subgrid_index,allsource_index,:)+subgrid(i,j,:,wetdepo_nonlocal_subgrid_index,source_index,:)
                        subgrid(i,j,:,wetdepo_local_subgrid_index,allsource_index,:)=subgrid(i,j,:,wetdepo_local_subgrid_index,allsource_index,:)+subgrid(i,j,:,wetdepo_local_subgrid_index,source_index,:)


                    enddo
                enddo
            endif
        enddo

        !Convert the nonlocal depositions from mg/m2/hr to ug/m2/sec for compatability with local calculations
        subgrid(:,:,:,drydepo_nonlocal_subgrid_index,allsource_index,:)=subgrid(:,:,:,drydepo_nonlocal_subgrid_index,allsource_index,:)*1000./3600.
        subgrid(:,:,:,wetdepo_nonlocal_subgrid_index,allsource_index,:)=subgrid(:,:,:,wetdepo_nonlocal_subgrid_index,allsource_index,:)*1000./3600.



    end subroutine uEMEP_calculate_deposition