SASHE_VAP  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups
SASHE VAP

Data Structures

struct  RetData_a0
 Retrieved a0 Data Structure. More...
struct  RetData_c0
 Retrieved c0 Data Structure. More...
struct  RetData_met
 Retrieved MET Data Structure. More...
struct  RetData_omi
 Retrieved OMI Data Structure. More...
struct  OutData
 Output Data Structure. More...
struct  SASHEData
 User Data Structure. More...

Macros

#define MISSING_VALUE   -9999.0
 Missing value to use in output variables.
#define Io_RET_OFFSET   3024000
 Begin/End offset used for Io data retrieval.
#define MIN_VIS_WAVELENGTH   300.0
 Minimum wavelength to process in vis data.
#define MAX_VIS_WAVELENGTH   1050.0
 Maximum wavelength to process in vis data.
#define MIN_NIR_WAVELENGTH   900.0
 Minimum wavelength to process in nir data.
#define MAX_NIR_WAVELENGTH   1825.0
 Maximum wavelength to process in nir data.
#define VIS_CLOUD_SCREEN   870.0
 Wavelength used for cloud screening.
#define OZONE_GAUSSIAN_FWHM   1.0
 FWHM (in degrees) used to compute ozone columnar density.
#define OZONE_MAX_DIST   5.0
 Maximum grid cell distance (in degrees) used to compute ozone columnar density.
#define OZONE_MIN_POINTS   10
 Minimum number of good grid cells needed to compute ozone columnar density.
#define OMI_RET_OFFSET   604800
 Begin/End offset used for OMI data retrieval.
#define QC_MISSING_VALUE   0x01
 QC Flag for missing_value.
#define QC_BELOW_MIN   0x02
 QC Flag for value is less than the valid_min.
#define QC_ABOVE_MAX   0x04
 QC Flag for value is greater than the valid_max.
#define QC_SZA_GT_84   0x08
 QC Flag for solar_zenith_angle is greater than 84 degrees.
#define QC_PRESS_OOR   0x10
 QC Flag for atmos_pressure out of range.
#define QC_DNT_OOR   0x20
 QC Flag for direct_normal_transmittance out of range.
#define QC_TAU_LTEQ_ZERO   0x40
 QC Flag for tau or tau prime <= 0 in cloud screening algorithm.
#define QC_CLOUD_DETECTED   0x80
 QC Flag for cloud detected.

Enumerations

enum  SASHEType {
  SASHE_VIS = 1,
  SASHE_NIR = 2
}
 SASHE Instrument Data Type.

Functions

void * init_process (void)
 Initialize the process.
void finish_process (void *user_data)
 Finish the process.
int process_data (void *user_data, time_t begin_date, time_t end_date, CDSGroup *ret_data)
 Main data processing function.
void print_nominal_calib_values (SASHEData *sashe, RetData_a0 *a0, OutData *out)
 Print nominal calibration values.
int print_aods (OutData *out)
 Print AODs.
int sashe_compute_cloud_screen (SASHEData *sashe)
 Compute the cloud screen for the current processing interval.
int sashe_compute_Ios (SASHEData *sashe, RetData_c0 *c0)
 Compute smoothed Io values for the current processing interval.
int sashe_compute_omi_ozone (SASHEData *sashe, RetData_omi *omi)
 Compute the ozone column value from the OMI data.
int sashe_init_output_dataset (SASHEData *sashe, RetData_a0 *a0, RetData_c0 *c0, RetData_omi *omi, OutData *out)
 Initialize the output dataset.
int sashe_init_retdata_a0 (SASHEData *sashe, RetData_a0 *a0)
 Initialize the RetData_a0 structure.
int sashe_init_retdata_c0 (SASHEData *sashe, RetData_c0 *c0)
 Initialize the RetData_c0 structure.
int sashe_init_retdata_omi (SASHEData *sashe, RetData_omi *omi)
 Initialize the RetData_omi structure.
int sashe_set_output_Io_values (RetData_c0 *c0, OutData *out)
 Set the Io values in the output dataset that were used to compute the smoothed Io value.

Detailed Description


Function Documentation

void finish_process ( void *  user_data)

Finish the process.

This function frees all memory used by the SASHEData structure.

Parameters:
user_datavoid pointer to the SASHEData structure returned by the init_process() function

Definition at line 304 of file sashe_aod.c.

void* init_process ( void  )

Initialize the process.

This function is used to do any up front process initialization that is specific to this process, and to create the SASHEData structure that will be passed to all hook functions.

If an error occurs in this function it will be appended to the log and error mail messages, and the process status will be set appropriately.

