Changeset 0ecc1fe in flexpart.git for src/outgrid_init.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.f90

    r6ecb30a r0ecc1fe  
    210210  allocate(gridunc(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec, &
    211211       maxpointspec_act,nclassunc,maxageclass),stat=stat)
    212     if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc'
     212  if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc'
    213213  if (ldirect.gt.0) then
    214214    allocate(wetgridunc(0:numxgrid-1,0:numygrid-1,maxspec, &
    215        maxpointspec_act,nclassunc,maxageclass),stat=stat)
     215         maxpointspec_act,nclassunc,maxageclass),stat=stat)
    216216    if (stat.ne.0) write(*,*)'ERROR: could not allocate wetgridunc'
    217   allocate(drygridunc(0:numxgrid-1,0:numygrid-1,maxspec, &
    218        maxpointspec_act,nclassunc,maxageclass),stat=stat)
     217    allocate(drygridunc(0:numxgrid-1,0:numygrid-1,maxspec, &
     218         maxpointspec_act,nclassunc,maxageclass),stat=stat)
    219219    if (stat.ne.0) write(*,*)'ERROR: could not allocate drygridunc'
    220220  endif
    221221
     222#ifdef USE_MPIINPLACE
     223#else
    222224! Extra field for totals at MPI root process
    223225  if (lroot.and.mpi_mode.gt.0) then
    224 
    225 #ifdef USE_MPIINPLACE
    226 #else
    227     ! If MPI_IN_PLACE option is not used in mpi_mod.f90::mpif_tm_reduce_grid(),
    228     ! then an aux array is needed for parallel grid reduction
     226! If MPI_IN_PLACE option is not used in mpi_mod.f90::mpif_tm_reduce_grid(),
     227! then an aux array is needed for parallel grid reduction
    229228    allocate(gridunc0(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec, &
    230229         maxpointspec_act,nclassunc,maxageclass),stat=stat)
    231230    if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc0'
     231  else if (.not.lroot.and.mpi_mode.gt.0) then
     232    allocate(gridunc0(1,1,1,1,1,1,1),stat=stat)
     233    if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc0'
     234  end if
    232235#endif
    233     if (ldirect.gt.0) then
    234       allocate(wetgridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
    235            maxpointspec_act,nclassunc,maxageclass),stat=stat)
    236       if (stat.ne.0) write(*,*)'ERROR: could not allocate wetgridunc0'
    237       allocate(drygridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
    238            maxpointspec_act,nclassunc,maxageclass),stat=stat)
    239       if (stat.ne.0) write(*,*)'ERROR: could not allocate drygridunc0'
    240     endif
     236!  if (ldirect.gt.0) then
     237  if (lroot.and.mpi_mode.gt.0) then
     238    allocate(wetgridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
     239         maxpointspec_act,nclassunc,maxageclass),stat=stat)
     240    if (stat.ne.0) write(*,*)'ERROR: could not allocate wetgridunc0'
     241    allocate(drygridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
     242         maxpointspec_act,nclassunc,maxageclass),stat=stat)
     243    if (stat.ne.0) write(*,*)'ERROR: could not allocate drygridunc0'
     244 
    241245! allocate a dummy to avoid compilator complaints
    242246  else if (.not.lroot.and.mpi_mode.gt.0) then
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG