Page 1 of 1

Error while compiling and linking api2arl

Posted: January 7th, 2020, 7:56 am
by indumati_sp
I get the following message while compiling and linking api2arl with Makefile_api.9.

" gfortran -I./grib_api-1.9.18/fortran -g -O2 -fconvert=big-endian -frecord-marker=4 -ffree-form -c -o api2arl_v3.o api2arl_v3.f
api2arl_v3.f:31.6:

use eccodes
1
Fatal Error: Can't open module file 'eccodes.mod' for reading at (1): No such file or directory
make: *** [api2arl_v3.o] Error 1 "

Kindly help and suggest.

Re: Error while compiling and linking api2arl

Posted: January 31st, 2020, 11:59 am
by Fantine
The api2arl converter needs either grib_api library or eccodes library to decode the grib format met data.

If you are using grib_api library, replace "use grib_api" with "use eccodes" in the api2arl_v3.f.

If you have eccodes library, the api2arl_v3.f should be compiled as (or use the attached Makefile)
gfortran -I[eccodes path]/include -g -O2 -fconvert=big-endian -frecord-marker=4 -ffree-form -c -o api2arl_v3.o api2arl_v3.f
gfortran -I[eccodes path]/include -g -O2 -fconvert=big-endian -frecord-marker=4 -ffree-form -o ./api2arl_v3 api2arl_v3.o [eccodes path]/lib/libeccodes_f90.so [eccodes path]/lib/libeccodes.so -leccodes_f90 -leccodes -L[HYSPLIT path]/trunk/library -lhysplit