cannot compile conc2cdf

Post any defects you find in the HYSPLIT software here. The HYSPLIT Developers carefully monitor this list and will work diligently to repair any reported problems. When posting a bug report, please specify both the HYSPLIT version and operating system you are using.
Post Reply
akp
Posts: 40
Joined: September 3rd, 2013, 9:34 pm
Registered HYSPLIT User: No

cannot compile conc2cdf

Post by akp » February 23rd, 2015, 9:52 pm

Hello,

I tried to compile conc2cdf on a cluster using two different fortran compilers but with netcdf v4. I am receiving similar error messages either way with many lines of
undefined reference to 'nf_strerror_' in conc2cdf.f. Also errors with other nf_ variables as well. I remember having issues with netcdf version 4 with previous attempts to compile other executables. Is there an easy fix to this or should I compile with netcdf3.6.3?

-Andre

ariel.stein
Posts: 647
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes
Contact:

Re: cannot compile conc2cdf

Post by ariel.stein » February 24th, 2015, 10:40 am

Andre

You need to make sure that the netcdf libraries were compiled with the same compiler as the one used to create conc2cdf.
If that does not solve the problem, try linking it to the netcdf 3.6 libraries.

Also, if you are using more than 3 species you might run into a dimension problem with the program.

akp
Posts: 40
Joined: September 3rd, 2013, 9:34 pm
Registered HYSPLIT User: No

Re: cannot compile conc2cdf

Post by akp » February 24th, 2015, 5:49 pm

Thanks for the reply, I would prefer recompiling with older version of netcdf if I don't have to. I changed the netcdf library flag from -lnetcdf to -lnetcdff which appeared to create the executable. When I try to use it though it says it can't find the library libnetcdff.so.5 which is most definitely in the path I defined. When I look in the compile.log file this message appears as well:

make: *** No rule to make target `conc2cdf'. Stop.



Here is what my cmaq/Makefile looks like:

SHELL = /bin/sh

SRC = .
EXE = ../exec

# LIBRARIES
LIB = ../library
API = /usr/local/lib
INC = /share/huina/ter/wrf_script/COMPILER_pgfortran/netcdf-install/include
CDF = /share/huina/ter/wrf_script/COMPILER_pgfortran/netcdf-install/lib

# standard compilation flags
SUN5 = -free -I$(INC)
AIXC = -I$(INC)
AIX8 = -qarch=auto -qmaxmem=8192 -I$(INC) -qstrict
DEC3 = -assume byterecl -I$(INC)
SGI5 = -bytereclen -I$(INC) -freeform
ABSF = -f free -I$(INC)
PGF9 = -Mfree -byteswapio -I$(INC)
INTL = -FR -assume byterecl -convert big_endian -I$(INC)
GF95 = -fendian=big -ffree-form -I$(INC)
GFOR = -fconvert=big-endian -frecord-marker=4 -ffree-form -I$(INC)

CFLAGS = $(PGF9)

FC = pgf90

all : traj2api conc2api mcip2arl conc2cdf

traj2api : traj2api.f
$(FC) -o $(EXE)/$@ $(CFLAGS) $@.f -L$(API) -lioapi -L$(CDF) -lnetcdf -L$(LIB) -lhysplit
rm -f *.o

conc2api : conc2api.f
$(FC) -o $(EXE)/$@ $(CFLAGS) $@.f -L$(API) -lioapi -L$(CDF) -lnetcdf -L$(LIB) -lhysplit
rm -f *.o

mcip2arl : mcip2arl.f
$(FC) -o $(EXE)/$@ $(CFLAGS) $@.f -L$(API) -lioapi -L$(CDF) -lnetcdf -L$(LIB) -lhysplit
rm -f *.o

conc2cdf : conc2cdf.f
$(FC) -o $(EXE)/$@ $(CFLAGS) $@.f -L$(CDF) -lnetcdff -L$(LIB) -lhysplit
rm -f *.o

ariel.stein
Posts: 647
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes
Contact:

Re: cannot compile conc2cdf

Post by ariel.stein » February 25th, 2015, 11:20 am

that means that your makefile did not created the executable.
When you modified the makefile you probably deleted some tabs that are needed for the makefile to interpret what is the name of the executable you want to create.

akp
Posts: 40
Joined: September 3rd, 2013, 9:34 pm
Registered HYSPLIT User: No

Re: cannot compile conc2cdf

Post by akp » February 25th, 2015, 8:10 pm

For some reason the netcdf diferctories specified will not link. I fell back to an older version of netcdf and adjusted the compiler flags accordingly by adding CURL_LIBS path.

Post Reply