Commit d2a5a833 authored by Espen Sollum's avatar Espen Sollum
Browse files

Fixed an issue with allocation in previous commit

parent 0ecc1fed
......@@ -233,19 +233,20 @@ subroutine outgrid_init
if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc0'
end if
#endif
! if (ldirect.gt.0) then
if (lroot.and.mpi_mode.gt.0) then
allocate(wetgridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR: could not allocate wetgridunc0'
allocate(drygridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR: could not allocate drygridunc0'
if (ldirect.gt.0) then
if (lroot.and.mpi_mode.gt.0) then
allocate(wetgridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR: could not allocate wetgridunc0'
allocate(drygridunc0(0:numxgrid-1,0:numygrid-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR: could not allocate drygridunc0'
! allocate a dummy to avoid compilator complaints
else if (.not.lroot.and.mpi_mode.gt.0) then
allocate(wetgridunc0(1,1,1,1,1,1),stat=stat)
allocate(drygridunc0(1,1,1,1,1,1),stat=stat)
else if (.not.lroot.and.mpi_mode.gt.0) then
allocate(wetgridunc0(1,1,1,1,1,1),stat=stat)
allocate(drygridunc0(1,1,1,1,1,1),stat=stat)
end if
end if
!write (*,*) 'Dimensions for fields', numxgrid,numygrid, &
......
......@@ -82,19 +82,20 @@ subroutine outgrid_init_nest
allocate(griduncn0(1,1,1,1,1,1,1),stat=stat)
end if
#endif
! if (ldirect.gt.0) then
if (lroot.and.mpi_mode.gt.0) then
allocate(wetgriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
allocate(drygriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
if (ldirect.gt.0) then
if (lroot.and.mpi_mode.gt.0) then
allocate(wetgriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
allocate(drygriduncn0(0:numxgridn-1,0:numygridn-1,maxspec, &
maxpointspec_act,nclassunc,maxageclass),stat=stat)
if (stat.ne.0) write(*,*)'ERROR:could not allocate nested gridunc'
! endif
! allocate a dummy to avoid compilator complaints
else if (.not.lroot.and.mpi_mode.gt.0) then
allocate(wetgriduncn0(1,1,1,1,1,1),stat=stat)
allocate(drygriduncn0(1,1,1,1,1,1),stat=stat)
else if (.not.lroot.and.mpi_mode.gt.0) then
allocate(wetgriduncn0(1,1,1,1,1,1),stat=stat)
allocate(drygriduncn0(1,1,1,1,1,1),stat=stat)
end if
end if
! Compute surface area and volume of each grid cell: area, volume;
......
......@@ -108,6 +108,12 @@ subroutine partoutput(itime)
p3=rddx*ddy
p4=ddx*ddy
! eso: Temporary fix for particle exactly at north pole
if (jyp >= nymax) then
! write(*,*) 'WARNING: conccalc.f90 jyp >= nymax'
jyp=jyp-1
end if
! Topography
!***********
......
......@@ -115,6 +115,12 @@ subroutine partoutput(itime)
p3=rddx*ddy
p4=ddx*ddy
! eso: Temporary fix for particle exactly at north pole
if (jyp >= nymax) then
! write(*,*) 'WARNING: conccalc.f90 jyp >= nymax'
jyp=jyp-1
end if
! Topography
!***********
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment