Good morning everyone,
I have found a bug in the FINN code and wanted to put a fix for it here.
When using FINN you have to make fire_emis from the /src folder.
When utilizing newer NETCDF-Fortran compilers the calling flags (I believe they are called this) -lnetcdf and -lnetcdff are in the wrong order in the make_fire_emis script.
At line 66-69 there is an if statement (below)
set ar_libs = -lnetcdf
if( -e ${NETCDF_DIR}/lib/libnetcdff.a ) then
set ar_libs = "${ar_libs} -lnetcdff "
endif
When you run the code using this set up you get the following error.
make: *** [Makefile:59: fire_emis] Error 1
Failed to build fire_emis
With the newer versions of NETCDF-Fortran they order of the flags need to be
-lnetcdff -lnetcdf
So lines 66-69 need to be changed to reflect this
set ar_libs = -lnetcdf
if( -e ${NETCDF_DIR}/lib/libnetcdff.a ) then
set ar_libs = "$-lnetcdff {ar_libs} "
endif
After that change the code builds fire_emis sucessfully.
++++++++++++++++++
fire_emis build Ok
++++++++++++++++++
Note I have only tested this out using FC=gfortran CC=gcc.
Hope this helps everyone.
Regards,
Will