Changeset 20963b1 in flexpart.git for src/FLEXPART_MPI.f90


Ignore:
Timestamp:
Apr 13, 2018, 2:33:40 PM (6 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
3d7eebf, 93786a1
Parents:
3f149cc
Message:

Backwards deposition for the MPI version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/FLEXPART_MPI.f90

    ra9cf4b1 r20963b1  
    6767  integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN
    6868  integer :: detectformat
    69 
     69  integer(selected_int_kind(16)), dimension(maxspec) :: tot_b=0, &
     70       & tot_i=0
    7071
    7172
     
    206207
    207208  if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
    208     print *,'ECMWF metdata detected'
     209    if (lroot) print *,'ECMWF metdata detected'
    209210  elseif (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then
    210     print *,'NCEP metdata detected'
     211    if (lroot) print *,'NCEP metdata detected'
    211212  else
    212     print *,'Unknown metdata format'
     213    if (lroot) print *,'Unknown metdata format'
    213214    stop
    214215  endif
     
    483484
    484485! NIK 16.02.2005
    485   if (lroot) then
    486     call MPI_Reduce(MPI_IN_PLACE, tot_blc_count, nspec, MPI_INTEGER8, MPI_SUM, id_root, &
     486  if (mp_partgroup_pid.ge.0) then ! Skip for readwind process
     487    call MPI_Reduce(tot_blc_count, tot_b, nspec, MPI_INTEGER8, MPI_SUM, id_root, &
    487488         & mp_comm_used, mp_ierr)
    488     call MPI_Reduce(MPI_IN_PLACE, tot_inc_count, nspec, MPI_INTEGER8, MPI_SUM, id_root, &
     489    call MPI_Reduce(tot_inc_count, tot_i, nspec, MPI_INTEGER8, MPI_SUM, id_root, &
    489490         & mp_comm_used, mp_ierr)
    490   else
    491     if (mp_partgroup_pid.ge.0) then ! Skip for readwind process
    492       call MPI_Reduce(tot_blc_count, 0, nspec, MPI_INTEGER8, MPI_SUM, id_root, &
    493            & mp_comm_used, mp_ierr)
    494       call MPI_Reduce(tot_inc_count, 0, nspec, MPI_INTEGER8, MPI_SUM, id_root, &
    495            & mp_comm_used, mp_ierr)
    496     end if
    497491  end if
     492 
    498493
    499494  if (lroot) then
     
    502497      write(*,*) 'Scavenging statistics for species ', species(i), ':'
    503498      write(*,*) 'Total number of occurences of below-cloud scavenging', &
    504            & tot_blc_count(i)
     499           & tot_b(i)
     500!           & tot_blc_count(i)
    505501      write(*,*) 'Total number of occurences of in-cloud    scavenging', &
    506            & tot_inc_count(i)
     502           & tot_i(i)
     503!           & tot_inc_count(i)
    507504      write(*,*) '**********************************************'
    508505    end do
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG