Commit cbea5bb6 authored by dingwell's avatar dingwell
Browse files

Debugging

parent 5b63ee2e
......@@ -95,6 +95,7 @@
use outg_mod
use par_mod
use com_mod
use netcdf_output_mod
implicit none
......@@ -376,7 +377,7 @@
if (option_verbose.ge.1) then
write(*,*) 'concoutput_irreg: Calling write_ncconc for main outgrid'
endif
call nc_write_oputput(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,0) ! 0= nest level
call nc_write_output(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,0) ! 0= nest level
else ! binary or ascii output
! Concentration output
......
......@@ -64,6 +64,7 @@ subroutine concoutput_nest_irreg(itime,outnum)
use outg_mod
use par_mod
use com_mod
use netcdf_output_mod
implicit none
......@@ -313,7 +314,7 @@ subroutine concoutput_nest_irreg(itime,outnum)
if (option_verbose.ge.1) then
write(*,*) 'concoutput_nest_irreg: Calling write_ncconc for main outgrid'
endif
call nc_write_oputput(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,1) ! 1= nest level
call nc_write_output(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,1) ! 1= nest level
else ! binary or ascii output
! Concentration output
......
......@@ -64,6 +64,7 @@ subroutine concoutput_nest_reg(itime,outnum)
use outg_mod
use par_mod
use com_mod
use netcdf_output_mod
implicit none
......@@ -309,7 +310,7 @@ subroutine concoutput_nest_reg(itime,outnum)
if (option_verbose.ge.1) then
write(*,*) 'concoutput_nest_reg: Calling write_ncconc for main outgrid'
endif
call nc_write_oputput(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,1) ! 1= nest level
call nc_write_output(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,1) ! 1= nest level
else ! binary or ascii output
! Concentration output
......
......@@ -100,6 +100,7 @@
use outg_mod
use par_mod
use com_mod
use netcdf_output_mod
implicit none
......@@ -392,7 +393,7 @@
if (option_verbose.ge.1) then
write(*,*) 'concoutput_reg: Calling write_ncconc for main outgrid'
endif
call nc_write_oputput(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,0) ! 0= nest level
call nc_write_output(itime,outnum,ks,kp,nage,tot_mu(ks,kp),densityoutrecept,0) ! 0= nest level
else ! binary or ascii output
! Concentration output
......
......@@ -47,15 +47,20 @@ INTEL_LDFLAGS = -O2 -cpp -mcmodel=medium -shared-intel -lnetcdff
BASENAME=$(EXECNAME)_$(COMPILER)
ifeq ($(NETCDFVERSION), 4)
FPP_FLAGS=-DNETCDF4_OUTPUT
endif
ifeq ($(COMPILER), pgi)
FCSER = pgf90
FCOMP = pgf90 -mp
FCMPI = pgf90 -mp
# NETCDF = /apps/netcdf/4.1.3-pgi
FFLAGS= -I${NETCDF}/include $(PGI_FFLAGS)
LDFLAGS= -L${NETCDF}/lib $(PGI_LDFLAGS)
ISNAN_OBJ = isnan_other.o
FFLAGS = -I${NETCDF}/include $(PGI_FFLAGS) $(FPP_FLAGS)
LDFLAGS = -L${NETCDF}/lib $(PGI_LDFLAGS)
ISNAN_OBJ = isnan_other.o
FPPFLAGS = ‑Mpreprocess
endif
......@@ -65,9 +70,10 @@ ifeq ($(COMPILER), gnu)
FCMPI = gfortran -fopenmp -lgomp
# NETCDF = /apps/netcdf/4.1.3-pgi
FFLAGS= -I${NETCDF}/include $(GNU_FFLAGS)
LDFLAGS= -L${NETCDF}/lib $(GNU_LDFLAGS)
ISNAN_OBJ = isnan_gfortran.o
FFLAGS = -I${NETCDF}/include $(GNU_FFLAGS) $(FPP_FLAGS)
LDFLAGS = -L${NETCDF}/lib $(GNU_LDFLAGS)
ISNAN_OBJ = isnan_gfortran.o
FPPFLAGS = -cpp
endif
......@@ -77,19 +83,21 @@ ifeq ($(COMPILER), intel)
FCMPI = ifort -openmp
# NETCDF = /apps/netcdf/4.1.3-intel
FFLAGS= -I${NETCDF}/include $(INTEL_FFLAGS)
LDFLAGS= -L${NETCDF}/lib $(INTEL_LDFLAGS)
ISNAN_OBJ = isnan_other.o
FFLAGS = -I${NETCDF}/include $(INTEL_FFLAGS) $(FPP_FLAGS)
LDFLAGS = -L${NETCDF}/lib $(INTEL_LDFLAGS)
ISNAN_OBJ = isnan_other.o
FPPFLAGS = -fpp
endif
NETCDF_OBJ = write_ncheader.o write_ncinfo.o \
ifeq ($(NETCDFVERSION), 3)
# Old method:
#NETCDF_OBJ = write_ncheader.o write_ncinfo.o \
#ifeq ($(NETCDFVERSION), 3)
# NETCDF_OBJ = write_ncheader_v3.o write_ncinfo_v3.o \
#endif
# New method to distinguish between netcdf3 and netcdf4 uses the pre-processors
# bundled with the supported compilers:
NETCDF_OBJ = write_ncheader_v3.o write_ncinfo_v3.o \
endif
ifeq ($(MAKECMDGOALS),serial)
FC=$(FCSER)
......@@ -125,21 +133,23 @@ interpol_mod.o cmapf_mod.o \
unc_mod.o oh_mod.o \
xmass_mod.o flux_mod.o \
point_mod.o outg_mod.o \
kftable_mod.o wrf_map_utils_mod.o \
ran_mod.o mpi_mod.o \
mt_kind_defs.o mt_stream.o \
read_ncwrfout.o
kftable_mod.o wrf_map_utils_mod.o \
ran_mod.o mpi_mod.o \
netcdf_output_mod.o \
mt_kind_defs.o mt_stream.o \
read_ncwrfout.o
#
OBJECTS = assignland.o writeheader.o \
OBJECTS = \
assignland.o writeheader.o \
calcpar.o part0.o \
caldate.o partdep.o \
coordtrafo.o psih.o \
raerod.o \
dynamic_viscosity.o random.o \
initial_cond_output.o initial_cond_calc.o\
outgrid_init_irreg.o outgrid_init_reg.o\
releaseparticles_irreg.o releaseparticles_reg.o\
conccalc_irreg.o conccalc_reg.o\
dynamic_viscosity.o random.o \
initial_cond_output.o initial_cond_calc.o\
outgrid_init_irreg.o outgrid_init_reg.o\
releaseparticles_irreg.o releaseparticles_reg.o\
conccalc_irreg.o conccalc_reg.o\
erf.o \
ew.o \
advance.o readdepo.o \
......@@ -186,44 +196,41 @@ readwind_nests.o \
outgrid_init_nest_reg.o outgrid_init_nest_irreg.o \
outgrid_init_nest.o writeheader_nest.o \
wetdepokernel_nest.o \
drydepokernel_nest.o drydepokernel.o \
concoutput_irreg.o concoutput_reg.o\
concoutput_nest_irreg.o concoutput_nest_reg.o\
drydepokernel_nest.o drydepokernel.o \
concoutput_irreg.o concoutput_reg.o\
concoutput_nest_irreg.o concoutput_nest_reg.o\
map_proj_wrf.o \
map_proj_wrf_subaa.o readinput.o \
tke_partition_hanna.o tke_partition_my.o \
redist_kf.o pre_redist_kf.o\
convection_kfeta.o convmix_kfeta.o \
readwind_timeav.o \
readwind_nests_timeav.o \
gf2xe.o f_get_coeff.o \
map_proj_wrf_subaa.o readinput.o \
tke_partition_hanna.o tke_partition_my.o \
redist_kf.o pre_redist_kf.o\
convection_kfeta.o convmix_kfeta.o \
readwind_timeav.o readwind_nests_timeav.o \
gf2xe.o f_get_coeff.o \
ranlux.o \
initialize_cbl_vel.o \
gasdevlux.o \
cbl.o re_initialize_particle.o \
write_ncconc.o \
check_ncerror.o
#
MPI_ONLY_OBJS = sendreal_mpi.o senddouble_mpi.o \
sendint_mpi.o sendint2_mpi.o \
sendreal2d_mpi.o flexwrf_mpi.o \
timemanager_mpi.o senddrydep_mpi.o \
senddrydep_nest_mpi.o \
#
SERIAL_ONLY_OBJS = flexwrf.o timemanager_serial.o \
#
OMP_ONLY_OBJS = flexwrf.o timemanager.o \
serial: $(MODOBJS) $(OBJECTS) $(SERIAL_ONLY_OBJS) $(ISNAN_OBJ) $(NETCDF_OBJ)
serial: $(MODOBJS) $(OBJECTS) $(SERIAL_ONLY_OBJS) $(ISNAN_OBJ)
# echo 'Pure serial not supported - use omp'
# exit
$(FC) *.o -o $(MAIN) $(LDFLAGS2)
omp: $(MODOBJS) $(OBJECTS) $(OMP_ONLY_OBJS) $(ISNAN_OBJ) $(NETCDF_OBJ)
omp: $(MODOBJS) $(OBJECTS) $(OMP_ONLY_OBJS) $(ISNAN_OBJ)
$(FC) *.o -o $(MAIN) $(LDFLAGS2)
mpi: $(MODOBJS) $(OBJECTS) $(MPI_ONLY_OBJS) $(ISNAN_OBJ) $(NETCDF_OBJ)
mpi: $(MODOBJS) $(OBJECTS) $(MPI_ONLY_OBJS) $(ISNAN_OBJ)
echo 'Compiling MPI'
$(FC) *.o -o $(MAIN) $(LDFLAGS2)
......@@ -234,6 +241,10 @@ $(SERIAL_ONLY_OBJECTS): $(MODOBJS)
%.o: %.f90
$(FC) -c $(FFLAGS2) $<
# Included in for netcdf_output_mod.F90 (.F90 ensure the use of FPP)
%.o: %.F90
$(FC) -c $(FPPFLAGS) $(FFLAGS2) $<
# This is here because of a single source file, erf.f
%.o: %.f
$(FC) -c $(FFLAGS2) $<
......
This diff is collapsed.
......@@ -96,13 +96,14 @@
use oh_mod
use par_mod
use com_mod
use mt_stream
use mt_stream
use netcdf_output_mod
! use ran_mod
! use interpol_mod
implicit none
include 'netcdf.inc'
!include 'netcdf.inc'
integer :: ix,jy,j,ks,kp,l,n,jtime,nstop,nstop1
......@@ -755,8 +756,8 @@
!***************************
if (iouttype.eq.2) then
write(*,*) "timemanager: End of simulation reached, closing output file"
ncret=nf_close(ncout)
! call check_ncerror(ncret)
ncret=NF90_CLOSE(ncout)
call check_ncerror(ncret)
if (nested_output.eq.1) ncret=nf_close(ncoutn)
endif
......
......@@ -97,7 +97,8 @@
use par_mod
use com_mod
use mpi_mod
use mt_stream
use mt_stream
use netcdf_output_mod
! use ran_mod
! use interpol_mod
......@@ -1014,7 +1015,7 @@
if (myid.eq.0) then
if (iouttype.eq.2) then
write(*,*) "timemanager_mpi: End of simulation reached, closing output file"
ncret=nf_close(ncout)
ncret=NF90_CLOSE(ncout)
call check_ncerror(ncret)
if (nested_output.eq.1) ncret=nf_close(ncoutn)
endif
......
......@@ -96,7 +96,8 @@
use oh_mod
use par_mod
use com_mod
use mt_stream
use mt_stream
use netcdf_output_mod
! use ran_mod
! use interpol_mod
......@@ -746,7 +747,7 @@
!***************************
if (iouttype.eq.2) then
write(*,*) "timemanager_serial: End of simulation reached, closing output file"
ncret=nf_close(ncout)
ncret=NF90_CLOSE(ncout)
call check_ncerror(ncret)
if (nested_output.eq.1) ncret=nf_close(ncoutn)
endif
......
Supports Markdown
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