Error while compiling and linking api2arl

Post questions and find resources to convert meteorological data into a format HYSPLIT can read.
Post Reply
Posts: 13
Joined: November 20th, 2012, 12:46 am
Registered HYSPLIT User: Yes

Error while compiling and linking api2arl

Post by indumati_sp » January 7th, 2020, 7:56 am

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

use eccodes
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.

Posts: 101
Joined: November 8th, 2012, 3:41 pm

Re: Error while compiling and linking api2arl

Post by Fantine » January 31st, 2020, 11:59 am

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/ [eccodes path]/lib/ -leccodes_f90 -leccodes -L[HYSPLIT path]/trunk/library -lhysplit
(1.54 KiB) Downloaded 66 times

Post Reply