1.3 UNIX - LINUX HYSPLIT install




The Windows and Mac distributions come with all executables pre-compiled. However, for installation on a UNIX or LINUX system, the code must be compiled locally or pre-compiled binaries installed. See the HYSPLIT web page for more information about how to obtain either LINUX version. If you are installing HYSPLIT for a workshop from a DVD, you may have the source code and a Red Hat precompiled version already available. If you are going to use the LINUX scripts directly from the DVD, it may be necessary to convert the EOL character using the dos2unix command. The remainder of this section discusses how to obtain and compile the source code from the respository.

  1. Similar to both Windows and Mac, the pre-requisite software should be installed prior to installing HYSPLIT. The graphical user interface requres Tcl/Tk; the native graphical format for HYSPLIT is Postscript which can be viewed using Ghostscript; Postscript graphics are converted to other formats using ImageMagick. If not already available on your system, they may be easily installed using yum.

  2. If you have obtained access instructions to the source code you will have a username and password. In all cases, access is through a secure connection through port 8443. You may need to install either SVN or WGET on your system using the following command line options:
    • svn --username XXXX --password YYYY export https://svn.arl.noaa.gov:8443/svn/hysplit
    • wget -r --reject "index.html" -nH --cut-dirs=1 --secure-protocol=auto --no-parent --no-check-certificate --user=XXXX --password=YYYY https://svn.arl.noaa.gov:8443/svn/hysplit/

  3. The download will copy all files into the hysplit directory, cd hysplit and then run the script ./update.sh. Normally this script should be used for future updates. However in this case, the code was just downloaded and therefore just select the server option and version option which will just create and update the version number files (version?.inc) associated with this download. Subsequent compilations will use this information. If this step was not properly executed, simulations would show text starting with USE: svn info | tail -n3 rather than the version number to indicate that this information is missing.

  4. The default distribution assumes the gfortran compiler is available and NetCDF is installed in the /usr/local/lib and /usr/local/include directories. NetCDF is only required if you are converting WRF-ARW data fields. For this example, we will change the default compiler to Portland Group Fortran (pgf90) and NetCDF version 4. The following edits to the Makefiles are requred:
    • Edit library/hysplit/Makefile and uncomment CFLAGS = $(PGF9) and FC = pgf90 and comment (#) the two equivalent lines for gfortran
    • Edit exec/Makefile and uncomment CFLAGS = $(PGF9) and FC = pgf90 and comment (#) the two equivalent lines for gfortran. Search for the two lines with -DENS,-DMPI and replace the comma with a space -DENS -DMPI".
    • If your system has MPI installed, then also in exec/Makefile uncomment the line MPI=pgf90 -Mmpi and add the hycm_std hycm_ens hycm_cb4 hytm_std to the compilation list under all:
    • Edit data2arl/arw2arl/Makefile and cmaq/Makefile and as before uncomment CFLAGS = $(PGF9) and FC = pgf90. Also uncomment the link to the NetCDF4 library LINKS = -lnetcdff and comment the link to the NetCDF3 library # LINKS = -lnetcdf

  5. Now in the hysplit directory edit compile.sh and modify the two lines export NETLIB=/?/?/lib and export NETINC=/?/?/include to point to the location of the NetCDF4 /lib and /include directories on your system. Then just run compile.sh. Errors will stop the compilation and check the compile.log file for more information.

  6. The installation can be tested by running ../testing/xrun.scr and comparing the final output file results.ps with the example output file results.pdf.

  7. Once the code is correctly installed, open a terminal window or X-window and change directory to ../hysplit4/working. Then just execute the softlink ./hysplit4.tcl and the GUI should open if Tcl/Tk has been installed. If the softlink does not exist, one should be created in the working directory using the command ln -s ../guicode/hysplit4.tcl hysplit4.tcl. Never run the model from the guicode directory. If using an X-window, insure that the X-directory location (usually /usr/X11/bin) in file default_exec points to the location of xterm, which can be determined from the command which xterm. Even if you are not planning on running the model through the GUI, create this step and open and then exit the GUI. Opening the GUI the first time will create all the basic control files required to run HYSPLIT. These can then be copied to other directories if desired.