Software SPD computes for a set of stations and for a set of
epochs the following quantities:

1) slant path delay in the neutral atmosphere;
2) atmosphere opacity at the specified frequencies;
3) atmosphere brightness temperature at the specified frequencies;
4) surface atmosphere pressure;
5) surface air temperature.

The field of the refractivity index and atmosphere absorption is computed 
from the field of the atmospheric pressure, air temperature and the specific
humidity defined on a 4-dimensional grid provided by the output of the 
numerical weather field. Path delay, atmospheric opacity and atmosphere 
brighness temperature is computed by integrating differential equations 
of wave propagation.

System requirements:

  At least 4 Gb memory.
  64-bit Operating System.
  SPD can use all processors on a multi-processor machine. 
  
Installation:

  Refer to INSTALL file

General remarks:

  Computation of the slant path delay for analysis of astronomy,
geodesy, or altimetery data is done in three steps:

  1) Data downloading, extraction of relevant datasets and 
     their storage.

     The output of the atmospheric weather models presents a 
     time series of many atmospheric parameters on a 3-dimension 
     non-uniform, irregular grid, including

     a) air temperature at the middle of a layer between two 
        consecutive terrain-following level;
     b) specific humidity at the middle of a layer between two 
        consecutive terrain-following level;
     c) pressure thickness of layer.

     Software MALO (MAss LOading) (See http://astrogeo.org/malo)
     is used for automatic downloading the outputs of numerical
     weather models from data centers, extraction of these three
     datasets and writing these datasets in HEB format.
     (See http://astrogeo.org/heb)

     The input for SPD is the directory tree with files in HEB
     format with these three datasets as well, as time-independent
     dataset with the nominal surface heights above the geoid that
     can is generated by program geos_gen_eh from MALO package.
    

  2) Computation of the slant path delay for a given epoch for 
     the specified set of stations.

     Program  spd_3d reads the control file, determines the list of 
     station, and the range of dates. Computation is done for each
     epoch separately.

     Program  spd_3d 
       a) reads input data files with air temperature, specific
          humidity and pressure thickness. 

       b) Using this information, the state of the atmosphere defined
          by three variables: total atmospheric pressure, partial
          pressure of water vapor, and air temperature is computed
          by solving differential hypsometric equation derived from
          the condition of hydrostatic equation and from the real gas law.
          Result is put on a regular, uniform 3D grid.

       c) refractivity is computed for each grid point using the 
          variables of the state of the atmosphere derived at the 
          previous step using the specified algorithm.

       d) The refractivity field is expanded over 3D B-spline basis.
 
       e) (optionally) the contribution of the refractivity due 
          to water is computed

       f) for each station spd_3d generates a uniform grid over elevation 
          and azimuth. The grid is regular over azimuth and irregular over 
          elevation angle.
     
       For each station, each elevation, each azimuth of a grid, program
       spd computes the slant path delay by solving a system of two
       non-linear differential equations of the 2nd order with mixed
       boundary conditions. These differential equations are a solution
       of a variational problem that utilizes the Fermat principle.
       The coefficients of these differential equations, the refractivity
       and its gradient, are computed using the coefficients of the
       3D B-spline for the refractivity field. The solution of these 
       equations defines the trajectory of the electromagnetic wave.
       Integration of the refractivity along this trajectory form the station
       to the top of the atmosphere and subtraction of the length of the 
       straight line from the station to the top of the atmosphere gives
       us immediately the path delay. Optionally, the contribution of
       path delay due to water vapor can be computed by integrating the 
       partial refractivity due to water vapor along this path.

       Slant total path delay, the contribution of water vapor
       to path delay, atmospheric opacity and atmosphere brightness 
       temperature for each frequency, each station, each elevation angle 
       and each azimuth are written in output files, one file per epoch.
       The epoch of these quantities is defined by the epoch of the state
       of the atmosphere defined by the output of numerical weather model.
       In addition, surface atmospheric pressure and surface air temperature
       for each station are written in the output file as well.

  3) Computation of the slant path delay and its partial derivatives
     with respect to the path delay in zenith direction and the tilt of the
     symmetry axis of the azimuth-elevation distribution of path delay.

       The main program defines the list of stations and the range of dates.
       Routines from SPD package read the files with path delay, parse them, 
       and expand the path delay over the 3D B-spline basis. The axes of the 
       basis are elevation angle, azimuth, time. Slant path delay as well its 
       derivatives with respect to time and/or path delay in zenith direction 
       at a given elevation are computed using the coefficients of this 
       expansion.

  4) Computation of the atmospheric opacity and atmosphere brightness 
     temperature for a given elevation angle, azimuth, and time is computed
     in a similar way: routines from SPD package read the files with 
     opacities and brightness temperatures read them, parse them and expand 
     them over the 3D B-spline basis. The coefficients of this expansion are 
     used for computation.
