Usage:     aploading [-opt [-opt...]] y [m [m...]]

Purpose:   compute air pressure loading results for one year y (one
           or more or all months m).

The procedure compares the request with what is there and issues new
copies from the archive / run_olfg as required.

Issues run_olfg -ts - , i.e. an atmospheric loading job with time series options.

Options:

-b           - for the whole first month, force the unpacking job.
-B           - Like -b but for the actual range of days.
-q           - if unpacking is needed, run it for the whole month.
-t           - run a test. Show the commands that would have been issued.
-m           - restore data from tape.

{ -noaa | -smhi | -ecmwf } compulsory option
-noaa        - restore data from NOAA/UCAR spectral files. This involves ftp
               copy, no local copy of the file is kept in our archive. C.f. HOW.TO
               This is surface pressure
-ecmwf       - use data copied separately from ECMWF to our archive.
               This is surface pressure
-smhi        - use data that SMHI helped us to copy from ECMWF to our archive.
               This is sea-level pressure

-k           - keep the monthly source data (don't rm).
               (noaa data source is always kept)
-kb          - delete the big tar, keep the monthly data base
-V [SITE|-]  - after-the-fight verify the job for a specific site.

               This is for check-only (no issuing of a loading job).
-v [SITE|-]  - check this site for availability of results.
-v and -V    - should specify the same site.
               Specify '-' to keep the
               previous definition. Default = ONSA
               Specify 'none' to skip test.
+v [SITE|-]  - like -v; however, exec loading stage eventhough results
               might already be available.
-c y m...    - clean the directory gap$y/m_$m and exit.
-clean y m   - clean ... without confirmation.
-p | -P      - prepare directories and data, but don't exec the loading
               stage. -P - prepapre directories only.
-s | -S      - run a succession of jobs with clean inbetween to save disk
               space. -S to also clean the big ASC's and tar's.

-1 y m db [de] - run for less than a complete month; the call line
                 parameters have the following meaning:
                 year month first_day [last_day]

-2 y m db      - run for a typical VLBI session
                 (include the following 2 days).
-L n y m db    - run for the y m d plus n days.
Else:          - run the loading procedure for a succession of complete
                 months.
y m [ m ...]   - Year, month(s).

Year must be written with four digits. Months can
arbitrarily be specified as jan Jan JAN 1 01 etc.

Options for running the loading procedure:
-r            - Redirect run_olfg output to file: olfg.prt
-d path       - result directory [apl/]
-O \'options [options ...] \'     to be passed to the run_olfg command line.
-N \'parameter=assignment \'  to be passed to run_olfg namelist

Example:
-O \'-s sitefile.stacov \'
-N \'parameter=assignment[, ...] \'

N.B.: aploading needs a lot of time and processes a lot of data
One month implies 50 Mbyte input ascii data and 120*270 kbyte daily binary
input data. Check disk space whether more than one month can be
processed. Fortunately, output is less demanding.

Directories:
gap$y     - Located under ./ the annual directory (e.g. gap1993).
            receiving temporarily the monthly ascii data hecatomb.
m_jan     - Located under ./gap$y the monthly subdirectories, containing
m_feb etc.  the quarterdiurnal pressure fields d01.00 d01.06 etc.

Examples:
    aploading 1993 aug sep; aploading -c 1993 aug sep

For extraction of local pressure data:
  one day:
    aploading -1 -k -v ABCD -d test-bifrost-apl/ \
      -O \'-i -y -lc test-bifrost-apl/local.pressure -nocmc \' \
      -N \'load_sites=0 \' 1996 aug 01 01

  in batches of months:
    aploading -k -v none -d airp/ \
      -O \'-lc airp/local.pressure4tap -nl -nocmc -S $HOME/tap/data/sites.xyz \' \
      1997 jan feb may