/* polder.h ** author: CESBIO / CISI / CNES */ /* LIBPOL_VERSION "@(#)polder.h 1.3 98/01/16" */ #ifndef _POLDER_H_ #define _POLDER_H_ #ifndef FORTRAN /* Functions available in libpolder.a */ /* ---------------------------------- */ #define LINE 0 #define COLUMN 1 #ifdef __cplusplus extern "C" { #endif int get_Date(int id, char **begin, char **end); #ifdef __cplusplus } extern "C" { #endif int ExtractVariable_Var(int id, float **val, int type); #ifdef __cplusplus } extern "C" { #endif int ExtractVariable_Var_Byte(int id, unsigned char **val, int type); #ifdef __cplusplus } extern "C" { #endif int ExtractVariable_Var_Short(int id, unsigned short **val, int type); #ifdef __cplusplus } extern "C" { #endif int ExtractVariable_Var_Int(int id, unsigned int **val, int type); #ifdef __cplusplus } extern "C" { #endif int ExtractVariable_Grid(int id, short **val, int *size, int grid); #ifdef __cplusplus } extern "C" { #endif int ExtractPixel(int, int, int, void*, int, ...); #ifdef __cplusplus } extern "C" { #endif int ExtractNextPixel(int, int*, int*, void*, int, ...); #ifdef __cplusplus } extern "C" { #endif int InitPolder(int, int); #ifdef __cplusplus } extern "C" { #endif int OpenProduct(char*); #ifdef __cplusplus } extern "C" { #endif void CloseProduct(int); #ifdef __cplusplus } extern "C" { #endif int GetProductMaxpix(int id); #ifdef __cplusplus } extern "C" { #endif int GetProductType(int id); #ifdef __cplusplus } #endif extern int ExtractVariable_Var(int id, float **val, int type); extern int ExtractVariable_Var_Byte(int id, unsigned char **val, int type); extern int ExtractVariable_Var_Short(int id, unsigned short **val, int type); extern int ExtractVariable_Var_Int(int id, unsigned int **val, int type); extern int ExtractVariable_Grid(int id, short **val, int *size, int grid); extern int InitPolder(int NBproduct, int VerboseMode); /* InitPolder ** function: initialize a session of work with the polder library ** NBproduct: the maximum number of product to be used during the session of work ** VerboseMode: 0 => no verbose, 1 and more => verbose ** return: if failed, return a error code */ extern int OpenProduct(char* filename); /* OpenProduct ** function: open Polder leader and data files and read parameters for internal ** use filename: Polder product filename ** You can use either the Polder leader file name or the Polder data file ** name, but the two files must be present in the same directory and the ** filename must be given with its whole pathname. ** return: product identifiant which should be used as product reference in ** other functions. ** if failed, return a error code */ extern void CloseProduct(int id); /* CloseProduct ** function: close the polder Product files ** id: product identifiant ** return: N/A */ extern int GetProductMaxpix(int id); extern int GetProductType(int id); extern int ExtractPixel (int id,int line,int column,void* val,int nbpar,...); /* ExtractPixel ** function: extract parameter(s) from Polder pixel ** id: product identifiant ** line: line number ** column: column number (in Polder grid) ** val: pointer on values array ** nbpar: number of parameters to extract ** ...: parameter list (see "Parameters description") ** return: PLD_OK on success ** otherwise, return a error code */ extern int ExtractNextPixel (int id,int* line,int* column,void* val,int nbpar,...); /* ExtractNextPixel ** function: extract parameter(s) from the next record number in Polder product ** id: product identifiant ** line: line number of the pixel read ** column: column number (in Polder grid) ** val: pointer on values array ** nbpar: number of parameters to extract ** ...: parameter list (see "Parameters description") ** return: PLD_OK on success ** otherwise, return a error code */ extern int ExtractBlock(int id,int lineN,int colW,int lineS,int colE,void* val,int fmt, int nbpar,...); /* ExtractBlock ** function: extract parameter(s) on a rectangular block of pixels ** id: product identifiant ** lineN, colW: North-West point coordinates of block ** lineS, colE: South-East point coordinates of block ** val: pointer on values array ** fmt: interleaving mode (BSQ, BIL, BIP) ** nbpar: number of parameters to extract ** ...: parameter list (see "Parameters description") ** return: PLD_OK on success ** otherwise, return a error code */ extern int ExtractPixelDQX (int id,int line,int column,unsigned short int * val,int nbpar,...); /* ExtractPixelDQX ** function: extract bits for DQX parameter from Polder pixel ** id: product identifiant ** line: line number ** column: column number (in Polder grid) ** val: pointer on values array ** nbpar: number of parameters to extract ** ...: parameter list (see "dqx.h") ** return: PLD_OK on success ** otherwise, return a error code */ /* Note: other functions should be added on request */ #endif /* Definition of error codes returned by functions */ /* ----------------------------------------------- */ #define PLD_OK 0 #define PLD_UNDEF_PID -1 /* Product identifiant undefined */ #define PLD_MAX_OPENED -2 /* too many products open */ #define PLD_FILE_ACCESS -3 /* error on opening leader file */ #define PLD_ALT_FILENAME -4 /* not generic filename */ #define PLD_FILESIZE -5 /* error on accessing data */ #define PLD_PRODUCT_EMPTY -6 /* product empty */ #define PLD_PIXEL_UNDEFINED -7 /* pixel not observed */ #define PLD_NOMEM -8 /* memory allocation error */ #define PLD_INVAL -9 /* invalid parameter */ #define PLD_OUTSIDE -10 /* line outside the product */ #define PLD_LIG_INVAL -11 /* invalid lines ( 1st line > Last line) */ #define PLD_PRODUCT_UNAVAILABLE -12 /* product and libpol are not compatible */ /* Definition of interleaving mode */ /* ------------------------------- */ #define BIP 0 /* parameter values are organized by pixel: line 1 (pixel1: par.1, par.2,... / pixel2: par.1, ...) line 2 (pixel1: par.1, par.2,... / pixel2: par.1, ...) ... */ #define BIL 1 /* parameter values are organized by line: line1 (pixel1: par.1, pixel2: par.1, ..., pixeln: par.1) line1 (pixel1: par.2, pixel2: par.2, ..., pixeln: par.2) ... line2 (pixel1: par.1, pixel2: par.1, ..., pixeln: par.1) line2 (pixel1: par.2, pixel2: par.2, ..., pixeln: par.2) ... */ #define BSQ 2 /* parameter values are organized by parameter: line1 (pixel1: par.1, pixel2: par.1, ..., pixeln: par.1) line2 (pixel1: par.1, pixel2: par.1, ..., pixeln: par.1) ... line1 (pixel1: par.2, pixel2: par.2, ..., pixeln: par.2) line2 (pixel1: par.2, pixel2: par.2, ..., pixeln: par.2) ... */ #define NaN -999. /* Definition of extraction mode for directional parameters */ /* -------------------------------------------------------- */ #define RAD2REF 268435456 /* extract reflectance in place of radiance ** works with all extraction mode but LIST_++ ** usefull only with Level 1 product parameters */ #define VIEW_01 (1*65536) /* the value of the first direction . inactive */ #define VIEW_02 (2*65536) /* the value of the second direction. inactive*/ #define VIEW_03 (3*65536) #define VIEW_04 (4*65536) #define VIEW_05 (5*65536) #define VIEW_06 (6*65536) #define VIEW_07 (7*65536) #define VIEW_08 (8*65536) /* ... */ #define VIEW_09 (9*65536) /* the value may be undefined . inactive*/ #define VIEW_10 (10*65536) #define VIEW_11 (11*65536) #define VIEW_12 (12*65536) #define VIEW_13 (13*65536) #define VIEW_14 (14*65536) /* value of the fourteenth direction */ #define ALL (1*1048576) /* all values */ #define FIRST (2*1048576) /* first valid parameter value */ #define LAST (3*1048576) /* last valid parameter value */ #define MEDIAN (4*1048576) /* value for median viewing configuration. inactive*/ #define MEAN (5*1048576) /* mean of valid values */ #define NADIR (6*1048576) /* value for nearest nadir direction */ #define LIST_01 (1*16777216) /* first parameter value (valid or not) */ #define LIST_02 (2*16777216) /* two parameters that follow itself */ #define LIST_03 (3*16777216) #define LIST_04 (4*16777216) #define LIST_05 (5*16777216) /* Note: LIST_01 is default mode if omited in the argument list for a directional parameter */ /* Definition of parameter types classed by product */ /* ------------------------------------------------ */ /* Note: the parameters with '!' in the description does not be extracted with ** ExtractPixel or ExtractBlock functions. */ #define UNDEF -1 /* Parameter undefined */ /* LEVEL 1 */ /*-----------*/ #define B11 4 #define B11_NB_PAR_DIR 23 /* number of directional parameters */ #define SB 1073741824 /* signed word encoding */ #define B1_DQX 0 /* ! pixel confidence data */ #define B1_CI 1 /* rough cloud indicator */ #define B1_AZS 2 /* solar azimuth angle */ #define B1_NVD 3 /* number of available viewing directions */ #define B1_SA 4 /* ! sequence arrangement */ /* directional parameters */ #define B1_SN 5 /* sequence number within the orbit*/ #define B1_LN (6+SB) /* CCD matrix detector line number */ #define B1_CN (7+SB) /* CCD matrix detector coulmn number */ #define B1_THS 8 /* solar zenith solar angle */ #define B1_THV 9 /* view zenith angle */ #define B1_RAZ 10 /* relative azimuthal angle */ #define B1_DC_THV (11+SB) #define B1_DS_THV (12+SB) #define B1_I443 (13+SB) /* normalized radiance for channel 443 nm unpolarized */ #define B1_I443P (14+SB) /* normalized radiance for channel 443 nm polarized */ #define B1_I490 (15+SB) /* normalized radiance for channel 490 nm */ #define B1_I565 (16+SB) /* normalized radiance for channel 565 nm */ #define B1_I670P (17+SB) /* normalized radiance for channel 670 nm polarized */ #define B1_I763 (18+SB) /* normalized radiance for channel 763 nm */ #define B1_I765 (19+SB) /* normalized radiance for channel 765 nm */ #define B1_I865P (20+SB) /* normalized radiance for channel 865 nm polarized */ #define B1_I910 (21+SB) /* normalized radiance for channel 910 nm */ #define B1_Q443P (22+SB) /* 2nd component of Stockes vector for channel 443 nm polarized */ #define B1_Q670P (23+SB) /* 2nd component of Stockes vector for channel 670 nm polarized */ #define B1_Q865P (24+SB) /* 2nd component of Stockes vector for channel 865 nm polarized */ #define B1_U443P (25+SB) /* 3rd component of Stockes vector for channel 443 nm polarized */ #define B1_U670P (26+SB) /* 3rd component of Stockes vector for channel 670 nm polarized */ #define B1_U865P (27+SB) /* 3rd component of Stockes vector for channel 865 nm polarized */ /* LEVEL 2 */ /* Land Surfaces & Atmosphere: surface parameters */ /*--------------------------------------------------*/ #define L2A 24 #define L2A_NB_PAR_DIR 9 /* number of directional parameters */ #define L2_DQX 0 /* ! pixel confident data */ #define L2_THS 1 /* solar zenith angle */ #define L2_AZS 2 /* solar azimuth angle */ #define L2_NVD 3 /* number of viewing directions */ /* directional parameters */ #define L2_SN 4 /* sequence number within the orbit */ #define L2_THV 5 /* view zenith angle */ #define L2_RAZ 6 /* relative azimuth angle */ #define L2_R443 7 /* surface reflectance for channel 443 nm */ #define L2_R565 8 /* surface reflectance for channel 565 nm */ #define L2_R670 9 /* surface reflectance for channel 670 nm */ #define L2_R765 10 /* surface reflectance for channel 765 nm */ #define L2_R865 11 /* surface reflectance for channel 865 nm */ #define L2_RP865 12 /* signed polarised reflectance for channel 865 nm */ /* LEVEL 2 */ /* Land Surfaces & Atmosphere: aerosols and water vapor */ /*--------------------------------------------------------*/ #define L2C 25 #define L2_DQX 0 /* ! pixel confident data */ #define L2_TAU865 1 /* aerosol optical thickness for 865 nm */ #define L2_INDEX 2 /* particle refractive index */ #define L2_ANGST 3 /* aerosol Angstrom coefficient */ #define L2_IA 4 /* aerosol index */ #define L2_TAU865F 5 /* optical thickness, from fixed mode, for 865 nm */ #define L2_IQMES 6 /* measurement qualty index */ #define L2_IQINV 7 /* polarized radiance inversion quality index */ /* LEVEL 3 */ /* Land Surfaces & Atmosphere: surface directional signatures */ /*--------------------------------------------------------------*/ #define L3A 28 #define L3_DQX 0 /* ! pixel confident data */ #define L3_TH0 1 /* solar zenith angle */ #define L3_K443_1 2 /* 1st parameter BRDF model for channel 443 nm */ #define L3_K443_2 3 /* 2nd parameter BRDF model for channel 443 nm */ #define L3_K443_3 4 /* ... */ #define L3_ER_K443_1 5 /* Accuracy of the 1st parameter BRDF model for channel 443 nm */ #define L3_ER_K443_2 6 /* Accuracy of the 2nd parameter BRDF model for channel 443 nm */ #define L3_ER_K443_3 7 /* ... */ #define L3_K565_1 8 /* 1st parameter BRDF model for channel 565 nm */ #define L3_K565_2 9 /* 2nd parameter BRDF model for channel 565 nm */ #define L3_K565_3 10 /* ... */ #define L3_ER_K565_1 11 /* Accuracy of the 1st parameter BRDF model for channel 565 nm */ #define L3_ER_K565_2 12 /* Accuracy of the 2nd parameter BRDF model for channel 565 nm */ #define L3_ER_K565_3 13 /* ... */ #define L3_K670_1 14 /* 1st parameter BRDF model for channel 670 nm */ #define L3_K670_2 15 /* 2nd parameter BRDF model for channel 670 nm */ #define L3_K670_3 16 /* ... */ #define L3_ER_K670_1 17 /* Accuracy of the 1st parameter BRDF model for channel 670 nm */ #define L3_ER_K670_2 18 /* Accuracy of the 2nd parameter BRDF model for channel 670 nm */ #define L3_ER_K670_3 19 /* ... */ #define L3_K765_1 20 /* 1st parameter BRDF model for channel 765 nm */ #define L3_K765_2 21 /* 2nd parameter BRDF model for channel 765 nm */ #define L3_K765_3 22 /* ... */ #define L3_ER_K765_1 23 /* Accuracy of the 1st parameter BRDF model for channel 765 nm */ #define L3_ER_K765_2 24 /* Accuracy of the 2nd parameter BRDF model for channel 765 nm */ #define L3_ER_K765_3 25 /* ... */ #define L3_K865_1 26 /* 1st parameter BRDF model for channel 865 nm */ #define L3_K865_2 27 /* 2nd parameter BRDF model for channel 865 nm */ #define L3_K865_3 28 /* ... */ #define L3_ER_K865_1 29 /* Accuracy of the 1st parameter BRDF model for channel 865 nm */ #define L3_ER_K865_2 30 /* Accuracy of the 2nd parameter BRDF model for channel 865 nm */ #define L3_ER_K865_3 31 /* ... */ /* LEVEL 3 */ /* Land Surfaces & Atmosphere: albedo and NDVI */ /*-----------------------------------------------*/ #define L3B 29 #define L3_BDQX 0 /* ! pixel confident data */ #define L3_BTH0 1 /* solar zenith angle */ #define L3_RH443 2 /* directional hemispheric reflectance for channel 443 nm */ #define L3_ER_RH443 3 /* Accuracy of th e directional hemispheric reflectance for channel 443 nm*/ #define L3_RH565 4 /* directional hemispheric reflectance for channel 565 nm */ #define L3_ER_RH565 5 /* Accuracy of th e directional hemispheric reflectance for channel 565 nm*/ #define L3_RH670 6 /* directional hemispheric reflectance for channel 670 nm */ #define L3_ER_RH670 7 /* Accuracy of th e directional hemispheric reflectance for channel 670 nm*/ #define L3_RH765 8 /* directional hemispheric reflectance for channel 765 nm */ #define L3_ER_RH765 9 /* Accuracy of th e directional hemispheric reflectance for channel 765 nm*/ #define L3_RH865 10 /* directional hemispheric reflectance for channel 865 nm */ #define L3_ER_RH865 11 /* Accuracy of th e directional hemispheric reflectance for channel 865 nm*/ #define L3_NDVI 12 /* Normalised Difference Vegetation Index */ #define L3_ER_NDVI 13 /* Accuracy of Normalised Difference Vegetation Index */ #define L3_LAI 14 /* Leaf Area Index */ #define L3_ER_LAI 15 /* Accuracy of Leaf Area Index */ #define L3_VEG 16 /* Vegetation cover */ #define L3_ER_VEG 17 /* Accuracy of Vegetation cover */ /* LEVEL 3 */ /* Land Surfaces & Atmosphere: atmospheric parameters */ /*-----------------------------------------------------*/ #define L3C 30 #define L3_CDQX 0 /* ! pixel confident data */ #define L3_NB_1 1 /* number of observations used within decade 1 */ #define L3_TAU_1 2 /* mean general aerosol optical thickness within decade 1 */ #define L3_ANGST_1 3 /* mean of angstrom coefficient within decade 1 */ #define L3_IA_1 4 /* mean aerosol index within decade 1*/ #define L3_TAUF_1 5 /* mean aerosol optical thickness from fixed mode within decade 1 */ #define L3_NB_2 6 /* number of observations used within decade 2 */ #define L3_TAU_2 7 /* mean general aerosol optical thickness within decade 2 */ #define L3_ANGST_2 8 /* mean of angstrom coefficient within decade 2 */ #define L3_IA_2 9 /* mean aerosol index within decade 2*/ #define L3_TAUF_2 10 /* mean aerosol optical thickness from fixed mode within decade 2 */ #define L3_NB_3 11 /* number of observations used within decade 3 */ #define L3_TAU_3 12 /* mean general aerosol optical thickness within decade 3 */ #define L3_ANGST_3 13 /* mean of angstrom coefficient within decade 3 */ #define L3_IA_3 14 /* mean aerosol index within decade 3*/ #define L3_TAUF_3 15 /* mean aerosol optical thickness from fixed mode within decade 3 */ #define L3_NB_M 16 /* number of observations used within the month */ #define L3_TAU_M 17 /* mean general aerosol optical thickness within the month */ #define L3_ANGST_M 18 /* mean of angstrom coefficient within the month */ #define L3_IA_M 19 /* mean aerosol index within the month*/ #define L3_TAUF_M 20 /* mean aerosol optical thickness from fixed mode within the month */ #define L3_TAUQ_0 21 /* minimal general aerosol optical thickness */ #define L3_TAUQ_1 22 /* first quartile of general aerosol optical thickness */ #define L3_TAUQ_2 23 /* mean general aerosol optical thickness */ #define L3_TAUQ_3 24 /* third quartile of general aerosol optical thickness */ #define L3_TAUQ_4 25 /* maximal general aerosol optical */ #define L3_IAQ_0 26 /* minimal aerosol index */ #define L3_IAQ_1 27 /* first quartile of aerosol index */ #define L3_IAQ_2 28 /* mean aerosol index */ #define L3_IAQ_3 29 /* third quartile of aerosol index */ #define L3_IAQ_4 30 /* maximal aerosol index */ #define L3_TAUQF_0 31 /* minimal aerosol optical thickness from fixed mode */ #define L3_TAUQF_1 32 /* first quartile of aerosol optical thickness from fixed mode */ #define L3_TAUQF_2 33 /* mean aerosol optical thickness from fixed mode*/ #define L3_TAUQF_3 34 /* third quartile of aerosol optical thickness from fixed mode */ #define L3_TAUQF_4 35 /* maximal aerosol optical from fixed mode */ #define L3_F_ANGST_1 36 /* frequency of angstrom coefficient occurence in class 1 */ #define L3_F_ANGST_2 37 /* frequency of angstrom coefficient occurence in class 2 */ #define L3_F_ANGST_3 38 /* frequency of angstrom coefficient occurence in class 3 */ #define L3_F_ANGST_4 39 /* frequency of angstrom coefficient occurence in class 4 */ #define L3_F_INDEX_1 40 /* frequency of refractive index occurence in class 1 */ #define L3_F_INDEX_2 41 /* frequency of refractive index occurence in class 2 */ #define L3_F_INDEX_3 42 /* frequency of refractive index occurence in class 3 */ /* LEVEL 2 */ /* Ocean color & marine aerosols: directional parameters */ /*---------------------------------------------------------*/ #define O2A 40 #define O2A_NB_PAR_DIR 8 /* number of directional parameters */ #define O2_DQX 0 /* ! pixel confident data */ #define O2_THS 1 /* solar zenith angle */ #define O2_AZS 2 /* solar azimuth angle */ #define O2_NVD 3 /* number of viewing directions */ #define O2_X_DISX 4 /* SeaWIFS aerosol model */ #define O2_AANGST 5 /* Angstrom coefficient */ #define O2_ATAU865 6 /* aerosol optical thickness for 865 nm */ #define O2_AOMEGA 7 /* albedo for a simple diffusion */ #define O2_FOAMREFL 8 /* foam reflectance */ #define O2_IQAERO 9 /* aerosols confidence index */ #define O2_TICTIL 10 /* integration time flags */ #define O2_UO3 11 /* ozone integrated content */ #define O2_WINDVEL 12 /* wind surface velocity */ #define O2_SURFPRES 13 /* surface pressure */ /* directional parameters */ #define O2_THV 14 /* view zenith angle */ #define O2_RAZ 15 /* relative azimuth angle */ #define O2_GAMMA 16 /* diffusion angle */ #define O2_RW443 17 /* marine reflectance for channel 443 nm */ #define O2_RW490 18 /* marine reflectance for channel 490 nm */ #define O2_RW565 19 /* marine reflectance for channel 565 nm */ #define O2_RW670 20 /* marine reflectance for channel 670 nm */ #define O2_RC865 21 /* reflectance for channel 865 nm */ /* LEVEL 2 */ /* Ocean color & marine aerosols: non directional parameters */ /*-------------------------------------------------------------*/ #define O2B 41 #define O2_BDQX 0 /* ! pixel confident data */ #define O2_BTHS 1 /* solar zenith angle */ #define O2_BAZS 2 /* solar azimuth angle */ #define O2_BX_DISX 3 /* SeaWIFS aerosol model */ #define O2_BANGST 4 /* Angstrom coefficient */ #define O2_TAU865 5 /* aerosol optical thickness for 865 nm */ #define O2_BOMEGA 6 /* Albedo for a simple diffusion */ #define O2_BFOAMREFL 7 /* foam reflectance */ #define O2_BIQAERO 8 /* aerosols confidence index */ #define O2_DR443 9 /* diffuse marine reflectance for channel 443 nm */ #define O2_DR490 10 /* diffuse marine reflectance for channel 490 nm */ #define O2_DR565 11 /* diffuse marine reflectance for channel 565 nm */ #define O2_DR670 12 /* diffuse marine reflectance for channel 670 nm */ #define O2_PIGMENT 13 /* pigment concentration */ #define O2_CHLORO 14 /* chlorophyll concentration (sea wifs model) */ #define O2_WTYPE 15 /* water type */ #define O2_IQPIG 16 /* pigment confidence index */ #define O2_BBACK 17 /* back diffusion marine coefficient, for 443 nm */ #define O2_ABS443 18 /* absporption marine coefficient for 443 nm */ #define O2_ABS490 19 /* absporption marine coefficient for 490 nm */ #define O2_WSURF 20 /* surface wind */ /* LEVEL 2 */ /* Ocean color & marine aerosols: marine aerosol parameters */ /*------------------------------------------------------------*/ #define O2C 42 #define O2_DQS 0 /* ! super-pixel confident data */ #define O2_IQINVERS 1 /* inversion quality index */ #define O2_CTHS 2 /* solar zenith angle */ #define O2_TAU865T 3 /* total aerosols optical thickness, for 865 nm */ #define O2_TAU670T 4 /* total aerosols optical thickness, for 670 nm */ #define O2_CANGST 5 /* Angstrom coefficient from mix between 670 and 865 nm*/ #define O2_OMEGA 6 /* mixing simple diffusion albedo for 865nm */ #define O2_G 7 /* mixing asymetry factor */ #define O2_INDEX 8 /* aerosol index */ #define O2_REFF 9 /* mixed mode real radius */ #define O2_REFF_SMALL 10 /* small mode real radius */ #define O2_REFF_BIG 11 /* big mode real radius */ #define O2_TAU865_SMALL 12 /* aerosols optical thickness, from small model, for 865 nm */ #define O2_TAU670_SMALL 13 /* aerosols optical thickness, from small model, for 670 nm */ #define O2_ANGST_SMALL 14 /* Angstrom coefficient from mix between 670 and 865 nm small mode */ #define O2_TAU865_GS 15 /* Tau of spherical coarse mode at 865.For favorable viewing geom*/ #define O2_TAU865_GNS 16 /* Tau of non-spherical coarse mode at 865.For favorable viewing geom*/ #define O2_ID 17 /* Noshericity ratio of the big mode */ #define O2_INDEX_SMALL 18 /* small mode aerasols refractive index */ #define O2_INDEX_BIG 19 /* big mode aerasols refractive index */ /* LEVEL 3 */ /* Ocean color & marine aerosols: marine parameters synthesis */ /*-------------------------------------------------------------*/ #define O3B 45 #define O3_DQX 0 /*! pixel confident data */ /* decade 1 */ #define O3_MRAU443_D1 1 /* mean of diffuse marine reflectances, for 443 nm */ #define O3_MRAU490_D1 2 /* mean of diffuse marine reflectances, for 490 nm */ #define O3_MRAU565_D1 3 /* mean of diffuse marine reflectances, for 565 nm */ #define O3_MRAU670_D1 4 /* mean of diffuse marine reflectances, for 670 nm */ #define O3_MPIGMENT_D1 5 /* mean of pigment concentrations */ #define O3_MCHLORO_D1 6 /* mean of seaWIFS chlorophyll*/ #define O3_MTAU865_D1 7 /* mean of aerosol optical thickness, for 865 nm */ #define O3_MANGST_D1 8 /* mean of angstrom coefficient */ #define O3_MANG_TAU_D1 9 /* mean of dust index*/ #define O3_MOMEGA_D1 10 /* mean of albedo for a simple diffusion */ #define O3_MBACK_D1 11 /* mean of back diffuse coefficient */ #define O3_MABS443_D1 12 /* mean of marine absorption coefficient, for 443nm */ #define O3_MABS490_D1 13 /* mean of marine absorption coefficient, for 490nm */ #define O3_NOBS_D1 14 /* number of observations*/ #define O3_NOBSWATER_D1 15 /* number of observation for water type 1 */ #define O3_IQPIG_D1 16 /* pigment confidence index */ /* decade 2 */ #define O3_MRAU443_D2 17 /* mean of diffuse marine reflectances, for 443 nm */ #define O3_MRAU490_D2 18 /* mean of diffuse marine reflectances, for 490 nm */ #define O3_MRAU565_D2 19 /* mean of diffuse marine reflectances, for 565 nm */ #define O3_MRAU670_D2 20 /* mean of diffuse marine reflectances, for 670 nm */ #define O3_MPIGMENT_D2 21 /* mean of pigment concentrations */ #define O3_MCHLORO_D2 22 /* mean of seaWIFS chlorophyll*/ #define O3_MTAU865_D2 23 /* mean of aerosol optical thickness, for 865 nm */ #define O3_MANGST_D2 24 /* mean of angstrom coefficient */ #define O3_MANG_TAU_D2 25 /* mean of dust index*/ #define O3_MOMEGA_D2 26 /* mean of albedo for a simple diffusion */ #define O3_MBACK_D2 27 /* mean of back diffuse coefficient */ #define O3_MABS443_D2 28 /* mean of marine absorption coefficient, for 443nm */ #define O3_MABS490_D2 29 /* mean of marine absorption coefficient, for 490nm */ #define O3_NOBS_D2 30 /* number of observations*/ #define O3_NOBSWATER_D2 31 /* number of observation for water type 1 */ #define O3_IQPIG_D2 32 /* pigment confidence index */ /* decade 3 */ #define O3_MRAU443_D3 33 /* mean of diffuse marine reflectances, for 443 nm */ #define O3_MRAU490_D3 34 /* mean of diffuse marine reflectances, for 490 nm */ #define O3_MRAU565_D3 35 /* mean of diffuse marine reflectances, for 565 nm */ #define O3_MRAU670_D3 36 /* mean of diffuse marine reflectances, for 670 nm */ #define O3_MPIGMENT_D3 37 /* mean of pigment concentrations */ #define O3_MCHLORO_D3 38 /* mean of seaWIFS chlorophyll*/ #define O3_MTAU865_D3 39 /* mean of aerosol optical thickness, for 865 nm */ #define O3_MANGST_D3 40 /* mean of angstrom coefficient */ #define O3_MANG_TAU_D3 41 /* mean of dust index*/ #define O3_MOMEGA_D3 42 /* mean of albedo for a simple diffusion */ #define O3_MBACK_D3 43 /* mean of back diffuse coefficient */ #define O3_MABS443_D3 44 /* mean of marine absorption coefficient, for 443nm */ #define O3_MABS490_D3 45 /* mean of marine absorption coefficient, for 490nm */ #define O3_NOBS_D3 46 /* number of observations*/ #define O3_NOBSWATER_D3 47 /* number of observation for water type 1 */ #define O3_IQPIG_D3 48 /* pigment confidence index */ /* month */ #define O3_MRAU443 49 /* mean of diffuse marine reflectances, for 443 nm */ #define O3_MRAU490 50 /* mean of diffuse marine reflectances, for 490 nm */ #define O3_MRAU565 51 /* mean of diffuse marine reflectances, for 565 nm */ #define O3_MRAU670 52 /* mean of diffuse marine reflectances, for 670 nm */ #define O3_ERAU443 53 /* standard deviation of diffuse marine reflectances, for 443 nm */ #define O3_ERAU490 54 /* standard deviation of diffuse marine reflectances, for 490 nm */ #define O3_ERAU565 55 /* standard deviation of diffuse marine reflectances, for 565 nm */ #define O3_ERAU670 56 /* standard deviation of diffuse marine reflectances, for 670 nm */ #define O3_MPIGMENT 57 /* mean of pigment concentrations */ #define O3_MCHLORO 58 /* mean of seaWIFS chlorophyll*/ #define O3_EPIGMENT 59 /* standard deviation of pigment concentrations */ #define O3_ECHLORO 60 /* standard deviation of seaWIFS chlorophyll*/ #define O3_MINPIGMENT 61 /* minimum of pigment concentration */ #define O3_MAXPIGMENT 62 /* maximum of pigment concentration */ #define O3_MINCHLORO 63 /* minimum of seaWIFS chlorophyll*/ #define O3_MAXCHLORO 64 /* maximum of seaWIFS chlorophyll*/ #define O3_MTAU865 65 /* mean of aerosol optical thickness, for 865 nm */ #define O3_ETAU865 66 /* standard deviation of aerosol optical thickness, for 865 nm */ #define O3_MINTAU865 67 /* minimum of aerosol optical thickness, for 865 nm */ #define O3_MAXTAU865 68 /* maximum of aerosol optical thickness, for 865 nm */ #define O3_MANGST 69 /* mean of angstrom coefficient for a month*/ #define O3_EANGST 70 /* standard deviation of angstrom coefficient */ #define O3_MANG_TAU 71 /* mean of dust index for a month*/ #define O3_EANG_TAU 72 /* standard deviation of dust index */ #define O3_MOMEGA 73 /* mean of a simple diffusion albedo for a month*/ #define O3_EOMEGA 74 /* standard deviation a simple diffusion albedo */ #define O3_MBACK 75 /* mean of back diffuse coefficient for a month*/ #define O3_MABS443 76 /* mean of marine absorption coefficient for a month, for 443nm */ #define O3_MABS490 77 /* mean of marine absorption coefficient for a month, for 490nm */ #define O3_EBACK 78 /* standard deviation of back diffuse coefficient */ #define O3_EABS443 79 /* standard deviation of marine absorption coefficient , for 443nm */ #define O3_EABS490 80 /* standard deviation of marine absorption coefficient , for 490nm */ #define O3_NOBS 81 /* number of observations */ #define O3_NOBSWATER 82 /* number of observation for water type 1 */ #define O3_IQPIG 83 /* pigment confidence index */ /* LEVEL 3 */ /* Ocean color & marine aerosols: marine aerosol parameters */ /*------------------------------------------------------------*/ #define O3C 46 #define O3_DQS 0 /* ! super-pixel confident data */ /* decade 1 */ #define O3_SNOBS_D1 1 /* number of observations used for decade synthesis */ #define O3_STAU865_D1 2 /* mean of aerosol optical thickness, for 865 nm */ #define O3_STAU865_SMALL_D1 3 /* mean of aerosol optical thickness from small model, for 865 nm */ #define O3_SANGST_D1 4 /* mean of Angstrom coefficients */ #define O3_SANGST_SMALL_D1 5 /* mean of Angstrom coefficients from small model*/ #define O3_SINDEX_D1 6 /* mean of aerosol index */ /* decade 2 */ #define O3_SNOBS_D2 7 /* number of observations used for decade synthesis */ #define O3_STAU865_D2 8 /* mean of aerosol optical thickness, for 865 nm */ #define O3_STAU865_SMALL_D2 9 /* mean of aerosol optical thickness from small model, for 865 nm */ #define O3_SANGST_D2 10 /* mean of Angstrom coefficients */ #define O3_SANGST_SMALL_D2 11 /* mean of Angstrom coefficients from small model*/ #define O3_SINDEX_D2 12 /* mean of aerosol index */ /* decade 3 */ #define O3_SNOBS_D3 13 /* number of observations used for decade synthesis */ #define O3_STAU865_D3 14 /* mean of aerosol optical thickness, for 865 nm */ #define O3_STAU865_SMALL_D3 15 /* mean of aerosol optical thickness from small model, for 865 nm */ #define O3_SANGST_D3 16 /* mean of Angstrom coefficients */ #define O3_SANGST_SMALL_D3 17 /* mean of Angstrom coefficients from small model*/ #define O3_SINDEX_D3 18 /* mean of aerosol index */ /* month */ #define O3_SNOBS 19 /* number of observations used for monthly synthesis */ #define O3_SNOBS_OPT 20 /* number of observations used for monthly synthesis with optimal geom used*/ #define O3_STAU865 21 /* mean of aerosol optical thickness, for 865 nm */ #define O3_STAU865_SMALL 22 /* mean of aerosol optical thickness from small model, for 865 nm */ #define O3_SANGST 23 /* mean of Angstrom coefficients */ #define O3_SANGST_SMALL 24 /* mean of Angstrom coefficients from small model*/ #define O3_SINDEX 25 /* mean of aerosol index for monthly synthesis */ #define O3_STAU865_PP 26 /* mean of tau from small model, for 865 nm, with optimal geom used */ #define O3_STAU865_GS 27 /* mean of tau from spherical coarse mode, for 865 nm, with optimal geom used */ #define O3_STAU865_GNS 28 /* mean of tau from non-spherical coarse mode, for 865 nm, with optimal geom used */ #define O3_STAU865_GC 29 /* mean of tau from coarse mode, for 865 nm, with optimal geom used */ #define O3_SID 30 /* relative contribution of non spherical particles to O3_STAU865_GC */ #define O3_SQTAU865_1 31 /* aerosol optical thickness monthly quartile, for 865 nm */ #define O3_SQTAU865_2 32 /* aerosol optical thickness monthly quartile, for 865 nm */ #define O3_SQTAU865_3 33 /* aerosol optical thickness monthly quartile, for 865 nm */ #define O3_SQTAU865_4 34 /* aerosol optical thickness monthly quartile, for 865 nm */ #define O3_SQTAU865_5 35 /* aerosol optical thickness monthly quartile, for 865 nm */ #define O3_SQTAU865_SMALL_1 36 /* aerosol optical thickness monthly quartile from small model, for 865 nm */ #define O3_SQTAU865_SMALL_2 37 /* aerosol optical thickness monthly quartile from small model, for 865 nm */ #define O3_SQTAU865_SMALL_3 38 /* aerosol optical thickness monthly quartile from small model, for 865 nm */ #define O3_SQTAU865_SMALL_4 39 /* aerosol optical thickness monthly quartile from small model, for 865 nm */ #define O3_SQTAU865_SMALL_5 40 /* aerosol optical thickness monthly quartile from small model, for 865 nm */ #define O3_SANGST_1 41 /* Angstrom coefficient monthly frequency */ #define O3_SANGST_2 42 /* Angstrom coefficient monthly frequency */ #define O3_SANGST_3 43 /* Angstrom coefficient monthly frequency */ #define O3_SANGST_4 44 /* Angstrom coefficient monthly frequency */ #define O3_SANGST_SMALL_1 45 /* Angstrom coefficient monthly frequency from small model*/ #define O3_SANGST_SMALL_2 46 /* Angstrom coefficient monthly frequency from small model*/ #define O3_SANGST_SMALL_3 47 /* Angstrom coefficient monthly frequency from small model*/ #define O3_SANGST_SMALL_4 48 /* Angstrom coefficient monthly frequency from small model*/ #define O3_SINDEX_SMALL_1 49 /* aerosols refractive index monthly frequency from small model*/ #define O3_SINDEX_SMALL_2 50 /* aerosols refractive index monthly frequency from small model*/ #define O3_SINDEX_SMALL_3 51 /* aerosols refractive index monthly frequency from small model*/ #define O3_SINDEX_BIG_1 52 /* aerosols refractive index monthly frequency from big model*/ #define O3_SINDEX_BIG_2 53 /* aerosols refractive index monthly frequency from big model*/ #define O3_SINDEX_BIG_3 54 /* aerosols refractive index monthly frequency from big model*/ #define O3_SREFFRAD_1 55 /* aerosols effective beam monthly frequency */ #define O3_SREFFRAD_2 56 /* aerosols effective beam monthly frequency */ #define O3_SREFFRAD_3 57 /* aerosols effective beam monthly frequency */ #define O3_SREFFRAD_4 58 /* aerosols effective beam monthly frequency */ #define O3_SREFFRAD_SMALL_1 59 /* aerosols effective beam monthly frequency from small model */ #define O3_SREFFRAD_SMALL_2 60 /* aerosols effective beam monthly frequency from small model */ #define O3_SREFFRAD_SMALL_3 61 /* aerosols effective beam monthly frequency from small model */ #define O3_SREFFRAD_SMALL_4 62 /* aerosols effective beam monthly frequency from small model */ /* LEVEL 2 */ /* Earth radiation and clouds */ /*-----------------------------*/ #define RC_OPT 536870912 /* OPTION for distribution */ #define R2B 56 #define R2_TAB_I 8192 #define R2_TAB_J 512 #define R2B_NB_PAR_DIR 10 /* number of directional parameters */ #define R2_DQS 0 /* ! super-pixel confidence data */ #define R2_H 1 /* super-pixel UTC time : hour */ #define R2_MN 2 /* super-pixel UTC time : minutes */ #define R2_NI 3 /* number of viewing directions */ #define R2_NRNP 4 /* number of viewing directions for Rayleigh */ /* number of elementary pixels*/ #define R2_MINMAXGLIT 5 /* number of the first direction in the glitter */ /* number of the last direction in the glitter */ #define R2_MU0 6 /* cosine of solar zenithal angle for centralpixel */ #define R2_AVIS 7 /* Mean of albedos calculated by pixel and by direction */ /* in visible wavelenght (670 nm over land or 865 over sea) */ #define R2_RSDAVIS 8 /* Relative spatial dispertion of albedos calculated by pixel*/ /* and by direction in visible wavelenght */ #define R2_RADAVIS 9 /* Relative angular dispertion of albedos calculated by pixel*/ /* and by direction in visible wavelenght */ #define R2_QAVIS 10 /* Quality index dispertion of albedos calculated by pixel*/ /* and by direction in visible wavelenght */ #define R2_ASCVIS 11 /* albedo of the scene supposed as homgeneous in the visible */ /* wavelenght (670 nm over land or 865 over sea) */ #define R2_RADASCVIS 12 /*Relative spatial dispertion of albedo of the scene supposed */ /* as homgeneous in the visible wavelenght (670 nm over land or 865 over sea)*/ #define R2_AVISCLEAR 13 /* "estimated clear sky" albedo in visiblewavelenght */ /* (670 nm over land or 865 over sea) */ #define R2_ASW 14 /* Albedo for lambda SW */ #define R2_ASWCLEAR 15 /* "estimated clear sky" albedo for lambda SW */ #define R2_CN 16 /* Cloud cover */ #define R2_CNPLUSMOINS 17 /* Rate of indefinite pixels redistributed "clear sky" */ /* Rate of indefinite pixels redistributed "cloudy" */ #define R2_QCN 18 /* Quality index of cloud cover */ #define R2_M_UH2O 19 /* mean of apparent water vapor content on clear sky pixels */ #define R2_QH2O 20 /* Apparent water vapour content on clear sky pixels */ #define R2_M_PCLOUD 21 /* mean of corrected cloud O2 pressure (on cloudy pixels) */ #define R2_S_PCLOUD 22 /* Angular deviation of cloud O2 pressure on cloudy pixels)*/ #define R2_M_RAYL 23 /* mean of cloud Rayleigh pressure (on cloudy pixels) */ #define R2_S_RAYL 24 /* Angular deviation of cloud Rayleigh pressure (on cloudy pixels)*/ #define R2_TAU 25 /* Mean of optical thicness on cloudy pixels in visible wavelenght */ /* (670 nm over land or 865 over sea) */ #define R2_RSDTAU 26 /* Relative standar deviation of optical thickness on cloudy pixels */ /* in visible wavelenght (670 nm over land or 865 over sea) */ #define R2_EPSTAU 27 /* coefficient of heterogeneousness on clouy superpixels */ /* in visible wavelenght (670 nm over land or 865 over sea) */ #define R2_ASVIS 28 /* Cloud spherical albedo in visible wavelenght */ /* (670 nm over land or 865 over sea) */ #define R2_INDPHASE 29 /* cloud phase quality index (liquid, ice, mixed, */ /* undetermined, non calculated with quality hierarchy */ #define R2_IND_MICRO 30 /* indicator of ice crystals type */ #define R2_STRAT670 31 /* stratospheric aerosols optical thickness for 670 nm */ #define R2_UO3 32 /* integrated contents of ozone */ #define R2_VVS 33 /* surface wind speed */ #define R2_PHIVS 34 /* surface wind direction */ #define R2_PSURF 35 /* surface pressure */ #define R2_TK 36+R2_TAB_I + 10*R2_TAB_J /* temperature profile, estimated from Meteo data */ #define R2_UK 46+R2_TAB_I + 10*R2_TAB_J /* integrated water vapor profile, estimated from Meteo data */ /* directional parameters */ #define R2_M_THV 56 /* zenithal viewing angle for central pixel */ #define R2_M_AZ 57 /* relative azimuth angle for central pixel */ #define R2_M_RVIS 58 /* Mean of Np corrected reflectance in visible */ /* wavelenght (670 nm over land or 865 over sea) */ #define R2_M_AVIS 59 /* Mean of Np albedo in visible wavelenght (670 nm over land or 865 over sea) */ #define R2_M_RSW 60 /* Mean of Np corrected reflectance for lambda SW*/ #define R2_M_ASW 61 /* Mean of Np albedo for lambda SW */ #define R2_LPMOD865 62 /* mean of Np polaried "modified" radiances for 865 nm */ #define R2_PCTCLOUCLEAR 63 /* ratio of cloud pixels before "indetermination" removal (10 classes) */ /* ratio of cloud sky pixels before "indetermination" removal (10 classes) */ #define R2_DCN 64 /* directional cloud cover */ #define R2_SVIS 65 /* Cloud spherical albedo in visible wavelenght (670 nm over land or 865 over sea) */ /* LEVEL 3 */ /* Earth radiation and clouds */ /*-----------------------------*/ #define R3B 61 #define R3_TAB_I 8192 #define R3_TAB_J 512 #define R3_NJ 0 /* number of observation days */ #define R3_NORB_TOT 1 /* number of orbits / super-pixel processed */ #define R3_NORB_SNOW 2 /* number of orbits / snow-ice risk */ #define R3_NORB_CLEAR 3 /* number of orbits/cloud cover is zero */ #define R3_NORB_CN 4 /* number of orbits/cloud cover not zero */ #define R3_NORB_TAU 5 /* number of orbits/albedo determined */ #define R3_NORB_PCLOUD 6 /* number of orbits/corrected cloud O2 pressure determined */ #define R3_NORB_PRAY 7 /* number of orbits/cloud Rayleigh pressure determined */ #define R3_NORB_PHASE 8 /* number of orbits/phase determined */ #define R3_NORB_UH2O 9 /* number of orbits/UH2O determined */ #define R3_M_MU0 10 /* monthly mean of zenithal solar cosines MUs */ #define R3_M_AVIS 11 /* monthly mean of albedos in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_S_AVIS 12 /* temporal standard deviation of albedos in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_M_AVISCLEAR 13 /* monthly mean of " clear sky" albedos in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_S_AVISCLEAR 14 /* temporal standard deviation of " clear sky" albedos in visible */ /* wavelenght (670nm over land or 865 over sea) */ #define R3_M_AVISMCLEAR 15 /* monthly mean of " estimated clear sky" albedos in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_M_ASW 16 /* monthly mean of albedos , for SW */ #define R3_S_ASW 17 /* temporal standard deviation of albedos , for SW */ #define R3_M_ASWCLEAR 18 /* monthly mean of" clear sky" albedos , for SW */ #define R3_S_ASWCLEAR 19 /* temporal standard deviation of" clear sky" albedos , for SW */ #define R3_M_ASWMCLEAR 20 /* monthly mean of" estimated clear sky" albedos , for SW */ #define R3_M_FINC 21 /* monthly mean the incidental diurnal flux */ #define R3_M_FREFL 22 /* monthly mean the reflected diurnal flux */ #define R3_M_FREFLCLEAR 23 /* monthly mean the "clear sky" reflected diurnal flux */ #define R3_M_CN 24 /* monthly mean of cloud cover */ #define R3_S_CN 25 /* temporal standard deviation of cloud cover */ #define R3_M_CLEARCLOUD 26 /* monthly rate of indefinite pixels redistributed */ /* "clear sky" outside glitter*/ /* monthly rate of indefinite pixels redistributed*/ /* "cloudy" outside glitter*/ #define R3_M_H2O 27 /* monthly mean of apparent water vapor content on clear-sky pixels */ #define R3_S_H2O 28 /* temporal standard deviation of apparent water vapor content on clear-sky pixels */ #define R3_M_PCLOUD 29 /* monthly mean of corrected cloud O2 pressure, */ /* balanced with CN (on cloudy pixels)*/ #define R3_S_PCLOUD 30 /* temporale standard deviation of corrected cloud O2 pressure, */ /* balanced with CN (on cloudy pixels)*/ #define R3_M_PRAY 31 /* monthly mean of cloud Rayleigh pressure (on cloudy pixels) */ #define R3_S_PRAY 32 /* temporal standard deviation of cloud Rayleigh pressure (on cloudy pixels)*/ #define R3_M_TAU 33 /* mean of cloud optical thickness in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_SR_TAU 34 /* relative temporal standard deviation of cloud optical thickness in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_M_TAULIQ 35 /* mean of liquid cloud optical thickness in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_M_TAUICE 36 /* mean of ice cloud optical thickness in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_M_TAUMIX 37 /* mean of mixed phase cloud optical thickness in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_M_ASVIS 38 /* monthly mean of spherical albedos in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_S_ASVIS 39 /* temporal standard deviation of spherical albedos in visible wavelenght */ /* (670nm over land or 865 over sea) */ #define R3_FRE_PHASE 40+R3_TAB_I + 4*R3_TAB_J /* cloud phase distribution (cover percentage in 4 classes) */ #define R3_FRE_CRIS 44+R3_TAB_I + 7*R3_TAB_J /* ice crystal types distribution (cover percentage in 7 classes) */ #endif