ocssw  1.0
Defines | Functions
/disk01/web/ocssw/build/src/l2gen/l1_meris_N1.c File Reference

(r8096/r7671)

#include <stdbool.h>
#include "l1_meris_N1.h"
#include "l12_proto.h"
#include "epr_api.h"
#include "epr_field.h"

Go to the source code of this file.

Defines

#define MERIS_NBANDS   15
#define MERIS_BANDINFO_FILENAME   "band_info.txt"
#define MERIS_WAVELENGTH_FR_FILENAME   "central_wavelen_fr.txt"
#define MERIS_WAVELENGTH_RR_FILENAME   "central_wavelen_rr.txt"
#define MERIS_SUN_FLUX_FR_FILENAME   "sun_spectral_flux_fr.txt"
#define MERIS_SUN_FLUX_RR_FILENAME   "sun_spectral_flux_rr.txt"
#define MERIS_REDUCED_RESOLUTION_MAX   1121
#define MERIS_FR_DETECTORS   3700
#define MERIS_RR_DETECTORS   925
#define MERIS_LINE_MAX   255
#define MERIS_L1FLAG_COSMETIC   0x01
#define MERIS_L1FLAG_DUPLICATED   0x02
#define MERIS_L1FLAG_GLINT   0x04
#define MERIS_L1FLAG_SUSPECT   0x08
#define MERIS_L1FLAG_LAND   0x10
#define MERIS_L1FLAG_BRIGHT   0x20
#define MERIS_L1FLAG_COASTLINE   0x40
#define MERIS_L1FLAG_INVALID   0x80
#define MERIS_L2FLAG_WHITE_SCATTER   0x000001
#define MERIS_L2FLAG_PRESSURE_CONF   0x000002
#define MERIS_L2FLAG_HIGH_GLINT   0x000004
#define MERIS_L2FLAG_DDV   0x000008
#define MERIS_L2FLAG_MEDIUM_GLINT   0x000010
#define MERIS_L2FLAG_ICE_HAZE   0x000020
#define MERIS_L2FLAG_CASE2_Y   0x000040
#define MERIS_L2FLAG_CASE2_ANOM   0x000080
#define MERIS_L2FLAG_CASE2_S   0x000100
#define MERIS_L2FLAG_ABSOA_DUST   0x000200
#define MERIS_L2FLAG_OOADB   0x000400
#define MERIS_L2FLAG_SUSPECT   0x000800
#define MERIS_L2FLAG_COSMETIC   0x001000
#define MERIS_L2FLAG_COASTLINE   0x002000
#define MERIS_L2FLAG_PCD_19   0x004000
#define MERIS_L2FLAG_PCD_18   0x008000
#define MERIS_L2FLAG_PCD_17   0x010000
#define MERIS_L2FLAG_PCD_16   0x020000
#define MERIS_L2FLAG_PCD_15   0x040000
#define MERIS_L2FLAG_PCD_14   0x080000
#define MERIS_L2FLAG_PCD_1_13   0x100000
#define MERIS_L2FLAG_WATER   0x200000
#define MERIS_L2FLAG_CLOUD   0x400000
#define MERIS_L2FLAG_LAND   0x800000

Functions

double trunc (double x)
void calc_smile_delta (int *shouldCorrect, int *indexes1, int *indexes2, float *radiances, float *theoretWLs, float *theoretE0s, float *detectorWLs, float *detectorE0s, float *delta)
void radcor (l1str *l1rec, int32_t ip, int land)
int openl1_meris_N1 (filehandle *file)
 opens a MERIS file for reading to load into L1 record
int readl1_meris_N1 (filehandle *file, int32 scan, l1str *l1rec)
 reads 1 scan line from MERIS file, loads l1rec
int readl1_lonlat_meris_N1 (filehandle *file, int32 scan, l1str *l1rec)
 reads 1 scan line from MERIS file, loads l1rec
int closel1_meris_N1 (filehandle *file)
 closes MERIS file, loads l1rec

Define Documentation

#define MERIS_BANDINFO_FILENAME   "band_info.txt"

Definition at line 23 of file l1_meris_N1.c.

#define MERIS_FR_DETECTORS   3700

Definition at line 32 of file l1_meris_N1.c.

#define MERIS_L1FLAG_BRIGHT   0x20

Definition at line 52 of file l1_meris_N1.c.

#define MERIS_L1FLAG_COASTLINE   0x40

Definition at line 53 of file l1_meris_N1.c.

#define MERIS_L1FLAG_COSMETIC   0x01

Definition at line 47 of file l1_meris_N1.c.

#define MERIS_L1FLAG_DUPLICATED   0x02

Definition at line 48 of file l1_meris_N1.c.

#define MERIS_L1FLAG_GLINT   0x04

Definition at line 49 of file l1_meris_N1.c.

#define MERIS_L1FLAG_INVALID   0x80

Definition at line 54 of file l1_meris_N1.c.

#define MERIS_L1FLAG_LAND   0x10

Definition at line 51 of file l1_meris_N1.c.

#define MERIS_L1FLAG_SUSPECT   0x08

Definition at line 50 of file l1_meris_N1.c.

#define MERIS_L2FLAG_ABSOA_DUST   0x000200