Return values:
sashevoid pointer to the SASHEData structure
NULLif and error occurred

Definition at line 123 of file sashe_aod.c.

int print_aods ( OutData out)

Print AODs.

Parameters:
outpointer to the OutData structure

Definition at line 661 of file sashe_aod.c.

void print_nominal_calib_values ( SASHEData sashe,
RetData_a0 a0,
OutData out 
)

Print nominal calibration values.

Parameters:
sashepointer to the SASHEData structure
a0pointer to the RetData_a0 structure
outpointer to the OutData structure

Definition at line 739 of file sashe_aod.c.

int process_data ( void *  user_data,
time_t  begin_date,
time_t  end_date,
CDSGroup ret_data 
)

Main data processing function.

This function will be called once per processing interval just after the output datasets are created, but before they are stored to disk.

Parameters:
user_datavoid pointer to the SASHEData structure returned by the init_process() function
begin_datebegin time of the processing interval
end_dateend time of the processing interval
ret_dataparent CDSGroup containing the retrieved data
Return values:
1if processing should continue normally
0if processing should skip the current processing interval and continue on to the next one
-1if a fatal error occurred and the process should exit

Definition at line 399 of file sashe_aod.c.

int sashe_compute_cloud_screen ( SASHEData sashe)

Compute the cloud screen for the current processing interval.

Parameters:
sashepointer to the SASHEData structure
Return values:
1if successful
-1if a fatal error occurred and the process should exit.

Definition at line 806 of file sashe_aod.c.

int sashe_compute_Ios ( SASHEData sashe,
RetData_c0 c0 
)

Compute smoothed Io values for the current processing interval.

Parameters:
sashepointer to the SASHEData structure
c0pointer to the RetData_c0 structure
Return values:
1if successful
0if there weren't enough Io values retrieved
-1if a fatal error occurred and the process should exit

Definition at line 876 of file sashe_aod.c.

int sashe_compute_omi_ozone ( SASHEData sashe,
RetData_omi omi 
)

Compute the ozone column value from the OMI data.

Parameters:
sashepointer to the SASHEData structure
omipointer to the RetData_omi structure
Return values:
1if successful
0if no OMI data was found
-1if a fatal error occurred and the process should exit

Definition at line 981 of file sashe_aod.c.

int sashe_init_output_dataset ( SASHEData sashe,
RetData_a0 a0,
RetData_c0 c0,
RetData_omi omi,
OutData out 
)

Initialize the output dataset.

This function will initialize all variables in the output dataset.

Parameters:
sashepointer to the SASHEData structure
a0pointer to the RetData_a0 structure
c0pointer to the RetData_c0 structure
omipointer to the RetData_omi structure
outpointer to the OutData structure
Return values:
nrecsnumber of valid output records found
-1if a fatal error occurred and the process should exit.

Definition at line 1214 of file sashe_aod.c.

int sashe_init_retdata_a0 ( SASHEData sashe,
RetData_a0 a0 
)

Initialize the RetData_a0 structure.

Parameters:
sashe- pointer to the SASHEData structure
a0- pointer to the RetData_a0 structure
Returns:
  • 1 if successful
  • -1 if a fatal error occurred and the process should exit.

Definition at line 1623 of file sashe_aod.c.

int sashe_init_retdata_c0 ( SASHEData sashe,
RetData_c0 c0 
)

Initialize the RetData_c0 structure.

Parameters:
sashe- pointer to the SASHEData structure
c0- pointer to the RetData_c0 structure
Returns:
  • 1 if successful
  • 0 if there weren't enough Io values retrieved
  • -1 if a fatal error occurred and the process should exit.

Definition at line 1741 of file sashe_aod.c.

int sashe_init_retdata_omi ( SASHEData sashe,
RetData_omi omi 
)

Initialize the RetData_omi structure.

Parameters:
sashe- pointer to the SASHEData structure
omi- pointer to the RetData_omi structure
Returns:
  • 1 if successful
  • 0 if no OMI data was found
  • -1 if a fatal error occurred and the process should exit.

Definition at line 1922 of file sashe_aod.c.

int sashe_set_output_Io_values ( RetData_c0 c0,
OutData out 
)

Set the Io values in the output dataset that were used to compute the smoothed Io value.

Parameters:
sashe- pointer to the SASHEData structure
c0- pointer to the RetData_c0 structure
out- pointer to the OutData structure
Returns:
  • 1 if successful
  • -1 if a fatal error occurred and the process should exit.

Definition at line 1987 of file sashe_aod.c.