Compile issues on CentOS 5.8

Post any questions or comments regarding the LINUX version of HYSPLIT. This includes the model execution, GUIs, results, or graphics. Be sure to mention the version of LINUX you are using.

Compile issues on CentOS 5.8

Postby krice67 » January 16th, 2013, 11:59 am

I'm trying to install hysplit on one of our servers for one of our scientists but I am running into compilation error. I'm trying to run the script in the hysplit/trunk directory. The script starts to work but then bombs out when it is building the WRF-ARW decoder. It complains that it requires NetCDF, but all the available NetCDF distro packages are installed. Any advice or help would be appreciated.

dos2unix: converting file utils.c to UNIX format ...
dos2unix: converting file Makefile to UNIX format ...
Building fcsubs library
Building hysplit source library
lBuilding exec directory programs
Building the ascii2shp converter
Building the dbf editor
Building the WRF-ARW decoder (requires NetCDF)
[root@aeronet trunk]# host
Host not found: 3(NXDOMAIN)
[root@aeronet trunk]# cat /etc/redhat-release
CentOS release 5.8 (Final)
[root@aeronet trunk]# pwd
[root@aeronet trunk]# yum list installed | grep -i netcdf
netcdf.i386 3.6.2-7.el5 installed
netcdf.x86_64 3.6.2-7.el5 installed
netcdf-decoders.x86_64 5.0.0-1.el5 installed
netcdf-devel.i386 3.6.2-7.el5 installed
netcdf-devel.x86_64 3.6.2-7.el5 installed
netcdf-static.x86_64 3.6.2-7.el5 installed
[root@aeronet trunk]#

Posts: 1
Joined: January 16th, 2013, 9:56 am

Re: Compile issues on CentOS 5.8

Postby FCrt85 » January 23rd, 2013, 11:25 am


I'm having a similar issue for a local installation on an Ubuntu 12.10 x64 system. I have installed the netcdf packets via Ubuntu repositories, but, still, building the WRF-ARW decoder generates an error.
My NetCDF .so libraries are under usr/lib, while the headers and .inc file under usr/include (which are the same paths already set in the decoder's Makefile). The decoder is set as gfortran (FC=gfortran).

Is there something I'm doing wrong?


Posts: 2
Joined: January 23rd, 2013, 11:09 am

Re: Compile issues on CentOS 5.8

Postby FCrt85 » January 31st, 2013, 9:18 am

I am having issues with the compiler, but the solution to the previous problem may be to add the flag -lnetcdff in the makefile...
Posts: 2
Joined: January 23rd, 2013, 11:09 am

Re: Compile issues on CentOS 5.8

Postby dgiles » March 1st, 2013, 11:15 am

On CentOS 5.8, I compiled the Hysplit model software and interface on my local directory to avoid any incompatibility with system installed packages and to make sure packages were built with the same compilers. First, I needed to install netcdf and then install the netcdf-fortran 4.2 to create libnetcdff. Next, I installed IOAPI 3.1 to create libioapi.a and make available the necessary includes. I made modifications to the hysplit make files and compiled hysplit ( It was useful to run the make files within /data2arl/arw2arl and /cmaq directories to correctly assign the include and lib locations for the dependent packages before hysplit compilation. I still received an error on the cmaq makefile but after running in the trunk (which must have cleaned the makes), it ran through the hysplit compilation without error. All of the packages appeared to be compiled with either gcc or gfortran. I ran the Hysplit test script (testing/xrun.scr) and the trajectory output matched the expected results output, while the dispersion results slightly varied which can be expected due to differences in random number generation on various hardware/software platforms.

Many thanks to Roland for his help and FCrt85's comment regarding libnetcdff (which needed to be modified from libnetcdf in the Hysplit make files).
Posts: 1
Joined: March 1st, 2013, 10:40 am

Re: Compile issues on CentOS 5.8

Postby chron » April 3rd, 2013, 10:42 am

I've previously encountered issues using some hysplit programs with recent netcdf libraries (>4.1). Installing netcdf 3.6.3 in addition to 4.2, and linking to that in the Makefiles, may solve your problems.

Also, as mentioned above some versions of netcdf build the fortran and c libraries separately in which case you need to use the -lnetcdff flag. Check the include and lib directories to see if is there in addition to On the cluster I use, 3.6.3 does not compile them separately, whereas 4.2 does. Here's the relevant portion of my Makefile:

Code: Select all
NETLIB = /n/sw/netcdf-3.6.3_gnu/lib
NETINC = /n/sw/netcdf-3.6.3_gnu/include
#Update to 4.2: uncomment if you *really* need netcdf4 and can handle a few things breaking                                                                   
#NETLIB = /n/sw/netcdf-4.2_full/lib                                                 
#NETINC = /n/sw/netcdf-4.2_full/include                                             
HLIB = ../../library
#Use just -lnetcdf if compiling with netcdf-3.6.3, otherwise use -lnetcdff -lnetcdf:                                                                                   
LINKS = -L$(NETLIB) -lnetcdf -L$(HLIB) -lhysplit
Posts: 9
Joined: February 4th, 2013, 7:32 pm

Return to HYSPLIT for LINUX

Who is online

Users browsing this forum: No registered users and 1 guest