If there is no binary distribution that will work on your machine, you will need to build the LDM-McIDAS decoders from source.
After you download the source distribution of the LDM-McIDAS package, you need to move it to a suitable location, compile, test, and install the software.
Like all Unidata packages, LDM-McIDAS is distributed as a separate package, and you can build and install it any place you like on the machine that is running the LDM so long as the user running the LDM has access to and execute privilege for its decoders.
Here are some guidelines for LDM-McIDAS:
If you follow these guidelines, your directory structure would look something like:
|-bin |-data------- |-doc |-etc-------- |-include |-decoders | |-util | | | | |-bin----- | | |-doc----- | |-ldm-5.2.x--|-include- | | |-lib----- | | |-man-----|-man1- | | | |-man3- |-ldm--------| |-src----- | | | |-lib | |-logs | |-man | |-runtime | |-src | | | | | | |-bin----- | | | |-lib----- /usr/local-| |-ldm-mcidas-|-ldm-mcidas-...-| | | | | |-decode-- | | |-src-----|-ingest-- | | | |-libpng- | | | |-port---- | | | |-tingest- | | | |-zlib---- | | | | | |-include- | | |-man-----|-man1 | | | | |-bin
|-bin |-data------- |-doc |-etc-------- |-include |-decoders |-util | | |-bin----- | |-doc----- |-ldm-5.2.x--|-include- | |-lib----- | |-man-----|-man1- | | |-man3- |-ldm--------| |-src----- | | | |-lib | |-logs | |-man | |-runtime | |-src | | | |-bin----- | |-lib----- /usr/local-| | | |-ldm-mcidas-|-ldm-mcidas-...-| | | | |-decode-- | |-src-----|-ingest-- | | |-libpng- | | |-port---- | | |-tingest- | | |-zlib---- | | | |-include- | |-man-----|-man1 | | |-bin
<login as the user ldm>
Type the following:
mkdir ldm-mcidas cd ldm-mcidas mv <ldm-mcidas_download_directory>/ldm-mcidas-VERSION.tar.Z . zcat ldm-mcidas-VERSION.tar.Z | tar xvf -
If you are working with a binary distribution, you can proceed to the Installing the Software section.
LDM-McIDAS uses the configure utility to create C header and compilation Makefile files. The packages that LDM-McIDAS decoders depend on are:
If both the LDM or McIDAS-X are installed in "standard" directories, configure will correctly guess values for needed, system-dependent environment variables. If those packages are not installed in "standard" directories, you will need to define environment variables that will tell configure where to find the packages.
The easiest way to insure that configure will find all of the packages it needs is to define needed environment variables yourself. The full set of environment variables you may need to define to build LDM-MCIDAS are:
Environment variable | Use |
CC | C compiler to use |
CFLAGS | C compiler flags to use |
CPPFLAGS | C preprocessor flags to use |
FC | Fortran compiler to use |
FFLAGS | Fortran compiler flags to use |
CPP_LDM | Compile-time reference for LDM header files |
LD_LDM | Link-time reference for LDM library |
CPP_MCIDAS | Compile-time reference for McIDAS header files |
LD_MCIDAS | Link-time reference for McIDAS library |
CPP_NETCDF | Compile-time reference for netCDF header files |
LD_NETCDF | Link-time reference for netCDF library |
LD_X11 | Link-time reference for X11 library |
LD_MATH | Link-time reference for math library |
Example environment variable settings for a Linux system:
CC=gcc CFLAGS=-O CPPFLAGS='-DNDEBUG -Df2cFortran' FC=g77 FFLAGS='-O -Wuninitialized -fno-automatic -ff90-intrinsics-hide' CPP_LDM=-I/home/ldm/include LD_LDM='-L/home/ldm/lib -lldm' CPP_MCIDAS=-I/home/mcidas/inc LD_MCIDAS='-L/home/mcidas/lib -lmcidas' CPP_NETCDF=-I/home/mcidas/include LD_NETCDF='-L/home/mcidas/lib -lnetcdf' LD_X11=-L/usr/X11R6/lib -lX11 LD_MATH=-lm
After defining the environment variables, you should go into the src directory of the LDM-McIDAS version you just unpacked. Type the following:
cd ~ldm/ldm-mcidas/ldm-mcidas-200x/src
and read the README and INSTALL files before proceeding. INSTALL provides additional information on running the configuration utility.
The next step is to run the configure shell script located in the src directory of the LDM-McIDAS version tree. Type the following:
./confgure
Once configure has run, and assuming it ran with no errors, you use make to compile, test and install the LDM-McIDAS package.
There are 3 steps in the make process:
To build, install, and then cleanup, you can type the following:
make all install clean >&! ldm-mcidas.log & tail -f ldm-mcidas.log
make all install clean >ldm-mcidas.log 2>&1 & tail -f ldm-mcidas.log
Following these examples, output from the make command will be sent to the file ldm-mcidas.log. The tail command allows you to view the output as it is sent to the log file. We recommend that you send the output to a log file. If there are problems, and you can't figure out what is wrong, you can mail the log file to <support-ldm-mcidas AT unidata.ucar.edu>.
At this point, you could use the LDM-McIDAS decoders from the directory you just installed them in: ~ldm/ldm-mcidas/ldm-mcidas-200x/bin. We recommend, however, that you copy them to the either the ~ldm/decoders or ~ldm/util directory and use them from there. Which directory you copy them to will depend on which directory you have previously created and included in the PATH for the user running your LDM.
Since the most commonly used directory for LDM decoders is ~ldm/decoders, we recommend that copy them there. While still logged in as the 'ldm' user, type the following:
cd ~ldm/ldm-mcidas/ldm-mcidas-200x/bin chmod +x * cp area2png ~ldm/decoders cp nldn2md ~ldm/decoders cp pnga2area ~ldm/decoders cp pngg2gini ~ldm/decoders cp proftomd ~ldm/decoders cp zlibg2gini ~ldm/decoders
If this is a first-time installation for the LDM-McIDAS decoders on your system, also do the following (do not do this if you are upgrading). Type the following:
cp batch.k ~ldm/decoders cp uwgrid.sh ~ldm/decoders
Next, if you will be using pnga2area to decode MCIDAS and FNEXRAD datastream imagery into McIDAS usable formats, you will need to copy two files in the LDM-McIDAS etc to the ~ldm/etc directory. While still logged in as the 'ldm' user, type the following:
cd ~ldm/ldm-mcidas/ldm-mcidas-200x/etc cp SATANNOT ~ldm/etc cp SATBAND ~ldm/etc
If you will be decoding FSL2 Wind Profiler and NLDN lightning data into McIDAS compatible data files, you must copy three files in the LDM-McIDAS etc to the to the directory where you want decoders for these data to write their output. While still logged in as the 'ldm' user, type the following:
cd ~ldm/ldm-mcidas/ldm-mcidas-200x/etc chmod 664 ROUTE.SYS SYSKEY.TAB chmod 666 SCHEMA cp ROUTE.SYS ~ldm/data/mcidas cp SYSKEY.TAB ~ldm/data/mcidas cp SCHEMA ~ldm/data/mcidas
If an error occurs during the configure or make process, you can try to diagnose the problem by looking at the file config.status or by looking at the make log file.
If you are unable to figure out what is wrong, send a message to <support-ldm-mcidas AT unidata.ucar.edu> and include (if possible) the error message (ex: the output from the log file). A few of the common problems that occur and a brief description are listed below. A more complete listing of common problems (and solutions) can be found by searching the LDM-McIDAS email archive./
REMEMBER: You need to have the LDM, netCDF, and McIDAS-X libraries and include files installed on your system before you can build the LDM-McIDAS decoders.