/*********************************************************************** * * Include file declaring all cloud test thresholds and all shared * variables pertaining to reading and stroage of threshold file values. * * R. Frey 05/07 * * ***********************************************************************/ /* Thresholds file names. */ #define THR_FILE_NAME_AQUA "thresholds.dat.aqua.C6" #define THR_FILE_NAME_TERRA "thresholds.dat.terra.C6" /* Maximum length of any line in the thresholds file (# characters). */ #define max_line_len 256 /* Maximum number of lines in the thresholds file. */ #define max_num_lines 500 /* Character array used for storage of individual lines in the threshold file. */ char lines[max_num_lines][max_line_len]; /* Storage for the number of lines found in the threshold file. */ int line_count; /* Length of version string in thresholds file (# characters+1). */ #define id_len 34 /* Threshold version ID string searched. */ char first_id[id_len]; #define FIRST_ID_AQUA "thresholds_file_ver :v6.0.0_Aqua " #define FIRST_ID_TERRA "thresholds_file_ver :v6.0.0_Terra" /* Maximum length of threshold variable. */ #define max_thrname_len 15 /* All test thresholds. */ /* Daytime land */ float dl11_12hi[1]; float dl_ref3_tpw[1]; float dl11_4lo[4]; float dlco2[4]; float dlh20[4]; float dlref1[4]; float dlref3[4]; float dlvrat[4]; float dltci[2]; /* Polar daytime land */ float pdl11_12hi[1]; float pdl_ref3_tpw[1]; float pdl11_4lo[4]; float pdlh20[4]; float pdlref1[4]; float pdlref3[4]; float pdlvrat[4]; float pdltci[2]; /* Daytime coastal land */ float dl11_12hi_t2[1]; float dl_ref3_tpw_t2[1]; float dl11_4lo_t2[4]; float dlco2_t2[4]; float dlh20_t2[4]; float dlref1_t2[4]; float dlref3_t2[4]; float dltci_t2[2]; /* Daytime polar coastal land */ float pdl11_12hi_t2[1]; float pdl_ref3_tpw_t2[1]; float pdl11_4lo_t2[4]; float pdlh20_t2[4]; float pdlref1_t2[4]; float pdlref3_t2[4]; float pdltci_t2[2]; /* Daytime ocean */ float do11_12hi[1]; float do11_4lo[4]; float dobt11[4]; float doco2[4]; float doh20[4]; float doref2[4]; float doref3[4]; float dovrathi[4]; float dovratlo[4]; float do11_86[4]; float dosst[4]; float dotci[2]; /* Daytime polar ocean */ float pdo11_12hi[1]; float pdo11_4lo[4]; float pdobt11[4]; float pdoh20[4]; float pdoref2[4]; float pdoref3[4]; float pdovrathi[4]; float pdovratlo[4]; float pdo11_86[4]; float pdosst[4]; float pdotci[2]; /* Daytime ocean spatial variability */ float dovar11[1]; /* Daytime desert */ float lds11_12hi[4]; float lds11_4hi[4]; float lds11_4lo[4]; float ldsco2[4]; float ldsh20[4]; float ldsref2[4]; float ldsref3[4]; float ldstci[2]; float ldsgemi0[4]; float ldsgemi1[4]; float ldsgemi2[4]; float lds_ref3_tpw[1]; float ldsbt1[1]; float lds_ndvi[1]; /* Daytime polar desert */ float pds11_12hi[4]; float pds11_4hi[4]; float pds11_4lo[4]; float pdsh20[4]; float pdsref2[4]; float pdsref3[4]; float pdstci[2]; float pdsgemi0[4]; float pdsgemi1[4]; float pdsgemi2[4]; float pds_ref3_tpw[1]; float pdsbt1[1]; /* Daytime coastal desert */ float lds11_12hi_c[4]; float lds11_4hi_c[4]; float lds11_4lo_c[4]; float ldsco2_c[4]; float ldsh20_c[4]; float ldsref2_c[4]; float ldsref3_c[4]; float ldstci_c[2]; float lds_ref3_tpw_c[1]; float ldsbt1_c[1]; float lds_ndvi_c[1]; /* Daytime polar coastal desert */ float pds11_12hi_c[4]; float pds11_4hi_c[4]; float pds11_4lo_c[4]; float pdsh20_c[4]; float pdsref2_c[4]; float pdsref3_c[4]; float pdstci_c[2]; float pds_ref3_tpw_c[1]; float pdsbt1_c[1]; /* Nighttime land */ float nl4_12hi[4]; float nlco2[4]; float nlh20[4]; float nl7_11s[4]; float nl_11_4l[4]; float nl_11_4h[4]; float nl_11_4m[4]; float bt_diff_bounds[2]; float nl_df1[2]; float nl_df2[2]; float nl11_12hi[1]; float nl_sfct1[1]; float nl_sfct2[1]; float nlbt1[1]; float nl_lat[1]; float nl_ndvi[1]; float nl_ndvi_Aust[1]; float nl_intadj[1]; float nl_btd1[1]; /* Nighttime polar land */ float pnlh20[4]; float pnl11_12hi[1]; float pnlbt1[1]; float pnlbt2[1]; /* Nighttime ocean */ float no11_12hi[1]; float no_intadj[1]; float no11_4lo[4]; float nobt11[4]; float noco2[4]; float noh20[4]; float no86_73[4]; float no11_86[4]; float no_11var[4]; float nosst[4]; /* Nighttime polar ocean */ float pno11_12hi[1]; float pnobt1[1]; float pno_intadj[1]; float pno11_4lo[4]; float pnobt11[4]; float pnoh20[4]; float pno86_73[4]; float pno_11var[4]; float pno11_86[4]; float pnosst[4]; /* Daytime snow */ float ds11_12hi[1]; float ds_ref3_tpw[1]; float ds11_12adj[1]; float ds4_11[4]; float ds4_11hel[4]; float dsco2[4]; float dsh20[4]; float dsref3[4]; float dstci[4]; /* Daytime polar snow */ float dps11_12hi[1]; float dps11_12adj[1]; float dps_ref3_tpw[1]; float dpsbt1[1]; float dpsbt2[1]; float dpsh20[4]; float dpsref3[4]; float dps4_11l[4]; float dps4_11h[4]; float dps4_11m1[4]; float dps4_11m2[4]; float dps4_11m3[4]; float bt_11_bnds3[4]; float bt_11_bnds1[4]; float dpstci[4]; /* Antarctic day */ float anth20[4]; float ant4_11l[4]; float ant4_11h[4]; float ant4_11m1[4]; float ant4_11m2[4]; float ant4_11m3[4]; float bt_11_bnds5[4]; float bt_11_bnds4[4]; float antbt1[1]; float antbt2[1]; /* Nighttime polar snow */ float pns11_12hi[1]; float pn11_12adj[1]; float pn65_11[1]; float pn13_11[1]; float pn7_11[1]; float pnbt1[1]; float pnbt2[1]; float pn_4_12l[4]; float pn_4_12h[4]; float pn_4_12m1[4]; float pn_4_12m2[4]; float pn_4_12m3[4]; float pn_7_11l[4]; float pn_7_11h[4]; float pn_7_11m1[4]; float pn_7_11m2[4]; float pn_7_11m3[4]; float pn_7_11lw[4]; float pn_7_11hw[4]; float pn_7_11m1w[4]; float pn_7_11m2w[4]; float pn_7_11m3w[4]; float pnsh20[4]; float pn_11_4l[4]; float pn_11_4h[4]; float pn_11_4m1[4]; float pn_11_4m2[4]; float pn_11_4m3[4]; float bt_11_bounds[4]; float bt_11_bnds2[4]; /* Nighttime snow */ float ns11_12hi[1]; float ns11_12adj[1]; float n65_11[1]; float nsbt1[1]; float nsbt2[1]; float ns11_4lo[4]; float ns4_12hi[4]; float nsco2[4]; float nsh20[4]; /* Sun glint */ float snglntv[2]; float snglntvch[2]; float snglntvcl[2]; float sg_tbdfl[1]; float sg_tbdfh[1]; float snglrat[1]; float snglnt0[4]; float snglnt10[4]; float snglnt20[4]; float snglnt_bounds[4]; /* Land restoral */ float ldsr5_4_thr[1]; float ldr5_4_thr[1]; float ld20m22[1]; float ld22m31[1]; float ldsbt11[3]; float ldsbt11bd[3]; float lnbt11[3]; /* Non-cloud obstruction */ float nc_bt37[1]; float nc37_11[1]; float nc21[1]; float nc11_12[1]; float ncrat[1]; float ncvrat[1]; float ncsig[1]; float ncd_lddf1[2]; float ncd_lddf2[3]; float ncd_ldm26[2]; float ncd_ldrat1[2]; float ncd_ldrat2[1]; float ncd_wdsst[2]; float ncd_wdsig2[1]; float ncd_wdm03[1]; float ncd_wdrat3[4]; float ncd_wdrat4[2]; float ncd_wddf1[4]; float ncd_wddf2[4]; float ncd_lnm31[1]; float ncd_lnsig31[1]; float ncd_lndf1[1]; float ncd_lndf2[1]; float ncd_lndf3[2]; float ncd_wnsst[2]; float ncd_wnsig31[1]; float ncd_wndf1[3]; float ncd_wndf3[3]; /* Snow mask */ float sm_bt11[1]; float sm_ndsi[1]; float sm_ref2[1]; float sm_ref3[1]; float sm_co2[1]; float sm85_11[1]; float sm37_11[1]; float sm37_11hel[1]; float sm_mnir[1]; /* Coast and shallow water NDVI */ float swc_ndvi[2]; /* Thin cirrus TPW check */ float tci_ref3_tpw[1]; /* Thresholds used in calculating 0.66 and 0.413 um thresholds */ float des_ndvi[1]; float fill_ndvi1[1]; float fill_ndvi2[1]; float ndvi_bnd1[1]; float ndvi_bnd2[1]; float thr_adj_fac_desert[1]; float thr_adj_fac_land[1]; /* 0.66 um NDVI-dependent thresholds for daytime land surfaces */ float b1ndvi0[12]; float b1ndvi1[12]; float b1ndvi2[12]; float b1ndvi3[12]; float b1ndvi4[12]; float b1ndvi5[12]; float b1ndvi6[12]; float b1ndvi7[12]; float b1ndvi8[12]; float b1ndvi9[12]; /* 0.413 um NDVI-dependent thresholds for daytime desert (NDVIbackround < 0.25) surfaces */ float b8ndvi0[12]; float b8ndvi1[12]; float b8ndvi2[12];