I prepared the directories (uvic/dms) and appropriate files (uvic/Makefile, uvic/dms/Makefile, and uvic/dms/dms.F90), and modified few of the core files and then compiled the model........
...Hello Error!
Problem:
./doit
make[2]: Entering directory `~/FABM/fabm-git/src/models/uvic'
Makefile:4: *** missing separator. Stop.
Solution:
This happened because I used 'spaces' instead of 'tab' for Makefiles in 'src/models/uvic/' and 'src/models/uvic/dms' directories. ---> fixed it by replacing the 'spaces' with 'tabs'.
Problem:
./doit
make[3]: Entering directory `~/FABM/fabm-git/src/models/uvic/dms'
make[3]: *** No rule to make target `/HOME/hakase/FABM/fabm-git/lib/gotm/GFORTRAN/libfabm_prod.a(uvic_dms.o)', needed by `objs'. Stop.
Solution:
I compared my 'src/models/uvic/dms/Makefile' with 'src/models/gotm/npzd/Makefile', and found few differences between the two files. Thus, I modified my Makefile following the NPZD Makefile.
vi models/uvic/dms/Makefile
include ../../../Rules.make
OBJS = ${LIBFABM}(dms.o)
DOCSRC = dms.F90
all: objs
${OBJS}: $(FABMBASE)
objs: ${OBJS}
$(MOVE_MODULES_COMMAND)
doc: $(DOCSRC)
$(PROTEX) $(DOCSRC) > ../../../../doc/uvic_dms.tex
clean:
$(RM) *.o *~
Compilation done successfully. Now I have an empty DMS model :)
One thing I noticed after the compilation of FABM.. If you couple FABM with GOTM, the GOTM executable is deleted after the FABM recompilation. Thus the recompilation of GOTM is also required every time you recompile FABM which makes sense.
The message below is output of GOTM execution with uvic_dms model, which indicates the model is read successfully:
Initializing biogeochemical model "uvic_dms"...
model "uvic_dms" initialized successfully.
0 件のコメント:
コメントを投稿