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.
Here are some guidelines for LDM-McIDAS:
If you follow these guidelines, your directory structure would look something like:
LDM-McIDAS built/installed in ldm account:
|-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
LDM-McIDAS built/installed at the same level as the ldm account:
|-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
To build the source distribution or unpack the binary distribution in the ldm account, you would move the compressed tar file to the /usr/local/ldm/ldm-mcidas directory and uncompress and untar the file:
<login as the user ldm>Type: mkdir ldm-mcidas Type: cd ldm-mcidas Type: mv <ldm-mcidas_download_directory>/ldm-mcidas-2004.tar.Z . Type: zcat ldm-mcidas-2004.tar.Z | tar xvf -
If you are working with a binary distribution, you can proceed to the Installing the Software section.
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: 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: ./confgure
There are 3 steps in the make process:
For `csh'-compatible shells:
Type: make all install clean >&! ldm-mcidas.log &
Type: tail -f ldm-mcidas.log
For POSIX.2-compatible shells (e.g `sh', `ksh', `bash:
Type: make all install clean >ldm-mcidas.log 2>&1 &
Type: 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 'ldm'> Type: cd ~ldm/ldm-mcidas/ldm-mcidas-200x/bin Type: chmod +x * Type: cp area2png ~ldm/decoders Type: cp nldn2md ~ldm/decoders Type: cp pnga2area ~ldm/decoders Type: cp pngg2gini ~ldm/decoders Type: cp proftomd ~ldm/decoders Type: 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: cp batch.k ~ldm/decoders Type: 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 'ldm'> Type: cd ~ldm/ldm-mcidas/ldm-mcidas-200x/etc Type: cp SATANNOT ~ldm/etc Type: 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:
<still logged in as 'ldm'> Type: cd ~ldm/ldm-mcidas/ldm-mcidas-200x/etc Type: chmod 664 ROUTE.SYS SYSKEY.TAB Type: chmod 666 SCHEMA Type: cp ROUTE.SYS ~ldm/data/mcidas Type: cp SYSKEY.TAB ~ldm/data/mcidas Type: cp SCHEMA ~ldm/data/mcidas
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.
Send questions/comments to <support-ldm-mcidas AT unidata.ucar.edu>.