Changeset 0ecc1fe in flexpart.git for src/outgrid_init_nest.f90


Ignore:
Timestamp:
Nov 30, 2017, 4:04:54 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:
d2a5a83
Parents:
c2bd55e
Message:

Changed handling of nested input fields to be consistent with non-nested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/outgrid_init_nest.f90

    r8a65cb0 r0ecc1fe  
    6969  endif
    7070
     71#ifdef USE_MPIINPLACE
     72#else
    7173! Extra field for totals at MPI root process
    7274  if (lroot.and.mpi_mode.gt.0) then
    73     ! allocate(griduncn0(0:numxgridn-1,0:numygridn-1,numzgrid,maxspec, &
    74     !      maxpointspec_act,nclassunc,maxageclass),stat=stat)
    75     ! if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
    76 
    77     if (ldirect.gt.0) then
    78       allocate(wetgriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
    79            maxpointspec_act,nclassunc,maxageclass),stat=stat)
    80       if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
    81       allocate(drygriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
    82            maxpointspec_act,nclassunc,maxageclass),stat=stat)
    83       if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
    84     endif
     75! If MPI_IN_PLACE option is not used in mpi_mod.f90::mpif_tm_reduce_grid_nest(),
     76! then an aux array is needed for parallel grid reduction
     77    allocate(griduncn0(0:numxgridn-1,0:numygridn-1,numzgrid,maxspec, &
     78         maxpointspec_act,nclassunc,maxageclass),stat=stat)
     79    if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
     80! allocate a dummy to avoid compilator complaints
     81  else if (.not.lroot.and.mpi_mode.gt.0) then
     82    allocate(griduncn0(1,1,1,1,1,1,1),stat=stat)
     83  end if
     84#endif
     85!    if (ldirect.gt.0) then
     86  if (lroot.and.mpi_mode.gt.0) then
     87    allocate(wetgriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
     88         maxpointspec_act,nclassunc,maxageclass),stat=stat)
     89    if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
     90    allocate(drygriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
     91         maxpointspec_act,nclassunc,maxageclass),stat=stat)
     92    if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
     93!  endif
    8594! allocate a dummy to avoid compilator complaints
    8695  else if (.not.lroot.and.mpi_mode.gt.0) then
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG