BASIC User Guide

Usage

BASIC is nativiely written in scilab and it can be called through the BASIC.sce script.

But a python script named BASIC.py has also been developped to process BASIC easily.

This interpreter takes into account several arguments and options:

> cd <install-dir>
> python BASIC.py --help
Usage: BASIC.py [OPTIONS] LIDAR_FILE [AERONET_FILE]

 This program retrieves aerosol properties from various ground-based measurements.

Options:
  -h, --help                                                show this help message and exit
  -o OUTPUT_FILENAME, --output-file=OUTPUT_FILENAME         the output file name
  -p PARAMETER_FILE, --parameter-file=PARAMETER_FILE        change the default parameters file
  -d OUTPUT_DIR, --output-dir=OUTPUT_DIR                    the output directory
  -l LIDAR_RATIO, --lidar-ratio=LIDAR_RATIO                 set lidar ratio values (sr)
  -t LIDAR_RATIO_TIME, --lidar-ratio-time=LIDAR_RATIO_TIME  set hours of the lidar ratio values (hours)
  -f, --force                                               force the output overwriting

Inversion modes

This interpreter allows to choose among both inversion easily:

  • lidar profile + AOD
  • or lidar profile only

Both modes requires one LIDAR_FILE as first argument. Then to enable the lidar + photometer mode you must specify the location of a AERONET_FILE as second argument:

By example:

> cd <install-dir>
> python BASIC.py ./data/LID/SIRTA_Palaiseau/als450_1a_PR2_v03_20120320_000000_1440.nc

will produces a BALIA output,

> cd <install-dir>
> python BASIC.py ./data/LID/SIRTA_Palaiseau/als450_1a_PR2_v03_20120320_000000_1440.nc ./data/AER/SIRTA_Palaiseau/AERONET-AOD.L15.Palaiseau_20120320.txt

will produces a BALI output.

Specification of scientific parameters

For each platform mentioned in the Description section of the overview, the unpackaged archive contains a default parameters file which gathers scientific settings required to process the algorithm successfully.

All of them are included in the parameters sub-directory:

<install-dir>                                unpackaged BASIC directory
    .
    .
    |-- parameters
    |   |-- COPDD_Puy-De-Dome.info
    |   |-- LOA-Photons_Lille.info
    |   |-- OPAR_La-Reunion.info
    |   |-- OPE_Houdelaincourt.info
    |   |-- QUALAIR_Paris.info
    |   `-- SIRTA_Palaiseau.info
    .
    .
    .

If you want to use your own configuration, or if your lidar file doesn’t follow the naming convention, you must specify the parameter file through the --parameter-file option:

> cd <install-dir>
> python BASIC.py --parameter-file my_own_parameters.txt  --lidar-ratio 150.0 my_own_lidar_file.nc

Parameters description

Global parameters

Parameter Description
lid_data the name of the NetCDF variable that contains Pr2 values
lambda the wavelength of the lidar remote sensor (in nm)
site_name the name of the platform, retreived in the name of the output file
latitude the latitude in north degrees (example 45.0 deg N)
longitude the longitude in east degrees (example 90.0 deg E)
altitude the altitude in meters

Scilab engine

BASIC program has a native backend written in Scilab, then the python script BASIC.py allow to call the scilab scipt BASIC.sce with the convenient arguments.

This executable takes as first and unique argument a PCF (Process Control File):

> scilab-adv-cli -f <install-dir>/BASIC.sce -args config_file.pcf

Indeed the python script BASIC.py is used to call BASIC.sce through a convenient PCF easily, as follows:

  1. parse the command line
  2. build a convenient PCF in a temporary directory
  3. call the Scilab BASIC.sce script in a new process

TROUBLESHOOTING

Warning! HDF5 library version mismatched error

If you have an error like this when running scilab, you have a version of HDF5 (used by NetCDF4) installed on your system that differs from the one used natively in scilab.

As said in the warning :

You can, at your own risk, disable this warning by setting the environment variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.

Rerun your app, with HDF5_DISABLE_VERSION_CHECK=1 or 2 as a prefix, and it can work. For instance :

HDF5_DISABLE_VERSION_CHECK=2 scilab
HDF5_DISABLE_VERSION_CHECK=2 scilab-adv-cli
HDF5_DISABLE_VERSION_CHECK=2 python <install-dir>/BASIC.py

Error Internal Error: printf is broken

This is an character encoding mismatch. Make sure to set a compatible encoding

> export LC_ALL=en_US.utf-8

before running.

Search