-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from noaa-oar-arl/develop
Fixed memory issues and array bounds check.
- Loading branch information
Showing
5 changed files
with
242 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
#------------------------------------------------------------------------------# | ||
# The Community Multiscale Air Quality (CMAQ) system software is in # | ||
# continuous development by various groups and is based on information # | ||
# from these groups: Federal Government employees, contractors working # | ||
# within a United States Government contract, and non-Federal sources # | ||
# including research institutions. These groups give the Government # | ||
# permission to use, prepare derivative works of, and distribute copies # | ||
# of their work in the CMAQ system to the public and to permit others # | ||
# to do so. The United States Environmental Protection Agency # | ||
# therefore grants similar permission to use the CMAQ system software, # | ||
# but users are requested to provide copies of derivative works or # | ||
# products designed to operate in the CMAQ system to the United States # | ||
# Government without restrictions as to use by others. Software # | ||
# that is used with the CMAQ system but distributed under the GNU # | ||
# General Public License or the GNU Lesser General Public License is # | ||
# subject to their copyright restrictions. # | ||
#------------------------------------------------------------------------------# | ||
|
||
.SUFFIXES: | ||
.SUFFIXES: .o .f90 .F90 | ||
|
||
MODEL = mcip.exe | ||
|
||
#...Portland Group Fortran | ||
#FC = /usr/local/apps/pgi/linux86-64/17.10/bin/pgf90 | ||
#NETCDF = /usr/local/apps/netcdf-4.6.3/pgi-17.10 | ||
#IOAPI_ROOT = /usr/local/apps/ioapi-3.2_20181011/pgi-17.10 | ||
###FFLAGS = -g -O0 -Ktrap=unf -Ktrap=denorm -Ktrap=inv -Ktrap=ovf -Ktrap=divz \ | ||
### -Ktrap=fp -pc 32 -Mbounds -Mchkfpstk -Mchkptr -Kieee \ | ||
### -Minform,inform -Mfree -byteswapio -I$(NETCDF)/include \ | ||
### -I$(IOAPI_ROOT)/Linux2_x86_64pg | ||
#FFLAGS = -O4 -fastsse -pc 32 -Mfree -byteswapio -I$(NETCDF)/include \ | ||
# -I$(IOAPI_ROOT)/Linux2_x86_64pg | ||
#LIBS = -L$(IOAPI_ROOT)/Linux2_x86_64pg -lioapi \ | ||
# -L$(NETCDF)/lib -lnetcdff -lnetcdf | ||
|
||
#...gfortran | ||
#FC = gfortran | ||
#NETCDF = /usr/local/apps/netcdf-4.6.3/gcc-6.1.0 | ||
#IOAPI_ROOT = /usr/local/apps/ioapi-3.2_20181011/gcc-6.1.0 | ||
#FFLAGS = -O3 -I$(NETCDF)/include -I$(IOAPI_ROOT)/Linux2_x86_64 | ||
###FFLAGS = -g -O0 \ | ||
### -ffpe-trap='invalid','zero','overflow','underflow' \ | ||
### -I$(NETCDF)/include -I$(IOAPI_ROOT)/Linux2_x86_64 | ||
#LIBS = -L$(IOAPI_ROOT)/Linux2_x86_64 -lioapi \ | ||
# -L$(NETCDF)/lib -lnetcdff -lnetcdf | ||
|
||
FC = mpifort | ||
|
||
#NetCDF Settings | ||
NETCDF = /opt/sw/spack/apps/linux-centos8-cascadelake/gcc-9.3.0-openmpi-4.0.4/netcdf-c-4.7.4-vh | ||
|
||
#IOAPI Settings | ||
IOAPI_ROOT = /opt/sw/other/apps/linux-centos8-cascadelake/gnu-9.3.0-openmpi-4.0.4/ioapi/3.2-spack | ||
|
||
#MPI Settings for parallel | ||
MPI_ROOT = /opt/ohpc/pub/mpi/openmpi4-gnu9/4.0.4 | ||
|
||
FFLAGS = -g -O0 -fbacktrace -fbounds-check -I$(NETCDF)/include -I$(IOAPI_ROOT) -I$(MPI_ROOT)/include | ||
|
||
#Parallel | ||
LIBS = -L$(IOAPI_ROOT) -lioapi \ | ||
-L$(NETCDF)/lib -lnetcdf -lnetcdff -fopenmp \ | ||
-L$(MPI_ROOT)/lib -lmpi | ||
|
||
/EFS = | ||
|
||
|
||
MODULES =\ | ||
const_mod.o \ | ||
const_pbl_mod.o \ | ||
coord_mod.o \ | ||
ctmvars_mod.o \ | ||
date_time_mod.o \ | ||
date_pack_mod.o \ | ||
files_mod.o \ | ||
lucats_mod.o \ | ||
mcipparm_mod.o \ | ||
metinfo_mod.o \ | ||
metvars_mod.o \ | ||
netcdf_io_mod.o \ | ||
vgrd_mod.o \ | ||
xvars_mod.o | ||
|
||
OBJS =\ | ||
mcip.o \ | ||
alloc_ctm.o \ | ||
alloc_met.o \ | ||
alloc_x.o \ | ||
bcldprc_ak.o \ | ||
blddesc.o \ | ||
chkwpshdr.o \ | ||
chkwrfhdr.o \ | ||
chkfv3hdr.o \ | ||
close_files.o \ | ||
collapx.o \ | ||
comheader.o \ | ||
comheader_lufrac.o \ | ||
comheader_mos.o \ | ||
comheader_soi.o \ | ||
ctmout.o \ | ||
ctmproc.o \ | ||
dealloc_ctm.o \ | ||
dealloc_met.o \ | ||
dealloc_x.o \ | ||
detangle_soil_px.o \ | ||
e_aerk.o \ | ||
dynflds.o \ | ||
fv3mopts.o \ | ||
fv3lammopts.o \ | ||
getluse.o \ | ||
getmet.o \ | ||
getpblht.o \ | ||
getpsih.o \ | ||
getsdt.o \ | ||
getxyindex.o \ | ||
graceful_stop.o \ | ||
gridout.o \ | ||
gridproc.o \ | ||
init_ctm.o \ | ||
init_io.o \ | ||
init_met.o \ | ||
init_x.o \ | ||
julian.o \ | ||
layht.o \ | ||
ll2xy_lam.o \ | ||
ll2xy_lam_sec.o \ | ||
ll2xy_lam_tan.o \ | ||
ll2xy_merc.o \ | ||
ll2xy_ps.o \ | ||
locate.o \ | ||
mapfac_lam.o \ | ||
mapfac_merc.o \ | ||
mapfac_ps.o \ | ||
metgrid2ctm.o \ | ||
metvars2ctm.o \ | ||
myinterp.o \ | ||
outclog.o \ | ||
outcm3io.o \ | ||
outglog.o \ | ||
outgm3io.o \ | ||
outncf.o \ | ||
outncfbdy.o \ | ||
outncfglobal.o \ | ||
pblsup.o \ | ||
ptemp.o \ | ||
pvs.o \ | ||
qsat.o \ | ||
rdwrfem.o \ | ||
rdfv3.o \ | ||
rdfv3_lam.o \ | ||
readnml.o \ | ||
resistcalc.o \ | ||
setgriddefs.o \ | ||
setup.o \ | ||
setup_wrfem.o \ | ||
setup_fv3.o \ | ||
setup_fv3_lam.o \ | ||
sfclayer.o \ | ||
statflds.o \ | ||
vertarys.o \ | ||
vertnhy_wrf.o \ | ||
vstamp.o \ | ||
vtemp.o \ | ||
wind.o \ | ||
windrotation.o \ | ||
wrfemopts.o \ | ||
wrgdesc.o \ | ||
xy2ll_lam.o \ | ||
xy2ll_merc.o \ | ||
|
||
all: | ||
@$(MAKE) $(MODULES) | ||
@$(MAKE) $(MODEL) | ||
|
||
$(MODEL): $(OBJS) | ||
$(FC) -o $(MODEL) $(FFLAGS) $(OBJS) $(MODULES) $(LIBS) | ||
|
||
$(OBJS): $(MODULES) | ||
|
||
.f90.o: | ||
$(FC) $(FFLAGS) $(INCLUDES) -c $< | ||
|
||
.F90.o: | ||
$(FC) $(FFLAGS) $(INCLUDES) -c $< $(DEFS) | ||
|
||
clean: | ||
rm -f *.o *.mod *.il $(MODEL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.