OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1_meris_N1.c File Reference
#include "l1_meris_N1.h"
#include "epr_api.h"
#include "epr_field.h"
#include <math.h>
#include "smile.h"
#include <libnav.h>
#include "l1.h"
#include <stdbool.h>
Include dependency graph for l1_meris_N1.c:

Go to the source code of this file.

Macros

#define MERIS_NBANDS   15
 
#define MERIS_BANDINFO_FILENAME   "band_info_meris.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_FR_DETECTORS   3700
 
#define MERIS_RR_DETECTORS   925
 
#define MERIS_LINE_MAX   1024
 
#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

int openl1_meris_N1 (filehandle *file)
 
int readl1_meris_N1 (filehandle *file, int32_t scan, l1str *l1rec)
 
int readl1_lonlat_meris_N1 (filehandle *file, int32_t scan, l1str *l1rec)
 
int closel1_meris_N1 (filehandle *file)
 

Macro Definition Documentation

◆ MERIS_BANDINFO_FILENAME

#define MERIS_BANDINFO_FILENAME   "band_info_meris.txt"

Definition at line 28 of file l1_meris_N1.c.

◆ MERIS_FR_DETECTORS

#define MERIS_FR_DETECTORS   3700

Definition at line 36 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_BRIGHT

#define MERIS_L1FLAG_BRIGHT   0x20

Definition at line 56 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_COASTLINE

#define MERIS_L1FLAG_COASTLINE   0x40

Definition at line 57 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_COSMETIC

#define MERIS_L1FLAG_COSMETIC   0x01

Definition at line 51 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_DUPLICATED

#define MERIS_L1FLAG_DUPLICATED   0x02

Definition at line 52 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_GLINT

#define MERIS_L1FLAG_GLINT   0x04

Definition at line 53 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_INVALID

#define MERIS_L1FLAG_INVALID   0x80

Definition at line 58 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_LAND

#define MERIS_L1FLAG_LAND   0x10

Definition at line 55 of file l1_meris_N1.c.

◆ MERIS_L1FLAG_SUSPECT

#define MERIS_L1FLAG_SUSPECT   0x08

Definition at line 54 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_ABSOA_DUST

#define MERIS_L2FLAG_ABSOA_DUST   0x000200

Definition at line 77 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_CASE2_ANOM

#define MERIS_L2FLAG_CASE2_ANOM   0x000080

Definition at line 75 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_CASE2_S

#define MERIS_L2FLAG_CASE2_S   0x000100

Definition at line 76 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_CASE2_Y

#define MERIS_L2FLAG_CASE2_Y   0x000040

Definition at line 74 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_CLOUD

#define MERIS_L2FLAG_CLOUD   0x400000

Definition at line 90 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_COASTLINE

#define MERIS_L2FLAG_COASTLINE   0x002000

Definition at line 81 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_COSMETIC

#define MERIS_L2FLAG_COSMETIC   0x001000

Definition at line 80 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_DDV

#define MERIS_L2FLAG_DDV   0x000008

Definition at line 71 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_HIGH_GLINT

#define MERIS_L2FLAG_HIGH_GLINT   0x000004

Definition at line 70 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_ICE_HAZE

#define MERIS_L2FLAG_ICE_HAZE   0x000020

Definition at line 73 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_LAND

#define MERIS_L2FLAG_LAND   0x800000

Definition at line 91 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_MEDIUM_GLINT

#define MERIS_L2FLAG_MEDIUM_GLINT   0x000010

Definition at line 72 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_OOADB

#define MERIS_L2FLAG_OOADB   0x000400

Definition at line 78 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_14

#define MERIS_L2FLAG_PCD_14   0x080000

Definition at line 87 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_15

#define MERIS_L2FLAG_PCD_15   0x040000

Definition at line 86 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_16

#define MERIS_L2FLAG_PCD_16   0x020000

Definition at line 85 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_17

#define MERIS_L2FLAG_PCD_17   0x010000

Definition at line 84 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_18

#define MERIS_L2FLAG_PCD_18   0x008000

Definition at line 83 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_19

#define MERIS_L2FLAG_PCD_19   0x004000

Definition at line 82 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PCD_1_13

#define MERIS_L2FLAG_PCD_1_13   0x100000

Definition at line 88 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_PRESSURE_CONF

#define MERIS_L2FLAG_PRESSURE_CONF   0x000002

Definition at line 69 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_SUSPECT

#define MERIS_L2FLAG_SUSPECT   0x000800

Definition at line 79 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_WATER

#define MERIS_L2FLAG_WATER   0x200000

Definition at line 89 of file l1_meris_N1.c.

◆ MERIS_L2FLAG_WHITE_SCATTER

#define MERIS_L2FLAG_WHITE_SCATTER   0x000001

Definition at line 68 of file l1_meris_N1.c.

◆ MERIS_LINE_MAX

#define MERIS_LINE_MAX   1024

Definition at line 41 of file l1_meris_N1.c.

◆ MERIS_NBANDS

#define MERIS_NBANDS   15

Definition at line 26 of file l1_meris_N1.c.

◆ MERIS_RR_DETECTORS

#define MERIS_RR_DETECTORS   925

Definition at line 38 of file l1_meris_N1.c.

◆ MERIS_SUN_FLUX_FR_FILENAME

#define MERIS_SUN_FLUX_FR_FILENAME   "sun_spectral_flux_fr.txt"

Definition at line 32 of file l1_meris_N1.c.

◆ MERIS_SUN_FLUX_RR_FILENAME

#define MERIS_SUN_FLUX_RR_FILENAME   "sun_spectral_flux_rr.txt"

Definition at line 33 of file l1_meris_N1.c.

◆ MERIS_WAVELENGTH_FR_FILENAME

#define MERIS_WAVELENGTH_FR_FILENAME   "central_wavelen_fr.txt"

Definition at line 30 of file l1_meris_N1.c.

◆ MERIS_WAVELENGTH_RR_FILENAME

#define MERIS_WAVELENGTH_RR_FILENAME   "central_wavelen_rr.txt"

Definition at line 31 of file l1_meris_N1.c.

Function Documentation

◆ closel1_meris_N1()

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 743 of file l1_meris_N1.c.

◆ openl1_meris_N1()

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 112 of file l1_meris_N1.c.

◆ readl1_lonlat_meris_N1()

int readl1_lonlat_meris_N1 ( filehandle *  file,
int32_t  scan,
l1str *  l1rec 
)

reads 1 scan line from MERIS file, loads l1rec

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

Definition at line 679 of file l1_meris_N1.c.

◆ readl1_meris_N1()

int readl1_meris_N1 ( filehandle *  file,
int32_t  scan,
l1str *  l1rec 
)

reads 1 scan line from MERIS file, loads l1rec

Parameters
[in]filefile handle to MERIS file
[in]scanscan number to read @apram[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 275 of file l1_meris_N1.c.