I am trying to work with era52arl and am currently at the stage of installing eccodes.
I have installed my eccodes at /opt/eccodes and followed through the explanation on viewtopic.php?f=14&t=2141&p=7413&hilit=makefile#p7413 already. However, I am still getting the error message of "Cannot open module file ‘eccodes.mod’ for reading at (1): No such file or directory" when compiling with
Code: Select all
gfortran -o era52arl era52arl.f90
Code: Select all
include ../../Makefile.inc
EXE=../../exec
PGM=era52arl
ECCODES_TOPDIR= /opt/eccodes
ECCODESINC= -I/opt/eccodes/include
ECCODESLIBS= -L/opt/eccodes/lib -libeccodes_f90.so -libeccodes.so
FC=gfortran
FFLAGS_FREEFORM= -ffree-form
FFLAGS=$(OPTIMIZATION) -fconvert=big-endian -frecord-marker=4 -fPIC -falign-commons -finit-local-zero
LIBHYS = -L../../library -lhysplit
FCFLAGS = -g $(FFLAGS) $(FFLAGS_FREEFORM)
api2arl_DEPENDENCIES = \
$(ECCODES_TOPDIR)/lib/libeccodes_f90.so \
$(ECCODES_TOPDIR)/lib/libeccodes.so
FCCOMPILE = $(FC) $(ECCODESINC) $(FCFLAGS)
FCLD = $(FC)
FCLINK = $(FCLD) $(FCFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $(EXE)/$@
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(PGM): $(PGM).o $(api2arl_DEPENDENCIES)
@rm -f $(PGM)
$(FCLINK) $(PGM).o $(ECCODESLIBS) $(LIBHYS)
.f.o:
$(FCCOMPILE) -c -o $@ $<
clean :
rm -f $(EXE)/apidump
rm -f $(EXE)/$(PGM)
rm -f *.o