Definition at line 73 of file l1_meris_N1.c.

#define MERIS_L2FLAG_CASE2_ANOM   0x000080

Definition at line 71 of file l1_meris_N1.c.

#define MERIS_L2FLAG_CASE2_S   0x000100

Definition at line 72 of file l1_meris_N1.c.

#define MERIS_L2FLAG_CASE2_Y   0x000040

Definition at line 70 of file l1_meris_N1.c.

#define MERIS_L2FLAG_CLOUD   0x400000

Definition at line 86 of file l1_meris_N1.c.

#define MERIS_L2FLAG_COASTLINE   0x002000

Definition at line 77 of file l1_meris_N1.c.

#define MERIS_L2FLAG_COSMETIC   0x001000

Definition at line 76 of file l1_meris_N1.c.

#define MERIS_L2FLAG_DDV   0x000008

Definition at line 67 of file l1_meris_N1.c.

#define MERIS_L2FLAG_HIGH_GLINT   0x000004

Definition at line 66 of file l1_meris_N1.c.

#define MERIS_L2FLAG_ICE_HAZE   0x000020

Definition at line 69 of file l1_meris_N1.c.

#define MERIS_L2FLAG_LAND   0x800000

Definition at line 87 of file l1_meris_N1.c.

#define MERIS_L2FLAG_MEDIUM_GLINT   0x000010

Definition at line 68 of file l1_meris_N1.c.

#define MERIS_L2FLAG_OOADB   0x000400

Definition at line 74 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_14   0x080000

Definition at line 83 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_15   0x040000

Definition at line 82 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_16   0x020000

Definition at line 81 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_17   0x010000

Definition at line 80 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_18   0x008000

Definition at line 79 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_19   0x004000

Definition at line 78 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PCD_1_13   0x100000

Definition at line 84 of file l1_meris_N1.c.

#define MERIS_L2FLAG_PRESSURE_CONF   0x000002

Definition at line 65 of file l1_meris_N1.c.

#define MERIS_L2FLAG_SUSPECT   0x000800

Definition at line 75 of file l1_meris_N1.c.

#define MERIS_L2FLAG_WATER   0x200000

Definition at line 85 of file l1_meris_N1.c.

#define MERIS_L2FLAG_WHITE_SCATTER   0x000001

Definition at line 64 of file l1_meris_N1.c.

#define MERIS_LINE_MAX   255

Definition at line 37 of file l1_meris_N1.c.

#define MERIS_NBANDS   15

Definition at line 21 of file l1_meris_N1.c.

#define MERIS_REDUCED_RESOLUTION_MAX   1121

Definition at line 30 of file l1_meris_N1.c.

#define MERIS_RR_DETECTORS   925

Definition at line 34 of file l1_meris_N1.c.

#define MERIS_SUN_FLUX_FR_FILENAME   "sun_spectral_flux_fr.txt"

Definition at line 26 of file l1_meris_N1.c.

#define MERIS_SUN_FLUX_RR_FILENAME   "sun_spectral_flux_rr.txt"

Definition at line 27 of file l1_meris_N1.c.

#define MERIS_WAVELENGTH_FR_FILENAME   "central_wavelen_fr.txt"

Definition at line 24 of file l1_meris_N1.c.

#define MERIS_WAVELENGTH_RR_FILENAME   "central_wavelen_rr.txt"

Definition at line 25 of file l1_meris_N1.c.


Function Documentation

void calc_smile_delta ( int *  shouldCorrect,
int *  indexes1,
int *  indexes2,
float *  radiances,
float *  theoretWLs,
float *  theoretE0s,
float *  detectorWLs,
float *  detectorE0s,
float *  delta 
)

Definition at line 117 of file l1_meris_N1.c.

int closel1_meris_N1 ( filehandle file)

closes MERIS file, loads l1rec

Parameters:
[in]filefile handle to MERIS file
Author:
Paul E. Lyon NRL, Oct. 2006.

Definition at line 1099 of file l1_meris_N1.c.

int openl1_meris_N1 ( filehandle file)

opens a MERIS file for reading to load into L1 record

Parameters:
[in]filefile handle to MERIS file
Author:
Paul E. Lyon NRL, Oct. 2006.

Definition at line 409 of file l1_meris_N1.c.

void radcor ( l1str l1rec,
int32_t  ip,
int  land 
)

Definition at line 162 of file l1_meris_N1.c.

int readl1_lonlat_meris_N1 ( filehandle file,
int32  scan,
l1str l1rec 
)

reads 1 scan line from MERIS file, loads l1rec

Parameters:
[in]filefile handle to MERIS file
[in]scanscan number to read [out] l1rec output l1rec
Author:
Paul E. Lyon NRL, Oct. 2006.

Definition at line 1032 of file l1_meris_N1.c.

int readl1_meris_N1 ( filehandle file,
int32  scan,
l1str l1rec 
)

reads 1 scan line from MERIS file, loads l1rec

Parameters:
[in]filefile handle to MERIS file
[in]scanscan number to read [out] l1rec output l1rec
Author:
Paul E. Lyon NRL, Oct. 2006. W. Robinson, SAIC, 22 May 2012 account for msec going to next day

Definition at line 542 of file l1_meris_N1.c.

double trunc ( double  x)