|
ocssw
1.0
|
00001 #ifndef _INPUT_STR_H 00002 #define _INPUT_STR_H 00003 00004 #include <stdio.h> 00005 #include "hdf.h" 00006 #include "l12_parms.h" 00007 #include "l2prod.h" 00008 #include "filter.h" 00009 00010 typedef struct input_struct { 00011 00012 int32_t sensorID; 00013 int32_t subsensorID; 00014 int32_t format; 00015 int modis_subset_compat; /* force modis file to be read as subsetted */ 00016 00017 00018 char ifile [MAX_IFILES][FILENAME_MAX]; 00019 char ofile [MAX_OFILES][FILENAME_MAX]; 00020 char fmtofile[MAX_OFILES][5]; 00021 char l2prod [MAX_OFILES][PRODSTRLEN]; 00022 char suite [32]; 00023 char ilist [FILENAME_MAX]; 00024 char calfile [FILENAME_MAX]; 00025 char xcalfile[FILENAME_MAX]; 00026 char polfile [FILENAME_MAX]; 00027 char cldfile [FILENAME_MAX]; 00028 char geofile [FILENAME_MAX]; 00029 char metafile[FILENAME_MAX]; 00030 char btfile [FILENAME_MAX]; 00031 char sstcoeffile [FILENAME_MAX]; 00032 char sst4coeffile[FILENAME_MAX]; 00033 char sstssesfile [FILENAME_MAX]; 00034 char sst4ssesfile[FILENAME_MAX]; 00035 char sstmirrfile [FILENAME_MAX]; 00036 char sst4mirrfile[FILENAME_MAX]; 00037 char picfile[FILENAME_MAX]; 00038 char owtfile[FILENAME_MAX]; 00039 char owtchlerrfile[FILENAME_MAX]; 00040 char vcnnfile[FILENAME_MAX]; 00041 char def_l2prod[MAX_OFILES][PRODSTRLEN]; 00042 00043 char aermodels [MAXAERMOD][32]; 00044 int32_t naermodels; 00045 int32_t aermodmin; 00046 int32_t aermodmax; 00047 float aermodrat; 00048 00049 int32_t evalmask; 00050 int32_t mode; /* 0: Forward processing only */ 00051 /* 1: Inverse calibration mode, given Lw */ 00052 /* 2: Inverse calibration mode, given nLw */ 00053 /* 3: Inverse calibration mode, assuming nLw=0 */ 00054 int32_t spixl; /* starting pixel no. of the input (1-rel) */ 00055 int32_t epixl; /* ending pixel no. of the input (1-rel) */ 00056 int32_t dpixl; /* pixel subsampling increment */ 00057 int32_t sline; /* starting line no. of the input (1-rel) */ 00058 int32_t eline; /* ending line no. of the input (1-rel) */ 00059 int32_t dline; /* line subsampling increment */ 00060 int32_t ctl_pt_incr; /* control-point reduction factor */ 00061 00062 int32_t proc_ocean; /* 1=perform ocean-specific processing */ 00063 int32_t proc_land; /* 1=perform land-specific processing */ 00064 int32_t proc_sst; /* 1=perform sst-specific processing */ 00065 int32_t atmocor; /* 1=perform atmospheric correction */ 00066 int32_t seawater_opt; /* pure seawater IOP options */ 00067 int32_t aer_opt; /* aerosol model option */ 00068 int32_t aer_wave_short; /* shortest wavelength for model selection */ 00069 int32_t aer_wave_long; /* longest wavelength for model selection */ 00070 int32_t aer_swir_short; /* shortest wavelength foe swir to nir corr */ 00071 int32_t aer_swir_long; /* longest wavelength for swir to nir corr */ 00072 float aer_rrs_short; /* Rrs at shortest aerosol wavelength */ 00073 float aer_rrs_long; /* Rrs at longest aerosol wavelength */ 00074 float aer_angstrom; /* angstrom for aerosol model selection */ 00075 int32_t gas_opt; /* 1=ozone, 2=co2, 4=no2, 8=h2o */ 00076 int32_t brdf_opt; /* 1=Fresnel, 2=Rgoth, 3=f/Q*Rgoth */ 00077 int32_t iop_opt; /* Base IOP model for downstream products */ 00078 int32_t pol_opt; /* polarization correction option */ 00079 int32_t rad_opt; /* radcor switch for MERIS smile correction */ 00080 int32_t ocrvc_opt; /* OCR-VC switch */ 00081 int32_t absaer_opt; /* absorbing aerosol test option */ 00082 int32_t aer_iter_max; /* aerosol_iteration_limit */ 00083 int32_t glint_opt; /* 1=apply glint correction */ 00084 int32_t outband_opt; /* 1=apply seawifs out-of-band correction */ 00085 int32_t oxaband_opt; /* 1=apply seawifs 765 nm Oxygen corr */ 00086 int32_t filter_opt; /* 1=apply filtering in filter_file */ 00087 int32_t resolution; /* process at this nadir pixel res (meters) */ 00088 /* 250, 500, 1000, -1=native (modis only) */ 00089 float taua[NBANDS]; /* Input aerosol optical thickness */ 00090 00091 int32_t xcal_nwave; /* number of wavelengths to which xcal applied */ 00092 int32_t xcal_opt[NBANDS]; /* xcal option per band */ 00093 float xcal_wave[NBANDS]; /* sensor wavelengths to which xcal applied */ 00094 00095 int32_t sl_pixl; /* seawifs straylight pixel limit */ 00096 float sl_frac; /* seawifs straylight Ltyp fraction */ 00097 00098 char filter_file [FILENAME_MAX]; /* filter specification file */ 00099 fctlstr fctl; 00100 00101 char aerfile[FILENAME_MAX]; /* input aerosol spec file */ 00102 char tgtfile[FILENAME_MAX]; /* input cal target file */ 00103 00104 char met1 [FILENAME_MAX]; /* Meteorological ancillary file */ 00105 char met2 [FILENAME_MAX]; /* Meteorological ancillary file */ 00106 char met3 [FILENAME_MAX]; /* Meteorological ancillary file */ 00107 char ozone1 [FILENAME_MAX]; /* Ozone ancillary file */ 00108 char ozone2 [FILENAME_MAX]; /* Ozone ancillary file */ 00109 char ozone3 [FILENAME_MAX]; /* Ozone ancillary file */ 00110 char land [FILENAME_MAX]; /* Land mask file */ 00111 char water [FILENAME_MAX]; /* Bathymetry mask file */ 00112 char demfile[FILENAME_MAX]; /* Digital elevation map file */ 00113 char elevfile[FILENAME_MAX]; /* Elevation file */ 00114 char elev_auxfile[FILENAME_MAX]; /* Auxiliary elevation file */ 00115 char icefile[FILENAME_MAX]; /* Ice mask/fraction file */ 00116 char sstfile[FILENAME_MAX]; /* SST file */ 00117 char sssfile[FILENAME_MAX]; /* SSS file */ 00118 char no2file[FILENAME_MAX]; /* NO2 file */ 00119 char alphafile[FILENAME_MAX];/* angstrom climatology file */ 00120 char tauafile[FILENAME_MAX]; /* AOT climatology file */ 00121 char aerbinfile[FILENAME_MAX]; /* Bin file for aerosol inputs */ 00122 char owmcfile[FILENAME_MAX]; /* Ocean water classification */ 00123 char prodXMLfile[FILENAME_MAX]; /* product XML output file name */ 00124 00125 float gain [NBANDS]; /* Vicarious calibration gain */ 00126 float gain_unc[NBANDS]; /* Vicarious gain uncertainty */ 00127 float offset [NBANDS]; /* Vicarious calibration offset */ 00128 float albedo; /* cloud reflectance threshold */ 00129 float cloud_wave; /* cloud test wavelength */ 00130 float cloud_eps; /* cloud reflectance ratio */ 00131 float glint; /* glint threshold */ 00132 float sunzen; /* solar zenith angle threshold */ 00133 float satzen; /* sensor zenith angle threshold */ 00134 float epsmin; /* min epsilon for atm corr failure */ 00135 float epsmax; /* max epsilon for atm corr failure */ 00136 float tauamax; /* max tau 865 for hi-taua flagging */ 00137 float nlwmin; /* min nlw 555 for low lw flagging */ 00138 float hipol; /* high polarization threshold */ 00139 float wsmax; /* max windspeed for whitecap corr */ 00140 float coccolith[8]; /* coccolithophore algorithm coefs. */ 00141 float absaer; /* threshold for abs aerosol index */ 00142 float rhoamin; /* low aerosol threshold */ 00143 float cirrus_thresh[2]; /* cirrus reflectance thresholds */ 00144 00145 float windspeed; /* use fixed windspeed as specified */ 00146 float windangle; /* use fixed wind dir as specified */ 00147 float pressure; /* use fixed pressure as specified */ 00148 float ozone; /* use fixed ozone as specified */ 00149 float watervapor; /* use fixed pr. water as specified */ 00150 float relhumid; /* use fixed rh as specified */ 00151 float ice_threshold; /* fraction above which is flag ice */ 00152 00153 int32_t landmask; /* 0=off, 1=on */ 00154 int32_t bathmask; /* 0=off, 1=on */ 00155 int32_t cloudmask; /* 0=off, 1=on */ 00156 int32_t glintmask; /* 0=off, 1=on */ 00157 int32_t sunzenmask; /* 0=off, 1=on */ 00158 int32_t satzenmask; /* 0=off, 1=on */ 00159 int32_t hiltmask; /* 0=off, 1=on */ 00160 int32_t stlightmask; /* 0=off, 1=on */ 00161 00162 char pro_control[4096]; 00163 char input_parms[16384]; 00164 char input_files[6144]; 00165 char mask_names[1024]; 00166 char pversion[1024]; 00167 char rflag[1024]; 00168 00169 /* Vicarious calibration */ 00170 float vcal_nLw[NBANDS]; 00171 float vcal_Lw [NBANDS]; 00172 float vcal_chl; 00173 float vcal_solz; 00174 int vcal_opt; 00175 00176 /* MUMM control */ 00177 float mumm_alpha; 00178 float mumm_gamma; 00179 float mumm_epsilon; 00180 00181 /* QAA IOP model control */ 00182 float qaa_adg_s; 00183 int qaa_wave[NBANDS]; 00184 00185 /* GSM IOP model control */ 00186 int32_t gsm_opt; 00187 float gsm_adg_s; 00188 float gsm_bbp_s; 00189 float gsm_aphw[NBANDS]; 00190 float gsm_aphs[NBANDS]; 00191 int32_t gsm_fit; 00192 00193 /* GIOP IOP model control */ 00194 char giop_aph_file[FILENAME_MAX]; 00195 char giop_adg_file[FILENAME_MAX]; 00196 char giop_bbp_file[FILENAME_MAX]; 00197 int giop_maxiter; 00198 int giop_fit_opt; 00199 int giop_aph_opt; 00200 int giop_adg_opt; 00201 int giop_bbp_opt; 00202 int giop_rrs_opt; 00203 int giop_iterate; 00204 int giop_ts_opt; 00205 float giop_aph_s; 00206 float giop_adg_s; 00207 float giop_bbp_s; 00208 float giop_aph_w; 00209 float giop_adg_w; 00210 float giop_bbp_w; 00211 float giop_grd[2]; 00212 float giop_rrs_diff; 00213 float giop_wave[NBANDS]; 00214 float giop_rrs_unc[NBANDS]; 00215 00216 /* empirical chlorophyll algorithm coeffs */ 00217 int32_t chloc2w[2]; 00218 float chloc2c[5]; 00219 int32_t chloc3w[3]; 00220 float chloc3c[5]; 00221 int32_t chloc4w[4]; 00222 float chloc4c[5]; 00223 int32_t chlclarkw[3]; 00224 float chlclarkc[6]; 00225 00226 int32_t kd2w[2]; 00227 float kd2c[6]; 00228 00229 float flh_offset; 00230 00231 /* avhrr stuff */ 00232 int32_t degc; 00233 00234 /* the following fields support inverse (calibration) processing */ 00235 char il2file [MAX_OFILES][FILENAME_MAX]; 00236 char flaguse[1024]; 00237 float chlthreshold; 00238 float aotthreshold; 00239 float maxpointdist; /* Provide max distance between L1 and L2 pixels 00240 (-1. - use average resolution of L1 data 00241 default=max{L1 resolution, L2 resolution} */ 00242 00243 int32_t xcalbox; /* Pixel size of the central box in the L1 scene (e.g. 5 pixels around MOBY) to be extracted into xcalfile, default=0-whole L1 */ 00244 int32_t xcalboxcenter[2]; /* Centeral [ipix, iscan] of the box in the L1 scene, default =[0,0] - center of the L1 scene */ 00245 int32_t xcalpervalid; /* Minimum percent of valid cross-calibration pixels within the box or the L1 scene */ 00246 int32_t xcalsubsmpl; /* Subsampling rate for the data to be used for the cross-calibration */ 00247 int32_t vct_msk_water; /* vcaltarget control to use deep water mask */ 00248 char vct_water[FILENAME_MAX]; /* water mask name */ 00249 int32_t vct_min_nbin; /* min # samples in bin to accept */ 00250 float vct_fill_pct; /* minimum % of pixels in target file to allow, if < 0 00251 create empty target, aerosol files regardless */ 00252 00253 /* the following fields support l1mapgen */ 00254 int32_t stype; /* scaling type 0=log, 1=linear*/ 00255 float datamin; 00256 float datamax; 00257 float west; 00258 float east; 00259 float north; 00260 float south; 00261 int32_t width; 00262 float threshold; 00263 int32_t rgb[3]; 00264 int subsamp; 00265 int32_t outmode; 00266 int32_t xbox; /* number of pixels to retrieve around a point */ 00267 int32_t ybox; 00268 00269 int32_t deflate; 00270 } instr; 00271 00272 00273 #endif 00274 00275 00276
1.7.6.1