Commit 9b1877ff authored by Marc-Antoine Drouin's avatar Marc-Antoine Drouin
Browse files

update for new CL31

- update script to allow zip as input
- add configuration of orly02 and roissy27
parent 05582fb5
;------------------------------------------------------------------------------
; raw2l1 user configuration file
;
; ___ __ _ _ ___ _ __
; | _ \/ \ | | | |(_ | | / |
; | v / /\ || 'V' | / /| |_`7 |
; |_|_\_||_|!_/ \_!|___|___||_|
;
; version: 2.1.8
; SIRTA IPSL/CNRS/EP 2014-2016
;
; for TOPROF netCDF-CF format
;
;------------------------------------------------------------------------------
; General configuration of the processing
;------------------------------------------------------------------------------
[conf]
reader_dir = reader
reader = vaisala_cl
netcdf_format = NETCDF4
netcdf4_compression = true
netcdf4_compression_level = 1
; Special option for the reader (optional)
;------------------------------------------------------------------------------
[reader_conf]
; time resolution in seconds
time_resolution = 30
missing_float = -999.
missing_int = -9
check_scale = true
; Variables required by TOPROF chosen format
;==============================================================================
; Global attribute of the netCDF file
;------------------------------------------------------------------------------
[global]
site_location = roissy
instrument_id = A
institution = Meteo-France
principal_investigator = SIRTA
instrument_type = CL31
title = ORLY VAISALA CL31 METEO-FRANCE/SIRTA
history =
instrument_firmware_version = toprof v2.05
overlap_function = false
overlap_is_corrected = true
source = METEO-FRANCE/SIRTA
references =
comment =
Conventions = CF-1.0, UKMO-1.0.2
; Dimensions
;------------------------------------------------------------------------------
[time]
dim = time
type = $time$
standard_name = time
units = days since 1970-01-01 00:00:00
calendar = standard
value = $reader_data$, time
[range]
dim = range
type = $float$
long_name = range
units = m
value = $reader_data$, range
[layer]
dim = layer
type = $integer$
long_name = layer index of cloud base height
units = 1
value = $reader_data$, cbh_layer
[layer_clh]
dim = layer_clh
type = $integer$
long_name = layer index of cloud layer height
units = 1
value = $reader_data$, clh_layer
; variables
;------------------------------------------------------------------------------
[rcs_0]
dim = time, range
type = $double$
long_name = normalized range corrected signal
units = 1e-8 sr^-1.m^-1
missing_value = -999.
_FillValue = -999.
value = $reader_data$, rcs_0
[bckgrd_rcs_0]
dim = time
type = $double$
long_name = background light at internal ADC input
units = mV
missing_value = -999.
_FillValue = -999.
value = $reader_data$, bckgrd_rcs_0
[cloud_base_height]
dim = time, layer
type = $integer$
long_name = cloud base height
units = m
missing_value = -9
_FillValue = -9
value = $reader_data$, cbh
[time_resol]
dim = $none$
type = $integer$
long_name = time resolution
units = s
value = $reader_data$, time_resolution
[range_resol]
dim = $none$
type = $float$
long_name = range resolution
units = m
value = $reader_data$, range_resol
[tilt_angle]
dim = time
type = $float$
long_name = instrument tilt angle from vertical
units = degree
missing_value = -999.
_FillValue = -999.
value = $reader_data$, tilt_angle
[l0_wavelength]
dim = $none$
type = $float$
long_name = laser 0 wavelength
units = nm
value = 910
[l0_width]
type = $float$
dim = $none$
long_name = laser 0 line width
units = nm
value = NAN
[l0_beam_div]
type = $float$
dim = $none$
long_name = laser 0 beam divergence
units = rad
value = NAN
[l0_prf]
type = $float$
dim = $none$
long_name = laser 0 pulse repetition frequency
units = Hz
value = NAN
[t0_fov]
type = $float$
dim = $none$
long_name = telescope 0 field of view
units = rad
value = NAN
[t0_tilt]
type = $float$
dim = $none$
long_name = telescope 0 tilt angle wrt nadir
units = degree
value = NAN
[temperature_laser]
type = $float$
long_name = laser temperature
units = K
dim = time
missing_value = -999.
_FillValue = -999.
value = $reader_data$, laser_temp
[start_time]
dim = time
type = $time$
long_name = start time of measurements
units = days since 1970-01-01 00:00:00
calendar = standard
value = $reader_data$, start_time
[station_latitude]
dim = $none$
type = $float$
long_name = latitude
units = degrees_north
value = 48.71447
[station_longitude]
dim = $none$
type = $float$
long_name = longitude
units = degrees_east
value = 2.37519
[station_altitude]
dim = $none$
type = $float$
standard_name = altitude
long_name = altitude
units = m
value = 89.0
; Additional data available in CL31 files
;==============================================================================
[calibration_factor]
dim = $none$
type = $float$
long_name = preliminary calibration factor
units = 1
comment = preliminary calibration factor to be applied to normalized range corrected signal (rcs_0) for display purpose only
missing_value = -999.
_FillValue = -999.
value = 1.e8
; 1d
[sum_rcs0]
dim = time
type = $float$
long_name = sum of detected and normalized backscatter
units = sr^-1
missing_value = -999.
_FillValue = -999.
value = $reader_data$, integrated_rcs_0
[laser_energy]
dim = time
type = $float$
long_name = laser pulse energy, percent of nominal factory setting
units = %
missing_value = -999.
_FillValue = -999.
value = $reader_data$, laser_energy
[window_transmission]
dim = time
type = $float$
long_name = window transmission estimate
units = %
missing_value = -999.
_FillValue = -999.
value = $reader_data$, window_transmission
; 2d
[clh]
dim = time, layer_clh
type = $integer$
long_name = cloud layer height
units = m
missing_value = -9
_FillValue = -9
value = $reader_data$, clh
[cloud_amount]
type = $short$
long_name = cloud fraction in eighths
units = 1
dim = time, layer_clh
missing_value = -9
_FillValue = -9
value = $reader_data$, cloud_amount
; string variables
[error_string]
dim = time
type = $string$
long_name = alarm or warning status
units = 1
flag_values = 0, W, A
flags_meanings = None warning alarm
value = $reader_data$, alarm
[alarm_infos]
dim = time
type = $string$
long_name = alarm or warning status
units = 1
value = $reader_data$, info_flags
\ No newline at end of file
;------------------------------------------------------------------------------
; raw2l1 user configuration file
;
; ___ __ _ _ ___ _ __
; | _ \/ \ | | | |(_ | | / |
; | v / /\ || 'V' | / /| |_`7 |
; |_|_\_||_|!_/ \_!|___|___||_|
;
; version: 2.1.8
; SIRTA IPSL/CNRS/EP 2014-2016
;
; for TOPROF netCDF-CF format
;
;------------------------------------------------------------------------------
; General configuration of the processing
;------------------------------------------------------------------------------
[conf]
reader_dir = reader
reader = vaisala_cl
netcdf_format = NETCDF4
netcdf4_compression = true
netcdf4_compression_level = 1
; Special option for the reader (optional)
;------------------------------------------------------------------------------
[reader_conf]
; time resolution in seconds
time_resolution = 30
missing_float = -999.
missing_int = -9
check_scale = true
; Variables required by TOPROF chosen format
;==============================================================================
; Global attribute of the netCDF file
;------------------------------------------------------------------------------
[global]
site_location = roissy
instrument_id = A
institution = Meteo-France
principal_investigator = SIRTA
instrument_type = CL31
title = ROISSY VAISALA CL31 METEO-FRANCE/SIRTA
history =
instrument_firmware_version = toprof v2.05
overlap_function = false
overlap_is_corrected = true
source = METEO-FRANCE/SIRTA
references =
comment =
Conventions = CF-1.0, UKMO-1.0.2
; Dimensions
;------------------------------------------------------------------------------
[time]
dim = time
type = $time$
standard_name = time
units = days since 1970-01-01 00:00:00
calendar = standard
value = $reader_data$, time
[range]
dim = range
type = $float$
long_name = range
units = m
value = $reader_data$, range
[layer]
dim = layer
type = $integer$
long_name = layer index of cloud base height
units = 1
value = $reader_data$, cbh_layer
[layer_clh]
dim = layer_clh
type = $integer$
long_name = layer index of cloud layer height
units = 1
value = $reader_data$, clh_layer
; variables
;------------------------------------------------------------------------------
[rcs_0]
dim = time, range
type = $double$
long_name = normalized range corrected signal
units = 1e-8 sr^-1.m^-1
missing_value = -999.
_FillValue = -999.
value = $reader_data$, rcs_0
[bckgrd_rcs_0]
dim = time
type = $double$
long_name = background light at internal ADC input
units = mV
missing_value = -999.
_FillValue = -999.
value = $reader_data$, bckgrd_rcs_0
[cloud_base_height]
dim = time, layer
type = $integer$
long_name = cloud base height
units = m
missing_value = -9
_FillValue = -9
value = $reader_data$, cbh
[time_resol]
dim = $none$
type = $integer$
long_name = time resolution
units = s
value = $reader_data$, time_resolution
[range_resol]
dim = $none$
type = $float$
long_name = range resolution
units = m
value = $reader_data$, range_resol
[tilt_angle]
dim = time
type = $float$
long_name = instrument tilt angle from vertical
units = degree
missing_value = -999.
_FillValue = -999.
value = $reader_data$, tilt_angle
[l0_wavelength]
dim = $none$
type = $float$
long_name = laser 0 wavelength
units = nm
value = 910
[l0_width]
type = $float$
dim = $none$
long_name = laser 0 line width
units = nm
value = NAN
[l0_beam_div]
type = $float$
dim = $none$
long_name = laser 0 beam divergence
units = rad
value = NAN
[l0_prf]
type = $float$
dim = $none$
long_name = laser 0 pulse repetition frequency
units = Hz
value = NAN
[t0_fov]
type = $float$
dim = $none$
long_name = telescope 0 field of view
units = rad
value = NAN
[t0_tilt]
type = $float$
dim = $none$
long_name = telescope 0 tilt angle wrt nadir
units = degree
value = NAN
[temperature_laser]
type = $float$
long_name = laser temperature
units = K
dim = time
missing_value = -999.
_FillValue = -999.
value = $reader_data$, laser_temp
[start_time]
dim = time
type = $time$
long_name = start time of measurements
units = days since 1970-01-01 00:00:00
calendar = standard
value = $reader_data$, start_time
[station_latitude]
dim = $none$
type = $float$
long_name = latitude
units = degrees_north
value = 49,02537
[station_longitude]
dim = $none$
type = $float$
long_name = longitude
units = degrees_east
value = 2,56691
[station_altitude]
dim = $none$
type = $float$
standard_name = altitude
long_name = altitude
units = m
value = 117.4
; Additional data available in CL31 files
;==============================================================================
[calibration_factor]
dim = $none$
type = $float$
long_name = preliminary calibration factor
units = 1
comment = preliminary calibration factor to be applied to normalized range corrected signal (rcs_0) for display purpose only
missing_value = -999.
_FillValue = -999.
value = 1.e8
; 1d
[sum_rcs0]
dim = time
type = $float$
long_name = sum of detected and normalized backscatter
units = sr^-1
missing_value = -999.
_FillValue = -999.
value = $reader_data$, integrated_rcs_0
[laser_energy]
dim = time
type = $float$
long_name = laser pulse energy, percent of nominal factory setting
units = %
missing_value = -999.
_FillValue = -999.
value = $reader_data$, laser_energy
[window_transmission]
dim = time
type = $float$
long_name = window transmission estimate
units = %
missing_value = -999.
_FillValue = -999.
value = $reader_data$, window_transmission
; 2d
[clh]
dim = time, layer_clh
type = $integer$
long_name = cloud layer height
units = m
missing_value = -9
_FillValue = -9
value = $reader_data$, clh
[cloud_amount]
type = $short$
long_name = cloud fraction in eighths
units = 1
dim = time, layer_clh
missing_value = -9
_FillValue = -9
value = $reader_data$, cloud_amount
; string variables
[error_string]
dim = time
type = $string$
long_name = alarm or warning status
units = 1
flag_values = 0, W, A
flags_meanings = None warning alarm
value = $reader_data$, alarm
[alarm_infos]
dim = time
type = $string$
long_name = alarm or warning status
units = 1
value = $reader_data$, info_flags
\ No newline at end of file
......@@ -111,7 +111,8 @@ n=0
#------------------------------------------------------------------------------
# Recupere les parametres de la lignes de commande
#------------------------------------------------------------------------------
while getopts :d:e:s:t:n:c:hv option
UNZIP=0
while getopts :d:e:s:t:n:c:u:hv option
do
case $option in
d) date="$OPTARG" ;;
......@@ -125,6 +126,7 @@ do
t) REP_TRAVAIL=${OPTARG} ;;
n) DEBUG=${OPTARG} ;;
c) fich_conf="$OPTARG" ;;
u) UNZIP=1 ;;
# permet de sauter des options inconnues sans sortir de while
?) while [[ $OPTIND -le $# && ${!OPTIND:0:1} != '-' ]]; do OPTIND=$((OPTIND+1)); done ;;
*) ERREUR=1 ;;
......@@ -204,6 +206,25 @@ then
exit 1
fi
# if unzipping raw files is needed
if [[ $UNZIP == 0 ]]
then
input_files=("${fich_entree[@]}")
elif [[ $UNZIP == 1 ]]
then
# create tmp directory for data
tmp_data=$(mktemp -d -p "$REP_TRAVAIL")
# unzip input files in it
for zip_file in "${fich_entree[@]}"
do
unzip "$zip_file" -d "$tmp_data"
done
# put all unzipped files in array
mapfile -t input_files < <(find "$tmp_data" -name "*.dat" | sort)
fi
# Recuperation des fichiers de sortie