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

Changed from grib_api to eccodes. MPI: implemented linversionout=1; fixed...

Changed from grib_api to eccodes. MPI: implemented linversionout=1; fixed calculation of grid_initial fields.
parent a756649a
./options_test/ ./options/
./output_test/ ./output/
/ ./preprocess/flex_extract/work/
/xnilu_wrk/flex_wrk/WIND_FIELDS/AVAILABLE_ECMWF_OPER_fields_global ./AVAILABLE
...@@ -82,8 +82,6 @@ program flexpart ...@@ -82,8 +82,6 @@ program flexpart
flexversion='Version '//trim(flexversion_major)//'.4 (2019-07-23)' flexversion='Version '//trim(flexversion_major)//'.4 (2019-07-23)'
verbosity=0 verbosity=0
write(*,*) "flexversion: ", flexversion
! Read the pathnames where input/output files are stored ! Read the pathnames where input/output files are stored
!******************************************************* !*******************************************************
......
...@@ -76,6 +76,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -76,6 +76,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
integer :: sp_count_i,sp_count_r integer :: sp_count_i,sp_count_r
real :: sp_fact real :: sp_fact
real :: outnum,densityoutrecept(maxreceptor),xl,yl real :: outnum,densityoutrecept(maxreceptor),xl,yl
! RLT
real :: densitydryrecept(maxreceptor)
real :: factor_dryrecept(maxreceptor)
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act, ! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
...@@ -110,6 +113,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -110,6 +113,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
! mind eso: added to ensure identical results between 2&3-fields versions ! mind eso: added to ensure identical results between 2&3-fields versions
character(LEN=8),save :: file_stat='REPLACE' character(LEN=8),save :: file_stat='REPLACE'
logical :: ldates_file logical :: ldates_file
logical :: lexist
integer :: ierr integer :: ierr
character(LEN=100) :: dates_char character(LEN=100) :: dates_char
...@@ -211,6 +215,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -211,6 +215,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
! rho(iix,jjy,kzz-1,2)*dz2)/dz ! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz rho(iix,jjy,kzz-1,mind)*dz2)/dz
! RLT
densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &
rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz
end do end do
end do end do
end do end do
...@@ -222,8 +229,14 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -222,8 +229,14 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
jjy=max(min(nint(yl),nymin1),0) jjy=max(min(nint(yl),nymin1),0)
!densityoutrecept(i)=rho(iix,jjy,1,2) !densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind) densityoutrecept(i)=rho(iix,jjy,1,mind)
! RLT
densitydryrecept(i)=rho_dry(iix,jjy,1,mind)
end do end do
! RLT
! conversion factor for output relative to dry air
factor_drygrid=densityoutgrid/densitydrygrid
factor_dryrecept=densityoutrecept/densitydryrecept
! Output is different for forward and backward simulations ! Output is different for forward and backward simulations
do kz=1,numzgrid do kz=1,numzgrid
...@@ -276,11 +289,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -276,11 +289,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
endif endif
write(unitoutgrid) itime write(unitoutgrid) itime
endif endif
if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio
open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// &
atime//'_'//anspec,form='unformatted') atime//'_'//anspec,form='unformatted')
write(unitoutgridppt) itime write(unitoutgridppt) itime
endif endif
endif ! if deposition output endif ! if deposition output
...@@ -624,6 +635,49 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -624,6 +635,49 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
end do end do
! RLT Aug 2017
! Write out conversion factor for dry air
inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist)
if (lexist) then
! open and append
open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&
status='old',action='write',access='append')
else
! create new
open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&
status='new',action='write')
endif
sp_count_i=0
sp_count_r=0
sp_fact=-1.
sp_zer=.true.
do kz=1,numzgrid
do jy=0,numygrid-1
do ix=0,numxgrid-1
if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then
if (sp_zer.eqv..true.) then ! first value not equal to one
sp_count_i=sp_count_i+1
sparse_dump_i(sp_count_i)= &
ix+jy*numxgrid+kz*numxgrid*numygrid
sp_zer=.false.
sp_fact=sp_fact*(-1.)
endif
sp_count_r=sp_count_r+1
sparse_dump_r(sp_count_r)= &
sp_fact*factor_drygrid(ix,jy,kz)
else ! factor is one
sp_zer=.true.
endif
end do
end do
end do
write(unitoutfactor) sp_count_i
write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)
write(unitoutfactor) sp_count_r
write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)
close(unitoutfactor)
if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal
if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ &
wetgridtotal wetgridtotal
...@@ -650,7 +704,23 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, & ...@@ -650,7 +704,23 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
end do end do
endif endif
! RLT Aug 2017
! Write out conversion factor for dry air
if (numreceptor.gt.0) then
inquire(file=path(2)(1:length(2))//'factor_dryreceptor',exist=lexist)
if (lexist) then
! open and append
open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',&
status='old',action='write',access='append')
else
! create new
open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',&
status='new',action='write')
endif
write(unitoutfactor) itime
write(unitoutfactor) (factor_dryrecept(i),i=1,numreceptor)
close(unitoutfactor)
endif
! Reinitialization of grid ! Reinitialization of grid
!************************* !*************************
......
...@@ -605,7 +605,6 @@ subroutine concoutput_nest(itime,outnum) ...@@ -605,7 +605,6 @@ subroutine concoutput_nest(itime,outnum)
write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r) write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)
close(unitoutfactor) close(unitoutfactor)
! Reinitialization of grid ! Reinitialization of grid
!************************* !*************************
......
...@@ -57,7 +57,6 @@ subroutine concoutput_nest(itime,outnum) ...@@ -57,7 +57,6 @@ subroutine concoutput_nest(itime,outnum)
! * ! *
!***************************************************************************** !*****************************************************************************
use unc_mod use unc_mod
use point_mod use point_mod
use outg_mod use outg_mod
...@@ -73,6 +72,9 @@ subroutine concoutput_nest(itime,outnum) ...@@ -73,6 +72,9 @@ subroutine concoutput_nest(itime,outnum)
integer :: sp_count_i,sp_count_r integer :: sp_count_i,sp_count_r
real :: sp_fact real :: sp_fact
real :: outnum,densityoutrecept(maxreceptor),xl,yl real :: outnum,densityoutrecept(maxreceptor),xl,yl
! RLT
real :: densitydryrecept(maxreceptor)
real :: factor_dryrecept(maxreceptor)
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act, ! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
...@@ -99,6 +101,7 @@ subroutine concoutput_nest(itime,outnum) ...@@ -99,6 +101,7 @@ subroutine concoutput_nest(itime,outnum)
logical :: sp_zer logical :: sp_zer
character :: adate*8,atime*6 character :: adate*8,atime*6
character(len=3) :: anspec character(len=3) :: anspec
logical :: lexist
integer :: mind integer :: mind
! mind eso:added to ensure identical results between 2&3-fields versions ! mind eso:added to ensure identical results between 2&3-fields versions
...@@ -175,6 +178,9 @@ subroutine concoutput_nest(itime,outnum) ...@@ -175,6 +178,9 @@ subroutine concoutput_nest(itime,outnum)
! rho(iix,jjy,kzz-1,2)*dz2)/dz ! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz rho(iix,jjy,kzz-1,mind)*dz2)/dz
! RLT
densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &
rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz
end do end do
end do end do
end do end do
...@@ -186,8 +192,14 @@ subroutine concoutput_nest(itime,outnum) ...@@ -186,8 +192,14 @@ subroutine concoutput_nest(itime,outnum)
jjy=max(min(nint(yl),nymin1),0) jjy=max(min(nint(yl),nymin1),0)
!densityoutrecept(i)=rho(iix,jjy,1,2) !densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind) densityoutrecept(i)=rho(iix,jjy,1,mind)
! RLT
densitydryrecept(i)=rho_dry(iix,jjy,1,mind)
end do end do
! RLT
! conversion factor for output relative to dry air
factor_drygrid=densityoutgrid/densitydrygrid
factor_dryrecept=densityoutrecept/densitydryrecept
! Output is different for forward and backward simulations ! Output is different for forward and backward simulations
do kz=1,numzgrid do kz=1,numzgrid
...@@ -210,6 +222,16 @@ subroutine concoutput_nest(itime,outnum) ...@@ -210,6 +222,16 @@ subroutine concoutput_nest(itime,outnum)
do ks=1,nspec do ks=1,nspec
write(anspec,'(i3.3)') ks write(anspec,'(i3.3)') ks
if (DRYBKDEP.or.WETBKDEP) then !scavdep output
if (DRYBKDEP) &
open(unitoutgrid,file=path(2)(1:length(2))//'grid_drydep_nest_'//adate// &
atime//'_'//anspec,form='unformatted')
if (WETBKDEP) &
open(unitoutgrid,file=path(2)(1:length(2))//'grid_wetdep_nest_'//adate// &
atime//'_'//anspec,form='unformatted')
write(unitoutgrid) itime
else
if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
if (ldirect.eq.1) then if (ldirect.eq.1) then
open(unitoutgrid,file=path(2)(1:length(2))//'grid_conc_nest_' & open(unitoutgrid,file=path(2)(1:length(2))//'grid_conc_nest_' &
...@@ -222,6 +244,7 @@ subroutine concoutput_nest(itime,outnum) ...@@ -222,6 +244,7 @@ subroutine concoutput_nest(itime,outnum)
endif endif
write(unitoutgrid) itime write(unitoutgrid) itime
endif endif
endif
if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio
open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_nest_' & open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_nest_' &
...@@ -552,30 +575,72 @@ subroutine concoutput_nest(itime,outnum) ...@@ -552,30 +575,72 @@ subroutine concoutput_nest(itime,outnum)
end do end do
! RLT Aug 2017
! Write out conversion factor for dry air
! Reinitialization of grid inquire(file=path(2)(1:length(2))//'factor_drygrid_nest',exist=lexist)
!************************* if (lexist) then
! open and append
do ks=1,nspec open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid_nest',form='unformatted',&
do kp=1,maxpointspec_act status='old',action='write',access='append')
do i=1,numreceptor else
creceptor(i,ks)=0. ! create new
end do open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid_nest',form='unformatted',&
do jy=0,numygridn-1 status='new',action='write')
do ix=0,numxgridn-1 endif
do l=1,nclassunc sp_count_i=0
do nage=1,nageclass sp_count_r=0
do kz=1,numzgrid sp_fact=-1.
griduncn(ix,jy,kz,ks,kp,l,nage)=0. sp_zer=.true.
end do do kz=1,numzgrid
end do do jy=0,numygridn-1
end do do ix=0,numxgridn-1
end do if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then
if (sp_zer.eqv..true.) then ! first value not equal to one
sp_count_i=sp_count_i+1
sparse_dump_i(sp_count_i)= &
ix+jy*numxgridn+kz*numxgridn*numygridn
sp_zer=.false.
sp_fact=sp_fact*(-1.)
endif
sp_count_r=sp_count_r+1
sparse_dump_r(sp_count_r)= &
sp_fact*factor_drygrid(ix,jy,kz)
else ! factor is one
sp_zer=.true.
endif
end do end do
end do end do
end do end do
write(unitoutfactor) sp_count_i
write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)
write(unitoutfactor) sp_count_r
write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)
close(unitoutfactor)
! Reinitialization of grid
!*************************
! do ks=1,nspec
! do kp=1,maxpointspec_act
! do i=1,numreceptor
! creceptor(i,ks)=0.
! end do
! do jy=0,numygridn-1
! do ix=0,numxgridn-1
! do l=1,nclassunc
! do nage=1,nageclass
! do kz=1,numzgrid
! griduncn(ix,jy,kz,ks,kp,l,nage)=0.
! end do
! end do
! end do
! end do
! end do
! end do
! end do
creceptor(:,:)=0.
griduncn(:,:,:,:,:,:,:)=0.
if (mp_measure_time) call mpif_mtime('iotime',1) if (mp_measure_time) call mpif_mtime('iotime',1)
! if (mp_measure_time) then ! if (mp_measure_time) then
! call cpu_time(mp_root_time_end) ! call cpu_time(mp_root_time_end)
......
...@@ -650,23 +650,23 @@ subroutine concoutput_surf_nest(itime,outnum) ...@@ -650,23 +650,23 @@ subroutine concoutput_surf_nest(itime,outnum)
!************************* !*************************
do ks=1,nspec do ks=1,nspec
do kp=1,maxpointspec_act do kp=1,maxpointspec_act
do i=1,numreceptor do i=1,numreceptor
creceptor(i,ks)=0. creceptor(i,ks)=0.
end do end do
do jy=0,numygridn-1 do jy=0,numygridn-1
do ix=0,numxgridn-1 do ix=0,numxgridn-1
do l=1,nclassunc do l=1,nclassunc
do nage=1,nageclass do nage=1,nageclass
do kz=1,numzgrid do kz=1,numzgrid
griduncn(ix,jy,kz,ks,kp,l,nage)=0. griduncn(ix,jy,kz,ks,kp,l,nage)=0.
end do
end do end do
end do end do
end do end do
end do end do
end do end do
end do end do
end do
if (mp_measure_time) call mpif_mtime('iotime',1) if (mp_measure_time) call mpif_mtime('iotime',1)
! if (mp_measure_time) then ! if (mp_measure_time) then
......
...@@ -62,14 +62,16 @@ ifeq ($(gcc), 4.9) ...@@ -62,14 +62,16 @@ ifeq ($(gcc), 4.9)
LIBPATH1 = ${ROOT_DIR}/lib LIBPATH1 = ${ROOT_DIR}/lib
else else
# Compiled libraries under user ~flexpart, gfortran v5.4 # Compiled libraries under user ~flexpart, gfortran v5.4
ROOT_DIR = /homevip/flexpart/ # ROOT_DIR = /homevip/flexpart/
F90 = /usr/bin/gfortran F90 = /usr/bin/gfortran
MPIF90 = /usr/bin/mpifort MPIF90 = /usr/bin/mpifort
INCPATH1 = ${ROOT_DIR}/gcc-5.4.0/include # INCPATH1 = ${ROOT_DIR}/gcc-5.4.0/include
# INCPATH2 = /usr/include
# LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib
INCPATH1 = /usr/include
INCPATH2 = /usr/include INCPATH2 = /usr/include
LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib
endif endif
...@@ -91,8 +93,7 @@ O_LEV = 0 # [0,1,2,3,g,s,fast] ...@@ -91,8 +93,7 @@ O_LEV = 0 # [0,1,2,3,g,s,fast]
O_LEV_DBG = g # [0,g] O_LEV_DBG = g # [0,g]
## LIBRARIES ## LIBRARIES
#LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff LIBS = -leccodes -leccodes_f90 -lm $(NCOPT)
LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT)
FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native
...@@ -127,10 +128,10 @@ OBJECTS_SERIAL = \ ...@@ -127,10 +128,10 @@ OBJECTS_SERIAL = \
boundcond_domainfill.o \ boundcond_domainfill.o \
redist.o \ redist.o \
concoutput_surf.o concoutput_surf_nest.o \ concoutput_surf.o concoutput_surf_nest.o \
concoutput_inversion_nest.o \
concoutput_inversion.o \
getfields.o \ getfields.o \
readwind_ecmwf.o readwind_ecmwf.o \
initial_cond_output.o \
initial_cond_output_inversion.o
## For MPI version ## For MPI version
OBJECTS_MPI = releaseparticles_mpi.o partoutput_mpi.o \ OBJECTS_MPI = releaseparticles_mpi.o partoutput_mpi.o \
...@@ -144,11 +145,14 @@ OBJECTS_MPI = releaseparticles_mpi.o partoutput_mpi.o \ ...@@ -144,11 +145,14 @@ OBJECTS_MPI = releaseparticles_mpi.o partoutput_mpi.o \
redist_mpi.o \ redist_mpi.o \
concoutput_surf_mpi.o concoutput_surf_nest_mpi.o \ concoutput_surf_mpi.o concoutput_surf_nest_mpi.o \
getfields_mpi.o \ getfields_mpi.o \
readwind_ecmwf_mpi.o readwind_ecmwf_mpi.o \
initial_cond_output_mpi.o \
initial_cond_output_inversion_mpi.o
OBJECTS_NCF = netcdf_output_mod.o OBJECTS_NCF = netcdf_output_mod.o
OBJECTS = \ OBJECTS = \
initial_cond_calc.o \
advance.o initialize.o \ advance.o initialize.o \
writeheader.o writeheader_txt.o \ writeheader.o writeheader_txt.o \
partpos_average.o writeprecip.o \ partpos_average.o writeprecip.o \
...@@ -201,10 +205,12 @@ writeheader_nest.o writeheader_nest_surf.o \ ...@@ -201,10 +205,12 @@ writeheader_nest.o writeheader_nest_surf.o \
wetdepokernel_nest.o \ wetdepokernel_nest.o \
drydepokernel_nest.o zenithangle.o \ drydepokernel_nest.o zenithangle.o \
ohreaction.o getvdep_nests.o \ ohreaction.o getvdep_nests.o \
initial_cond_calc.o initial_cond_output.o initial_cond_output_inversion.o \
dynamic_viscosity.o get_settling.o \ dynamic_viscosity.o get_settling.o \
initialize_cbl_vel.o re_initialize_particle.o \ initialize_cbl_vel.o re_initialize_particle.o \
cbl.o cbl.o \
concoutput_inversion_nest.o \
concoutput_inversion.o \
ifeq ($(ncf), yes) ifeq ($(ncf), yes)
OBJECTS := $(OBJECTS) $(OBJECTS_NCF) OBJECTS := $(OBJECTS) $(OBJECTS_NCF)
...@@ -324,9 +330,13 @@ hanna_short.o: com_mod.o hanna_mod.o par_mod.o ...@@ -324,9 +330,13 @@ hanna_short.o: com_mod.o hanna_mod.o par_mod.o
init_domainfill.o: com_mod.o par_mod.o point_mod.o random_mod.o init_domainfill.o: com_mod.o par_mod.o point_mod.o random_mod.o
init_domainfill_mpi.o: com_mod.o mpi_mod.o par_mod.o point_mod.o random_mod.o init_domainfill_mpi.o: com_mod.o mpi_mod.o par_mod.o point_mod.o random_mod.o
initial_cond_calc.o: com_mod.o outg_mod.o par_mod.o unc_mod.o initial_cond_calc.o: com_mod.o outg_mod.o par_mod.o unc_mod.o
initial_cond_calc_mpi.o: com_mod.o outg_mod.o par_mod.o unc_mod.o
initial_cond_output.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o initial_cond_output.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o
initial_cond_output_mpi.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o mpi_mod.o
initial_cond_output_inversion.o: com_mod.o outg_mod.o par_mod.o point_mod.o \ initial_cond_output_inversion.o: com_mod.o outg_mod.o par_mod.o point_mod.o \
unc_mod.o unc_mod.o
initial_cond_output_inversion_mpi.o: com_mod.o outg_mod.o par_mod.o point_mod.o \
unc_mod.o
initialize.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o random_mod.o initialize.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o random_mod.o
initialize_cbl_vel.o: com_mod.o par_mod.o random_mod.o initialize_cbl_vel.o: com_mod.o par_mod.o random_mod.o
interpol_all.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o interpol_all.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o
......
...@@ -2597,6 +2597,58 @@ contains ...@@ -2597,6 +2597,58 @@ contains
601 end subroutine mpif_tm_reduce_grid_nest 601 end subroutine mpif_tm_reduce_grid_nest
subroutine mpif_tm_reduce_initcond
!***********************************************************************
! Collect init_cond to PID 0, adding from all processes.
!
!
!***********************************************************************
use com_mod
use unc_mod
use par_mod
implicit none
integer :: grid_size
!**********************************************************************
grid_size=numxgrid*numygrid*numzgrid*maxspec* &
& maxpointspec_act
! Time for MPI communications
if (mp_measure_time) call mpif_mtime('commtime',0)
#ifdef USE_MPIINPLACE