10 #include <sys/types.h>
16 static int32_t numTauas = -1;
20 char defaermodels[][32] = {
"r30f95v01",
"r30f80v01",
"r30f50v01",
"r30f30v01",
"r30f20v01",
"r30f10v01",
"r30f05v01",
"r30f02v01",
"r30f01v01",
"r30f00v01",
21 "r50f95v01",
"r50f80v01",
"r50f50v01",
"r50f30v01",
"r50f20v01",
"r50f10v01",
"r50f05v01",
"r50f02v01",
"r50f01v01",
"r50f00v01",
22 "r70f95v01",
"r70f80v01",
"r70f50v01",
"r70f30v01",
"r70f20v01",
"r70f10v01",
"r70f05v01",
"r70f02v01",
"r70f01v01",
"r70f00v01",
23 "r75f95v01",
"r75f80v01",
"r75f50v01",
"r75f30v01",
"r75f20v01",
"r75f10v01",
"r75f05v01",
"r75f02v01",
"r75f01v01",
"r75f00v01",
24 "r80f95v01",
"r80f80v01",
"r80f50v01",
"r80f30v01",
"r80f20v01",
"r80f10v01",
"r80f05v01",
"r80f02v01",
"r80f01v01",
"r80f00v01",
25 "r85f95v01",
"r85f80v01",
"r85f50v01",
"r85f30v01",
"r85f20v01",
"r85f10v01",
"r85f05v01",
"r85f02v01",
"r85f01v01",
"r85f00v01",
26 "r90f95v01",
"r90f80v01",
"r90f50v01",
"r90f30v01",
"r90f20v01",
"r90f10v01",
"r90f05v01",
"r90f02v01",
"r90f01v01",
"r90f00v01",
27 "r95f95v01",
"r95f80v01",
"r95f50v01",
"r95f30v01",
"r95f20v01",
"r95f10v01",
"r95f05v01",
"r95f02v01",
"r95f01v01",
"r95f00v01"};
32 static char default_flaguse[1024];
35 static char mainProgramName[50];
37 static char *l2gen_optionKeys[] = {
41 "-dump_options_paramfile",
42 "-dump_options_xmlfile",
90 "gas_transmittance_file",
152 "flh_base_wavelengths",
153 "flh_height_wavelength",
249 "water_spectra_file",
250 "shallow_water_depth",
306 static char *l1bgen_optionKeys[] = {
310 "-dump_options_paramfile",
311 "-dump_options_xmlfile",
337 static char *l1mapgen_optionKeys[] = {
341 "-dump_options_paramfile",
342 "-dump_options_xmlfile",
375 static char *l1brsgen_optionKeys[] = {
379 "-dump_options_paramfile",
380 "-dump_options_xmlfile",
413 static char *l1det2det_optionKeys[] = {
417 "-dump_options_paramfile",
418 "-dump_options_xmlfile",
444 static char *vcalmerge_optionKeys[] = {
448 "-dump_options_paramfile",
449 "-dump_options_xmlfile",
508 input->proc_ocean = 1;
509 input->proc_sst = -1;
510 input->proc_land = 0;
511 input->proc_cloud = 0;
512 input->proc_uncertainty=0;
515 input->glint_opt = 1;
516 input->aer_iter_max = 10;
517 input->brdf_opt = -1;
519 input->atrem_opt = 0;
520 input->atrem_full = 0;
521 input->atrem_geom = 0;
522 input->atrem_model = 0;
523 input->atrem_splitpaths = 0;
527 input->absaer_opt = 0;
528 input->cirrus_opt = 0;
531 input->gsm_adg_s = 0.02061;
532 input->gsm_bbp_s = 1.03373;
534 input->giop_maxiter = -1;
535 input->giop_fit_opt = -1;
536 input->giop_aph_opt = -1;
537 input->giop_adg_opt = -1;
538 input->giop_bbp_opt = -1;
539 input->giop_acdom_opt = -1;
540 input->giop_anap_opt = -1;
541 input->giop_bbph_opt = -1;
542 input->giop_bbnap_opt = -1;
543 input->giop_rrs_opt = -1;
544 input->giop_rrs_diff = -1.0;
545 input->giop_iterate = 0;
546 input->giop_aph_s = -1000.0;
547 input->giop_adg_s = -1000.0;
548 input->giop_uadg_s = -1000.0;
549 input->giop_bbp_s = -1000.0;
550 input->giop_ubbp_s = -1000.0;
551 input->giop_aph_w = -1.0;
552 input->giop_adg_w = -1.0;
553 input->giop_bbp_w = -1.0;
554 input->giop_grd[0] = -1000.0;
555 input->giop_grd[1] = -1000.0;
557 input->qaa_adg_s = 0.015;
563 input->seawater_opt = 0;
565 input->oxaband_opt = 99;
566 input->filter_opt = 99;
568 input->aer_wave_short = 765;
569 input->aer_wave_long = 865;
570 input->aer_wave_base = 865;
571 input->aer_swir_short = -1;
572 input->aer_swir_long = -1;
573 input->aer_rrs_short = -1.0;
574 input->aer_rrs_long = -1.0;
575 input->aer_angstrom = -999.0;
577 input->band_shift_opt = 0;
579 input->vcal_chl = -1.0;
580 input->vcal_solz = -1.0;
581 input->vcal_opt = -1;
583 input->aermodrat = 0.0;
584 input->aermodmin = -1;
585 input->aermodmax = -1;
588 input->rhoamin = 0.0001;
589 input->epsmin = 0.85;
590 input->epsmax = 1.35;
591 input->tauamax = 0.30;
592 input->nlwmin = 0.15;
595 input->mumm_alpha = 1.72;
596 input->mumm_gamma = 1.00;
597 input->mumm_epsilon = 1.00;
599 input->windspeed = -1000;
600 input->windangle = -1000;
601 input->pressure = -1000;
602 input->ozone = -1000;
603 input->relhumid = -1000;
604 input->watervapor = -1000;
605 input->ice_threshold = 0.1;
607 for (
i = 0;
i < 8;
i++)
input->coccolith[0] = 0.0;
621 input->maxpointdist = 0.0;
622 strcpy(default_flaguse,
"ATMFAIL,LAND,HIGLINT,HILT,HISATZEN,STRAYLIGHT,CLDICE,COCCOLITH,LOWLW,CHLFAIL,NAVWARN,ABSAER,MAXAERITER,ATMWARN,HISOLZEN,NAVFAIL");
626 input->xcalboxcenter[0] = 0;
627 input->xcalboxcenter[1] = 0;
628 input->xcalpervalid = 0;
629 input->xcalsubsmpl = 1;
631 input->vcal_depth = -1000;
632 input->vcal_min_nbin = 4;
633 input->vcal_min_nscene = 3;
636 input->sstreftype = 0;
637 input->sstrefdif = 100.0;
638 input->viirsnv7 = -1;
639 input->viirsnosisaf = 0;
642 input->datamin = 0.01;
643 input->datamax = 0.9;
649 input->threshold = 0.1;
652 for (
i = 0;
i < 3;
i++) {
660 input->raman_opt = 0;
662 input->shallow_water_depth=30.;
688 strcpy(mainProgramName, prog);
693 if (!strcmp(prog,
"msl12")) {
695 }
else if (!strcmp(prog,
"l2gen")) {
697 }
else if (!strcmp(prog,
"l3gen")) {
699 }
else if (!strcmp(prog,
"l1bgen_generic")) {
701 }
else if (!strcmp(prog,
"l1mapgen")) {
703 }
else if (!strcmp(prog,
"l1brsgen")) {
705 }
else if (!strcmp(prog,
"l1det2det")) {
707 }
else if (!strcmp(prog,
"vcalmerge")) {
715 sprintf(tmpStr,
"Usage: %s argument-list\n\n", prog);
716 strcat(tmpStr,
" The argument-list is a set of keyword=value pairs. The arguments can\n");
717 strcat(tmpStr,
" be specified on the commandline, or put into a parameter file, or the\n");
718 strcat(tmpStr,
" two methods can be used together, with commandline over-riding.\n\n");
719 strcat(tmpStr,
" return value: 0=OK, 1=error, 110=north,south,east,west does not intersect\n");
720 strcat(tmpStr,
" file data.\n\n");
721 strcat(tmpStr,
"The list of valid keywords follows:\n");
724 strcpy(tmpStr,
"product suite string for loading\n");
725 strcat(tmpStr,
" suite-specific defaults");
728 strcpy(tmpStr,
"input L1 file name");
732 strcpy(tmpStr,
"ifile[#]=input L1 file names (1-original and 2-vicarious) to be cross-calibrated\n");
733 strcat(tmpStr,
" or input HDF file names containing cross-calibration pixels");
738 strcpy(tmpStr,
"input L1 geolocation file name (MODIS/VIIRS only)");
741 if (!strcmp(prog,
"l1mapgen")) {
745 strcpy(tmpStr,
"output file format\n");
746 strcat(tmpStr,
" ppm: output a netPBM PPM file\n");
747 strcat(tmpStr,
" png: output a PNG file\n");
748 strcat(tmpStr,
" tiff: output a geoTIFF file");
751 }
else if (!strcmp(prog,
"l1brsgen")) {
755 strcpy(tmpStr,
"output file format\n");
756 strcat(tmpStr,
" hdf4: output a HDF4 file\n");
757 strcat(tmpStr,
" bin: output a flat binary file\n");
758 strcat(tmpStr,
" png: output a PNG file\n");
759 strcat(tmpStr,
" ppm: output a netPBM PPM file");
762 }
else if (!strcmp(prog,
"l1bgen_generic") || !strcmp(prog,
"l1det2det")) {
766 strcpy(tmpStr,
"output file format\n");
767 strcat(tmpStr,
" netcdf4: output a netCDF version 4 file\n");
768 strcat(tmpStr,
" hdf4: output a HDF version 4 file");
772 strcpy(tmpStr,
"output file #1 name,\n");
773 strcat(tmpStr,
" output vicarious L1B for inverse mode\n");
774 strcat(tmpStr,
" ofile[#] = additional output L2 file name");
778 strcpy(tmpStr,
"output file format\n");
779 strcat(tmpStr,
" netcdf4: output a netCDF version 4 file\n");
780 strcat(tmpStr,
" hdf4: output a HDF version 4 file");
784 strcpy(tmpStr,
"output file color depth for HDF4 file\n");
785 strcat(tmpStr,
" 8bit: output 8 bit color depth\n");
786 strcat(tmpStr,
" 24bit: output 24 bit color depth");
791 strcpy(tmpStr,
"input L2 file names for sensor to be\n");
792 strcat(tmpStr,
" used as a calibrator. Alternatively, a data point can be used as a\n");
793 strcat(tmpStr,
" calibrator (e.g. MOBY)\n");
794 strcat(tmpStr,
" il2file[#] = additional L2 calibration file names");
802 strcpy(tmpStr,
"L2 products to be included in ofile #1\n");
803 strcat(tmpStr,
" l2prod[#] = L2 products to be included in ofile[#]");
807 strcpy(tmpStr,
"toggle ocean processing\n");
808 strcat(tmpStr,
" 1: On\n");
809 strcat(tmpStr,
" 0: Off\n");
810 strcat(tmpStr,
" 2: force all pixels to be processed as ocean");
816 strcpy(tmpStr,
"uncertainty propagation mode\n");
817 strcat(tmpStr,
" 0: without uncertainty propagation\n");
818 strcat(tmpStr,
" 1: uncertainty propagation generating error variance");
819 strcat(tmpStr,
" 2: uncertainty propagation generating full covariance matrix");
822 strcpy(tmpStr,
"toggle SST processing\n");
823 strcat(tmpStr,
" (default=1 for MODIS, 0 otherwise)");
826 strcpy(tmpStr,
"processing mode\n");
827 strcat(tmpStr,
" 0: forward processing\n");
828 strcat(tmpStr,
" 1: inverse (calibration) mode, targeting to nLw=0\n");
829 strcat(tmpStr,
" 2: inverse (calibration) mode, given nLw target\n");
830 strcat(tmpStr,
" 3: inverse (calibration) mode, given Lw target (internally normalized)");
833 strcpy(tmpStr,
"seawater IOP options\n");
834 strcat(tmpStr,
" 0: static values\n");
835 strcat(tmpStr,
" 1: temperature & salinity-dependent seawater nw, aw, bbw");
840 sprintf(tmpStr,
"aerosol mode option\n");
842 sprintf(tmpStr,
"%s %3d: No aerosol subtraction\n", tmpStr1,
AERNULL);
844 sprintf(tmpStr,
"%s >0: Multi-scattering with fixed model (provide model number, 1-N,\n", tmpStr1);
846 sprintf(tmpStr,
"%s relative to aermodels list)\n", tmpStr1);
848 sprintf(tmpStr,
"%s %3d: White aerosol extrapolation.\n", tmpStr1,
AERWHITE);
850 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band model selection\n", tmpStr1,
AERWANG);
852 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band, RH-based model selection and\n", tmpStr1,
AERRHNIR);
854 sprintf(tmpStr,
"%s iterative NIR correction\n", tmpStr1);
856 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band model selection\n", tmpStr1,
AERWANGNIR);
858 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
860 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed model pair\n", tmpStr1,
FIXMODPAIR);
862 sprintf(tmpStr,
"%s (requires aermodmin, aermodmax, aermodrat specification)\n", tmpStr1);
864 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed model pair\n", tmpStr1,
FIXMODPAIRNIR);
866 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
868 sprintf(tmpStr,
"%s (requires aermodmin, aermodmax, aermodrat specification)\n", tmpStr1);
870 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed angstrom\n", tmpStr1,
FIXANGSTROM);
872 sprintf(tmpStr,
"%s (requires aer_angstrom specification)\n", tmpStr1);
874 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed angstrom\n", tmpStr1,
FIXANGSTROMNIR);
876 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
878 sprintf(tmpStr,
"%s (requires aer_angstrom specification)\n", tmpStr1);
880 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed aerosol optical thickness\n", tmpStr1,
FIXAOT);
882 sprintf(tmpStr,
"%s (requires taua specification)\n", tmpStr1);
884 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band model selection using Wang et al. 2009\n", tmpStr1,
AERWANGSWIR);
886 sprintf(tmpStr,
"%s to switch between SWIR and NIR. (MODIS only, requires aer_swir_short,\n", tmpStr1);
888 sprintf(tmpStr,
"%s aer_swir_long, aer_wave_short, aer_wave_long)\n", tmpStr1);
890 sprintf(tmpStr,
"%s %3d: Multi-scattering with MUMM correction\n", tmpStr1,
AERMUMM);
892 sprintf(tmpStr,
"%s and MUMM NIR calculation\n", tmpStr1);
894 sprintf(tmpStr,
"%s %3d: Multi-scattering epsilon, RH-based model selection\n", tmpStr1,
AERRHMSEPS);
896 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
898 sprintf(tmpStr,
"%s %3d: Spectral Matching of aerosols reflectance\n", tmpStr1,
AERRHSM);
900 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
902 sprintf(tmpStr,
"%s %3d: Multi-scattering epsilon (linear), RH-based model selection\n", tmpStr1,
AERRHMSEPS_lin);
904 sprintf(tmpStr,
"%s and iterative NIR correction", tmpStr1);
923 clo_addOption(
list,
"mumm_gamma",
CLO_TYPE_FLOAT,
"1.0",
"two-way Rayleigh-aerosol transmittance\n ratio for MUMM turbid water atmospheric correction");
926 strcpy(tmpStr,
"absorbing aerosol flagging option\n");
927 strcat(tmpStr,
" 0: disabled\n");
928 strcat(tmpStr,
" 1: use rhow_412 aerosol index test\n");
929 strcat(tmpStr,
" 2: GMAO ancillary aerosol test");
932 strcpy(tmpStr,
"glint correction:\n");
933 strcat(tmpStr,
" 0: glint correction off\n");
934 strcat(tmpStr,
" 1: standard glint correction\n");
935 strcat(tmpStr,
" 2: simple glint correction");
940 strcpy(tmpStr,
"oxygen A-band correction\n");
941 strcat(tmpStr,
" 0: no correction\n");
942 strcat(tmpStr,
" 1: Apply Ding and Gordon (1995) correction\n");
943 strcat(tmpStr,
" 2: Apply oxygen transmittance from gas transmittance table (see gas_opt)");
948 strcpy(tmpStr,
"Bidirectional reflectance correction\n");
949 strcat(tmpStr,
" 0: no correction\n");
950 strcat(tmpStr,
" 1: Fresnel reflection/refraction correction for sensor path\n");
951 strcat(tmpStr,
" 3: Fresnel reflection/refraction correction for sensor + solar path\n");
952 strcat(tmpStr,
" 7: Morel f/Q + Fresnel solar + Fresnel sensor\n");
953 strcat(tmpStr,
" 15: Gordon DT + Morel f/Q + Fresnel solar + Fresnel sensor\n");
954 strcat(tmpStr,
" 19: Morel Q + Fresnel solar + Fresnel sensor");
957 strcpy(tmpStr,
"gaseous transmittance bitmask selector\n");
958 strcat(tmpStr,
" 0: no correction\n");
959 strcat(tmpStr,
" 1: Ozone\n");
960 strcat(tmpStr,
" 2: CO2\n");
961 strcat(tmpStr,
" 4: NO2\n");
962 strcat(tmpStr,
" 8: H2O\n");
963 strcat(tmpStr,
" 16: Use ATREM\n");
964 strcat(tmpStr,
" 32: Use <sensor>_gas_transmittance.nc tables\n");
965 strcat(tmpStr,
" 64: CO\n");
966 strcat(tmpStr,
" 128: CH4\n");
967 strcat(tmpStr,
" 256: N2O");
972 strcpy(tmpStr,
"ATREM gaseous transmittance bitmask selector\n");
973 strcat(tmpStr,
" 0: H2O only\n");
974 strcat(tmpStr,
" 1: Ozone\n");
975 strcat(tmpStr,
" 2: CO2\n");
976 strcat(tmpStr,
" 4: NO2\n");
977 strcat(tmpStr,
" 8: CO\n");
978 strcat(tmpStr,
" 16: CH4\n");
979 strcat(tmpStr,
" 32: O2\n");
980 strcat(tmpStr,
" 64: N2O ");
982 strcpy(tmpStr,
"ATREM gaseous transmittance geometry option\n");
983 strcat(tmpStr,
" 0: Only recalculate geometry when error threshold reached (fast)\n");
984 strcat(tmpStr,
" 1: Recalculate geometry every pixel (slow)");
986 strcpy(tmpStr,
"ATREM gaseous transmittance calculation option\n");
987 strcat(tmpStr,
" 0: Calculate transmittance using k-distribution method (fast)\n");
988 strcat(tmpStr,
" 1: Calculate transmittance using full method (slow)");
990 strcpy(tmpStr,
"ATREM gaseous transmittance Atm. model selection\n");
991 strcat(tmpStr,
" 0: Use pixel's latitude and date to determine model \n");
992 strcat(tmpStr,
" 1: tropical\n");
993 strcat(tmpStr,
" 2: mid latitude summer\n");
994 strcat(tmpStr,
" 3: mid latitude winter\n");
995 strcat(tmpStr,
" 4: subarctic summer\n");
996 strcat(tmpStr,
" 5: subarctic winter\n");
997 strcat(tmpStr,
" 6: US standard 1962");
999 strcpy(tmpStr,
"ATREM gaseous transmittance split paths between solar and sensor (turns atrem_full on)\n");
1000 strcat(tmpStr,
" 0: Calculates transmittance over total path length (default)\n");
1001 strcat(tmpStr,
" 1: Calculates transmittance over separate solar and sensor paths (slow)");
1004 strcpy(tmpStr,
"IOP model for use in downstream products\n");
1005 strcat(tmpStr,
" 0: None (products requiring a or bb will fail)\n");
1006 strcat(tmpStr,
" 1: Carder\n");
1007 strcat(tmpStr,
" 2: GSM\n");
1008 strcat(tmpStr,
" 3: QAA\n");
1009 strcat(tmpStr,
" 4: PML\n");
1010 strcat(tmpStr,
" 5: NIWA\n");
1011 strcat(tmpStr,
" 6: LAS\n");
1012 strcat(tmpStr,
" 7: GIOP");
1015 strcpy(tmpStr,
"model for phytoplankton carbon\n");
1016 strcat(tmpStr,
" 1: Graff/Westberry\n");
1017 strcat(tmpStr,
" 2: Behrenfeld");
1022 strcpy(tmpStr,
"polarization correction (sensor-specific)\n");
1023 strcat(tmpStr,
" 0: no correction\n");
1024 strcat(tmpStr,
" 1: only Rayleigh component is polarized\n");
1025 strcat(tmpStr,
" 2: all radiance polarized like Rayleigh\n");
1026 strcat(tmpStr,
" 3: only Rayleigh and Glint are polarized (MODIS default)\n");
1027 strcat(tmpStr,
" 4: all radiance polarized like Rayleigh + Glint");
1030 strcpy(tmpStr,
"bandshifting option \n");
1031 strcat(tmpStr,
" 1: apply bio-optical bandshift\n");
1032 strcat(tmpStr,
" 0: linear interpolation");
1035 strcpy(tmpStr,
"GIOP model aph function type\n");
1036 strcat(tmpStr,
" 0: tabulated (supplied via giop_aph_file)\n");
1037 strcat(tmpStr,
" 2: Bricaud et al. 1995 (chlorophyll supplied via default empirical algorithm)\n");
1038 strcat(tmpStr,
" 3: Ciotti and Bricaud 2006 (size fraction supplied via giop_aph_s)");
1044 strcpy(tmpStr,
"GIOP model adg function type\n");
1045 strcat(tmpStr,
" 0: tabulated (supplied via giop_adg_file)\n");
1046 strcat(tmpStr,
" 1: exponential with exponent supplied via giop_adg_s)\n");
1047 strcat(tmpStr,
" 2: exponential with exponent derived via Lee et al. (2002)\n");
1048 strcat(tmpStr,
" 3: exponential with exponent derived via OBPG method");
1055 strcpy(tmpStr,
"GIOP model acdom function type\n");
1056 strcat(tmpStr,
" 0: tabulated (supplied via giop_acdom_file)\n");
1057 strcat(tmpStr,
" 1: no data");
1062 strcpy(tmpStr,
"GIOP model anap function type\n");
1063 strcat(tmpStr,
" 0: tabulated (supplied via giop_anap_file)\n");
1064 strcat(tmpStr,
" 1: no data");
1069 strcpy(tmpStr,
"GIOP model bbp function type\n");
1070 strcat(tmpStr,
" 0: tabulated (supplied via giop_bbp_file)\n");
1071 strcat(tmpStr,
" 1: power-law with exponent supplied via giop_bbp_s)\n");
1072 strcat(tmpStr,
" 2: power-law with exponent derived via Hoge & Lyon (1996)\n");
1073 strcat(tmpStr,
" 3: power-law with exponent derived via Lee et al. (2002)\n");
1074 strcat(tmpStr,
" 5: power-law with exponent derived via Ciotti et al. (1999)\n");
1075 strcat(tmpStr,
" 6: power-law with exponent derived via Morel & Maritorena (2001)\n");
1076 strcat(tmpStr,
" 7: power-law with exponent derived via Loisel & Stramski (2000)\n");
1077 strcat(tmpStr,
" 8: spectrally independent vector derived via Loisel & Stramski (2000)\n");
1078 strcat(tmpStr,
" 9: fixed vector derived via Loisel & Stramski (2000)\n");
1079 strcat(tmpStr,
" 10: fixed vector derived via lee et al. (2002)\n");
1080 strcat(tmpStr,
" 11: fixed vector derived via McKinna et al. (2021)\n");
1081 strcat(tmpStr,
" 12: fixed vector derived via Huot et al. (2008)");
1088 strcpy(tmpStr,
"GIOP model bbph function type\n");
1089 strcat(tmpStr,
" 0: tabulated (supplied via giop_bbph_file)\n");
1090 strcat(tmpStr,
" 1: no data");
1095 strcpy(tmpStr,
"GIOP model bbnap function type\n");
1096 strcat(tmpStr,
" 0: tabulated (supplied via giop_bbnap_file)\n");
1097 strcat(tmpStr,
" 1: no data");
1102 strcpy(tmpStr,
"GIOP model Rrs to bb/(a+bb) method\n");
1103 strcat(tmpStr,
" 0: Gordon quadratic (specified with giop_grd)\n");
1104 strcat(tmpStr,
" 1: Morel f/Q");
1109 strcpy(tmpStr,
"GIOP model list of sensor wavelengths for\n");
1110 strcat(tmpStr,
" optimization comma-separated list, default is all visible bands (400-700nm)");
1113 strcpy(tmpStr,
"GIOP model Rrs uncertainties option\n");
1114 strcat(tmpStr,
" 0: none \n");
1115 strcat(tmpStr,
" 1: sensor-derived Rrs uncertainties \n");
1116 strcat(tmpStr,
" 2: input spectral absolute uncertainties using giop_rrs_unc, as comma-separated\n");
1117 strcat(tmpStr,
" array with spectral resolution matching sensor\n");
1118 strcat(tmpStr,
" 3: input spectral relative uncertainties using giop_rrs_unc, as comma-separated\n");
1119 strcat(tmpStr,
" array with spectral resolution matching sensor");
1125 strcpy(tmpStr,
"GIOP model optimization method\n");
1126 strcat(tmpStr,
" 0: Amoeba optimization\n");
1127 strcat(tmpStr,
" 1: Levenberg-Marquardt optimization\n");
1128 strcat(tmpStr,
" 3: SVD matrix inversion\n");
1129 strcat(tmpStr,
" 4: SIOP adaptive matrix inversion");
1132 strcpy(tmpStr,
"GSM model options\n");
1133 strcat(tmpStr,
" 0: default coefficients\n");
1134 strcat(tmpStr,
" 1: Chesapeake regional coefficients");
1137 strcpy(tmpStr,
"GSM fit algorithm\n");
1138 strcat(tmpStr,
" 0: Amoeba\n");
1139 strcat(tmpStr,
" 1: Levenberg-Marquardt");
1144 clo_addOption(
list,
"gsm_aphw",
CLO_TYPE_FLOAT,
"[412.0, 443.0, 490.0, 510.0, 555.0, 670.0]",
"\n GSM IOP model, wavelengths of ap* table");
1145 clo_addOption(
list,
"gsm_aphs",
CLO_TYPE_FLOAT,
"[0.00665, 0.05582, 0.02055, 0.01910, 0.01015, 0.01424]",
"GSM IOP model, coefficients of ap* table");
1181 strcat(tmpStr,
",");
1184 strcat(tmpStr,
"]");
1215 strcpy(tmpStr,
"Reference SST field source\n");
1216 strcat(tmpStr,
" 0: Reynolds OI SST reference file\n");
1217 strcat(tmpStr,
" 1: AMSR-E daily SST reference file\n");
1218 strcat(tmpStr,
" 2: AMSR-E 3-day SST reference file\n");
1219 strcat(tmpStr,
" 3: ATSR monthly SST reference file\n");
1220 strcat(tmpStr,
" 4: NTEV2 monthly SST reference file\n");
1221 strcat(tmpStr,
" 5: AMSR-E 3-day or night SST reference file\n");
1222 strcat(tmpStr,
" 6: WindSat daily SST reference file\n");
1223 strcat(tmpStr,
" 7: WindSat 3-day SST reference file\n");
1224 strcat(tmpStr,
" 8: WindSat 3-day or night SST reference file");
1234 clo_addOption(
list,
"xcalbox",
CLO_TYPE_INT,
"0",
"pixel size of the central box in the L1 scene\n (e.g. 5 pixels around MOBY) to be extracted into xcalfile for the\n cross-calibration, 0=whole L1");
1235 clo_addOption(
list,
"xcalboxcenter",
CLO_TYPE_INT,
"[0,0]",
"Central [ipix, iscan] of the box in\n the L1 scene, [0,0] = center of the L1 scene");
1236 clo_addOption(
list,
"xcalpervalid",
CLO_TYPE_INT,
"0",
"min percent of valid cross-calibration\n pixels within the box or the L1 scene, 0 = at least 1 pixel");
1240 strcpy(tmpStr,
"max distance between L1 and L2 pixels\n");
1241 strcat(tmpStr,
" in km\n");
1242 strcat(tmpStr,
" -1.0: use mean res of L1 data\n");
1243 strcat(tmpStr,
" 0.0: max{mean(L1 res),mean(L2 res)}");
1246 sprintf(tmpStr2,
"%f",
CHL_MAX);
1247 sprintf(tmpStr,
"threshold on L2 data chlorophyll\n (%f=CHL_MAX)",
1251 sprintf(tmpStr2,
"%f",
AOT_MAX);
1252 sprintf(tmpStr,
"threshold on L2 data AOTs\n (%f=AOT_MAX)",
AOT_MAX);
1255 strcpy(tmpStr,
"\n coccolithophore algorithm coefs");
1256 clo_addOption(
list,
"coccolith",
CLO_TYPE_FLOAT,
"[1.1,0.9,0.75,1.85,1.0,1.65,0.6,1.15]", tmpStr);
1279 strcpy(tmpStr,
"depth to use to exclude data from target file\n");
1280 strcat(tmpStr,
" e.g. -1000 excludes depths less than 1000m");
1283 strcpy(tmpStr,
"minimum # of samples in a bin for acceptance");
1286 strcpy(tmpStr,
"minimum # of scenes in a bin for acceptance");
1298 if (!strcmp(prog,
"l1det2det")) {
1321 strcpy(tmpStr,
"\nThis program produces a PPM-formatted output image rendered in a Plate Carree\n");
1322 strcat(tmpStr,
"projection.\n\n");
1323 strcat(tmpStr,
"The default band combination produces a \"true-color\" image. Other combinations\n");
1324 strcat(tmpStr,
"may be chosen with the \"rgb=\" option. The expected argument to this option is\n");
1325 strcat(tmpStr,
"a comma separated string of wavelengths that specifies the desired bands in\n");
1326 strcat(tmpStr,
"red-green-blue order. For example, to produce a false color SeaWiFS output\n");
1327 strcat(tmpStr,
"image using 865, 670 and 555 nm as the red, green, and blue values\n");
1328 strcat(tmpStr,
"respectively, the option would be specified as \"rgb=865,670,555\".\n");
1331 strcpy(tmpStr,
"Raman scattering Rrs correction options\n");
1332 strcat(tmpStr,
" 0: no correction \n");
1333 strcat(tmpStr,
" 1: Lee et al. (2013) empirical correction \n");
1334 strcat(tmpStr,
" 2: Westberry et al. (2013) analytical correction \n");
1335 strcat(tmpStr,
" 3: Lee et al. (1994) analytical correction");
1340 strcpy(tmpStr,
"Cloud height and temperature file\n");
1341 strcat(tmpStr,
" Currently, use the MODIS L2 cloud file (MYD06...)\n");
1342 strcat(tmpStr,
" from the LAADS DAAC");
1348 "wavelength_3d input, written in ascending order\n"
1349 " with format 'wavelength_3d=nnn,nnn,nnn' where nnn is a sensor wavelength\n"
1350 " or a range of wavelengths as follows 'nnn:nnn'"
1378 int argc,
char* argv[], filehandle *
l1file) {
1380 char tmpStr[FILENAME_MAX];
1383 char localSuite[FILENAME_MAX];
1385 const char* l2genProgName =
"msl12";
1386 const char* otherProgName =
NULL;
1390 if ((dataRoot = getenv(
"OCDATAROOT")) ==
NULL) {
1391 printf(
"-E- OCDATAROOT environment variable is not defined.\n");
1400 localSuite[0] =
'\0';
1408 sprintf(tmpStr,
"%s/common/%s_defaults.par", dataRoot, l2genProgName);
1410 printf(
"Loading default parameters from %s\n", tmpStr);
1413 if (progName && progName[0] && strcmp(progName, l2genProgName)) {
1414 otherProgName = progName;
1418 if (otherProgName) {
1419 sprintf(tmpStr,
"%s/common/%s_defaults.par", dataRoot, otherProgName);
1420 if (access(tmpStr, R_OK) != -1) {
1422 printf(
"Loading default parameters from %s\n", tmpStr);
1431 if (otherProgName) {
1432 sprintf(tmpStr,
"%s/%s/%s_defaults.par", dataRoot,
1434 if (access(tmpStr, R_OK) != -1) {
1436 printf(
"Loading default parameters for %s from %s\n",
1442 if (
l1file->subsensorID >= 0) {
1443 sprintf(tmpStr,
"%s/%s/%s/%s_defaults.par", dataRoot,
1446 if (access(tmpStr, R_OK) != -1) {
1448 printf(
"Loading default sub-sensor parameters for %s from %s\n",
1456 if (localSuite[0] ==
'\0')
1460 int suiteLoaded = 0;
1461 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1462 "common", l2genProgName, localSuite);
1463 if (access(tmpStr, R_OK) != -1) {
1465 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1472 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1473 "common", otherProgName, localSuite);
1474 if (access(tmpStr, R_OK) != -1) {
1476 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1483 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1485 if (access(tmpStr, R_OK) != -1) {
1487 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1494 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1496 if (access(tmpStr, R_OK) != -1) {
1498 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1505 if(
l1file->subsensorID >= 0) {
1506 sprintf(tmpStr,
"%s/%s/%s/%s_defaults_%s.par", dataRoot,
1509 if (access(tmpStr, R_OK) != -1) {
1511 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1518 sprintf(tmpStr,
"%s/%s/%s/%s_defaults_%s.par", dataRoot,
1521 if (access(tmpStr, R_OK) != -1) {
1523 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1531 printf(
"-E- Failed to load parameters for suite %s for sensor %s\n", localSuite,
1542 sprintf(tmpStr,
"l2prod%d",
i + 1);
1547 default_l2prod[
i][0] =
'\0';
1552 printf(
"Loading command line parameters\n\n");
1563 char str_buf[FILENAME_MAX];
1564 char str_buf2[FILENAME_MAX];
1565 char tmp_file[FILENAME_MAX];
1570 char keyword[FILENAME_MAX];
1582 if (default_l2prod[
i][0]) {
1592 for (optionId = 0; optionId < numOptions; optionId++) {
1603 while (*strVal !=
'\0') {
1604 *strVal = tolower(*strVal);
1608 if (strcmp(keyword,
"help") == 0)
1610 else if (strcmp(keyword,
"version") == 0)
1612 else if (strncmp(keyword,
"dump_options", 12) == 0)
1614 else if (strcmp(keyword,
"par") == 0)
1616 else if (strcmp(keyword,
"ifile") == 0) {
1621 }
else if (strncmp(keyword,
"ifile", 5) == 0) {
1623 sprintf(str_buf,
"ifile%d",
i + 1);
1624 if (strcmp(keyword, str_buf) == 0) {
1634 printf(
"-E- l2gen_load_input: %s bigger than MAX_IFILES(%d)\n",
1639 }
else if (strcmp(keyword,
"ilist") == 0) {
1643 if ((fp = fopen(tmp_file,
"r")) ==
NULL) {
1644 printf(
"Error: Unable to open input file list %s\n", tmp_file);
1647 tmp_file[0] =
'\x0';
1649 if (fscanf(fp,
"%s\n", tmp_file) != EOF) {
1651 sprintf(str_buf,
"ifile%d",
i + 1);
1652 sprintf(str_buf2,
"ilist=%s", strVal);
1660 }
else if (strcmp(keyword,
"fqfile") == 0) {
1666 }
else if (strcmp(keyword,
"parfile") == 0) {
1672 }
else if (strcmp(keyword,
"ofile") == 0) {
1677 }
else if (strncmp(keyword,
"ofile", 5) == 0) {
1679 sprintf(str_buf,
"ofile%d",
i + 1);
1680 if (strcmp(keyword, str_buf) == 0) {
1688 printf(
"-E- l2gen_load_input: %s bigger than MAX_OFILES(%d)\n",
1693 }
else if (strcmp(keyword,
"oformat") == 0) {
1696 if (tmpStr ==
NULL) {
1697 printf(
"-E- l2gen_load_input: oformat=%s is not a recognized file format\n",
1703 }
else if (strcmp(keyword,
"oformat_depth") == 0) {
1705 if (strcasecmp(strVal,
"8bit") == 0 || strcasecmp(strVal,
"24bit") == 0) {
1708 printf(
"-E- l2gen_load_input: oformat_depth=%s is not a valid color depth\n",
1713 }
else if (strcmp(keyword,
"il2file") == 0) {
1720 }
else if (strncmp(keyword,
"il2file", 7) == 0) {
1722 sprintf(str_buf,
"il2file%d",
i + 1);
1723 if (strcmp(keyword, str_buf) == 0) {
1733 printf(
"-E- l2gen_load_input: %s bigger than MAX_OFILES(%d)\n",
1738 }
else if (strcmp(keyword,
"l2prod") == 0) {
1740 input->l2prod[0][0] =
'\0';
1743 strcat(
input->l2prod[0],
" ");
1744 strcat(
input->l2prod[0], strArray[
i]);
1747 }
else if (strncmp(keyword,
"l2prod", 6) == 0) {
1749 sprintf(str_buf,
"l2prod%d",
i + 1);
1750 if (strcmp(keyword, str_buf) == 0) {
1754 input->l2prod[
i][0] =
'\0';
1757 strcat(
input->l2prod[
i],
" ");
1758 strcat(
input->l2prod[
i], strArray[
j]);
1764 printf(
"-E- l2gen_load_input: %s bigger than MAX_OFILES(%d)\n",
1769 }
else if (strcmp(keyword,
"suite") == 0) {
1772 }
else if (strcmp(keyword,
"mode") == 0) {
1775 }
else if (strcmp(keyword,
"deflate") == 0) {
1778 }
else if (strcmp(keyword,
"proc_ocean") == 0) {
1781 }
else if (strcmp(keyword,
"proc_land") == 0) {
1784 }
else if (strcmp(keyword,
"proc_cloud") == 0) {
1787 }
else if (strcmp(keyword,
"proc_uncertainty") == 0) {
1790 }
else if (strcmp(keyword,
"proc_sst") == 0) {
1792 if(
input->proc_sst) {
1796 }
else if (strcmp(keyword,
"atmocor") == 0) {
1799 }
else if (strcmp(keyword,
"aer_opt") == 0) {
1802 }
else if (strcmp(keyword,
"aer_wave_short") == 0) {
1805 }
else if (strcmp(keyword,
"aer_wave_long") == 0) {
1808 }
else if (strcmp(keyword,
"aer_wave_base") == 0) {
1811 }
else if (strcmp(keyword,
"aer_swir_short") == 0) {
1814 }
else if (strcmp(keyword,
"aer_swir_long") == 0) {
1817 }
else if (strcmp(keyword,
"aer_rrs_short") == 0) {
1820 }
else if (strcmp(keyword,
"aer_rrs_long") == 0) {
1823 }
else if (strcmp(keyword,
"aer_angstrom") == 0) {
1826 }
else if (strcmp(keyword,
"aer_iter_max") == 0) {
1829 }
else if (strcmp(keyword,
"seawater_opt") == 0) {
1832 }
else if (strcmp(keyword,
"brdf_opt") == 0) {
1835 }
else if (strcmp(keyword,
"gas_opt") == 0) {
1838 }
else if (strcmp(keyword,
"gas_transmittance_file") == 0) {
1843 }
else if (strcmp(keyword,
"atrem_opt") == 0) {
1846 }
else if (strcmp(keyword,
"atrem_full") == 0) {
1848 if (option->
count > 0) {
1849 if (
input->atrem_full <= 0)
input->atrem_full = 0;
1850 else input->atrem_full = 1;
1853 }
else if (strcmp(keyword,
"atrem_geom") == 0) {
1855 if (option->
count > 0) {
1856 if (
input->atrem_geom <= 0)
input->atrem_geom = 0;
1857 else input->atrem_geom = 1;
1860 }
else if (strcmp(keyword,
"atrem_model") == 0) {
1863 }
else if (strcmp(keyword,
"atrem_splitpaths") == 0) {
1866 }
else if (strcmp(keyword,
"gsm_opt") == 0) {
1869 }
else if (strcmp(keyword,
"gsm_fit") == 0) {
1872 }
else if (strcmp(keyword,
"gsm_adg_s") == 0) {
1875 }
else if (strcmp(keyword,
"gsm_bbp_s") == 0) {
1878 }
else if (strcmp(keyword,
"gsm_aphs") == 0) {
1881 printf(
"-E- number of gsm_aphs elements (%d) must be %d or less\n",
count,
nbands);
1886 input->gsm_aphs[
i] = fArray[
i];
1888 }
else if (strcmp(keyword,
"gsm_aphw") == 0) {
1891 printf(
"-E- number of gsm_aphw elements (%d) must be %d or less\n",
count,
nbands);
1896 input->gsm_aphw[
i] = fArray[
i];
1898 }
else if (strcmp(keyword,
"qaa_adg_s") == 0) {
1901 }
else if (strcmp(keyword,
"qaa_wave") == 0) {
1905 printf(
"-E- number of qaa_wave elements must be 5.\n");
1910 input->qaa_wave[
i] = iArray[
i];
1913 }
else if (strcmp(keyword,
"giop_maxiter") == 0) {
1916 }
else if (strcmp(keyword,
"giop_fit_opt") == 0) {
1919 }
else if (strcmp(keyword,
"giop_aph_opt") == 0) {
1922 }
else if (strcmp(keyword,
"giop_adg_opt") == 0) {
1925 }
else if (strcmp(keyword,
"giop_acdom_opt") == 0) {
1928 }
else if (strcmp(keyword,
"giop_anap_opt") == 0) {
1931 }
else if (strcmp(keyword,
"giop_bbp_opt") == 0) {
1934 }
else if (strcmp(keyword,
"giop_bbph_opt") == 0) {
1937 }
else if (strcmp(keyword,
"giop_bbnap_opt") == 0) {
1940 }
else if (strcmp(keyword,
"giop_rrs_opt") == 0) {
1943 }
else if (strcmp(keyword,
"giop_rrs_unc_opt") == 0) {
1946 }
else if (strcmp(keyword,
"giop_rrs_diff") == 0) {
1949 }
else if (strcmp(keyword,
"giop_aph_file") == 0) {
1954 }
else if (strcmp(keyword,
"giop_uaph_file") == 0) {
1959 }
else if (strcmp(keyword,
"giop_aph_s") == 0) {
1962 }
else if (strcmp(keyword,
"giop_adg_file") == 0) {
1967 }
else if (strcmp(keyword,
"giop_uadg_file") == 0) {
1972 }
else if (strcmp(keyword,
"giop_adg_s") == 0) {
1975 }
else if (strcmp(keyword,
"giop_uadg_s") == 0) {
1978 }
else if (strcmp(keyword,
"giop_bbp_file") == 0) {
1983 }
else if (strcmp(keyword,
"giop_ubbp_file") == 0) {
1988 }
else if (strcmp(keyword,
"giop_bbp_s") == 0) {
1991 }
else if (strcmp(keyword,
"giop_ubbp_s") == 0) {
1994 }
else if (strcmp(keyword,
"giop_acdom_file") == 0) {
2001 }
else if (strcmp(keyword,
"giop_uacdom_file") == 0) {
2008 }
else if (strcmp(keyword,
"giop_anap_file") == 0) {
2015 }
else if (strcmp(keyword,
"giop_uanap_file") == 0) {
2022 }
else if (strcmp(keyword,
"giop_bbph_file") == 0) {
2029 }
else if (strcmp(keyword,
"giop_ubbph_file") == 0) {
2036 }
else if (strcmp(keyword,
"giop_bbnap_file") == 0) {
2043 }
else if (strcmp(keyword,
"giop_ubbnap_file") == 0) {
2050 }
else if (strcmp(keyword,
"giop_grd") == 0) {
2053 printf(
"-E- number of giop_grd elements must be 2 or less.\n");
2057 input->giop_grd[
i] = fArray[
i];
2059 }
else if (strcmp(keyword,
"giop_wave") == 0) {
2063 printf(
"-E- number of giop_wave elements (%d) must be %d or less\n",
count,
nbands);
2068 input->giop_wave[
i] = fArray[
i];
2072 }
else if (strcmp(keyword,
"giop_rrs_unc") == 0) {
2076 printf(
"-E- number of giop_rrs_unc elements (%d) must be %d or less\n",
count,
nbands);
2081 input->giop_rrs_unc[
i] = fArray[
i];
2084 }
else if (strcmp(keyword,
"iop_opt") == 0) {
2087 }
else if (strcmp(keyword,
"cphyt_opt") == 0) {
2090 }
else if (strcmp(keyword,
"band_shift_opt") == 0) {
2092 }
else if (strcmp(keyword,
"aermodfile") == 0) {
2099 }
else if (strcmp(keyword,
"uncertaintyfile") == 0) {
2106 }
else if (strcmp(keyword,
"polfile") == 0) {
2113 }
else if (strcmp(keyword,
"pol_opt") == 0) {
2116 }
else if (strcmp(keyword,
"absaer_opt") == 0) {
2119 }
else if (strcmp(keyword,
"glint_opt") == 0) {
2122 }
else if (strcmp(keyword,
"cirrus_opt") == 0) {
2125 }
else if (strcmp(keyword,
"oxaband_opt") == 0) {
2128 }
else if (strcmp(keyword,
"filter_opt") == 0) {
2132 }
else if (strcmp(keyword,
"filter_file") == 0) {
2139 }
else if (strcmp(keyword,
"tgtfile") == 0) {
2146 }
else if (strcmp(keyword,
"aerfile") == 0) {
2153 }
else if (strcmp(keyword,
"sstcoeffile") == 0) {
2160 }
else if (strcmp(keyword,
"dsdicoeffile") == 0) {
2167 }
else if (strcmp(keyword,
"sstssesfile") == 0) {
2174 }
else if (strcmp(keyword,
"sst4coeffile") == 0) {
2181 }
else if (strcmp(keyword,
"sst4ssesfile") == 0) {
2188 }
else if (strcmp(keyword,
"vcnnfile") == 0) {
2195 }
else if (strcmp(keyword,
"picfile") == 0) {
2202 }
else if (strcmp(keyword,
"sst3coeffile") == 0) {
2209 }
else if (strcmp(keyword,
"sst3ssesfile") == 0) {
2216 }
else if (strcmp(keyword,
"owtfile") == 0) {
2223 }
else if (strcmp(keyword,
"owtchlerrfile") == 0) {
2230 }
else if (strcmp(keyword,
"metafile") == 0) {
2237 }
else if (strcmp(keyword,
"aerbinfile") == 0) {
2244 }
else if (strcmp(keyword,
"met1") == 0) {
2249 }
else if (strcmp(keyword,
"met2") == 0) {
2256 }
else if (strcmp(keyword,
"met3") == 0) {
2263 }
else if (strcmp(keyword,
"ozone1") == 0) {
2268 }
else if (strcmp(keyword,
"ozone2") == 0) {
2275 }
else if (strcmp(keyword,
"ozone3") == 0) {
2282 }
else if (strcmp(keyword,
"rad1") == 0) {
2288 }
else if (strcmp(keyword,
"rad2") == 0) {
2294 }
else if (strcmp(keyword,
"rad3") == 0) {
2300 }
else if (strcmp(keyword,
"anc_profile1") == 0) {
2307 }
else if (strcmp(keyword,
"anc_profile2") == 0) {
2314 }
else if (strcmp(keyword,
"anc_profile3") == 0) {
2321 }
else if (strcmp(keyword,
"anc_aerosol1") == 0) {
2328 }
else if (strcmp(keyword,
"anc_aerosol2") == 0) {
2335 }
else if (strcmp(keyword,
"anc_aerosol3") == 0) {
2342 }
else if (strcmp(keyword,
"sfc_albedo") == 0) {
2349 }
else if (strcmp(keyword,
"cth_albedo") == 0) {
2356 }
else if (strcmp(keyword,
"anc_cor_file") == 0) {
2363 }
else if (strcmp(keyword,
"pixel_anc_file") == 0) {
2370 }
else if (strcmp(keyword,
"land") == 0) {
2375 }
else if (strcmp(keyword,
"water") == 0) {
2380 }
else if (strcmp(keyword,
"demfile") == 0) {
2385 }
else if (strcmp(keyword,
"dem_auxfile") == 0) {
2392 }
else if (strcmp(keyword,
"mldfile") == 0) {
2399 }
else if (strcmp(keyword,
"icefile") == 0) {
2404 }
else if (strcmp(keyword,
"sstfile") == 0) {
2408 }
else if (strcmp(keyword,
"sstreftype") == 0) {
2411 }
else if (strcmp(keyword,
"sssfile") == 0) {
2416 }
else if (strcmp(keyword,
"no2file") == 0) {
2421 }
else if (strcmp(keyword,
"alphafile") == 0) {
2426 }
else if (strcmp(keyword,
"tauafile") == 0) {
2431 }
else if (strcmp(keyword,
"geofile") == 0) {
2438 }
else if (strcmp(keyword,
"georegion_file") == 0) {
2446 else if (strcmp(keyword,
"owmcfile") == 0) {
2451 }
else if (strcmp(keyword,
"prodxmlfile") == 0) {
2458 }
else if (strcmp(keyword,
"breflectfile") == 0) {
2465 }
else if (strcmp(keyword,
"gmpfile") == 0) {
2472 }
else if (strcmp(keyword,
"flaguse") == 0) {
2474 input->flaguse[0] =
'\0';
2477 strcat(
input->flaguse,
",");
2478 strcat(
input->flaguse, strArray[
i]);
2481 }
else if (strcmp(keyword,
"xcalbox") == 0) {
2484 }
else if (strcmp(keyword,
"xcalboxcenter") == 0) {
2487 printf(
"-E- number of xcalboxcenter elements must be 2 or less\n");
2491 input->xcalboxcenter[
i] = iArray[
i];
2493 }
else if (strcmp(keyword,
"xcalpervalid") == 0) {
2496 }
else if (strcmp(keyword,
"xcalsubsmpl") == 0) {
2499 }
else if (strcmp(keyword,
"maxpointdist") == 0) {
2502 }
else if (strcmp(keyword,
"chlthreshold") == 0) {
2505 }
else if (strcmp(keyword,
"aotthreshold") == 0) {
2508 }
else if (strcmp(keyword,
"coccolith") == 0) {
2511 printf(
"-E- number of coccolith elements must be 8 or less\n");
2515 input->coccolith[
i] = fArray[
i];
2517 }
else if (strcmp(keyword,
"cirrus_thresh") == 0) {
2520 printf(
"-E- number of cirrus_thresh elements must be 2 or less\n");
2524 input->cirrus_thresh[
i] = fArray[
i];
2526 }
else if (strcmp(keyword,
"chloc2_wave") == 0) {
2529 printf(
"-E- number of chloc2_wave elements must be 2 or less\n");
2533 input->chloc2w[
i] = iArray[
i];
2535 }
else if (strcmp(keyword,
"chloc2_coef") == 0) {
2538 printf(
"-E- number of chloc2_coef elements must be 5 or less\n");
2542 input->chloc2c[
i] = fArray[
i];
2544 }
else if (strcmp(keyword,
"chloc3_wave") == 0) {
2547 printf(
"-E- number of chloc3_wave elements must be 3 or less\n");
2551 input->chloc3w[
i] = iArray[
i];
2553 }
else if (strcmp(keyword,
"chloc3_coef") == 0) {
2556 printf(
"-E- number of chloc3_coef elements must be 5 or less\n");
2560 input->chloc3c[
i] = fArray[
i];
2562 }
else if (strcmp(keyword,
"avw_coef") == 0) {
2565 printf(
"-E- number of avw_coef elements must be 6 or less\n");
2569 input->avw_coef[
i] = fArray[
i];
2571 }
else if (strcmp(keyword,
"chloc4_wave") == 0) {
2574 printf(
"-E- number of chloc4_wave elements must be 4 or less\n");
2578 input->chloc4w[
i] = iArray[
i];
2580 }
else if (strcmp(keyword,
"chloc4_coef") == 0) {
2583 printf(
"-E- number of chloc4_coef elements must be 5 or less\n");
2587 input->chloc4c[
i] = fArray[
i];
2589 }
else if (strcmp(keyword,
"kd2_wave") == 0) {
2592 printf(
"-E- number of kd2_wave elements must be 2 or less\n");
2598 }
else if (strcmp(keyword,
"kd2_coef") == 0) {
2601 printf(
"-E- number of kd2_coef elements must be 6 or less\n");
2607 }
else if (strcmp(keyword,
"flh_offset") == 0) {
2610 }
else if (strcmp(keyword,
"flh_base_wavelengths") == 0) {
2614 printf(
"-E- number of flh_base_wavelengths elements must be at least 2\n");
2620 input->flh_base_wavelengths[
i] = fArray[
i];
2622 }
else if (strcmp(keyword,
"flh_height_wavelength") == 0) {
2625 }
else if (strcmp(keyword,
"aermodels") == 0) {
2628 printf(
"-E- number of aermodels must be %d or less\n",
2635 input->aermodels[
i][0] =
'\0';
2638 }
else if (strcmp(keyword,
"taua") == 0) {
2642 printf(
"-E- number of taua elements (%d) must be %d or less\n",
count,
nbands);
2651 }
else if (strcmp(keyword,
"aermodrat") == 0) {
2654 }
else if (strcmp(keyword,
"aermodmin") == 0) {
2657 }
else if (strcmp(keyword,
"aermodmax") == 0) {
2660 }
else if (strcmp(keyword,
"absaer") == 0) {
2663 }
else if (strcmp(keyword,
"rhoamin") == 0) {
2666 }
else if (strcmp(keyword,
"epsmin") == 0) {
2669 }
else if (strcmp(keyword,
"epsmax") == 0) {
2672 }
else if (strcmp(keyword,
"tauamax") == 0) {
2675 }
else if (strcmp(keyword,
"nlwmin") == 0) {
2678 }
else if (strcmp(keyword,
"wsmax") == 0) {
2681 }
else if (strcmp(keyword,
"windspeed") == 0) {
2684 }
else if (strcmp(keyword,
"windangle") == 0) {
2687 }
else if (strcmp(keyword,
"pressure") == 0) {
2690 }
else if (strcmp(keyword,
"ozone") == 0) {
2693 }
else if (strcmp(keyword,
"relhumid") == 0) {
2696 }
else if (strcmp(keyword,
"watervapor") == 0) {
2699 }
else if (strcmp(keyword,
"ice_threshold") == 0) {
2702 }
else if (strcmp(keyword,
"mumm_alpha") == 0) {
2705 }
else if (strcmp(keyword,
"mumm_gamma") == 0) {
2708 }
else if (strcmp(keyword,
"mumm_epsilon") == 0) {
2711 }
else if (strcmp(keyword,
"viirsnv7") == 0) {
2714 }
else if (strcmp(keyword,
"viirsnosisaf") == 0) {
2717 }
else if (strcmp(keyword,
"sstrefdif") == 0) {
2720 }
else if (strcmp(keyword,
"vcal_opt") == 0) {
2723 }
else if (strcmp(keyword,
"vcal_nlw") == 0) {
2727 printf(
"-E- number of vcal_nlw elements (%d) must be %d or less\n",
count,
nbands);
2732 input->vcal_nLw[
i] = fArray[
i];
2737 }
else if (strcmp(keyword,
"vcal_lw") == 0) {
2741 printf(
"-E- number of vcal_lw elements (%d) must be %d or less\n",
count,
nbands);
2747 input->vcal_Lw[
i] = fArray[
i];
2752 }
else if (strcmp(keyword,
"vcal_chl") == 0) {
2755 }
else if (strcmp(keyword,
"vcal_solz") == 0) {
2758 }
else if (strcmp(keyword,
"vcal_depth") == 0) {
2761 }
else if (strcmp(keyword,
"vcal_min_nbin") == 0) {
2764 }
else if (strcmp(keyword,
"vcal_min_nscene") == 0) {
2767 }
else if (strcmp(keyword,
"stype") == 0) {
2770 }
else if (strcmp(keyword,
"datamin") == 0) {
2773 }
else if (strcmp(keyword,
"datamax") == 0) {
2776 }
else if (strcmp(keyword,
"west") == 0) {
2779 }
else if (strcmp(keyword,
"east") == 0) {
2782 }
else if (strcmp(keyword,
"north") == 0) {
2785 }
else if (strcmp(keyword,
"south") == 0) {
2788 }
else if (strcmp(keyword,
"width") == 0) {
2791 }
else if (strcmp(keyword,
"threshold") == 0) {
2794 }
else if (strcmp(keyword,
"rgb") == 0) {
2798 printf(
"-E- number of rgb elements must be 3\n");
2805 }
else if (strcmp(keyword,
"subsamp") == 0) {
2808 }
else if (strcmp(keyword,
"xbox") == 0) {
2811 }
else if (strcmp(keyword,
"ybox") == 0) {
2814 }
else if (strcmp(keyword,
"raman_opt") == 0) {
2816 }
else if (strcmp(keyword,
"water_spectra_file") == 0) {
2821 }
else if (strcmp(keyword,
"bpar_validate_opt") == 0) {
2824 }
else if (strcmp(keyword,
"bpar_elev_opt") == 0) {
2827 }
else if (strcmp(keyword,
"bpar_elev_value") == 0) {
2830 }
else if (strcmp(keyword,
"cloud_hgt_file") == 0) {
2836 }
else if (strcmp(keyword,
"shallow_water_depth") == 0) {
2839 }
else if (strcmp(keyword,
"doi") == 0) {
2843 }
else if (strcmp(keyword,
"mbac_wave") == 0) {
2847 printf(
"-E- number of wave_mbac elements must be less than 100\n");
2852 if(iArray[
i]>
input->aer_wave_long)
2856 input->mbac_wave=(int32_t *)malloc(
count*
sizeof(int32_t));
2857 input->acbands_index=(int32_t *)malloc(
count*
sizeof(int32_t));
2859 input->mbac_wave[
i] = iArray[
i];
2861 }
else if (strcmp(keyword,
"watervapor_bands") == 0) {
2865 printf(
"-E- number of watervapor_bands elements must be time of 3\n");
2869 input->watervapor_bands=(
int *)malloc(
count*
sizeof(
int));
2871 input->watervapor_bands[
i] = iArray[
i];
2873 }
else if (strcmp(keyword,
"wavelength_3d") == 0) {
2879 }
else if (strcmp(keyword,
"pversion") == 0) {
2880 }
else if (strcmp(keyword,
"rad_opt") == 0) {
2881 }
else if (strcmp(keyword,
"viirscalparfile") == 0) {
2882 }
else if (strcmp(keyword,
"calfile") == 0) {
2883 }
else if (strcmp(keyword,
"geom_per_band") == 0) {
2884 }
else if (strcmp(keyword,
"xcalfile") == 0) {
2885 }
else if (strcmp(keyword,
"xcal_opt") == 0) {
2886 }
else if (strcmp(keyword,
"xcal_wave") == 0) {
2887 }
else if (strcmp(keyword,
"btfile") == 0) {
2888 }
else if (strcmp(keyword,
"resolution") == 0) {
2889 }
else if (strcmp(keyword,
"newavhrrcal") == 0) {
2890 }
else if (strcmp(keyword,
"ch22detcor") == 0) {
2891 }
else if (strcmp(keyword,
"ch23detcor") == 0) {
2892 }
else if (strcmp(keyword,
"sl_pixl") == 0) {
2893 }
else if (strcmp(keyword,
"sl_frac") == 0) {
2894 }
else if (strcmp(keyword,
"outband_opt") == 0) {
2895 }
else if (strcmp(keyword,
"eval") == 0) {
2896 }
else if (strcmp(keyword,
"maskland") == 0) {
2897 }
else if (strcmp(keyword,
"maskbath") == 0) {
2898 }
else if (strcmp(keyword,
"maskcloud") == 0) {
2899 }
else if (strcmp(keyword,
"maskglint") == 0) {
2900 }
else if (strcmp(keyword,
"masksunzen") == 0) {
2901 }
else if (strcmp(keyword,
"masksatzen") == 0) {
2902 }
else if (strcmp(keyword,
"maskhilt") == 0) {
2903 }
else if (strcmp(keyword,
"maskstlight") == 0) {
2904 }
else if (strcmp(keyword,
"sunzen") == 0) {
2905 }
else if (strcmp(keyword,
"satzen") == 0) {
2906 }
else if (strcmp(keyword,
"hipol") == 0) {
2907 }
else if (strcmp(keyword,
"glint_thresh") == 0) {
2908 }
else if (strcmp(keyword,
"extreme_glint") == 0) {
2909 }
else if (strcmp(keyword,
"cloud_thresh") == 0) {
2910 }
else if (strcmp(keyword,
"cloud_wave") == 0) {
2911 }
else if (strcmp(keyword,
"cloud_eps") == 0) {
2912 }
else if (strcmp(keyword,
"cloud_mask_file") == 0) {
2913 }
else if (strcmp(keyword,
"cloud_mask_opt") == 0) {
2914 }
else if (strcmp(keyword,
"gain") == 0) {
2915 }
else if (strcmp(keyword,
"offset") == 0) {
2916 }
else if (strcmp(keyword,
"spixl") == 0) {
2917 }
else if (strcmp(keyword,
"epixl") == 0) {
2918 }
else if (strcmp(keyword,
"dpixl") == 0) {
2919 }
else if (strcmp(keyword,
"sline") == 0) {
2920 }
else if (strcmp(keyword,
"eline") == 0) {
2921 }
else if (strcmp(keyword,
"dline") == 0) {
2923 printf(
"-E- Invalid argument \"%s\"\n", keyword);
2934 char *progName, filehandle *
l1file) {
2937 char str_buf[FILENAME_MAX] =
"";
2945 printf(
"-E- %s: Error reading program options.\n", __FILE__);
2957 strcat(
input->pro_control,
" ");
2958 strcat(
input->pro_control, argv[
i]);
2966 printf(
"-E- %s: Error loading options into input structure.\n", __FILE__);
2975 if ((tmp_str = getenv(
"OCDATAROOT")) ==
NULL) {
2976 printf(
"OCDATAROOT environment variable is not defined.\n");
2981 printf(
"Internal data compression requested at compression level: %d\n",
input->deflate);
2984 if (
input->filter_opt == 1) {
2985 if (
input->filter_file[0] ==
'\0') {
2986 sprintf(
input->filter_file,
"%s/%s/%s_filter.dat", tmp_str,
2992 if (numTauas > 0 && numTauas != numBands) {
2993 fprintf(
stderr,
"Parameter input error: Number of input taua values must equal %d.\n",
3003 strcat(
l1_input->input_parms,
"\n");
3006 if (
input->ifile[
i][0] !=
'\0') {
3008 sprintf(str_buf,
"ifile = %s ",
input->ifile[
i]);
3010 sprintf(str_buf,
"ifile%d = %s ",
i + 1,
input->ifile[
i]);
3011 strcat(
l1_input->input_parms, str_buf);
3012 strcat(
l1_input->input_parms,
"\n");
3018 if (
input->ofile[
i][0] !=
'\0') {
3020 sprintf(str_buf,
"ofile = %s",
input->ofile[
i]);
3022 sprintf(str_buf,
"ofile%d = %s",
i + 1,
input->ofile[
i]);
3023 strcat(
l1_input->input_parms, str_buf);
3024 strcat(
l1_input->input_parms,
"\n");
3027 if (
input->l2prod[
i][0] !=
'\0') {
3029 sprintf(str_buf,
"l2prod = %s",
input->l2prod[
i]);
3031 sprintf(str_buf,
"l2prod%d = %s",
i + 1,
input->l2prod[
i]);
3032 strcat(
l1_input->input_parms, str_buf);
3033 strcat(
l1_input->input_parms,
"\n");
3037 sprintf(str_buf,
"il2file%d = %s",
i + 1,
input->il2file[
i]);
3038 strcat(
l1_input->input_parms, str_buf);
3039 strcat(
l1_input->input_parms,
"\n");
3044 sprintf(str_buf,
"oformat = %s",
input->oformat);
3045 strcat(
l1_input->input_parms, str_buf);
3046 strcat(
l1_input->input_parms,
"\n");
3048 sprintf(str_buf,
"oformat_depth = %s",
input->oformat_depth);
3049 strcat(
l1_input->input_parms, str_buf);
3050 strcat(
l1_input->input_parms,
"\n");
3052 sprintf(str_buf,
"fqfile = %s",
input->fqfile);
3053 strcat(
l1_input->input_parms, str_buf);
3054 strcat(
l1_input->input_parms,
"\n");
3056 sprintf(str_buf,
"parfile = %s",
input->parfile);
3057 strcat(
l1_input->input_parms, str_buf);
3058 strcat(
l1_input->input_parms,
"\n");
3060 sprintf(str_buf,
"geofile = %s",
input->geofile);
3061 strcat(
l1_input->input_parms, str_buf);
3062 strcat(
l1_input->input_parms,
"\n");
3064 sprintf(str_buf,
"gmpfile = %s",
input->gmpfile);
3065 strcat(
l1_input->input_parms, str_buf);
3066 strcat(
l1_input->input_parms,
"\n");
3068 sprintf(str_buf,
"metafile = %s",
input->metafile);
3069 strcat(
l1_input->input_parms, str_buf);
3070 strcat(
l1_input->input_parms,
"\n");
3074 sprintf(str_buf,
"flaguse = %s",
input->flaguse);
3075 strcat(
l1_input->input_parms, str_buf);
3076 strcat(
l1_input->input_parms,
"\n");
3078 sprintf(str_buf,
"maxpointdist = %8.3f",
input->maxpointdist);
3079 strcat(
l1_input->input_parms, str_buf);
3080 strcat(
l1_input->input_parms,
"\n");
3082 sprintf(str_buf,
"chlthreshold = %8.3f",
input->chlthreshold);
3083 strcat(
l1_input->input_parms, str_buf);
3084 strcat(
l1_input->input_parms,
"\n");
3086 sprintf(str_buf,
"aotthreshold = %8.3f",
input->aotthreshold);
3087 strcat(
l1_input->input_parms, str_buf);
3088 strcat(
l1_input->input_parms,
"\n");
3090 sprintf(str_buf,
"xcalbox = %d", (
int)
input->xcalbox);
3091 strcat(
l1_input->input_parms, str_buf);
3092 strcat(
l1_input->input_parms,
"\n");
3094 sprintf(str_buf,
"xcalboxcenter = %d, %d",
3095 (
int)
input->xcalboxcenter[0], (
int)
input->xcalboxcenter[1]);
3096 strcat(
l1_input->input_parms, str_buf);
3097 strcat(
l1_input->input_parms,
"\n");
3099 sprintf(str_buf,
"xcalpervalid = %d", (
int)
input->xcalpervalid);
3100 strcat(
l1_input->input_parms, str_buf);
3101 strcat(
l1_input->input_parms,
"\n");
3103 sprintf(str_buf,
"xcalsubsmpl = %d", (
int)
input->xcalsubsmpl);
3104 strcat(
l1_input->input_parms, str_buf);
3105 strcat(
l1_input->input_parms,
"\n");
3109 sprintf(str_buf,
"suite = %s",
input->suite);
3110 strcat(
l1_input->input_parms, str_buf);
3111 strcat(
l1_input->input_parms,
"\n");
3113 sprintf(str_buf,
"mode = %5d",
input->mode);
3114 strcat(
l1_input->input_parms, str_buf);
3115 strcat(
l1_input->input_parms,
"\n");
3117 sprintf(str_buf,
"deflate = %5d",
input->deflate);
3118 strcat(
l1_input->input_parms, str_buf);
3119 strcat(
l1_input->input_parms,
"\n");
3121 sprintf(str_buf,
"proc_ocean = %3d",
input->proc_ocean);
3122 strcat(
l1_input->input_parms, str_buf);
3123 strcat(
l1_input->input_parms,
"\n");
3125 sprintf(str_buf,
"proc_land = %3d",
input->proc_land);
3126 strcat(
l1_input->input_parms, str_buf);
3127 strcat(
l1_input->input_parms,
"\n");
3129 sprintf(str_buf,
"proc_cloud = %3d",
input->proc_cloud);
3130 strcat(
l1_input->input_parms, str_buf);
3131 strcat(
l1_input->input_parms,
"\n");
3133 sprintf(str_buf,
"proc_uncertainty = %3d",
input->proc_uncertainty);
3134 strcat(
l1_input->input_parms, str_buf);
3135 strcat(
l1_input->input_parms,
"\n");
3137 sprintf(str_buf,
"proc_sst = %3d",
input->proc_sst);
3138 strcat(
l1_input->input_parms, str_buf);
3139 strcat(
l1_input->input_parms,
"\n");
3141 sprintf(str_buf,
"atmocor = %3d",
input->atmocor);
3142 strcat(
l1_input->input_parms, str_buf);
3143 strcat(
l1_input->input_parms,
"\n");
3145 sprintf(str_buf,
"seawater_opt = %3d",
input->seawater_opt);
3146 strcat(
l1_input->input_parms, str_buf);
3147 strcat(
l1_input->input_parms,
"\n");
3149 sprintf(str_buf,
"aermodfile = %s",
input->aermodfile);
3150 strcat(
l1_input->input_parms, str_buf);
3151 strcat(
l1_input->input_parms,
"\n");
3153 sprintf(str_buf,
"uncertaintyfile = %s",
input->uncertaintyfile);
3154 strcat(
l1_input->input_parms, str_buf);
3155 strcat(
l1_input->input_parms,
"\n");
3157 sprintf(str_buf,
"aer_opt = %3d",
input->aer_opt);
3158 strcat(
l1_input->input_parms, str_buf);
3159 strcat(
l1_input->input_parms,
"\n");
3161 sprintf(str_buf,
"aer_wave_short = %3d",
input->aer_wave_short);
3162 strcat(
l1_input->input_parms, str_buf);
3163 strcat(
l1_input->input_parms,
"\n");
3165 sprintf(str_buf,
"aer_wave_long = %3d",
input->aer_wave_long);
3166 strcat(
l1_input->input_parms, str_buf);
3167 strcat(
l1_input->input_parms,
"\n");
3169 sprintf(str_buf,
"aer_wave_base = %3d",
input->aer_wave_base);
3170 strcat(
l1_input->input_parms, str_buf);
3171 strcat(
l1_input->input_parms,
"\n");
3173 sprintf(str_buf,
"aer_swir_short = %3d",
input->aer_swir_short);
3174 strcat(
l1_input->input_parms, str_buf);
3175 strcat(
l1_input->input_parms,
"\n");
3177 sprintf(str_buf,
"aer_swir_long = %3d",
input->aer_swir_long);
3178 strcat(
l1_input->input_parms, str_buf);
3179 strcat(
l1_input->input_parms,
"\n");
3181 sprintf(str_buf,
"aer_rrs_short = %8.5f",
input->aer_rrs_short);
3182 strcat(
l1_input->input_parms, str_buf);
3183 strcat(
l1_input->input_parms,
"\n");
3185 sprintf(str_buf,
"aer_rrs_long = %8.5f",
input->aer_rrs_long);
3186 strcat(
l1_input->input_parms, str_buf);
3187 strcat(
l1_input->input_parms,
"\n");
3189 sprintf(str_buf,
"aer_angstrom = %8.5f",
input->aer_angstrom);
3190 strcat(
l1_input->input_parms, str_buf);
3191 strcat(
l1_input->input_parms,
"\n");
3193 sprintf(str_buf,
"aer_iter_max = %3d",
input->aer_iter_max);
3194 strcat(
l1_input->input_parms, str_buf);
3195 strcat(
l1_input->input_parms,
"\n");
3197 sprintf(str_buf,
"brdf_opt = %3d",
input->brdf_opt);
3198 strcat(
l1_input->input_parms, str_buf);
3199 strcat(
l1_input->input_parms,
"\n");
3201 sprintf(str_buf,
"gas_opt = %3d",
input->gas_opt);
3202 strcat(
l1_input->input_parms, str_buf);
3203 strcat(
l1_input->input_parms,
"\n");
3205 sprintf(str_buf,
"gas_transmittance_file = %s",
input->gas_transmittance_file);
3206 strcat(
l1_input->input_parms, str_buf);
3207 strcat(
l1_input->input_parms,
"\n");
3209 sprintf(str_buf,
"atrem_opt = %3d",
input->atrem_opt);
3210 strcat(
l1_input->input_parms, str_buf);
3211 strcat(
l1_input->input_parms,
"\n");
3213 sprintf(str_buf,
"atrem_full = %3d",
input->atrem_full);
3214 strcat(
l1_input->input_parms, str_buf);
3215 strcat(
l1_input->input_parms,
"\n");
3217 sprintf(str_buf,
"atrem_geom = %3d",
input->atrem_geom);
3218 strcat(
l1_input->input_parms, str_buf);
3219 strcat(
l1_input->input_parms,
"\n");
3221 sprintf(str_buf,
"atrem_model = %3d",
input->atrem_model);
3222 strcat(
l1_input->input_parms, str_buf);
3223 strcat(
l1_input->input_parms,
"\n");
3225 sprintf(str_buf,
"atrem_splitpaths = %3d",
input->atrem_splitpaths);
3226 strcat(
l1_input->input_parms, str_buf);
3227 strcat(
l1_input->input_parms,
"\n");
3229 sprintf(str_buf,
"iop_opt = %3d",
input->iop_opt);
3230 strcat(
l1_input->input_parms, str_buf);
3231 strcat(
l1_input->input_parms,
"\n");
3233 sprintf(str_buf,
"cphyt_opt = %3d",
input->cphyt_opt);
3234 strcat(
l1_input->input_parms, str_buf);
3235 strcat(
l1_input->input_parms,
"\n");
3237 sprintf(str_buf,
"gsm_opt = %3d",
input->gsm_opt);
3238 strcat(
l1_input->input_parms, str_buf);
3239 strcat(
l1_input->input_parms,
"\n");
3241 sprintf(str_buf,
"gsm_fit = %3d",
input->gsm_fit);
3242 strcat(
l1_input->input_parms, str_buf);
3243 strcat(
l1_input->input_parms,
"\n");
3245 sprintf(str_buf,
"gsm_adg_s = %8.5f",
input->gsm_adg_s);
3246 strcat(
l1_input->input_parms, str_buf);
3247 strcat(
l1_input->input_parms,
"\n");
3249 sprintf(str_buf,
"gsm_bbp_s = %8.5f",
input->gsm_bbp_s);
3250 strcat(
l1_input->input_parms, str_buf);
3251 strcat(
l1_input->input_parms,
"\n");
3253 sprintf(str_buf,
"gsm_aphw = %8.5f",
input->gsm_aphw[0]);
3254 strcat(
l1_input->input_parms, str_buf);
3255 for (
i = 1;
i < numBands;
i++) {
3256 sprintf(str_buf,
", %8.5f",
input->gsm_aphw[
i]);
3257 strcat(
l1_input->input_parms, str_buf);
3259 strcat(
l1_input->input_parms,
"\n");
3261 sprintf(str_buf,
"gsm_aphs = %8.5f",
input->gsm_aphs[0]);
3262 strcat(
l1_input->input_parms, str_buf);
3263 for (
i = 1;
i < numBands;
i++) {
3264 sprintf(str_buf,
", %8.5f",
input->gsm_aphs[
i]);
3265 strcat(
l1_input->input_parms, str_buf);
3267 strcat(
l1_input->input_parms,
"\n");
3268 sprintf(str_buf,
"qaa_adg_s = %8.5f",
input->qaa_adg_s);
3269 strcat(
l1_input->input_parms, str_buf);
3270 strcat(
l1_input->input_parms,
"\n");
3272 sprintf(str_buf,
"qaa_wave = %4d",
input->qaa_wave[0]);
3273 strcat(
l1_input->input_parms, str_buf);
3274 for (
i = 1;
i < 5;
i++) {
3275 sprintf(str_buf,
", %4d",
input->qaa_wave[
i]);
3276 strcat(
l1_input->input_parms, str_buf);
3278 strcat(
l1_input->input_parms,
"\n");
3279 sprintf(str_buf,
"giop_maxiter = %3d",
input->giop_maxiter);
3280 strcat(
l1_input->input_parms, str_buf);
3281 strcat(
l1_input->input_parms,
"\n");
3283 sprintf(str_buf,
"giop_fit_opt = %3d",
input->giop_fit_opt);
3284 strcat(
l1_input->input_parms, str_buf);
3285 strcat(
l1_input->input_parms,
"\n");
3287 sprintf(str_buf,
"giop_aph_opt = %3d",
input->giop_aph_opt);
3288 strcat(
l1_input->input_parms, str_buf);
3289 strcat(
l1_input->input_parms,
"\n");
3291 sprintf(str_buf,
"giop_acdom_opt = %3d",
input->giop_acdom_opt);
3292 strcat(
l1_input->input_parms, str_buf);
3293 strcat(
l1_input->input_parms,
"\n");
3295 sprintf(str_buf,
"giop_anap_opt = %3d",
input->giop_anap_opt);
3296 strcat(
l1_input->input_parms, str_buf);
3297 strcat(
l1_input->input_parms,
"\n");
3299 sprintf(str_buf,
"giop_adg_opt = %3d",
input->giop_adg_opt);
3300 strcat(
l1_input->input_parms, str_buf);
3301 strcat(
l1_input->input_parms,
"\n");
3303 sprintf(str_buf,
"giop_bbp_opt = %3d",
input->giop_bbp_opt);
3304 strcat(
l1_input->input_parms, str_buf);
3305 strcat(
l1_input->input_parms,
"\n");
3307 sprintf(str_buf,
"giop_bbnap_opt = %3d",
input->giop_bbnap_opt);
3308 strcat(
l1_input->input_parms, str_buf);
3309 strcat(
l1_input->input_parms,
"\n");
3311 sprintf(str_buf,
"giop_bbph_opt = %3d",
input->giop_bbph_opt);
3312 strcat(
l1_input->input_parms, str_buf);
3313 strcat(
l1_input->input_parms,
"\n");
3315 sprintf(str_buf,
"giop_rrs_opt = %3d",
input->giop_rrs_opt);
3316 strcat(
l1_input->input_parms, str_buf);
3317 strcat(
l1_input->input_parms,
"\n");
3319 sprintf(str_buf,
"giop_rrs_diff = %8.5f",
input->giop_rrs_diff);
3320 strcat(
l1_input->input_parms, str_buf);
3321 strcat(
l1_input->input_parms,
"\n");
3323 sprintf(str_buf,
"giop_aph_file = %s",
input->giop_aph_file);
3324 strcat(
l1_input->input_parms, str_buf);
3325 strcat(
l1_input->input_parms,
"\n");
3327 sprintf(str_buf,
"giop_uaph_file = %s",
input->giop_uaph_file);
3328 strcat(
l1_input->input_parms, str_buf);
3329 strcat(
l1_input->input_parms,
"\n");
3331 sprintf(str_buf,
"giop_aph_s = %8.5f",
input->giop_aph_s);
3332 strcat(
l1_input->input_parms, str_buf);
3333 strcat(
l1_input->input_parms,
"\n");
3335 sprintf(str_buf,
"giop_adg_file = %s",
input->giop_adg_file);
3336 strcat(
l1_input->input_parms, str_buf);
3337 strcat(
l1_input->input_parms,
"\n");
3339 sprintf(str_buf,
"giop_uadg_file = %s",
input->giop_uadg_file);
3340 strcat(
l1_input->input_parms, str_buf);
3341 strcat(
l1_input->input_parms,
"\n");
3343 sprintf(str_buf,
"giop_adg_s = %8.5f",
input->giop_adg_s);
3344 strcat(
l1_input->input_parms, str_buf);
3345 strcat(
l1_input->input_parms,
"\n");
3347 sprintf(str_buf,
"giop_uadg_s = %8.5f",
input->giop_uadg_s);
3348 strcat(
l1_input->input_parms, str_buf);
3349 strcat(
l1_input->input_parms,
"\n");
3351 sprintf(str_buf,
"giop_bbp_file = %s",
input->giop_bbp_file);
3352 strcat(
l1_input->input_parms, str_buf);
3353 strcat(
l1_input->input_parms,
"\n");
3355 sprintf(str_buf,
"giop_bbp_s = %8.5f",
input->giop_bbp_s);
3356 strcat(
l1_input->input_parms, str_buf);
3357 strcat(
l1_input->input_parms,
"\n");
3359 sprintf(str_buf,
"giop_ubbp_s = %8.5f",
input->giop_ubbp_s);
3360 strcat(
l1_input->input_parms, str_buf);
3361 strcat(
l1_input->input_parms,
"\n");
3363 sprintf(str_buf,
"giop_acdom_file = %s",
input->giop_acdom_file);
3364 strcat(
l1_input->input_parms, str_buf);
3365 strcat(
l1_input->input_parms,
"\n");
3367 sprintf(str_buf,
"giop_uacdom_file = %s",
input->giop_uacdom_file);
3368 strcat(
l1_input->input_parms, str_buf);
3369 strcat(
l1_input->input_parms,
"\n");
3371 sprintf(str_buf,
"giop_anap_file = %s",
input->giop_anap_file);
3372 strcat(
l1_input->input_parms, str_buf);
3373 strcat(
l1_input->input_parms,
"\n");
3375 sprintf(str_buf,
"giop_uanap_file = %s",
input->giop_uanap_file);
3376 strcat(
l1_input->input_parms, str_buf);
3377 strcat(
l1_input->input_parms,
"\n");
3379 sprintf(str_buf,
"giop_bbph_file = %s",
input->giop_bbph_file);
3380 strcat(
l1_input->input_parms, str_buf);
3381 strcat(
l1_input->input_parms,
"\n");
3383 sprintf(str_buf,
"giop_ubbph_file = %s",
input->giop_ubbph_file);
3384 strcat(
l1_input->input_parms, str_buf);
3385 strcat(
l1_input->input_parms,
"\n");
3387 sprintf(str_buf,
"giop_bbnap_file = %s",
input->giop_bbnap_file);
3388 strcat(
l1_input->input_parms, str_buf);
3389 strcat(
l1_input->input_parms,
"\n");
3391 sprintf(str_buf,
"giop_ubbnap_file = %s",
input->giop_ubbnap_file);
3392 strcat(
l1_input->input_parms, str_buf);
3393 strcat(
l1_input->input_parms,
"\n");
3395 sprintf(str_buf,
"giop_grd = %8.5f",
input->giop_grd[0]);
3396 strcat(
l1_input->input_parms, str_buf);
3397 for (
i = 1;
i < 2;
i++) {
3398 sprintf(str_buf,
", %8.5f",
input->giop_grd[
i]);
3399 strcat(
l1_input->input_parms, str_buf);
3401 strcat(
l1_input->input_parms,
"\n");
3403 sprintf(str_buf,
"giop_wave = %6.1f",
input->giop_wave[0]);
3404 strcat(
l1_input->input_parms, str_buf);
3405 for (
i = 1;
i < numBands;
i++) {
3406 sprintf(str_buf,
", %6.1f",
input->giop_wave[
i]);
3407 strcat(
l1_input->input_parms, str_buf);
3409 strcat(
l1_input->input_parms,
"\n");
3411 sprintf(str_buf,
"giop_rrs_unc_opt = %3d",
input->giop_rrs_unc_opt);
3412 strcat(
l1_input->input_parms, str_buf);
3413 strcat(
l1_input->input_parms,
"\n");
3415 sprintf(str_buf,
"giop_rrs_unc = %6.1f",
input->giop_rrs_unc[0]);
3416 strcat(
l1_input->input_parms, str_buf);
3417 for (
i = 1;
i < numBands;
i++) {
3418 sprintf(str_buf,
", %6.1f",
input->giop_rrs_unc[
i]);
3419 strcat(
l1_input->input_parms, str_buf);
3421 strcat(
l1_input->input_parms,
"\n");
3423 sprintf(str_buf,
"polfile = %s",
input->polfile);
3424 strcat(
l1_input->input_parms, str_buf);
3425 strcat(
l1_input->input_parms,
"\n");
3427 sprintf(str_buf,
"pol_opt = %3d",
input->pol_opt);
3428 strcat(
l1_input->input_parms, str_buf);
3429 strcat(
l1_input->input_parms,
"\n");
3431 sprintf(str_buf,
"vcnnfile = %s",
input->vcnnfile);
3432 strcat(
l1_input->input_parms, str_buf);
3433 strcat(
l1_input->input_parms,
"\n");
3435 sprintf(str_buf,
"absaer_opt = %3d",
input->absaer_opt);
3436 strcat(
l1_input->input_parms, str_buf);
3437 strcat(
l1_input->input_parms,
"\n");
3439 sprintf(str_buf,
"glint_opt = %3d",
input->glint_opt);
3440 strcat(
l1_input->input_parms, str_buf);
3441 strcat(
l1_input->input_parms,
"\n");
3443 sprintf(str_buf,
"cirrus_opt = %3d",
input->cirrus_opt);
3444 strcat(
l1_input->input_parms, str_buf);
3445 strcat(
l1_input->input_parms,
"\n");
3447 sprintf(str_buf,
"oxaband_opt = %3d",
input->oxaband_opt);
3448 strcat(
l1_input->input_parms, str_buf);
3449 strcat(
l1_input->input_parms,
"\n");
3451 sprintf(str_buf,
"filter_opt = %3d",
input->filter_opt);
3452 strcat(
l1_input->input_parms, str_buf);
3453 strcat(
l1_input->input_parms,
"\n");
3454 if (
input->filter_opt == 1) {
3455 sprintf(str_buf,
"filter_file = %s",
input->filter_file);
3456 strcat(
l1_input->input_parms, str_buf);
3457 strcat(
l1_input->input_parms,
"\n");
3458 for (
i = 0;
i <
input->fctl.nfilt;
i++) {
3459 sprintf(str_buf,
"# filter_%d = %d x %d (%d) %s %d ",
3463 input->fctl.f[
i].minfill,
3464 filter_names[
input->fctl.f[
i].func],
3465 input->fctl.f[
i].band + 1);
3466 strcat(
l1_input->input_parms, str_buf);
3467 strcat(
l1_input->input_parms,
"\n");
3471 sprintf(str_buf,
"aerfile = %s",
input->aerfile);
3472 strcat(
l1_input->input_parms, str_buf);
3473 strcat(
l1_input->input_parms,
"\n");
3475 sprintf(str_buf,
"tgtfile = %s",
input->tgtfile);
3476 strcat(
l1_input->input_parms, str_buf);
3477 strcat(
l1_input->input_parms,
"\n");
3479 sprintf(str_buf,
"met1 = %s",
input->met1);
3480 strcat(
l1_input->input_parms, str_buf);
3481 strcat(
l1_input->input_parms,
"\n");
3483 sprintf(str_buf,
"met2 = %s",
input->met2);
3484 strcat(
l1_input->input_parms, str_buf);
3485 strcat(
l1_input->input_parms,
"\n");
3487 sprintf(str_buf,
"met3 = %s",
input->met3);
3488 strcat(
l1_input->input_parms, str_buf);
3489 strcat(
l1_input->input_parms,
"\n");
3491 sprintf(str_buf,
"ozone1 = %s",
input->ozone1);
3492 strcat(
l1_input->input_parms, str_buf);
3493 strcat(
l1_input->input_parms,
"\n");
3495 sprintf(str_buf,
"ozone2 = %s",
input->ozone2);
3496 strcat(
l1_input->input_parms, str_buf);
3497 strcat(
l1_input->input_parms,
"\n");
3499 sprintf(str_buf,
"ozone3 = %s",
input->ozone3);
3500 strcat(
l1_input->input_parms, str_buf);
3501 strcat(
l1_input->input_parms,
"\n");
3503 sprintf(str_buf,
"rad1 = %s",
input->cld_rad1);
3504 strcat(
l1_input->input_parms, str_buf);
3505 strcat(
l1_input->input_parms,
"\n");
3507 sprintf(str_buf,
"rad2 = %s",
input->cld_rad2);
3508 strcat(
l1_input->input_parms, str_buf);
3509 strcat(
l1_input->input_parms,
"\n");
3511 sprintf(str_buf,
"rad3 = %s",
input->cld_rad3);
3512 strcat(
l1_input->input_parms, str_buf);
3513 strcat(
l1_input->input_parms,
"\n");
3515 sprintf(str_buf,
"anc_profile1 = %s",
input->anc_profile1);
3516 strcat(
l1_input->input_parms, str_buf);
3517 strcat(
l1_input->input_parms,
"\n");
3519 sprintf(str_buf,
"anc_profile2 = %s",
input->anc_profile2);
3520 strcat(
l1_input->input_parms, str_buf);
3521 strcat(
l1_input->input_parms,
"\n");
3523 sprintf(str_buf,
"anc_profile3 = %s",
input->anc_profile3);
3524 strcat(
l1_input->input_parms, str_buf);
3525 strcat(
l1_input->input_parms,
"\n");
3527 sprintf(str_buf,
"anc_aerosol1 = %s",
input->anc_aerosol1);
3528 strcat(
l1_input->input_parms, str_buf);
3529 strcat(
l1_input->input_parms,
"\n");
3531 sprintf(str_buf,
"anc_aerosol2 = %s",
input->anc_aerosol2);
3532 strcat(
l1_input->input_parms, str_buf);
3533 strcat(
l1_input->input_parms,
"\n");
3535 sprintf(str_buf,
"anc_aerosol3 = %s",
input->anc_aerosol3);
3536 strcat(
l1_input->input_parms, str_buf);
3537 strcat(
l1_input->input_parms,
"\n");
3539 sprintf(str_buf,
"sfc_albedo= %s",
input->sfc_albedo);
3540 strcat(
l1_input->input_parms, str_buf);
3541 strcat(
l1_input->input_parms,
"\n");
3543 sprintf(str_buf,
"cth_albedo= %s",
input->cth_albedo);
3544 strcat(
l1_input->input_parms, str_buf);
3545 strcat(
l1_input->input_parms,
"\n");
3547 sprintf(str_buf,
"anc_cor_file = %s",
input->anc_cor_file);
3548 strcat(
l1_input->input_parms, str_buf);
3549 strcat(
l1_input->input_parms,
"\n");
3551 sprintf(str_buf,
"pixel_anc_file = %s",
input->pixel_anc_file);
3552 strcat(
l1_input->input_parms, str_buf);
3553 strcat(
l1_input->input_parms,
"\n");
3555 sprintf(str_buf,
"land = %s",
input->land);
3556 strcat(
l1_input->input_parms, str_buf);
3557 strcat(
l1_input->input_parms,
"\n");
3559 sprintf(str_buf,
"water = %s",
input->water);
3560 strcat(
l1_input->input_parms, str_buf);
3561 strcat(
l1_input->input_parms,
"\n");
3563 sprintf(str_buf,
"shallow_water_depth = %6.2f",
input->shallow_water_depth);
3564 strcat(
l1_input->input_parms, str_buf);
3565 strcat(
l1_input->input_parms,
"\n");
3567 sprintf(str_buf,
"demfile = %s",
input->demfile);
3568 strcat(
l1_input->input_parms, str_buf);
3569 strcat(
l1_input->input_parms,
"\n");
3571 sprintf(str_buf,
"dem_auxfile = %s",
input->dem_auxfile);
3572 strcat(
l1_input->input_parms, str_buf);
3573 strcat(
l1_input->input_parms,
"\n");
3575 sprintf(str_buf,
"mldfile = %s",
input->mldfile);
3576 strcat(
l1_input->input_parms, str_buf);
3577 strcat(
l1_input->input_parms,
"\n");
3579 sprintf(str_buf,
"icefile = %s",
input->icefile);
3580 strcat(
l1_input->input_parms, str_buf);
3581 strcat(
l1_input->input_parms,
"\n");
3583 sprintf(str_buf,
"sstfile = %s",
input->sstfile);
3584 strcat(
l1_input->input_parms, str_buf);
3585 strcat(
l1_input->input_parms,
"\n");
3587 sprintf(str_buf,
"sstreftype = %d",
input->sstreftype);
3588 strcat(
l1_input->input_parms, str_buf);
3589 strcat(
l1_input->input_parms,
"\n");
3591 sprintf(str_buf,
"sssfile = %s",
input->sssfile);
3592 strcat(
l1_input->input_parms, str_buf);
3593 strcat(
l1_input->input_parms,
"\n");
3595 sprintf(str_buf,
"no2file = %s",
input->no2file);
3596 strcat(
l1_input->input_parms, str_buf);
3597 strcat(
l1_input->input_parms,
"\n");
3599 sprintf(str_buf,
"alphafile = %s",
input->alphafile);
3600 strcat(
l1_input->input_parms, str_buf);
3601 strcat(
l1_input->input_parms,
"\n");
3603 sprintf(str_buf,
"tauafile = %s",
input->tauafile);
3604 strcat(
l1_input->input_parms, str_buf);
3605 strcat(
l1_input->input_parms,
"\n");
3607 sprintf(str_buf,
"picfile = %s",
input->picfile);
3608 strcat(
l1_input->input_parms, str_buf);
3609 strcat(
l1_input->input_parms,
"\n");
3611 sprintf(str_buf,
"owmcfile = %s",
input->owmcfile);
3612 strcat(
l1_input->input_parms, str_buf);
3613 strcat(
l1_input->input_parms,
"\n");
3615 sprintf(str_buf,
"prodxmlfile = %s",
input->prodXMLfile);
3616 strcat(
l1_input->input_parms, str_buf);
3617 strcat(
l1_input->input_parms,
"\n");
3619 sprintf(str_buf,
"breflectfile = %s",
input->breflectfile);
3620 strcat(
l1_input->input_parms, str_buf);
3621 strcat(
l1_input->input_parms,
"\n");
3623 sprintf(str_buf,
"aerbinfile = %s",
input->aerbinfile);
3624 strcat(
l1_input->input_parms, str_buf);
3625 strcat(
l1_input->input_parms,
"\n");
3627 sprintf(str_buf,
"naermodels = %d",
input->naermodels);
3628 strcat(
l1_input->input_parms, str_buf);
3629 strcat(
l1_input->input_parms,
"\n");
3631 sprintf(str_buf,
"aermodels = %3s",
input->aermodels[0]);
3632 strcat(
l1_input->input_parms, str_buf);
3633 for (
i = 1;
i <
input->naermodels;
i++) {
3634 sprintf(str_buf,
", %3s",
input->aermodels[
i]);
3635 strcat(
l1_input->input_parms, str_buf);
3637 strcat(
l1_input->input_parms,
"\n");
3639 sprintf(str_buf,
"taua = %8.4f",
input->taua[0]);
3640 strcat(
l1_input->input_parms, str_buf);
3641 for (
i = 1;
i < numBands;
i++) {
3642 sprintf(str_buf,
", %8.4f",
input->taua[
i]);
3643 strcat(
l1_input->input_parms, str_buf);
3645 strcat(
l1_input->input_parms,
"\n");
3647 sprintf(str_buf,
"aermodrat = %8.5f",
input->aermodrat);
3648 strcat(
l1_input->input_parms, str_buf);
3649 strcat(
l1_input->input_parms,
"\n");
3651 sprintf(str_buf,
"aermodmin = %3d",
input->aermodmin);
3652 strcat(
l1_input->input_parms, str_buf);
3653 strcat(
l1_input->input_parms,
"\n");
3655 sprintf(str_buf,
"aermodmax = %3d",
input->aermodmax);
3656 strcat(
l1_input->input_parms, str_buf);
3657 strcat(
l1_input->input_parms,
"\n");
3659 sprintf(str_buf,
"cirrus_thresh = %8.5f, %8.5f",
input->cirrus_thresh[0],
input->cirrus_thresh[1]);
3660 strcat(
l1_input->input_parms, str_buf);
3661 strcat(
l1_input->input_parms,
"\n");
3663 sprintf(str_buf,
"absaer = %8.3f",
input->absaer);
3664 strcat(
l1_input->input_parms, str_buf);
3665 strcat(
l1_input->input_parms,
"\n");
3667 sprintf(str_buf,
"rhoamin = %8.5f",
input->rhoamin);
3668 strcat(
l1_input->input_parms, str_buf);
3669 strcat(
l1_input->input_parms,
"\n");
3671 sprintf(str_buf,
"nlwmin = %8.3f",
input->nlwmin);
3672 strcat(
l1_input->input_parms, str_buf);
3673 strcat(
l1_input->input_parms,
"\n");
3675 sprintf(str_buf,
"wsmax = %8.3f",
input->wsmax);
3676 strcat(
l1_input->input_parms, str_buf);
3677 strcat(
l1_input->input_parms,
"\n");
3679 sprintf(str_buf,
"coccolith = %8.4f",
input->coccolith[0]);
3680 strcat(
l1_input->input_parms, str_buf);
3681 for (
i = 1;
i < 8;
i++) {
3682 sprintf(str_buf,
", %8.4f",
input->coccolith[
i]);
3683 strcat(
l1_input->input_parms, str_buf);
3685 strcat(
l1_input->input_parms,
"\n");
3687 sprintf(str_buf,
"tauamax = %8.3f",
input->tauamax);
3688 strcat(
l1_input->input_parms, str_buf);
3689 strcat(
l1_input->input_parms,
"\n");
3691 sprintf(str_buf,
"epsmin = %8.3f",
input->epsmin);
3692 strcat(
l1_input->input_parms, str_buf);
3693 strcat(
l1_input->input_parms,
"\n");
3695 sprintf(str_buf,
"epsmax = %8.3f",
input->epsmax);
3696 strcat(
l1_input->input_parms, str_buf);
3697 strcat(
l1_input->input_parms,
"\n");
3699 sprintf(str_buf,
"windspeed = %8.3f",
input->windspeed);
3700 strcat(
l1_input->input_parms, str_buf);
3701 strcat(
l1_input->input_parms,
"\n");
3703 sprintf(str_buf,
"windangle = %8.3f",
input->windangle);
3704 strcat(
l1_input->input_parms, str_buf);
3705 strcat(
l1_input->input_parms,
"\n");
3707 sprintf(str_buf,
"pressure = %8.3f",
input->pressure);
3708 strcat(
l1_input->input_parms, str_buf);
3709 strcat(
l1_input->input_parms,
"\n");
3711 sprintf(str_buf,
"ozone = %8.3f",
input->ozone);
3712 strcat(
l1_input->input_parms, str_buf);
3713 strcat(
l1_input->input_parms,
"\n");
3715 sprintf(str_buf,
"watervapor = %8.3f",
input->watervapor);
3716 strcat(
l1_input->input_parms, str_buf);
3717 strcat(
l1_input->input_parms,
"\n");
3719 sprintf(str_buf,
"relhumid = %8.3f",
input->relhumid);
3720 strcat(
l1_input->input_parms, str_buf);
3721 strcat(
l1_input->input_parms,
"\n");
3723 sprintf(str_buf,
"ice_threshold = %8.3f",
input->ice_threshold);
3724 strcat(
l1_input->input_parms, str_buf);
3725 strcat(
l1_input->input_parms,
"\n");
3727 sprintf(str_buf,
"mumm_alpha = %8.3f",
input->mumm_alpha);
3728 strcat(
l1_input->input_parms, str_buf);
3729 strcat(
l1_input->input_parms,
"\n");
3731 sprintf(str_buf,
"mumm_gamma = %8.3f",
input->mumm_gamma);
3732 strcat(
l1_input->input_parms, str_buf);
3733 strcat(
l1_input->input_parms,
"\n");
3735 sprintf(str_buf,
"mumm_epsilon = %8.3f",
input->mumm_epsilon);
3736 strcat(
l1_input->input_parms, str_buf);
3737 strcat(
l1_input->input_parms,
"\n");
3739 sprintf(str_buf,
"chloc2_wave = %4d",
input->chloc2w[0]);
3740 strcat(
l1_input->input_parms, str_buf);
3741 for (
i = 1;
i < 2;
i++) {
3742 sprintf(str_buf,
", %4d",
input->chloc2w[
i]);
3743 strcat(
l1_input->input_parms, str_buf);
3745 strcat(
l1_input->input_parms,
"\n");
3747 sprintf(str_buf,
"chloc2_coef = %8.5f",
input->chloc2c[0]);
3748 strcat(
l1_input->input_parms, str_buf);
3749 for (
i = 1;
i < 5;
i++) {
3750 sprintf(str_buf,
", %8.5f",
input->chloc2c[
i]);
3751 strcat(
l1_input->input_parms, str_buf);
3753 strcat(
l1_input->input_parms,
"\n");
3755 sprintf(str_buf,
"chloc3_wave = %4d",
input->chloc3w[0]);
3756 strcat(
l1_input->input_parms, str_buf);
3757 for (
i = 1;
i < 3;
i++) {
3758 sprintf(str_buf,
", %4d",
input->chloc3w[
i]);
3759 strcat(
l1_input->input_parms, str_buf);
3761 strcat(
l1_input->input_parms,
"\n");
3763 sprintf(str_buf,
"chloc3_coef = %8.5f",
input->chloc3c[0]);
3764 strcat(
l1_input->input_parms, str_buf);
3765 for (
i = 1;
i < 5;
i++) {
3766 sprintf(str_buf,
", %8.5f",
input->chloc3c[
i]);
3767 strcat(
l1_input->input_parms, str_buf);
3769 strcat(
l1_input->input_parms,
"\n");
3771 sprintf(str_buf,
"chloc4_wave = %4d",
input->chloc4w[0]);
3772 strcat(
l1_input->input_parms, str_buf);
3773 for (
i = 1;
i < 4;
i++) {
3774 sprintf(str_buf,
", %4d",
input->chloc4w[
i]);
3775 strcat(
l1_input->input_parms, str_buf);
3777 strcat(
l1_input->input_parms,
"\n");
3779 sprintf(str_buf,
"chloc4_coef = %8.5f",
input->chloc4c[0]);
3780 strcat(
l1_input->input_parms, str_buf);
3781 for (
i = 1;
i < 5;
i++) {
3782 sprintf(str_buf,
", %8.5f",
input->chloc4c[
i]);
3783 strcat(
l1_input->input_parms, str_buf);
3785 strcat(
l1_input->input_parms,
"\n");
3787 sprintf(str_buf,
"avw_coef = %.5E",
input->avw_coef[0]);
3788 strcat(
l1_input->input_parms, str_buf);
3789 for (
i = 1;
i < 6;
i++) {
3790 sprintf(str_buf,
", %.5E",
input->avw_coef[
i]);
3791 strcat(
l1_input->input_parms, str_buf);
3793 strcat(
l1_input->input_parms,
"\n");
3795 sprintf(str_buf,
"kd2_wave = %4d",
input->kd2w[0]);
3796 strcat(
l1_input->input_parms, str_buf);
3797 for (
i = 1;
i < 2;
i++) {
3798 sprintf(str_buf,
", %4d",
input->kd2w[
i]);
3799 strcat(
l1_input->input_parms, str_buf);
3801 strcat(
l1_input->input_parms,
"\n");
3803 sprintf(str_buf,
"kd2_coef = %8.5f",
input->kd2c[0]);
3804 strcat(
l1_input->input_parms, str_buf);
3805 for (
i = 1;
i < 6;
i++) {
3806 sprintf(str_buf,
", %8.5f",
input->kd2c[
i]);
3807 strcat(
l1_input->input_parms, str_buf);
3809 strcat(
l1_input->input_parms,
"\n");
3811 sprintf(str_buf,
"flh_offset = %8.5f",
input->flh_offset);
3812 strcat(
l1_input->input_parms, str_buf);
3813 strcat(
l1_input->input_parms,
"\n");
3815 sprintf(str_buf,
"flh_base_wavelengths = ");
3816 strcat(
l1_input->input_parms, str_buf);
3817 for (
i = 0;
i <
input->flh_num_base_wavelengths;
i++) {
3819 sprintf(str_buf,
"%4f",
input->flh_base_wavelengths[
i]);
3821 sprintf(str_buf,
", %4f",
input->flh_base_wavelengths[
i]);
3822 strcat(
l1_input->input_parms, str_buf);
3824 strcat(
l1_input->input_parms,
"\n");
3826 sprintf(str_buf,
"flh_height_wavelength = %8.5f",
input->flh_height_wavelength);
3827 strcat(
l1_input->input_parms, str_buf);
3828 strcat(
l1_input->input_parms,
"\n");
3830 sprintf(str_buf,
"sstcoeffile = %s",
input->sstcoeffile);
3831 strcat(
l1_input->input_parms, str_buf);
3832 strcat(
l1_input->input_parms,
"\n");
3834 sprintf(str_buf,
"dsdicoeffile = %s",
input->dsdicoeffile);
3835 strcat(
l1_input->input_parms, str_buf);
3836 strcat(
l1_input->input_parms,
"\n");
3838 sprintf(str_buf,
"sstssesfile = %s",
input->sstssesfile);
3839 strcat(
l1_input->input_parms, str_buf);
3840 strcat(
l1_input->input_parms,
"\n");
3842 sprintf(str_buf,
"sst4coeffile = %s",
input->sst4coeffile);
3843 strcat(
l1_input->input_parms, str_buf);
3844 strcat(
l1_input->input_parms,
"\n");
3846 sprintf(str_buf,
"sst4ssesfile = %s",
input->sst4ssesfile);
3847 strcat(
l1_input->input_parms, str_buf);
3848 strcat(
l1_input->input_parms,
"\n");
3850 sprintf(str_buf,
"sst3coeffile = %s",
input->sst3coeffile);
3851 strcat(
l1_input->input_parms, str_buf);
3852 strcat(
l1_input->input_parms,
"\n");
3854 sprintf(str_buf,
"sst3ssesfile = %s",
input->sst3ssesfile);
3855 strcat(
l1_input->input_parms, str_buf);
3856 strcat(
l1_input->input_parms,
"\n");
3858 sprintf(str_buf,
"vcal_opt = %3d",
input->vcal_opt);
3859 strcat(
l1_input->input_parms, str_buf);
3860 strcat(
l1_input->input_parms,
"\n");
3862 sprintf(str_buf,
"vcal_nlw = %8.4f",
input->vcal_nLw[0]);
3863 strcat(
l1_input->input_parms, str_buf);
3864 for (
i = 1;
i < numBands;
i++) {
3865 sprintf(str_buf,
", %8.4f",
input->vcal_nLw[
i]);
3866 strcat(
l1_input->input_parms, str_buf);
3868 strcat(
l1_input->input_parms,
"\n");
3870 sprintf(str_buf,
"vcal_lw = %8.4f",
input->vcal_Lw[0]);
3871 strcat(
l1_input->input_parms, str_buf);
3872 for (
i = 1;
i < numBands;
i++) {
3873 sprintf(str_buf,
", %8.4f",
input->vcal_Lw[
i]);
3874 strcat(
l1_input->input_parms, str_buf);
3876 strcat(
l1_input->input_parms,
"\n");
3878 sprintf(str_buf,
"vcal_chl = %8.4f",
input->vcal_chl);
3879 strcat(
l1_input->input_parms, str_buf);
3880 strcat(
l1_input->input_parms,
"\n");
3882 sprintf(str_buf,
"vcal_solz = %8.4f",
input->vcal_solz);
3883 strcat(
l1_input->input_parms, str_buf);
3884 strcat(
l1_input->input_parms,
"\n");
3886 sprintf(str_buf,
"vcal_depth = %8.4f",
input->vcal_depth);
3887 strcat(
l1_input->input_parms, str_buf);
3888 strcat(
l1_input->input_parms,
"\n");
3890 sprintf(str_buf,
"vcal_min_nbin = %d",
input->vcal_min_nbin);
3891 strcat(
l1_input->input_parms, str_buf);
3892 strcat(
l1_input->input_parms,
"\n");
3894 sprintf(str_buf,
"vcal_min_nscene = %d",
input->vcal_min_nscene);
3895 strcat(
l1_input->input_parms, str_buf);
3896 strcat(
l1_input->input_parms,
"\n");
3898 sprintf(str_buf,
"band_shift_opt = %3d",
input->band_shift_opt);
3899 strcat(
l1_input->input_parms, str_buf);
3900 strcat(
l1_input->input_parms,
"\n");
3902 sprintf(str_buf,
"stype = %d",
input->stype);
3903 strcat(
l1_input->input_parms, str_buf);
3904 strcat(
l1_input->input_parms,
"\n");
3906 sprintf(str_buf,
"datamin = %8.4f",
input->datamin);
3907 strcat(
l1_input->input_parms, str_buf);
3908 strcat(
l1_input->input_parms,
"\n");
3910 sprintf(str_buf,
"datamax = %8.4f",
input->datamax);
3911 strcat(
l1_input->input_parms, str_buf);
3912 strcat(
l1_input->input_parms,
"\n");
3914 sprintf(str_buf,
"north = %8.4f",
input->north);
3915 strcat(
l1_input->input_parms, str_buf);
3916 strcat(
l1_input->input_parms,
"\n");
3918 sprintf(str_buf,
"south = %8.4f",
input->south);
3919 strcat(
l1_input->input_parms, str_buf);
3920 strcat(
l1_input->input_parms,
"\n");
3922 sprintf(str_buf,
"east = %8.4f",
input->east);
3923 strcat(
l1_input->input_parms, str_buf);
3924 strcat(
l1_input->input_parms,
"\n");
3926 sprintf(str_buf,
"west = %8.4f",
input->west);
3927 strcat(
l1_input->input_parms, str_buf);
3928 strcat(
l1_input->input_parms,
"\n");
3930 sprintf(str_buf,
"xbox = %d",
input->xbox);
3931 strcat(
l1_input->input_parms, str_buf);
3932 strcat(
l1_input->input_parms,
"\n");
3934 sprintf(str_buf,
"ybox = %d",
input->ybox);
3935 strcat(
l1_input->input_parms, str_buf);
3936 strcat(
l1_input->input_parms,
"\n");
3939 sprintf(str_buf,
"raman_opt = %d",
input->raman_opt);
3940 strcat(
l1_input->input_parms, str_buf);
3941 strcat(
l1_input->input_parms,
"\n");
3943 sprintf(str_buf,
"width = %d",
input->width);
3944 strcat(
l1_input->input_parms, str_buf);
3945 strcat(
l1_input->input_parms,
"\n");
3947 sprintf(str_buf,
"threshold = %8.4f",
input->threshold);
3948 strcat(
l1_input->input_parms, str_buf);
3949 strcat(
l1_input->input_parms,
"\n");
3951 sprintf(str_buf,
"rgb = %d",
input->rgb[0]);
3952 strcat(
l1_input->input_parms, str_buf);
3953 for (
i = 1;
i < 3;
i++) {
3954 sprintf(str_buf,
", %d",
input->rgb[
i]);
3955 strcat(
l1_input->input_parms, str_buf);
3957 strcat(
l1_input->input_parms,
"\n");
3959 sprintf(str_buf,
"subsamp = %d",
input->subsamp);
3960 strcat(
l1_input->input_parms, str_buf);
3961 strcat(
l1_input->input_parms,
"\n");
3963 sprintf(str_buf,
"viirsnv7 = %d",
input->viirsnv7);
3964 strcat(
l1_input->input_parms, str_buf);
3965 strcat(
l1_input->input_parms,
"\n");
3967 sprintf(str_buf,
"viirsnosisaf = %d",
input->viirsnosisaf);
3968 strcat(
l1_input->input_parms, str_buf);
3969 strcat(
l1_input->input_parms,
"\n");
3971 sprintf(str_buf,
"sstrefdif = %8.4f",
input->sstrefdif);
3972 strcat(
l1_input->input_parms, str_buf);
3973 strcat(
l1_input->input_parms,
"\n");
3975 sprintf(str_buf,
"water_spectra_file = %s",
input->water_spectra_file);
3976 strcat(
l1_input->input_parms, str_buf);
3977 strcat(
l1_input->input_parms,
"\n");
3979 sprintf(str_buf,
"sstreftype = %d",
input->sstreftype);
3980 strcat(
l1_input->input_parms, str_buf);
3981 strcat(
l1_input->input_parms,
"\n");
3983 sprintf(str_buf,
"bpar_validate_opt = %d",
input->bpar_validate_opt);
3984 strcat(
l1_input->input_parms, str_buf);
3985 strcat(
l1_input->input_parms,
"\n");
3987 sprintf(str_buf,
"bpar_elev_opt = %d",
input->bpar_elev_opt);
3988 strcat(
l1_input->input_parms, str_buf);
3989 strcat(
l1_input->input_parms,
"\n");
3991 sprintf(str_buf,
"bpar_elev_value = %8.5f",
input->bpar_elev_value);
3992 strcat(
l1_input->input_parms, str_buf);
3993 strcat(
l1_input->input_parms,
"\n");
3995 sprintf(str_buf,
"cloud_hgt_file = %s",
input->cloud_hgt_file);
3996 strcat(
l1_input->input_parms, str_buf);
3997 strcat(
l1_input->input_parms,
"\n");
3999 sprintf(str_buf,
"doi = %s",
input->doi);
4000 strcat(
l1_input->input_parms, str_buf);
4001 strcat(
l1_input->input_parms,
"\n");
4003 sprintf(str_buf,
"wavelength_3d = %s",
input->wavelength_3d_str);
4004 strcat(
l1_input->input_parms, str_buf);
4005 strcat(
l1_input->input_parms,
"\n");
4008 sprintf(str_buf,
"georegion_file = %s",
input->georegionfile);
4009 strcat(
l1_input->input_parms, str_buf);
4010 strcat(
l1_input->input_parms,
"\n");
4013 if(
input->mbac_wave){
4014 strcat(
l1_input->input_parms,
"mbac_wave = ");
4018 sprintf(str_buf,
"%d",
input->mbac_wave[
i]);
4020 sprintf(str_buf,
",%d",
input->mbac_wave[
i]);
4021 strcat(
l1_input->input_parms, str_buf);
4023 strcat(
l1_input->input_parms,
"\n");
4026 strcat(
l1_input->input_parms,
"mbac_wave = \n");
4028 if(
input->watervapor_bands){
4029 strcat(
l1_input->input_parms,
"watervapor_bands = ");
4031 for(
i=0;
i<
input->nbands_watervapor;
i++) {
4033 sprintf(str_buf,
"%d",
input->watervapor_bands[
i]);
4035 sprintf(str_buf,
",%d",
input->watervapor_bands[
i]);
4036 strcat(
l1_input->input_parms, str_buf);
4038 strcat(
l1_input->input_parms,
"\n");
4041 strcat(
l1_input->input_parms,
"watervapor_bands = \n");
4050 if (
input->ifile[
i][0] !=
'\0') {
4051 tmp_str = strrchr(
input->ifile[
i],
'/');
4052 tmp_str = (tmp_str == 0x0) ?
input->ifile[
i] : tmp_str + 1;
4053 if (
i == 0) sprintf(
l1_input->input_files,
"%s", tmp_str);
4055 sprintf(str_buf,
",%s", tmp_str);
4056 strcat(
l1_input->input_files, str_buf);
4060 if (strlen(
input->geofile)) {
4061 tmp_str = strrchr(
input->geofile,
'/');
4062 tmp_str = (tmp_str == 0x0) ?
input->geofile : tmp_str + 1;
4063 sprintf(str_buf,
",%s", tmp_str);
4064 strcat(
l1_input->input_files, str_buf);
4066 if (strlen(
input->gmpfile)) {
4067 tmp_str = strrchr(
input->gmpfile,
'/');
4068 tmp_str = (tmp_str == 0x0) ?
input->gmpfile : tmp_str + 1;
4069 sprintf(str_buf,
",%s", tmp_str);
4070 strcat(
l1_input->input_files, str_buf);
4072 if (strlen(
input->gas_transmittance_file)) {
4073 tmp_str = strrchr(
input->gas_transmittance_file,
'/');
4074 tmp_str = (tmp_str == 0x0) ?
input->gas_transmittance_file : tmp_str + 1;
4075 sprintf(str_buf,
",%s", tmp_str);
4076 strcat(
l1_input->input_files, str_buf);
4078 if (strlen(
input->met1)) {
4079 tmp_str = strrchr(
input->met1,
'/');
4080 tmp_str = (tmp_str == 0x0) ?
input->met1 : tmp_str + 1;
4081 sprintf(str_buf,
",%s", tmp_str);
4082 strcat(
l1_input->input_files, str_buf);
4084 if (strlen(
input->met2)) {
4085 tmp_str = strrchr(
input->met2,
'/');
4086 tmp_str = (tmp_str == 0x0) ?
input->met2 : tmp_str + 1;
4087 sprintf(str_buf,
",%s", tmp_str);
4088 strcat(
l1_input->input_files, str_buf);
4090 if (strlen(
input->met3)) {
4091 tmp_str = strrchr(
input->met3,
'/');
4092 tmp_str = (tmp_str == 0x0) ?
input->met3 : tmp_str + 1;
4093 sprintf(str_buf,
",%s", tmp_str);
4094 strcat(
l1_input->input_files, str_buf);
4096 if (strlen(
input->ozone1)) {
4097 tmp_str = strrchr(
input->ozone1,
'/');
4098 tmp_str = (tmp_str == 0x0) ?
input->ozone1 : tmp_str + 1;
4099 sprintf(str_buf,
",%s", tmp_str);
4100 strcat(
l1_input->input_files, str_buf);
4102 if (strlen(
input->ozone2)) {
4103 tmp_str = strrchr(
input->ozone2,
'/');
4104 tmp_str = (tmp_str == 0x0) ?
input->ozone2 : tmp_str + 1;
4105 sprintf(str_buf,
",%s", tmp_str);
4106 strcat(
l1_input->input_files, str_buf);
4108 if (strlen(
input->ozone3)) {
4109 tmp_str = strrchr(
input->ozone3,
'/');
4110 tmp_str = (tmp_str == 0x0) ?
input->ozone3 : tmp_str + 1;
4111 sprintf(str_buf,
",%s", tmp_str);
4112 strcat(
l1_input->input_files, str_buf);
4114 if (strlen(
input->cld_rad1)) {
4115 tmp_str = strrchr(
input->cld_rad1,
'/');
4116 tmp_str = (tmp_str == 0x0) ?
input->cld_rad1 : tmp_str + 1;
4117 sprintf(str_buf,
",%s", tmp_str);
4118 strcat(
l1_input->input_files, str_buf);
4120 if (strlen(
input->cld_rad2)) {
4121 tmp_str = strrchr(
input->cld_rad2,
'/');
4122 tmp_str = (tmp_str == 0x0) ?
input->cld_rad2 : tmp_str + 1;
4123 sprintf(str_buf,
",%s", tmp_str);
4124 strcat(
l1_input->input_files, str_buf);
4126 if (strlen(
input->cld_rad3)) {
4127 tmp_str = strrchr(
input->cld_rad3,
'/');
4128 tmp_str = (tmp_str == 0x0) ?
input->cld_rad3 : tmp_str + 1;
4129 sprintf(str_buf,
",%s", tmp_str);
4130 strcat(
l1_input->input_files, str_buf);
4132 if (strlen(
input->anc_profile1)) {
4133 tmp_str = strrchr(
input->anc_profile1,
'/');
4134 tmp_str = (tmp_str == 0x0) ?
input->anc_profile1 : tmp_str + 1;
4135 sprintf(str_buf,
",%s", tmp_str);
4136 strcat(
l1_input->input_files, str_buf);
4138 if (strlen(
input->anc_profile2)) {
4139 tmp_str = strrchr(
input->anc_profile2,
'/');
4140 tmp_str = (tmp_str == 0x0) ?
input->anc_profile2 : tmp_str + 1;
4141 sprintf(str_buf,
",%s", tmp_str);
4142 strcat(
l1_input->input_files, str_buf);
4144 if (strlen(
input->anc_profile3)) {
4145 tmp_str = strrchr(
input->anc_profile3,
'/');
4146 tmp_str = (tmp_str == 0x0) ?
input->anc_profile3 : tmp_str + 1;
4147 sprintf(str_buf,
",%s", tmp_str);
4148 strcat(
l1_input->input_files, str_buf);
4150 if (strlen(
input->anc_aerosol1)) {
4151 tmp_str = strrchr(
input->anc_aerosol1,
'/');
4152 tmp_str = (tmp_str == 0x0) ?
input->anc_aerosol1 : tmp_str + 1;
4153 sprintf(str_buf,
",%s", tmp_str);
4154 strcat(
l1_input->input_files, str_buf);
4156 if (strlen(
input->anc_aerosol2)) {
4157 tmp_str = strrchr(
input->anc_aerosol2,
'/');
4158 tmp_str = (tmp_str == 0x0) ?
input->anc_aerosol2 : tmp_str + 1;
4159 sprintf(str_buf,
",%s", tmp_str);
4160 strcat(
l1_input->input_files, str_buf);
4162 if (strlen(
input->anc_aerosol3)) {
4163 tmp_str = strrchr(
input->anc_aerosol3,
'/');
4164 tmp_str = (tmp_str == 0x0) ?
input->anc_aerosol3 : tmp_str + 1;
4165 sprintf(str_buf,
",%s", tmp_str);
4166 strcat(
l1_input->input_files, str_buf);
4168 if (strlen(
input->sfc_albedo)) {
4169 tmp_str = strrchr(
input->sfc_albedo,
'/');
4170 tmp_str = (tmp_str == 0x0) ?
input->sfc_albedo: tmp_str + 1;
4171 sprintf(str_buf,
",%s", tmp_str);
4172 strcat(
l1_input->input_files, str_buf);
4174 if (strlen(
input->cth_albedo)) {
4175 tmp_str = strrchr(
input->cth_albedo,
'/');
4176 tmp_str = (tmp_str == 0x0) ?
input->cth_albedo: tmp_str + 1;
4177 sprintf(str_buf,
",%s", tmp_str);
4178 strcat(
l1_input->input_files, str_buf);
4180 if (strlen(
input->anc_cor_file)) {
4181 tmp_str = strrchr(
input->anc_cor_file,
'/');
4182 tmp_str = (tmp_str == 0x0) ?
input->anc_cor_file : tmp_str + 1;
4183 sprintf(str_buf,
",%s", tmp_str);
4184 strcat(
l1_input->input_files, str_buf);
4186 if (strlen(
input->pixel_anc_file)) {
4187 tmp_str = strrchr(
input->pixel_anc_file,
'/');
4188 tmp_str = (tmp_str == 0x0) ?
input->pixel_anc_file : tmp_str + 1;
4189 sprintf(str_buf,
",%s", tmp_str);
4190 strcat(
l1_input->input_files, str_buf);
4192 if (strlen(
input->fqfile)) {
4193 tmp_str = strrchr(
input->fqfile,
'/');
4194 tmp_str = (tmp_str == 0x0) ?
input->fqfile : tmp_str + 1;
4195 sprintf(str_buf,
",%s", tmp_str);
4196 strcat(
l1_input->input_files, str_buf);
4198 if (strlen(
input->parfile)) {
4199 tmp_str = strrchr(
input->parfile,
'/');
4200 tmp_str = (tmp_str == 0x0) ?
input->parfile : tmp_str + 1;
4201 sprintf(str_buf,
",%s", tmp_str);
4202 strcat(
l1_input->input_files, str_buf);
4204 if (strlen(
input->polfile)) {
4205 tmp_str = strrchr(
input->polfile,
'/');
4206 tmp_str = (tmp_str == 0x0) ?
input->polfile : tmp_str + 1;
4207 sprintf(str_buf,
",%s", tmp_str);
4208 strcat(
l1_input->input_files, str_buf);
4210 if (strlen(
input->aermodfile)) {
4211 tmp_str = strrchr(
input->aermodfile,
'/');
4212 tmp_str = (tmp_str == 0x0) ?
input->aermodfile : tmp_str + 1;
4213 sprintf(str_buf,
",%s", tmp_str);
4214 strcat(
l1_input->input_files, str_buf);
4216 if (strlen(
input->vcnnfile)) {
4217 tmp_str = strrchr(
input->vcnnfile,
'/');
4218 tmp_str = (tmp_str == 0x0) ?
input->vcnnfile : tmp_str + 1;
4219 sprintf(str_buf,
",%s", tmp_str);
4220 strcat(
l1_input->input_files, str_buf);
4222 if (strlen(
input->land)) {
4223 tmp_str = strrchr(
input->land,
'/');
4224 tmp_str = (tmp_str == 0x0) ?
input->land : tmp_str + 1;
4225 sprintf(str_buf,
",%s", tmp_str);
4226 strcat(
l1_input->input_files, str_buf);
4228 if (strlen(
input->water)) {
4229 tmp_str = strrchr(
input->water,
'/');
4230 tmp_str = (tmp_str == 0x0) ?
input->water : tmp_str + 1;
4231 sprintf(str_buf,
",%s", tmp_str);
4232 strcat(
l1_input->input_files, str_buf);
4234 if (strlen(
input->demfile)) {
4235 tmp_str = strrchr(
input->demfile,
'/');
4236 tmp_str = (tmp_str == 0x0) ?
input->demfile : tmp_str + 1;
4237 sprintf(str_buf,
",%s", tmp_str);
4238 strcat(
l1_input->input_files, str_buf);
4241 if (strlen(
input->dem_auxfile)) {
4242 tmp_str = strrchr(
input->dem_auxfile,
'/');
4243 tmp_str = (tmp_str == 0x0) ?
input->dem_auxfile : tmp_str + 1;
4244 sprintf(str_buf,
",%s", tmp_str);
4245 strcat(
l1_input->input_files, str_buf);
4247 if (strlen(
input->mldfile)) {
4248 tmp_str = strrchr(
input->mldfile,
'/');
4249 tmp_str = (tmp_str == 0x0) ?
input->mldfile : tmp_str + 1;
4250 sprintf(str_buf,
",%s", tmp_str);
4251 strcat(
l1_input->input_files, str_buf);
4253 if (strlen(
input->icefile)) {
4254 tmp_str = strrchr(
input->icefile,
'/');
4255 tmp_str = (tmp_str == 0x0) ?
input->icefile : tmp_str + 1;
4256 sprintf(str_buf,
",%s", tmp_str);
4257 strcat(
l1_input->input_files, str_buf);
4259 if (strlen(
input->sstfile)) {
4260 tmp_str = strrchr(
input->sstfile,
'/');
4261 tmp_str = (tmp_str == 0x0) ?
input->sstfile : tmp_str + 1;
4262 sprintf(str_buf,
",%s", tmp_str);
4263 strcat(
l1_input->input_files, str_buf);
4266 if (strlen(
input->sssfile)) {
4267 tmp_str = strrchr(
input->sssfile,
'/');
4268 tmp_str = (tmp_str == 0x0) ?
input->sssfile : tmp_str + 1;
4269 sprintf(str_buf,
",%s", tmp_str);
4270 strcat(
l1_input->input_files, str_buf);
4272 if (strlen(
input->no2file)) {
4273 tmp_str = strrchr(
input->no2file,
'/');
4274 tmp_str = (tmp_str == 0x0) ?
input->no2file : tmp_str + 1;
4275 sprintf(str_buf,
",%s", tmp_str);
4276 strcat(
l1_input->input_files, str_buf);
4278 if (strlen(
input->alphafile)) {
4279 tmp_str = strrchr(
input->alphafile,
'/');
4280 tmp_str = (tmp_str == 0x0) ?
input->alphafile : tmp_str + 1;
4281 sprintf(str_buf,
",%s", tmp_str);
4282 strcat(
l1_input->input_files, str_buf);
4284 if (strlen(
input->tauafile)) {
4285 tmp_str = strrchr(
input->tauafile,
'/');
4286 tmp_str = (tmp_str == 0x0) ?
input->tauafile : tmp_str + 1;
4287 sprintf(str_buf,
",%s", tmp_str);
4288 strcat(
l1_input->input_files, str_buf);
4291 if (strlen(
input->picfile)) {
4292 tmp_str = strrchr(
input->picfile,
'/');
4293 tmp_str = (tmp_str == 0x0) ?
input->picfile : tmp_str + 1;
4294 sprintf(str_buf,
",%s", tmp_str);
4295 strcat(
l1_input->input_files, str_buf);
4297 if (strlen(
input->owmcfile)) {
4298 tmp_str = strrchr(
input->owmcfile,
'/');
4299 tmp_str = (tmp_str == 0x0) ?
input->owmcfile : tmp_str + 1;
4300 sprintf(str_buf,
",%s", tmp_str);
4301 strcat(
l1_input->input_files, str_buf);
4303 if (strlen(
input->water_spectra_file)) {
4304 tmp_str = strrchr(
input->water_spectra_file,
'/');
4305 tmp_str = (tmp_str == 0x0) ?
input->water_spectra_file : tmp_str + 1;
4306 sprintf(str_buf,
",%s", tmp_str);
4307 strcat(
l1_input->input_files, str_buf);
4309 if (strlen(
input->georegionfile)) {
4310 tmp_str = strrchr(
input->georegionfile,
'/');
4311 tmp_str = (tmp_str == 0x0) ?
input->georegionfile : tmp_str + 1;
4312 sprintf(str_buf,
",%s", tmp_str);
4313 strcat(
l1_input->input_files, str_buf);
4315 if (strlen(
input->cloud_hgt_file)) {
4316 tmp_str = strrchr(
input->cloud_hgt_file,
'/');
4317 tmp_str = (tmp_str == 0x0) ?
input->cloud_hgt_file : tmp_str + 1;
4318 sprintf(str_buf,
",%s", tmp_str);
4319 strcat(
l1_input->input_files, str_buf);
4328 if (
l1_input->landmask == 1) strcat(
input->mask_names,
",LAND");
4329 if (
l1_input->bathmask == 1) strcat(
input->mask_names,
",COASTZ");
4330 if (
l1_input->cloudmask == 1) strcat(
input->mask_names,
",CLDICE");
4331 if (
l1_input->glintmask == 1) strcat(
input->mask_names,
",HIGLINT");
4332 if (
l1_input->sunzenmask == 1) strcat(
input->mask_names,
",HISOLZEN");
4333 if (
l1_input->satzenmask == 1) strcat(
input->mask_names,
",HISATZEN");
4334 if (
l1_input->hiltmask == 1) strcat(
input->mask_names,
",HILT");
4335 if (
l1_input->stlightmask == 1) strcat(
input->mask_names,
",STRAYLIGHT");
4388 static char resolutionStr[FILENAME_MAX];
4389 static char ifileStr[FILENAME_MAX];
4390 static char geofileStr[FILENAME_MAX];
4392 argv[
argc++] =
"msl12";
4394 sprintf(ifileStr,
"ifile=%s",
l1file->name);
4395 argv[
argc++] = ifileStr;
4398 sprintf(geofileStr,
"geofile=%s",
l1file->geofile);
4399 argv[
argc++] = geofileStr;
4404 sprintf(resolutionStr,
"resolution=%d",
l1_input->resolution);
4405 argv[
argc++] = resolutionStr;