Compiling MORSE


The MORSE source code is written in (almost) standard FORTRAN77 - see conventions.html

There is a single program module morse.for and a number of subroutines *.for and include files *.inc.

Before compiling, check module For most systems the parameter RECLEN (which controls the record size assumed for the HITRAN binary file) should be set to 88, however for some machines and/or the ifort compiler it should be set to 22.

To compile MORSE it should be sufficient to place all the modules in a single directory and type

  f77 *.for -o morse
(or g77 instead of f77 on some systems, depending on definition of FORTRAN compilers).

For those not familiar with unix/linux, this runs the local FORTRAN77 compiler program f77, taking as input all files (*.for) in the local directory with extension .for, and creates an executable program (-o) called morse. Obviously you can name the output anything you like, eg if you want to create different versions called morse_local.

MORSE has been developed on a friendly unix system which implicitly saves all subroutine variables between calls and initialises all variables to zero. I've tried to make all these explicit but it's possible that some may have been missed, so with the less friendly linux compilers it may be safer to add these options to the compile

f77 -fno-automatic -finit-local-zero *.for -o morse
(and let me know if you find an example where this produces different results!).

As with the RFM considerable acceleration can be obtained if you have the ifort compiler and a machine with 'sse2' (see under 'flags' in more /proc/cpuinfo). In which case, set RECLEN=22 and compile using

ifort -O3 -arch SSE2 *.for -o morse