Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

error in compiling convert_mpas in MPAS-Tools repo

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


Hello everyone,
I have tried to compile "MPAS-TOOL" but getting the following error:

root@DESKTOP-CMBBM6L:/home/deb/Build_mpas/convert_mpas# nano Makefile
root@DESKTOP-CMBBM6L:/home/deb/Build_mpas/convert_mpas# make
( cd src; make FC="mpif90" FFLAGS="-O2 -ffree-form -Wall " FCINCLUDES="-I/home/d eb/Build_mpas/mpas-libs-gnu8.3.0/include" FCLIBS="-L/home/deb/Build_mpas/mpas-li bs-gnu8.3.0/lib -lnetcdff -L/home/deb/Build_mpas/mpas-libs-gnu8.3.0/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -lnetcdf -lhdf5_hl -lhdf5 -lz -ldl" )
make[1]: Entering directory '/home/deb/Build_mpas/convert_mpas/src'
rm -f scan_input.o scan_input.mod
mpif90 -O2 -ffree-form -Wall -c scan_input.F -I/home/deb/Build_mpas/mpas-libs-g nu8.3.0/include
f951: Warning: Nonexistent include directory ‘/home/deb/Build_mpas/mpas-libs-gnu 8.3.0/include’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/deb/Build_mpas/mpas-libs-gnu 8.3.0/include’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/deb/Build_mpas/mpas-libs-gnu 8.3.0/include’ [-Wmissing-include-dirs]

3 | use netcdf
| 1
Fatal Error: Cannot open module file ‘netcdf.mod’ for reading at (1): No such fi le or directory
compilation terminated.
make[1]: *** [Makefile:38: scan_input.o] Error 1
make[1]: Leaving directory '/home/deb/Build_mpas/convert_mpas/src'
make: *** [Makefile:7: all] Error 2

If anyone can say how to resolve this issue it will be highly appreciated
The warning message
f951: Warning: Nonexistent include directory ‘/home/deb/Build_mpas/mpas-libs-gnu 8.3.0/include’ [-Wmissing-include-dirs]
suggest that the directory /home/deb/Build_mpas/mpas-libs-gnu 8.3.0/include doesn't exist, and I think this is the directory where the compiler would otherwise find the "netcdf.mod" file produced when you installed the NetCDF library.

Do you see an "include" directory if you list the "/home/deb/Build_mpas/mpas-libs-gnu 8.3.0" directory?
Thanks for the reply,
Now I am facing a new issue which is attached as a text file.


  • convert_mpas_error.txt
    28.3 KB · Views: 34
The "undefined reference" errors in your log file, e.g.,
/usr/bin/ld: /home/deb/Build_mpas/mpas-libs-gnu8.3.0/lib/libnetcdf.a(libdispatch_la-derror.o): in function `nc_strerror':
/home/deb/Build_mpas/netcdf-c-4.6.3/libdispatch/derror.c:276: undefined reference to `ncmpi_strerror'
look similar to those in this post: . Can you see whether the solution proposed there helps?