10 #include <sys/types.h>
14 static int32_t numTauas = -1;
15 static int32_t numGainUncs = -1;
16 static int32_t numNoiseScales = -1;
17 static int32_t numBiasFracs = -1;
21 char defaermodels[][32] = {
"r30f95v01",
"r30f80v01",
"r30f50v01",
"r30f30v01",
"r30f20v01",
"r30f10v01",
"r30f05v01",
"r30f02v01",
"r30f01v01",
"r30f00v01",
22 "r50f95v01",
"r50f80v01",
"r50f50v01",
"r50f30v01",
"r50f20v01",
"r50f10v01",
"r50f05v01",
"r50f02v01",
"r50f01v01",
"r50f00v01",
23 "r70f95v01",
"r70f80v01",
"r70f50v01",
"r70f30v01",
"r70f20v01",
"r70f10v01",
"r70f05v01",
"r70f02v01",
"r70f01v01",
"r70f00v01",
24 "r75f95v01",
"r75f80v01",
"r75f50v01",
"r75f30v01",
"r75f20v01",
"r75f10v01",
"r75f05v01",
"r75f02v01",
"r75f01v01",
"r75f00v01",
25 "r80f95v01",
"r80f80v01",
"r80f50v01",
"r80f30v01",
"r80f20v01",
"r80f10v01",
"r80f05v01",
"r80f02v01",
"r80f01v01",
"r80f00v01",
26 "r85f95v01",
"r85f80v01",
"r85f50v01",
"r85f30v01",
"r85f20v01",
"r85f10v01",
"r85f05v01",
"r85f02v01",
"r85f01v01",
"r85f00v01",
27 "r90f95v01",
"r90f80v01",
"r90f50v01",
"r90f30v01",
"r90f20v01",
"r90f10v01",
"r90f05v01",
"r90f02v01",
"r90f01v01",
"r90f00v01",
28 "r95f95v01",
"r95f80v01",
"r95f50v01",
"r95f30v01",
"r95f20v01",
"r95f10v01",
"r95f05v01",
"r95f02v01",
"r95f01v01",
"r95f00v01"};
33 static char default_flaguse[1024];
36 static char mainProgramName[50];
38 static char *l2gen_optionKeys[] = {
42 "-dump_options_paramfile",
43 "-dump_options_xmlfile",
110 "add_no2_tropo_noise",
111 "add_no2_strat_noise",
244 "water_spectra_file",
245 "shallow_water_depth",
294 static char *l1bgen_optionKeys[] = {
298 "-dump_options_paramfile",
299 "-dump_options_xmlfile",
324 static char *l1mapgen_optionKeys[] = {
328 "-dump_options_paramfile",
329 "-dump_options_xmlfile",
362 static char *l1brsgen_optionKeys[] = {
366 "-dump_options_paramfile",
367 "-dump_options_xmlfile",
400 static char *l1det2det_optionKeys[] = {
404 "-dump_options_paramfile",
405 "-dump_options_xmlfile",
431 static char *vcalmerge_optionKeys[] = {
435 "-dump_options_paramfile",
436 "-dump_options_xmlfile",
498 input->ctl_pt_incr = 8;
500 input->proc_ocean = 1;
501 input->proc_sst = -1;
502 input->proc_land = 0;
503 input->proc_cloud = 0;
506 input->glint_opt = 1;
507 input->aer_iter_max = 10;
508 input->brdf_opt = -1;
510 input->atrem_opt = 0;
511 input->atrem_full = 0;
512 input->atrem_geom = 0;
513 input->atrem_model = 0;
514 input->atrem_splitpaths = 0;
518 input->absaer_opt = 0;
519 input->cirrus_opt = 0;
522 input->gsm_adg_s = 0.02061;
523 input->gsm_bbp_s = 1.03373;
525 input->giop_maxiter = -1;
526 input->giop_fit_opt = -1;
527 input->giop_aph_opt = -1;
528 input->giop_adg_opt = -1;
529 input->giop_bbp_opt = -1;
530 input->giop_acdom_opt = -1;
531 input->giop_anap_opt = -1;
532 input->giop_bbph_opt = -1;
533 input->giop_bbnap_opt = -1;
534 input->giop_rrs_opt = -1;
535 input->giop_rrs_diff = -1.0;
536 input->giop_iterate = 0;
537 input->giop_aph_s = -1000.0;
538 input->giop_adg_s = -1000.0;
539 input->giop_bbp_s = -1000.0;
540 input->giop_aph_w = -1.0;
541 input->giop_adg_w = -1.0;
542 input->giop_bbp_w = -1.0;
543 input->giop_grd[0] = -1000.0;
544 input->giop_grd[1] = -1000.0;
546 input->qaa_adg_s = 0.015;
548 input->flh_offset = 0.0;
550 input->seawater_opt = 0;
552 input->oxaband_opt = 99;
553 input->filter_opt = 99;
555 input->aer_wave_short = 765;
556 input->aer_wave_long = 865;
557 input->aer_swir_short = -1;
558 input->aer_swir_long = -1;
559 input->aer_rrs_short = -1.0;
560 input->aer_rrs_long = -1.0;
561 input->aer_angstrom = -999.0;
563 input->band_shift_opt = 0;
564 input->add_lt_noise = 0.0;
565 input->add_ws_noise = -1.0;
566 input->add_wd_noise = -1.0;
567 input->add_mw_noise = -1.0;
568 input->add_zw_noise = -1.0;
569 input->add_rh_noise = -1.0;
570 input->add_pr_noise = -1.0;
571 input->add_wv_noise = -1.0;
572 input->add_oz_noise = -1.0;
573 input->add_no2_strat_noise = -1.0;
574 input->add_no2_tropo_noise = -1.0;
576 input->vcal_chl = -1.0;
577 input->vcal_solz = -1.0;
578 input->vcal_opt = -1;
580 input->aermodrat = 0.0;
581 input->aermodmin = -1;
582 input->aermodmax = -1;
585 input->rhoamin = 0.0001;
586 input->epsmin = 0.85;
587 input->epsmax = 1.35;
588 input->tauamax = 0.30;
589 input->nlwmin = 0.15;
592 input->mumm_alpha = 1.72;
593 input->mumm_gamma = 1.00;
594 input->mumm_epsilon = 1.00;
596 input->windspeed = -1000;
597 input->windangle = -1000;
598 input->pressure = -1000;
599 input->ozone = -1000;
600 input->relhumid = -1000;
601 input->watervapor = -1000;
602 input->ice_threshold = 0.1;
604 for (
i = 0;
i < 8;
i++)
input->coccolith[0] = 0.0;
618 input->maxpointdist = 0.0;
619 strcpy(default_flaguse,
"ATMFAIL,LAND,HIGLINT,HILT,HISATZEN,STRAYLIGHT,CLDICE,COCCOLITH,LOWLW,CHLFAIL,NAVWARN,ABSAER,MAXAERITER,ATMWARN,HISOLZEN,NAVFAIL");
623 input->xcalboxcenter[0] = 0;
624 input->xcalboxcenter[1] = 0;
625 input->xcalpervalid = 0;
626 input->xcalsubsmpl = 1;
628 input->vcal_depth = -1000;
629 input->vcal_min_nbin = 4;
630 input->vcal_min_nscene = 3;
633 input->sstreftype = 0;
634 input->sstrefdif = 100.0;
635 input->viirsnv7 = -1;
636 input->viirsnosisaf = 0;
639 input->datamin = 0.01;
640 input->datamax = 0.9;
646 input->threshold = 0.1;
649 for (
i = 0;
i < 3;
i++) {
657 input->raman_opt = 0;
659 input->shallow_water_depth=30.;
675 strcpy(mainProgramName, prog);
677 if (!strcmp(prog,
"msl12")) {
679 }
else if (!strcmp(prog,
"l2gen")) {
681 }
else if (!strcmp(prog,
"l3gen")) {
683 }
else if (!strcmp(prog,
"l1bgen_generic")) {
685 }
else if (!strcmp(prog,
"l1mapgen")) {
687 }
else if (!strcmp(prog,
"l1brsgen")) {
689 }
else if (!strcmp(prog,
"l1det2det")) {
691 }
else if (!strcmp(prog,
"vcalmerge")) {
699 sprintf(tmpStr,
"Usage: %s argument-list\n\n", prog);
700 strcat(tmpStr,
" The argument-list is a set of keyword=value pairs. The arguments can\n");
701 strcat(tmpStr,
" be specified on the commandline, or put into a parameter file, or the\n");
702 strcat(tmpStr,
" two methods can be used together, with commandline over-riding.\n\n");
703 strcat(tmpStr,
" return value: 0=OK, 1=error, 110=north,south,east,west does not intersect\n");
704 strcat(tmpStr,
" file data.\n\n");
705 strcat(tmpStr,
"The list of valid keywords follows:\n");
708 strcpy(tmpStr,
"product suite string for loading\n");
709 strcat(tmpStr,
" suite-specific defaults");
712 strcpy(tmpStr,
"input L1 file name");
716 strcpy(tmpStr,
"ifile[#]=input L1 file names (1-original and 2-vicarious) to be cross-calibrated\n");
717 strcat(tmpStr,
" or input HDF file names containing cross-calibration pixels");
722 strcpy(tmpStr,
"input L1 geolocation file name (MODIS/VIIRS only)");
725 if (!strcmp(prog,
"l1mapgen")) {
729 strcpy(tmpStr,
"output file format\n");
730 strcat(tmpStr,
" ppm: output a netPBM PPM file\n");
731 strcat(tmpStr,
" png: output a PNG file\n");
732 strcat(tmpStr,
" tiff: output a geoTIFF file");
735 }
else if (!strcmp(prog,
"l1brsgen")) {
739 strcpy(tmpStr,
"output file format\n");
740 strcat(tmpStr,
" hdf4: output a HDF4 file\n");
741 strcat(tmpStr,
" bin: output a flat binary file\n");
742 strcat(tmpStr,
" png: output a PNG file\n");
743 strcat(tmpStr,
" ppm: output a netPBM PPM file");
746 }
else if (!strcmp(prog,
"l1bgen_generic") || !strcmp(prog,
"l1det2det")) {
750 strcpy(tmpStr,
"output file format\n");
751 strcat(tmpStr,
" netcdf4: output a netCDF version 4 file\n");
752 strcat(tmpStr,
" hdf4: output a HDF version 4 file");
756 strcpy(tmpStr,
"output file #1 name,\n");
757 strcat(tmpStr,
" output vicarious L1B for inverse mode\n");
758 strcat(tmpStr,
" ofile[#] = additional output L2 file name");
762 strcpy(tmpStr,
"output file format\n");
763 strcat(tmpStr,
" netcdf4: output a netCDF version 4 file\n");
764 strcat(tmpStr,
" hdf4: output a HDF version 4 file");
768 strcpy(tmpStr,
"output file color depth for HDF4 file\n");
769 strcat(tmpStr,
" 8bit: output 8 bit color depth\n");
770 strcat(tmpStr,
" 24bit: output 24 bit color depth");
775 strcpy(tmpStr,
"input L2 file names for sensor to be\n");
776 strcat(tmpStr,
" used as a calibrator. Alternatively, a data point can be used as a\n");
777 strcat(tmpStr,
" calibrator (e.g. MOBY)\n");
778 strcat(tmpStr,
" il2file[#] = additional L2 calibration file names");
786 strcpy(tmpStr,
"L2 products to be included in ofile #1\n");
787 strcat(tmpStr,
" l2prod[#] = L2 products to be included in ofile[#]");
791 strcpy(tmpStr,
" control-point pixel increment for lon/lat\n");
792 strcat(tmpStr,
" arrays");
795 strcpy(tmpStr,
"toggle ocean processing\n");
796 strcat(tmpStr,
" 1: On\n");
797 strcat(tmpStr,
" 0: Off\n");
798 strcat(tmpStr,
" 2: force all pixels to be processed as ocean");
804 strcpy(tmpStr,
"toggle SST processing\n");
805 strcat(tmpStr,
" (default=1 for MODIS, 0 otherwise)");
808 strcpy(tmpStr,
"processing mode\n");
809 strcat(tmpStr,
" 0: forward processing\n");
810 strcat(tmpStr,
" 1: inverse (calibration) mode, targeting to nLw=0\n");
811 strcat(tmpStr,
" 2: inverse (calibration) mode, given nLw target\n");
812 strcat(tmpStr,
" 3: inverse (calibration) mode, given Lw target (internally normalized)");
815 strcpy(tmpStr,
"seawater IOP options\n");
816 strcat(tmpStr,
" 0: static values\n");
817 strcat(tmpStr,
" 1: temperature & salinity-dependent seawater nw, aw, bbw\n");
822 sprintf(tmpStr,
"aerosol mode option\n");
823 strncpy(tmpStr1, tmpStr, 2048);
824 sprintf(tmpStr,
"%s %3d: No aerosol subtraction\n", tmpStr1,
AERNULL);
825 strncpy(tmpStr1, tmpStr, 2048);
826 sprintf(tmpStr,
"%s >0: Multi-scattering with fixed model (provide model number, 1-N,\n", tmpStr1);
827 strncpy(tmpStr1, tmpStr, 2048);
828 sprintf(tmpStr,
"%s relative to aermodels list)\n", tmpStr1);
829 strncpy(tmpStr1, tmpStr, 2048);
830 sprintf(tmpStr,
"%s %3d: White aerosol extrapolation.\n", tmpStr1,
AERWHITE);
831 strncpy(tmpStr1, tmpStr, 2048);
832 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band model selection\n", tmpStr1,
AERWANG);
833 strncpy(tmpStr1, tmpStr, 2048);
834 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band, RH-based model selection and\n", tmpStr1,
AERRHNIR);
835 strncpy(tmpStr1, tmpStr, 2048);
836 sprintf(tmpStr,
"%s iterative NIR correction\n", tmpStr1);
837 strncpy(tmpStr1, tmpStr, 2048);
838 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band model selection\n", tmpStr1,
AERWANGNIR);
839 strncpy(tmpStr1, tmpStr, 2048);
840 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
841 strncpy(tmpStr1, tmpStr, 2048);
842 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed model pair\n", tmpStr1,
FIXMODPAIR);
843 strncpy(tmpStr1, tmpStr, 2048);
844 sprintf(tmpStr,
"%s (requires aermodmin, aermodmax, aermodrat specification)\n", tmpStr1);
845 strncpy(tmpStr1, tmpStr, 2048);
846 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed model pair\n", tmpStr1,
FIXMODPAIRNIR);
847 strncpy(tmpStr1, tmpStr, 2048);
848 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
849 strncpy(tmpStr1, tmpStr, 2048);
850 sprintf(tmpStr,
"%s (requires aermodmin, aermodmax, aermodrat specification)\n", tmpStr1);
851 strncpy(tmpStr1, tmpStr, 2048);
852 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed angstrom\n", tmpStr1,
FIXANGSTROM);
853 strncpy(tmpStr1, tmpStr, 2048);
854 sprintf(tmpStr,
"%s (requires aer_angstrom specification)\n", tmpStr1);
855 strncpy(tmpStr1, tmpStr, 2048);
856 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed angstrom\n", tmpStr1,
FIXANGSTROMNIR);
857 strncpy(tmpStr1, tmpStr, 2048);
858 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
859 strncpy(tmpStr1, tmpStr, 2048);
860 sprintf(tmpStr,
"%s (requires aer_angstrom specification)\n", tmpStr1);
861 strncpy(tmpStr1, tmpStr, 2048);
862 sprintf(tmpStr,
"%s %3d: Multi-scattering with fixed aerosol optical thickness\n", tmpStr1,
FIXAOT);
863 strncpy(tmpStr1, tmpStr, 2048);
864 sprintf(tmpStr,
"%s (requires taua specification)\n", tmpStr1);
865 strncpy(tmpStr1, tmpStr, 2048);
866 sprintf(tmpStr,
"%s %3d: Multi-scattering with 2-band model selection using Wang et al. 2009\n", tmpStr1,
AERWANGSWIR);
867 strncpy(tmpStr1, tmpStr, 2048);
868 sprintf(tmpStr,
"%s to switch between SWIR and NIR. (MODIS only, requires aer_swir_short,\n", tmpStr1);
869 strncpy(tmpStr1, tmpStr, 2048);
870 sprintf(tmpStr,
"%s aer_swir_long, aer_wave_short, aer_wave_long)\n", tmpStr1);
871 strncpy(tmpStr1, tmpStr, 2048);
872 sprintf(tmpStr,
"%s %3d: Multi-scattering with MUMM correction\n", tmpStr1,
AERMUMM);
873 strncpy(tmpStr1, tmpStr, 2048);
874 sprintf(tmpStr,
"%s and MUMM NIR calculation\n", tmpStr1);
875 strncpy(tmpStr1, tmpStr, 2048);
876 sprintf(tmpStr,
"%s %3d: Multi-scattering epsilon, RH-based model selection\n", tmpStr1,
AERRHMSEPS);
877 strncpy(tmpStr1, tmpStr, 2048);
878 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
879 strncpy(tmpStr1, tmpStr, 2048);
880 sprintf(tmpStr,
"%s %3d: Spectral Matching of aerosols reflectance\n", tmpStr1,
AERRHSM);
881 strncpy(tmpStr1, tmpStr, 2048);
882 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
883 strncpy(tmpStr1, tmpStr, 2048);
884 sprintf(tmpStr,
"%s %3d: Multi-scattering epsilon (linear), RH-based model selection\n", tmpStr1,
AERRHMSEPS_lin);
885 strncpy(tmpStr1, tmpStr, 2048);
886 sprintf(tmpStr,
"%s and iterative NIR correction\n", tmpStr1);
903 clo_addOption(
list,
"mumm_gamma",
CLO_TYPE_FLOAT,
"1.0",
"two-way Rayleigh-aerosol transmittance\n ratio for MUMM turbid water atmospheric correction");
906 strcpy(tmpStr,
"absorbing aerosol flagging option\n");
907 strcat(tmpStr,
" 0: disabled\n");
908 strcat(tmpStr,
" 1: use rhow_412 aerosol index test\n");
909 strcat(tmpStr,
" 2: GMAO ancillary aerosol test\n");
912 strcpy(tmpStr,
"glint correction:\n");
913 strcat(tmpStr,
" 0: glint correction off\n");
914 strcat(tmpStr,
" 1: standard glint correction\n");
915 strcat(tmpStr,
" 2: simple glint correction");
920 strcpy(tmpStr,
"oxygen A-band correction\n");
921 strcat(tmpStr,
" 0: no correction\n");
922 strcat(tmpStr,
" 1: Apply Ding and Gordon (1995) correction\n");
923 strcat(tmpStr,
" 3: Apply oxygen transmittance from gas transmittance table (see gas_opt)\n");
928 strcpy(tmpStr,
"Bidirectional reflectance correction\n");
929 strcat(tmpStr,
" 0: no correction\n");
930 strcat(tmpStr,
" 1: Fresnel reflection/refraction correction for sensor path\n");
931 strcat(tmpStr,
" 3: Fresnel reflection/refraction correction for sensor + solar path\n");
932 strcat(tmpStr,
" 7: Morel f/Q + Fresnel solar + Fresnel sensor\n");
933 strcat(tmpStr,
" 15: Gordon DT + Morel f/Q + Fresnel solar + Fresnel sensor\n");
934 strcat(tmpStr,
" 19: Morel Q + Fresnel solar + Fresnel sensor");
937 strcpy(tmpStr,
"gaseous transmittance bitmask selector\n");
938 strcat(tmpStr,
" 0: no correction\n");
939 strcat(tmpStr,
" 1: Ozone\n");
940 strcat(tmpStr,
" 2: CO2\n");
941 strcat(tmpStr,
" 4: NO2\n");
942 strcat(tmpStr,
" 8: H2O\n");
943 strcat(tmpStr,
" 16: Use ATREM\n");
944 strcat(tmpStr,
" 32: Use <sensor>_gas_transmittance.nc tables\n");
945 strcat(tmpStr,
" 64: CO\n");
946 strcat(tmpStr,
" 128: CH4\n");
947 strcat(tmpStr,
" 256: N2O");
950 strcpy(tmpStr,
"ATREM gaseous transmittance bitmask selector\n");
951 strcat(tmpStr,
" 0: H2O only\n");
952 strcat(tmpStr,
" 1: Ozone\n");
953 strcat(tmpStr,
" 2: CO2\n");
954 strcat(tmpStr,
" 4: NO2\n");
955 strcat(tmpStr,
" 8: CO\n");
956 strcat(tmpStr,
" 16: CH4\n");
957 strcat(tmpStr,
" 32: O2\n");
958 strcat(tmpStr,
" 64: N2O ");
960 strcpy(tmpStr,
"ATREM gaseous transmittance geometry option\n");
961 strcat(tmpStr,
" 0: Only recalculate geometry when error threshold reached (fast)\n");
962 strcat(tmpStr,
" 1: Recalculate geometry every pixel (slow)");
964 strcpy(tmpStr,
"ATREM gaseous transmittance calculation option\n");
965 strcat(tmpStr,
" 0: Calculate transmittance using k-distribution method (fast)\n");
966 strcat(tmpStr,
" 1: Calculate transmittance using full method (slow)");
968 strcpy(tmpStr,
"ATREM gaseous transmittance Atm. model selection\n");
969 strcat(tmpStr,
" 0: Use pixel's latitude and date to determine model \n");
970 strcat(tmpStr,
" 1: tropical\n");
971 strcat(tmpStr,
" 2: mid latitude summer\n");
972 strcat(tmpStr,
" 3: mid latitude winter\n");
973 strcat(tmpStr,
" 4: subarctic summer\n");
974 strcat(tmpStr,
" 5: subarctic winter\n");
975 strcat(tmpStr,
" 6: US standard 1962");
977 strcpy(tmpStr,
"ATREM gaseous transmittance split paths between solar and sensor (turns atrem_full on)\n");
978 strcat(tmpStr,
" 0: Calculates transmittance over total path length (default)\n");
979 strcat(tmpStr,
" 1: Calculates transmittance over separate solar and sensor paths (slow)");
982 strcpy(tmpStr,
"IOP model for use in downstream products\n");
983 strcat(tmpStr,
" 0: None (products requiring a or bb will fail)\n");
984 strcat(tmpStr,
" 1: Carder\n");
985 strcat(tmpStr,
" 2: GSM\n");
986 strcat(tmpStr,
" 3: QAA\n");
987 strcat(tmpStr,
" 4: PML\n");
988 strcat(tmpStr,
" 5: NIWA\n");
989 strcat(tmpStr,
" 6: LAS\n");
990 strcat(tmpStr,
" 7: GIOP");
993 strcpy(tmpStr,
"model for phytoplankton carbon\n");
994 strcat(tmpStr,
" 1: Graff/Westberry\n");
995 strcat(tmpStr,
" 2: Behrenfeld\n");
1000 strcpy(tmpStr,
"polarization correction (sensor-specific)\n");
1001 strcat(tmpStr,
" 0: no correction\n");
1002 strcat(tmpStr,
" 1: only Rayleigh component is polarized\n");
1003 strcat(tmpStr,
" 2: all radiance polarized like Rayleigh\n");
1004 strcat(tmpStr,
" 3: only Rayleigh and Glint are polarized (MODIS default)\n");
1005 strcat(tmpStr,
" 4: all radiance polarized like Rayleigh + Glint");
1008 strcpy(tmpStr,
"bandshifting option \n");
1009 strcat(tmpStr,
" 1: apply bio-optical bandshift\n");
1010 strcat(tmpStr,
" 0: linear interpolation");
1013 strcpy(tmpStr,
"wind speed uncertainty simulation option \n");
1014 strcat(tmpStr,
" <0.0: no noise added\n");
1015 strcat(tmpStr,
" =0.0: use ws_unc to inform noise model\n");
1016 strcat(tmpStr,
" >0.0: use input to inform noise model");
1019 strcpy(tmpStr,
"wind direction uncertainty simulation option \n");
1020 strcat(tmpStr,
" <0.0: no noise added\n");
1021 strcat(tmpStr,
" =0.0: use wd_unc to inform noise model\n");
1022 strcat(tmpStr,
" >0.0: use input to inform noise model");
1025 strcpy(tmpStr,
"meridional wind uncertainty simulation option \n");
1026 strcat(tmpStr,
" <0.0: no noise added\n");
1027 strcat(tmpStr,
" =0.0: use mw_unc to inform noise model\n");
1028 strcat(tmpStr,
" >0.0: use input to inform noise model");
1031 strcpy(tmpStr,
"zonal wind uncertainty simulation option \n");
1032 strcat(tmpStr,
" <0.0: no noise added\n");
1033 strcat(tmpStr,
" =0.0: use zw_unc to inform noise model\n");
1034 strcat(tmpStr,
" >0.0: use input to inform noise model");
1037 strcpy(tmpStr,
"relative humidity uncertainty simulation option \n");
1038 strcat(tmpStr,
" <0.0: no noise added\n");
1039 strcat(tmpStr,
" =0.0: use rh_unc to inform noise model\n");
1040 strcat(tmpStr,
" >0.0: use input to inform noise model");
1043 strcpy(tmpStr,
"pressure uncertainty simulation option \n");
1044 strcat(tmpStr,
" <0.0: no noise added\n");
1045 strcat(tmpStr,
" =0.0: use pr_unc to inform noise model\n");
1046 strcat(tmpStr,
" >0.0: use input to inform noise model");
1049 strcpy(tmpStr,
"water vapor uncertainty simulation option \n");
1050 strcat(tmpStr,
" <0.0: no noise added\n");
1051 strcat(tmpStr,
" =0.0: use wv_unc to inform noise model\n");
1052 strcat(tmpStr,
" >0.0: use input to inform noise model");
1055 strcpy(tmpStr,
"ozone uncertainty simulation option \n");
1056 strcat(tmpStr,
" <0.0: no noise added\n");
1057 strcat(tmpStr,
" =0.0: use oz_unc to inform noise model\n");
1058 strcat(tmpStr,
" >0.0: use input to inform noise model");
1061 strcpy(tmpStr,
"tropospheric no2 uncertainty simulation option \n");
1062 strcat(tmpStr,
" <0.0: no noise added\n");
1063 strcat(tmpStr,
" =0.0: use no2_tropo_unc to inform noise model\n");
1064 strcat(tmpStr,
" >0.0: use input to inform noise model");
1067 strcpy(tmpStr,
"stratospheric no2 uncertainty simulation option \n");
1068 strcat(tmpStr,
" <0.0: no noise added\n");
1069 strcat(tmpStr,
" =0.0: use no2_strat_unc to inform noise model\n");
1070 strcat(tmpStr,
" >0.0: use input to inform noise model");
1073 strcpy(tmpStr,
"Lt uncertainty simulation option \n");
1074 strcat(tmpStr,
" >0.0: add random normal noise to gain\n");
1075 strcat(tmpStr,
" 0.0: no random noise added");
1078 strcpy(tmpStr,
"Lt noise scale factor option \n");
1079 strcat(tmpStr,
" !=1.0: scales noise by factoring SNR\n");
1080 strcat(tmpStr,
" =1.0: noise not scaled");
1083 strcpy(tmpStr,
"bias fraction factor option \n");
1084 strcat(tmpStr,
" !=0.0: adds bias as a fraction of Lt\n");
1085 strcat(tmpStr,
" =0.0: no bias added");
1088 strcpy(tmpStr,
"GIOP model aph function type\n");
1089 strcat(tmpStr,
" 0: tabulated (supplied via giop_aph_file)\n");
1090 strcat(tmpStr,
" 2: Bricaud et al. 1995 (chlorophyll supplied via default empirical algorithm)\n");
1091 strcat(tmpStr,
" 3: Ciotti and Bricaud 2006 (size fraction supplied via giop_aph_s)");
1096 strcpy(tmpStr,
"GIOP model adg function type\n");
1097 strcat(tmpStr,
" 0: tabulated (supplied via giop_adg_file)\n");
1098 strcat(tmpStr,
" 1: exponential with exponent supplied via giop_adg_s)\n");
1099 strcat(tmpStr,
" 2: exponential with exponent derived via Lee et al. (2002)\n");
1100 strcat(tmpStr,
" 3: exponential with exponent derived via OBPG method");
1105 strcpy(tmpStr,
"GIOP model acdom function type\n");
1106 strcat(tmpStr,
" 0: tabulated (supplied via giop_acdom_file)\n");
1107 strcat(tmpStr,
" 1: no data");
1111 strcpy(tmpStr,
"GIOP model anap function type\n");
1112 strcat(tmpStr,
" 0: tabulated (supplied via giop_anap_file)\n");
1113 strcat(tmpStr,
" 1: no data");
1117 strcpy(tmpStr,
"GIOP model bbp function type\n");
1118 strcat(tmpStr,
" 0: tabulated (supplied via giop_bbp_file)\n");
1119 strcat(tmpStr,
" 1: power-law with exponent supplied via giop_bbp_s)\n");
1120 strcat(tmpStr,
" 2: power-law with exponent derived via Hoge & Lyon (1996)\n");
1121 strcat(tmpStr,
" 3: power-law with exponent derived via Lee et al. (2002)\n");
1122 strcat(tmpStr,
" 5: power-law with exponent derived via Ciotti et al. (1999)\n");
1123 strcat(tmpStr,
" 6: power-law with exponent derived via Morel & Maritorena (2001)\n");
1124 strcat(tmpStr,
" 7: power-law with exponent derived via Loisel & Stramski (2000)\n");
1125 strcat(tmpStr,
" 8: spectrally independent vector derived via Loisel & Stramski (2000)\n");
1126 strcat(tmpStr,
" 9: fixed vector derived via Loisel & Stramski (2000)\n");
1127 strcat(tmpStr,
" 10: fixed vector derived via lee et al. (2002)");
1132 strcpy(tmpStr,
"GIOP model bbph function type\n");
1133 strcat(tmpStr,
" 0: tabulated (supplied via giop_bbph_file)\n");
1134 strcat(tmpStr,
" 1: no data");
1138 strcpy(tmpStr,
"GIOP model bbnap function type\n");
1139 strcat(tmpStr,
" 0: tabulated (supplied via giop_bbnap_file)\n");
1140 strcat(tmpStr,
" 1: no data");
1144 strcpy(tmpStr,
"GIOP model Rrs to bb/(a+bb) method\n");
1145 strcat(tmpStr,
" 0: Gordon quadratic (specified with giop_grd)\n");
1146 strcat(tmpStr,
" 1: Morel f/Q");
1150 strcpy(tmpStr,
"GIOP model list of sensor wavelengths for\n");
1151 strcat(tmpStr,
" optimization comma-separated list, default is all visible bands (400-700nm)");
1156 strcpy(tmpStr,
"GIOP model optimization method\n");
1157 strcat(tmpStr,
" 0: Amoeba optimization\n");
1158 strcat(tmpStr,
" 1: Levenberg-Marquardt optimization\n");
1159 strcat(tmpStr,
" 3: SVD matrix inversion\n");
1160 strcat(tmpStr,
" 4: SIOP adaptive matrix inversion");
1163 strcpy(tmpStr,
"GSM model options\n");
1164 strcat(tmpStr,
" 0: default coefficients\n");
1165 strcat(tmpStr,
" 1: Chesapeake regional coefficients");
1168 strcpy(tmpStr,
"SM fit algorithm\n");
1169 strcat(tmpStr,
" 0: Amoeba\n");
1170 strcat(tmpStr,
" 1: Levenberg-Marquardt");
1175 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");
1176 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");
1210 strcat(tmpStr,
",");
1213 strcat(tmpStr,
"]");
1240 strcpy(tmpStr,
"Reference SST field source\n");
1241 strcat(tmpStr,
" 0: Reynolds OI SST reference file\n");
1242 strcat(tmpStr,
" 1: AMSR-E daily SST reference file\n");
1243 strcat(tmpStr,
" 2: AMSR-E 3-day SST reference file\n");
1244 strcat(tmpStr,
" 3: ATSR monthly SST reference file\n");
1245 strcat(tmpStr,
" 4: NTEV2 monthly SST reference file\n");
1246 strcat(tmpStr,
" 5: AMSR-E 3-day or night SST reference file\n");
1247 strcat(tmpStr,
" 6: WindSat daily SST reference file\n");
1248 strcat(tmpStr,
" 7: WindSat 3-day SST reference file\n");
1249 strcat(tmpStr,
" 8: WindSat 3-day or night SST reference file\n");
1260 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");
1261 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");
1262 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");
1266 strcpy(tmpStr,
"max distance between L1 and L2 pixels\n");
1267 strcat(tmpStr,
" in km\n");
1268 strcat(tmpStr,
" -1.0: use mean res of L1 data\n");
1269 strcat(tmpStr,
" 0.0: max{mean(L1 res),mean(L2 res)}");
1272 sprintf(tmpStr2,
"%f",
CHL_MAX);
1273 sprintf(tmpStr,
"threshold on L2 data chlorophyll\n (%f=CHL_MAX)",
1277 sprintf(tmpStr2,
"%f",
AOT_MAX);
1278 sprintf(tmpStr,
"threshold on L2 data AOTs\n (%f=AOT_MAX)",
AOT_MAX);
1281 strcpy(tmpStr,
"\n coccolithophore algorithm coefs");
1282 clo_addOption(
list,
"coccolith",
CLO_TYPE_FLOAT,
"[1.1,0.9,0.75,1.85,1.0,1.65,0.6,1.15]", tmpStr);
1305 strcpy(tmpStr,
"depth to use to exclude data from target file\n");
1306 strcat(tmpStr,
" e.g. -1000 excludes depths less than 1000m\n");
1309 strcpy(tmpStr,
"minimum # of samples in a bin for acceptance");
1312 strcpy(tmpStr,
"minimum # of scenes in a bin for acceptance");
1324 if (!strcmp(prog,
"l1det2det")) {
1347 strcpy(tmpStr,
"\nThis program produces a PPM-formatted output image rendered in a Plate Carree\n");
1348 strcat(tmpStr,
"projection.\n\n");
1349 strcat(tmpStr,
"The default band combination produces a \"true-color\" image. Other combinations\n");
1350 strcat(tmpStr,
"may be chosen with the \"rgb=\" option. The expected argument to this option is\n");
1351 strcat(tmpStr,
"a comma separated string of wavelengths that specifies the desired bands in\n");
1352 strcat(tmpStr,
"red-green-blue order. For example, to produce a false color SeaWiFS output\n");
1353 strcat(tmpStr,
"image using 865, 670 and 555 nm as the red, green, and blue values\n");
1354 strcat(tmpStr,
"respectively, the option would be specified as \"rgb=865,670,555\".\n");
1357 strcpy(tmpStr,
"Raman scattering Rrs correction options\n");
1358 strcat(tmpStr,
" 0: no correction \n");
1359 strcat(tmpStr,
" 1: Lee et al. (2013) empirical correction \n");
1360 strcat(tmpStr,
" 2: Westberry et al. (2013) analytical correction \n");
1361 strcat(tmpStr,
" 3: Lee et al. (1994) analytical correction \n");
1366 strcpy(tmpStr,
"Cloud height and temperature file\n");
1367 strcat(tmpStr,
" Currently, use the MODIS L2 cloud file (MYD06...)\n");
1368 strcat(tmpStr,
" from the LAADS DAAC\n");
1392 int argc,
char* argv[], filehandle *
l1file) {
1394 char tmpStr[FILENAME_MAX];
1397 char localSuite[FILENAME_MAX];
1399 const char* l2genProgName =
"msl12";
1400 const char* otherProgName =
NULL;
1404 if ((dataRoot = getenv(
"OCDATAROOT")) ==
NULL) {
1405 printf(
"-E- OCDATAROOT environment variable is not defined.\n");
1414 localSuite[0] =
'\0';
1422 sprintf(tmpStr,
"%s/common/%s_defaults.par", dataRoot, l2genProgName);
1424 printf(
"Loading default parameters from %s\n", tmpStr);
1427 if (progName && progName[0] && strcmp(progName, l2genProgName)) {
1428 otherProgName = progName;
1432 if (otherProgName) {
1433 sprintf(tmpStr,
"%s/common/%s_defaults.par", dataRoot, otherProgName);
1434 if (access(tmpStr, R_OK) != -1) {
1436 printf(
"Loading default parameters from %s\n", tmpStr);
1445 if (otherProgName) {
1446 sprintf(tmpStr,
"%s/%s/%s_defaults.par", dataRoot,
1448 if (access(tmpStr, R_OK) != -1) {
1450 printf(
"Loading default parameters for %s from %s\n",
1456 if (
l1file->subsensorID >= 0) {
1457 sprintf(tmpStr,
"%s/%s/%s/%s_defaults.par", dataRoot,
1460 if (access(tmpStr, R_OK) != -1) {
1462 printf(
"Loading default sub-sensor parameters for %s from %s\n",
1470 if (localSuite[0] ==
'\0')
1474 int suiteLoaded = 0;
1475 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1476 "common", l2genProgName, localSuite);
1477 if (access(tmpStr, R_OK) != -1) {
1479 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1486 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1487 "common", otherProgName, localSuite);
1488 if (access(tmpStr, R_OK) != -1) {
1490 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1497 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1499 if (access(tmpStr, R_OK) != -1) {
1501 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1508 sprintf(tmpStr,
"%s/%s/%s_defaults_%s.par", dataRoot,
1510 if (access(tmpStr, R_OK) != -1) {
1512 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1519 if(
l1file->subsensorID >= 0) {
1520 sprintf(tmpStr,
"%s/%s/%s/%s_defaults_%s.par", dataRoot,
1523 if (access(tmpStr, R_OK) != -1) {
1525 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1532 sprintf(tmpStr,
"%s/%s/%s/%s_defaults_%s.par", dataRoot,
1535 if (access(tmpStr, R_OK) != -1) {
1537 printf(
"Loading parameters for suite %s from %s\n", localSuite, tmpStr);
1545 printf(
"-E- Failed to load parameters for suite %s for sensor %s\n", localSuite,
1556 sprintf(tmpStr,
"l2prod%d",
i + 1);
1561 default_l2prod[
i][0] =
'\0';
1566 printf(
"Loading command line parameters\n\n");
1577 char str_buf[FILENAME_MAX];
1578 char str_buf2[FILENAME_MAX];
1579 char tmp_file[FILENAME_MAX];
1584 char keyword[FILENAME_MAX];
1596 if (default_l2prod[
i][0]) {
1606 for (optionId = 0; optionId < numOptions; optionId++) {
1617 while (*strVal !=
'\0') {
1618 *strVal = tolower(*strVal);
1622 if (strcmp(keyword,
"help") == 0)
1624 else if (strcmp(keyword,
"version") == 0)
1626 else if (strncmp(keyword,
"dump_options", 12) == 0)
1628 else if (strcmp(keyword,
"par") == 0)
1630 else if (strcmp(keyword,
"ifile") == 0) {
1635 }
else if (strncmp(keyword,
"ifile", 5) == 0) {
1637 sprintf(str_buf,
"ifile%d",
i + 1);
1638 if (strcmp(keyword, str_buf) == 0) {
1648 printf(
"-E- l2gen_load_input: %s bigger than MAX_IFILES(%d)\n",
1653 }
else if (strcmp(keyword,
"ilist") == 0) {
1657 if ((fp = fopen(tmp_file,
"r")) ==
NULL) {
1658 printf(
"Error: Unable to open input file list %s\n", tmp_file);
1661 tmp_file[0] =
'\x0';
1663 if (fscanf(fp,
"%s\n", tmp_file) != EOF) {
1665 sprintf(str_buf,
"ifile%d",
i + 1);
1666 sprintf(str_buf2,
"ilist=%s", strVal);
1674 }
else if (strcmp(keyword,
"fqfile") == 0) {
1680 }
else if (strcmp(keyword,
"parfile") == 0) {
1686 }
else if (strcmp(keyword,
"ofile") == 0) {
1691 }
else if (strncmp(keyword,
"ofile", 5) == 0) {
1693 sprintf(str_buf,
"ofile%d",
i + 1);
1694 if (strcmp(keyword, str_buf) == 0) {
1702 printf(
"-E- l2gen_load_input: %s bigger than MAX_OFILES(%d)\n",
1707 }
else if (strcmp(keyword,
"oformat") == 0) {
1710 if (tmpStr ==
NULL) {
1711 printf(
"-E- l2gen_load_input: oformat=%s is not a recognized file format\n",
1717 }
else if (strcmp(keyword,
"oformat_depth") == 0) {
1719 if (strcasecmp(strVal,
"8bit") == 0 || strcasecmp(strVal,
"24bit") == 0) {
1722 printf(
"-E- l2gen_load_input: oformat_depth=%s is not a valid color depth\n",
1727 }
else if (strcmp(keyword,
"il2file") == 0) {
1734 }
else if (strncmp(keyword,
"il2file", 7) == 0) {
1736 sprintf(str_buf,
"il2file%d",
i + 1);
1737 if (strcmp(keyword, str_buf) == 0) {
1747 printf(
"-E- l2gen_load_input: %s bigger than MAX_OFILES(%d)\n",
1752 }
else if (strcmp(keyword,
"l2prod") == 0) {
1754 input->l2prod[0][0] =
'\0';
1757 strcat(
input->l2prod[0],
" ");
1758 strcat(
input->l2prod[0], strArray[
i]);
1761 }
else if (strncmp(keyword,
"l2prod", 6) == 0) {
1763 sprintf(str_buf,
"l2prod%d",
i + 1);
1764 if (strcmp(keyword, str_buf) == 0) {
1768 input->l2prod[
i][0] =
'\0';
1771 strcat(
input->l2prod[
i],
" ");
1772 strcat(
input->l2prod[
i], strArray[
j]);
1778 printf(
"-E- l2gen_load_input: %s bigger than MAX_OFILES(%d)\n",
1783 }
else if (strcmp(keyword,
"suite") == 0) {
1786 }
else if (strcmp(keyword,
"mode") == 0) {
1789 }
else if (strcmp(keyword,
"deflate") == 0) {
1792 }
else if (strcmp(keyword,
"ctl_pt_incr") == 0) {
1795 }
else if (strcmp(keyword,
"proc_ocean") == 0) {
1798 }
else if (strcmp(keyword,
"proc_land") == 0) {
1801 }
else if (strcmp(keyword,
"proc_cloud") == 0) {
1804 }
else if (strcmp(keyword,
"proc_sst") == 0) {
1806 if(
input->proc_sst) {
1810 }
else if (strcmp(keyword,
"atmocor") == 0) {
1813 }
else if (strcmp(keyword,
"aer_opt") == 0) {
1816 }
else if (strcmp(keyword,
"aer_wave_short") == 0) {
1819 }
else if (strcmp(keyword,
"aer_wave_long") == 0) {
1822 }
else if (strcmp(keyword,
"aer_swir_short") == 0) {
1825 }
else if (strcmp(keyword,
"aer_swir_long") == 0) {
1828 }
else if (strcmp(keyword,
"aer_rrs_short") == 0) {
1831 }
else if (strcmp(keyword,
"aer_rrs_long") == 0) {
1834 }
else if (strcmp(keyword,
"aer_angstrom") == 0) {
1837 }
else if (strcmp(keyword,
"aer_iter_max") == 0) {
1840 }
else if (strcmp(keyword,
"seawater_opt") == 0) {
1843 }
else if (strcmp(keyword,
"brdf_opt") == 0) {
1846 }
else if (strcmp(keyword,
"gas_opt") == 0) {
1849 }
else if (strcmp(keyword,
"atrem_opt") == 0) {
1852 }
else if (strcmp(keyword,
"atrem_full") == 0) {
1854 if (option->
count > 0) {
1855 if (
input->atrem_full <= 0)
input->atrem_full = 0;
1856 else input->atrem_full = 1;
1859 }
else if (strcmp(keyword,
"atrem_geom") == 0) {
1861 if (option->
count > 0) {
1862 if (
input->atrem_geom <= 0)
input->atrem_geom = 0;
1863 else input->atrem_geom = 1;
1866 }
else if (strcmp(keyword,
"atrem_model") == 0) {
1869 }
else if (strcmp(keyword,
"atrem_splitpaths") == 0) {
1872 }
else if (strcmp(keyword,
"gsm_opt") == 0) {
1875 }
else if (strcmp(keyword,
"gsm_fit") == 0) {
1878 }
else if (strcmp(keyword,
"gsm_adg_s") == 0) {
1881 }
else if (strcmp(keyword,
"gsm_bbp_s") == 0) {
1884 }
else if (strcmp(keyword,
"gsm_aphs") == 0) {
1887 printf(
"-E- number of gsm_aphs elements (%d) must be %d or less\n",
count,
nbands);
1892 input->gsm_aphs[
i] = fArray[
i];
1894 }
else if (strcmp(keyword,
"gsm_aphw") == 0) {
1897 printf(
"-E- number of gsm_aphw elements (%d) must be %d or less\n",
count,
nbands);
1902 input->gsm_aphw[
i] = fArray[
i];
1904 }
else if (strcmp(keyword,
"qaa_adg_s") == 0) {
1907 }
else if (strcmp(keyword,
"qaa_wave") == 0) {
1911 printf(
"-E- number of qaa_wave elements must be 5.\n");
1916 input->qaa_wave[
i] = iArray[
i];
1919 }
else if (strcmp(keyword,
"giop_maxiter") == 0) {
1922 }
else if (strcmp(keyword,
"giop_fit_opt") == 0) {
1925 }
else if (strcmp(keyword,
"giop_aph_opt") == 0) {
1928 }
else if (strcmp(keyword,
"giop_adg_opt") == 0) {
1931 }
else if (strcmp(keyword,
"giop_acdom_opt") == 0) {
1934 }
else if (strcmp(keyword,
"giop_anap_opt") == 0) {
1937 }
else if (strcmp(keyword,
"giop_bbp_opt") == 0) {
1940 }
else if (strcmp(keyword,
"giop_bbph_opt") == 0) {
1943 }
else if (strcmp(keyword,
"giop_bbnap_opt") == 0) {
1946 }
else if (strcmp(keyword,
"giop_rrs_opt") == 0) {
1949 }
else if (strcmp(keyword,
"giop_rrs_diff") == 0) {
1952 }
else if (strcmp(keyword,
"giop_aph_file") == 0) {
1957 }
else if (strcmp(keyword,
"giop_aph_s") == 0) {
1960 }
else if (strcmp(keyword,
"giop_adg_file") == 0) {
1965 }
else if (strcmp(keyword,
"giop_adg_s") == 0) {
1968 }
else if (strcmp(keyword,
"giop_bbp_file") == 0) {
1973 }
else if (strcmp(keyword,
"giop_bbp_s") == 0) {
1976 }
else if (strcmp(keyword,
"giop_acdom_file") == 0) {
1983 }
else if (strcmp(keyword,
"giop_anap_file") == 0) {
1990 }
else if (strcmp(keyword,
"giop_bbph_file") == 0) {
1997 }
else if (strcmp(keyword,
"giop_bbnap_file") == 0) {
2004 }
else if (strcmp(keyword,
"giop_grd") == 0) {
2007 printf(
"-E- number of giop_grd elements must be 2 or less.\n");
2011 input->giop_grd[
i] = fArray[
i];
2013 }
else if (strcmp(keyword,
"giop_wave") == 0) {
2017 printf(
"-E- number of giop_wave elements (%d) must be %d or less\n",
count,
nbands);
2022 input->giop_wave[
i] = fArray[
i];
2026 }
else if (strcmp(keyword,
"giop_rrs_unc") == 0) {
2030 printf(
"-E- number of giop_rrs_unc elements (%d) must be %d or less\n",
count,
nbands);
2035 input->giop_rrs_unc[
i] = fArray[
i];
2038 }
else if (strcmp(keyword,
"iop_opt") == 0) {
2041 }
else if (strcmp(keyword,
"cphyt_opt") == 0) {
2044 }
else if (strcmp(keyword,
"band_shift_opt") == 0) {
2046 }
else if (strcmp(keyword,
"add_ws_noise") == 0) {
2048 }
else if (strcmp(keyword,
"add_wd_noise") == 0) {
2050 }
else if (strcmp(keyword,
"add_mw_noise") == 0) {
2052 }
else if (strcmp(keyword,
"add_zw_noise") == 0) {
2054 }
else if (strcmp(keyword,
"add_pr_noise") == 0) {
2056 }
else if (strcmp(keyword,
"add_rh_noise") == 0) {
2058 }
else if (strcmp(keyword,
"add_wv_noise") == 0) {
2060 }
else if (strcmp(keyword,
"add_oz_noise") == 0) {
2062 }
else if (strcmp(keyword,
"add_no2_strat_noise") == 0) {
2064 }
else if (strcmp(keyword,
"add_no2_tropo_noise") == 0) {
2066 }
else if (strcmp(keyword,
"add_lt_noise") == 0) {
2068 }
else if (strcmp(keyword,
"lt_noise_scale") == 0) {
2072 printf(
"-E- number of lt_noise_scale elements (%d) must be %d or less\n",
count,
nbands);
2076 input->lt_noise_scale[
i] = fArray[
i];
2077 numNoiseScales =
count;
2079 }
else if (strcmp(keyword,
"bias_frac") == 0) {
2083 printf(
"-E- number of bias_frac elements (%d) must be %d or less\n",
count,
nbands);
2087 input->bias_frac[
i] = fArray[
i];
2088 numBiasFracs =
count;
2090 }
else if (strcmp(keyword,
"aermodfile") == 0) {
2097 }
else if (strcmp(keyword,
"polfile") == 0) {
2104 }
else if (strcmp(keyword,
"pol_opt") == 0) {
2107 }
else if (strcmp(keyword,
"absaer_opt") == 0) {
2110 }
else if (strcmp(keyword,
"glint_opt") == 0) {
2113 }
else if (strcmp(keyword,
"cirrus_opt") == 0) {
2116 }
else if (strcmp(keyword,
"oxaband_opt") == 0) {
2119 }
else if (strcmp(keyword,
"filter_opt") == 0) {
2123 }
else if (strcmp(keyword,
"filter_file") == 0) {
2130 }
else if (strcmp(keyword,
"tgtfile") == 0) {
2137 }
else if (strcmp(keyword,
"aerfile") == 0) {
2144 }
else if (strcmp(keyword,
"sstcoeffile") == 0) {
2151 }
else if (strcmp(keyword,
"dsdicoeffile") == 0) {
2158 }
else if (strcmp(keyword,
"sstssesfile") == 0) {
2165 }
else if (strcmp(keyword,
"sst4coeffile") == 0) {
2172 }
else if (strcmp(keyword,
"sst4ssesfile") == 0) {
2179 }
else if (strcmp(keyword,
"vcnnfile") == 0) {
2186 }
else if (strcmp(keyword,
"picfile") == 0) {
2193 }
else if (strcmp(keyword,
"sst3coeffile") == 0) {
2200 }
else if (strcmp(keyword,
"sst3ssesfile") == 0) {
2207 }
else if (strcmp(keyword,
"owtfile") == 0) {
2214 }
else if (strcmp(keyword,
"owtchlerrfile") == 0) {
2221 }
else if (strcmp(keyword,
"metafile") == 0) {
2228 }
else if (strcmp(keyword,
"aerbinfile") == 0) {
2235 }
else if (strcmp(keyword,
"met1") == 0) {
2240 }
else if (strcmp(keyword,
"met2") == 0) {
2247 }
else if (strcmp(keyword,
"met3") == 0) {
2254 }
else if (strcmp(keyword,
"ozone1") == 0) {
2259 }
else if (strcmp(keyword,
"ozone2") == 0) {
2266 }
else if (strcmp(keyword,
"ozone3") == 0) {
2273 }
else if (strcmp(keyword,
"anc_profile1") == 0) {
2280 }
else if (strcmp(keyword,
"anc_profile2") == 0) {
2287 }
else if (strcmp(keyword,
"anc_profile3") == 0) {
2294 }
else if (strcmp(keyword,
"anc_aerosol1") == 0) {
2301 }
else if (strcmp(keyword,
"anc_aerosol2") == 0) {
2308 }
else if (strcmp(keyword,
"anc_aerosol3") == 0) {
2315 }
else if (strcmp(keyword,
"sfc_albedo") == 0) {
2322 }
else if (strcmp(keyword,
"anc_cor_file") == 0) {
2329 }
else if (strcmp(keyword,
"pixel_anc_file") == 0) {
2336 }
else if (strcmp(keyword,
"land") == 0) {
2341 }
else if (strcmp(keyword,
"water") == 0) {
2346 }
else if (strcmp(keyword,
"demfile") == 0) {
2351 }
else if (strcmp(keyword,
"dem_auxfile") == 0) {
2358 }
else if (strcmp(keyword,
"mldfile") == 0) {
2365 }
else if (strcmp(keyword,
"icefile") == 0) {
2370 }
else if (strcmp(keyword,
"sstfile") == 0) {
2374 }
else if (strcmp(keyword,
"sstreftype") == 0) {
2377 }
else if (strcmp(keyword,
"sssfile") == 0) {
2382 }
else if (strcmp(keyword,
"no2file") == 0) {
2387 }
else if (strcmp(keyword,
"alphafile") == 0) {
2392 }
else if (strcmp(keyword,
"tauafile") == 0) {
2397 }
else if (strcmp(keyword,
"geofile") == 0) {
2404 }
else if (strcmp(keyword,
"owmcfile") == 0) {
2409 }
else if (strcmp(keyword,
"prodxmlfile") == 0) {
2416 }
else if (strcmp(keyword,
"breflectfile") == 0) {
2423 }
else if (strcmp(keyword,
"gmpfile") == 0) {
2430 }
else if (strcmp(keyword,
"gain_unc") == 0) {
2434 printf(
"-E- number of gain_unc elements (%d) must be %d or less\n",
count,
nbands);
2440 input->gain_unc[
i] = fArray[
i];
2441 numGainUncs =
count;
2444 }
else if (strcmp(keyword,
"flaguse") == 0) {
2446 input->flaguse[0] =
'\0';
2449 strcat(
input->flaguse,
",");
2450 strcat(
input->flaguse, strArray[
i]);
2453 }
else if (strcmp(keyword,
"xcalbox") == 0) {
2456 }
else if (strcmp(keyword,
"xcalboxcenter") == 0) {
2459 printf(
"-E- number of xcalboxcenter elements must be 2 or less\n");
2463 input->xcalboxcenter[
i] = iArray[
i];
2465 }
else if (strcmp(keyword,
"xcalpervalid") == 0) {
2468 }
else if (strcmp(keyword,
"xcalsubsmpl") == 0) {
2471 }
else if (strcmp(keyword,
"maxpointdist") == 0) {
2474 }
else if (strcmp(keyword,
"chlthreshold") == 0) {
2477 }
else if (strcmp(keyword,
"aotthreshold") == 0) {
2480 }
else if (strcmp(keyword,
"coccolith") == 0) {
2483 printf(
"-E- number of coccolith elements must be 8 or less\n");
2487 input->coccolith[
i] = fArray[
i];
2489 }
else if (strcmp(keyword,
"cirrus_thresh") == 0) {
2492 printf(
"-E- number of cirrus_thresh elements must be 2 or less\n");
2496 input->cirrus_thresh[
i] = fArray[
i];
2498 }
else if (strcmp(keyword,
"chloc2_wave") == 0) {
2501 printf(
"-E- number of chloc2_wave elements must be 2 or less\n");
2505 input->chloc2w[
i] = iArray[
i];
2507 }
else if (strcmp(keyword,
"chloc2_coef") == 0) {
2510 printf(
"-E- number of chloc2_coef elements must be 5 or less\n");
2514 input->chloc2c[
i] = fArray[
i];
2516 }
else if (strcmp(keyword,
"chloc3_wave") == 0) {
2519 printf(
"-E- number of chloc3_wave elements must be 3 or less\n");
2523 input->chloc3w[
i] = iArray[
i];
2525 }
else if (strcmp(keyword,
"chloc3_coef") == 0) {
2528 printf(
"-E- number of chloc3_coef elements must be 5 or less\n");
2532 input->chloc3c[
i] = fArray[
i];
2534 }
else if (strcmp(keyword,
"avw_coef") == 0) {
2537 printf(
"-E- number of avw_coef elements must be 6 or less\n");
2541 input->avw_coef[
i] = fArray[
i];
2543 }
else if (strcmp(keyword,
"chloc4_wave") == 0) {
2546 printf(
"-E- number of chloc4_wave elements must be 4 or less\n");
2550 input->chloc4w[
i] = iArray[
i];
2552 }
else if (strcmp(keyword,
"chloc4_coef") == 0) {
2555 printf(
"-E- number of chloc4_coef elements must be 5 or less\n");
2559 input->chloc4c[
i] = fArray[
i];
2561 }
else if (strcmp(keyword,
"kd2_wave") == 0) {
2564 printf(
"-E- number of kd2_wave elements must be 2 or less\n");
2570 }
else if (strcmp(keyword,
"kd2_coef") == 0) {
2573 printf(
"-E- number of kd2_coef elements must be 6 or less\n");
2579 }
else if (strcmp(keyword,
"flh_offset") == 0) {
2582 }
else if (strcmp(keyword,
"aermodels") == 0) {
2585 printf(
"-E- number of aermodels must be %d or less\n",
2592 input->aermodels[
i][0] =
'\0';
2595 }
else if (strcmp(keyword,
"taua") == 0) {
2599 printf(
"-E- number of taua elements (%d) must be %d or less\n",
count,
nbands);
2608 }
else if (strcmp(keyword,
"aermodrat") == 0) {
2611 }
else if (strcmp(keyword,
"aermodmin") == 0) {
2614 }
else if (strcmp(keyword,
"aermodmax") == 0) {
2617 }
else if (strcmp(keyword,
"absaer") == 0) {
2620 }
else if (strcmp(keyword,
"rhoamin") == 0) {
2623 }
else if (strcmp(keyword,
"epsmin") == 0) {
2626 }
else if (strcmp(keyword,
"epsmax") == 0) {
2629 }
else if (strcmp(keyword,
"tauamax") == 0) {
2632 }
else if (strcmp(keyword,
"nlwmin") == 0) {
2635 }
else if (strcmp(keyword,
"wsmax") == 0) {
2638 }
else if (strcmp(keyword,
"windspeed") == 0) {
2641 }
else if (strcmp(keyword,
"windangle") == 0) {
2644 }
else if (strcmp(keyword,
"pressure") == 0) {
2647 }
else if (strcmp(keyword,
"ozone") == 0) {
2650 }
else if (strcmp(keyword,
"relhumid") == 0) {
2653 }
else if (strcmp(keyword,
"watervapor") == 0) {
2656 }
else if (strcmp(keyword,
"ice_threshold") == 0) {
2659 }
else if (strcmp(keyword,
"mumm_alpha") == 0) {
2662 }
else if (strcmp(keyword,
"mumm_gamma") == 0) {
2665 }
else if (strcmp(keyword,
"mumm_epsilon") == 0) {
2669 }
else if (strcmp(keyword,
"viirsnv7") == 0) {
2672 }
else if (strcmp(keyword,
"viirsnosisaf") == 0) {
2675 }
else if (strcmp(keyword,
"sstrefdif") == 0) {
2678 }
else if (strcmp(keyword,
"vcal_opt") == 0) {
2681 }
else if (strcmp(keyword,
"vcal_nlw") == 0) {
2685 printf(
"-E- number of vcal_nlw elements (%d) must be %d or less\n",
count,
nbands);
2690 input->vcal_nLw[
i] = fArray[
i];
2695 }
else if (strcmp(keyword,
"vcal_lw") == 0) {
2699 printf(
"-E- number of vcal_lw elements (%d) must be %d or less\n",
count,
nbands);
2705 input->vcal_Lw[
i] = fArray[
i];
2710 }
else if (strcmp(keyword,
"vcal_chl") == 0) {
2713 }
else if (strcmp(keyword,
"vcal_solz") == 0) {
2716 }
else if (strcmp(keyword,
"vcal_depth") == 0) {
2719 }
else if (strcmp(keyword,
"vcal_min_nbin") == 0) {
2722 }
else if (strcmp(keyword,
"vcal_min_nscene") == 0) {
2725 }
else if (strcmp(keyword,
"stype") == 0) {
2728 }
else if (strcmp(keyword,
"datamin") == 0) {
2731 }
else if (strcmp(keyword,
"datamax") == 0) {
2734 }
else if (strcmp(keyword,
"west") == 0) {
2737 }
else if (strcmp(keyword,
"east") == 0) {
2740 }
else if (strcmp(keyword,
"north") == 0) {
2743 }
else if (strcmp(keyword,
"south") == 0) {
2746 }
else if (strcmp(keyword,
"width") == 0) {
2749 }
else if (strcmp(keyword,
"threshold") == 0) {
2752 }
else if (strcmp(keyword,
"rgb") == 0) {
2756 printf(
"-E- number of rgb elements must be 3\n");
2763 }
else if (strcmp(keyword,
"subsamp") == 0) {
2766 }
else if (strcmp(keyword,
"xbox") == 0) {
2769 }
else if (strcmp(keyword,
"ybox") == 0) {
2772 }
else if (strcmp(keyword,
"raman_opt") == 0) {
2774 }
else if (strcmp(keyword,
"water_spectra_file") == 0) {
2779 }
else if (strcmp(keyword,
"bpar_validate_opt") == 0) {
2782 }
else if (strcmp(keyword,
"bpar_elev_opt") == 0) {
2785 }
else if (strcmp(keyword,
"bpar_elev_value") == 0) {
2788 }
else if (strcmp(keyword,
"cloud_hgt_file") == 0) {
2794 }
else if (strcmp(keyword,
"shallow_water_depth") == 0) {
2798 }
else if (strcmp(keyword,
"pversion") == 0) {
2799 }
else if (strcmp(keyword,
"rad_opt") == 0) {
2800 }
else if (strcmp(keyword,
"viirscalparfile") == 0) {
2801 }
else if (strcmp(keyword,
"calfile") == 0) {
2802 }
else if (strcmp(keyword,
"geom_per_band") == 0) {
2803 }
else if (strcmp(keyword,
"xcalfile") == 0) {
2804 }
else if (strcmp(keyword,
"xcal_opt") == 0) {
2805 }
else if (strcmp(keyword,
"xcal_wave") == 0) {
2806 }
else if (strcmp(keyword,
"btfile") == 0) {
2807 }
else if (strcmp(keyword,
"resolution") == 0) {
2808 }
else if (strcmp(keyword,
"newavhrrcal") == 0) {
2809 }
else if (strcmp(keyword,
"ch22detcor") == 0) {
2810 }
else if (strcmp(keyword,
"ch23detcor") == 0) {
2811 }
else if (strcmp(keyword,
"sl_pixl") == 0) {
2812 }
else if (strcmp(keyword,
"sl_frac") == 0) {
2813 }
else if (strcmp(keyword,
"outband_opt") == 0) {
2814 }
else if (strcmp(keyword,
"eval") == 0) {
2815 }
else if (strcmp(keyword,
"maskland") == 0) {
2816 }
else if (strcmp(keyword,
"maskbath") == 0) {
2817 }
else if (strcmp(keyword,
"maskcloud") == 0) {
2818 }
else if (strcmp(keyword,
"maskglint") == 0) {
2819 }
else if (strcmp(keyword,
"masksunzen") == 0) {
2820 }
else if (strcmp(keyword,
"masksatzen") == 0) {
2821 }
else if (strcmp(keyword,
"maskhilt") == 0) {
2822 }
else if (strcmp(keyword,
"maskstlight") == 0) {
2823 }
else if (strcmp(keyword,
"sunzen") == 0) {
2824 }
else if (strcmp(keyword,
"satzen") == 0) {
2825 }
else if (strcmp(keyword,
"hipol") == 0) {
2826 }
else if (strcmp(keyword,
"glint_thresh") == 0) {
2827 }
else if (strcmp(keyword,
"cloud_thresh") == 0) {
2828 }
else if (strcmp(keyword,
"cloud_wave") == 0) {
2829 }
else if (strcmp(keyword,
"cloud_eps") == 0) {
2830 }
else if (strcmp(keyword,
"cloud_mask_file") == 0) {
2831 }
else if (strcmp(keyword,
"gain") == 0) {
2832 }
else if (strcmp(keyword,
"offset") == 0) {
2833 }
else if (strcmp(keyword,
"spixl") == 0) {
2834 }
else if (strcmp(keyword,
"epixl") == 0) {
2835 }
else if (strcmp(keyword,
"dpixl") == 0) {
2836 }
else if (strcmp(keyword,
"sline") == 0) {
2837 }
else if (strcmp(keyword,
"eline") == 0) {
2838 }
else if (strcmp(keyword,
"dline") == 0) {
2840 printf(
"-E- Invalid argument \"%s\"\n", keyword);
2851 char *progName, filehandle *
l1file) {
2854 char str_buf[FILENAME_MAX] =
"";
2862 printf(
"-E- %s: Error reading program options.\n", __FILE__);
2873 for (
i = 1;
i < argc;
i++) {
2874 strcat(
input->pro_control,
" ");
2875 strcat(
input->pro_control, argv[
i]);
2883 printf(
"-E- %s: Error loading options into input structure.\n", __FILE__);
2892 if ((tmp_str = getenv(
"OCDATAROOT")) ==
NULL) {
2893 printf(
"OCDATAROOT environment variable is not defined.\n");
2898 printf(
"Internal data compression requested at compression level: %d\n",
input->deflate);
2901 if (
input->filter_opt == 1) {
2902 if (
input->filter_file[0] ==
'\0') {
2903 sprintf(
input->filter_file,
"%s/%s/%s_filter.dat", tmp_str,
2909 if (numNoiseScales > 0 && numNoiseScales != numBands) {
2910 fprintf(
stderr,
"Parameter input error: Number of input gain uncertainties must equal %d.\n",
2914 if (numBiasFracs > 0 && numBiasFracs != numBands) {
2915 fprintf(
stderr,
"Parameter input error: Number of bias fractions must equal %d.\n",
2919 if (numGainUncs > 0 && numGainUncs != numBands) {
2920 fprintf(
stderr,
"Parameter input error: Number of input gain uncertainties must equal %d.\n",
2924 if (numTauas > 0 && numTauas != numBands) {
2925 fprintf(
stderr,
"Parameter input error: Number of input taua values must equal %d.\n",
2935 strcat(
l1_input->input_parms,
"\n");
2938 if (
input->ifile[
i][0] !=
'\0') {
2940 sprintf(str_buf,
"ifile = %s ",
input->ifile[
i]);
2942 sprintf(str_buf,
"ifile%d = %s ",
i + 1,
input->ifile[
i]);
2943 strcat(
l1_input->input_parms, str_buf);
2944 strcat(
l1_input->input_parms,
"\n");
2950 if (
input->ofile[
i][0] !=
'\0') {
2952 sprintf(str_buf,
"ofile = %s",
input->ofile[
i]);
2954 sprintf(str_buf,
"ofile%d = %s",
i + 1,
input->ofile[
i]);
2955 strcat(
l1_input->input_parms, str_buf);
2956 strcat(
l1_input->input_parms,
"\n");
2959 if (
input->l2prod[
i][0] !=
'\0') {
2961 sprintf(str_buf,
"l2prod = %s",
input->l2prod[
i]);
2963 sprintf(str_buf,
"l2prod%d = %s",
i + 1,
input->l2prod[
i]);
2964 strcat(
l1_input->input_parms, str_buf);
2965 strcat(
l1_input->input_parms,
"\n");
2969 sprintf(str_buf,
"il2file%d = %s",
i + 1,
input->il2file[
i]);
2970 strcat(
l1_input->input_parms, str_buf);
2971 strcat(
l1_input->input_parms,
"\n");
2976 sprintf(str_buf,
"oformat = %s",
input->oformat);
2977 strcat(
l1_input->input_parms, str_buf);
2978 strcat(
l1_input->input_parms,
"\n");
2980 sprintf(str_buf,
"oformat_depth = %s",
input->oformat_depth);
2981 strcat(
l1_input->input_parms, str_buf);
2982 strcat(
l1_input->input_parms,
"\n");
2984 sprintf(str_buf,
"fqfile = %s",
input->fqfile);
2985 strcat(
l1_input->input_parms, str_buf);
2986 strcat(
l1_input->input_parms,
"\n");
2988 sprintf(str_buf,
"parfile = %s",
input->parfile);
2989 strcat(
l1_input->input_parms, str_buf);
2990 strcat(
l1_input->input_parms,
"\n");
2992 sprintf(str_buf,
"geofile = %s",
input->geofile);
2993 strcat(
l1_input->input_parms, str_buf);
2994 strcat(
l1_input->input_parms,
"\n");
2996 sprintf(str_buf,
"gmpfile = %s",
input->gmpfile);
2997 strcat(
l1_input->input_parms, str_buf);
2998 strcat(
l1_input->input_parms,
"\n");
3000 sprintf(str_buf,
"metafile = %s",
input->metafile);
3001 strcat(
l1_input->input_parms, str_buf);
3002 strcat(
l1_input->input_parms,
"\n");
3006 sprintf(str_buf,
"flaguse = %s",
input->flaguse);
3007 strcat(
l1_input->input_parms, str_buf);
3008 strcat(
l1_input->input_parms,
"\n");
3010 sprintf(str_buf,
"maxpointdist = %8.3f",
input->maxpointdist);
3011 strcat(
l1_input->input_parms, str_buf);
3012 strcat(
l1_input->input_parms,
"\n");
3014 sprintf(str_buf,
"chlthreshold = %8.3f",
input->chlthreshold);
3015 strcat(
l1_input->input_parms, str_buf);
3016 strcat(
l1_input->input_parms,
"\n");
3018 sprintf(str_buf,
"aotthreshold = %8.3f",
input->aotthreshold);
3019 strcat(
l1_input->input_parms, str_buf);
3020 strcat(
l1_input->input_parms,
"\n");
3022 sprintf(str_buf,
"xcalbox = %d", (
int)
input->xcalbox);
3023 strcat(
l1_input->input_parms, str_buf);
3024 strcat(
l1_input->input_parms,
"\n");
3026 sprintf(str_buf,
"xcalboxcenter = %d, %d",
3027 (
int)
input->xcalboxcenter[0], (
int)
input->xcalboxcenter[1]);
3028 strcat(
l1_input->input_parms, str_buf);
3029 strcat(
l1_input->input_parms,
"\n");
3031 sprintf(str_buf,
"xcalpervalid = %d", (
int)
input->xcalpervalid);
3032 strcat(
l1_input->input_parms, str_buf);
3033 strcat(
l1_input->input_parms,
"\n");
3035 sprintf(str_buf,
"xcalsubsmpl = %d", (
int)
input->xcalsubsmpl);
3036 strcat(
l1_input->input_parms, str_buf);
3037 strcat(
l1_input->input_parms,
"\n");
3041 sprintf(str_buf,
"suite = %s",
input->suite);
3042 strcat(
l1_input->input_parms, str_buf);
3043 strcat(
l1_input->input_parms,
"\n");
3045 sprintf(str_buf,
"mode = %5d",
input->mode);
3046 strcat(
l1_input->input_parms, str_buf);
3047 strcat(
l1_input->input_parms,
"\n");
3049 sprintf(str_buf,
"deflate = %5d",
input->deflate);
3050 strcat(
l1_input->input_parms, str_buf);
3051 strcat(
l1_input->input_parms,
"\n");
3053 sprintf(str_buf,
"ctl_pt_incr = %5d",
input->ctl_pt_incr);
3054 strcat(
l1_input->input_parms, str_buf);
3055 strcat(
l1_input->input_parms,
"\n");
3057 sprintf(str_buf,
"proc_ocean = %3d",
input->proc_ocean);
3058 strcat(
l1_input->input_parms, str_buf);
3059 strcat(
l1_input->input_parms,
"\n");
3061 sprintf(str_buf,
"proc_land = %3d",
input->proc_land);
3062 strcat(
l1_input->input_parms, str_buf);
3063 strcat(
l1_input->input_parms,
"\n");
3065 sprintf(str_buf,
"proc_cloud = %3d",
input->proc_cloud);
3066 strcat(
l1_input->input_parms, str_buf);
3067 strcat(
l1_input->input_parms,
"\n");
3069 sprintf(str_buf,
"proc_sst = %3d",
input->proc_sst);
3070 strcat(
l1_input->input_parms, str_buf);
3071 strcat(
l1_input->input_parms,
"\n");
3073 sprintf(str_buf,
"atmocor = %3d",
input->atmocor);
3074 strcat(
l1_input->input_parms, str_buf);
3075 strcat(
l1_input->input_parms,
"\n");
3077 sprintf(str_buf,
"seawater_opt = %3d",
input->seawater_opt);
3078 strcat(
l1_input->input_parms, str_buf);
3079 strcat(
l1_input->input_parms,
"\n");
3081 sprintf(str_buf,
"aermodfile = %s",
input->aermodfile);
3082 strcat(
l1_input->input_parms, str_buf);
3083 strcat(
l1_input->input_parms,
"\n");
3085 sprintf(str_buf,
"aer_opt = %3d",
input->aer_opt);
3086 strcat(
l1_input->input_parms, str_buf);
3087 strcat(
l1_input->input_parms,
"\n");
3089 sprintf(str_buf,
"aer_wave_short = %3d",
input->aer_wave_short);
3090 strcat(
l1_input->input_parms, str_buf);
3091 strcat(
l1_input->input_parms,
"\n");
3093 sprintf(str_buf,
"aer_wave_long = %3d",
input->aer_wave_long);
3094 strcat(
l1_input->input_parms, str_buf);
3095 strcat(
l1_input->input_parms,
"\n");
3097 sprintf(str_buf,
"aer_swir_short = %3d",
input->aer_swir_short);
3098 strcat(
l1_input->input_parms, str_buf);
3099 strcat(
l1_input->input_parms,
"\n");
3101 sprintf(str_buf,
"aer_swir_long = %3d",
input->aer_swir_long);
3102 strcat(
l1_input->input_parms, str_buf);
3103 strcat(
l1_input->input_parms,
"\n");
3105 sprintf(str_buf,
"aer_rrs_short = %8.5f",
input->aer_rrs_short);
3106 strcat(
l1_input->input_parms, str_buf);
3107 strcat(
l1_input->input_parms,
"\n");
3109 sprintf(str_buf,
"aer_rrs_long = %8.5f",
input->aer_rrs_long);
3110 strcat(
l1_input->input_parms, str_buf);
3111 strcat(
l1_input->input_parms,
"\n");
3113 sprintf(str_buf,
"aer_angstrom = %8.5f",
input->aer_angstrom);
3114 strcat(
l1_input->input_parms, str_buf);
3115 strcat(
l1_input->input_parms,
"\n");
3117 sprintf(str_buf,
"aer_iter_max = %3d",
input->aer_iter_max);
3118 strcat(
l1_input->input_parms, str_buf);
3119 strcat(
l1_input->input_parms,
"\n");
3121 sprintf(str_buf,
"brdf_opt = %3d",
input->brdf_opt);
3122 strcat(
l1_input->input_parms, str_buf);
3123 strcat(
l1_input->input_parms,
"\n");
3125 sprintf(str_buf,
"gas_opt = %3d",
input->gas_opt);
3126 strcat(
l1_input->input_parms, str_buf);
3127 strcat(
l1_input->input_parms,
"\n");
3129 sprintf(str_buf,
"atrem_opt = %3d",
input->atrem_opt);
3130 strcat(
l1_input->input_parms, str_buf);
3131 strcat(
l1_input->input_parms,
"\n");
3133 sprintf(str_buf,
"atrem_full = %3d",
input->atrem_full);
3134 strcat(
l1_input->input_parms, str_buf);
3135 strcat(
l1_input->input_parms,
"\n");
3137 sprintf(str_buf,
"atrem_geom = %3d",
input->atrem_geom);
3138 strcat(
l1_input->input_parms, str_buf);
3139 strcat(
l1_input->input_parms,
"\n");
3141 sprintf(str_buf,
"atrem_model = %3d",
input->atrem_model);
3142 strcat(
l1_input->input_parms, str_buf);
3143 strcat(
l1_input->input_parms,
"\n");
3145 sprintf(str_buf,
"atrem_splitpaths = %3d",
input->atrem_splitpaths);
3146 strcat(
l1_input->input_parms, str_buf);
3147 strcat(
l1_input->input_parms,
"\n");
3149 sprintf(str_buf,
"iop_opt = %3d",
input->iop_opt);
3150 strcat(
l1_input->input_parms, str_buf);
3151 strcat(
l1_input->input_parms,
"\n");
3153 sprintf(str_buf,
"cphyt_opt = %3d",
input->cphyt_opt);
3154 strcat(
l1_input->input_parms, str_buf);
3155 strcat(
l1_input->input_parms,
"\n");
3157 sprintf(str_buf,
"gsm_opt = %3d",
input->gsm_opt);
3158 strcat(
l1_input->input_parms, str_buf);
3159 strcat(
l1_input->input_parms,
"\n");
3161 sprintf(str_buf,
"gsm_fit = %3d",
input->gsm_fit);
3162 strcat(
l1_input->input_parms, str_buf);
3163 strcat(
l1_input->input_parms,
"\n");
3165 sprintf(str_buf,
"gsm_adg_s = %8.5f",
input->gsm_adg_s);
3166 strcat(
l1_input->input_parms, str_buf);
3167 strcat(
l1_input->input_parms,
"\n");
3169 sprintf(str_buf,
"gsm_bbp_s = %8.5f",
input->gsm_bbp_s);
3170 strcat(
l1_input->input_parms, str_buf);
3171 strcat(
l1_input->input_parms,
"\n");
3173 sprintf(str_buf,
"gsm_aphw = %8.5f",
input->gsm_aphw[0]);
3174 strcat(
l1_input->input_parms, str_buf);
3175 for (
i = 1;
i < numBands;
i++) {
3176 sprintf(str_buf,
", %8.5f",
input->gsm_aphw[
i]);
3177 strcat(
l1_input->input_parms, str_buf);
3179 strcat(
l1_input->input_parms,
"\n");
3181 sprintf(str_buf,
"gsm_aphs = %8.5f",
input->gsm_aphs[0]);
3182 strcat(
l1_input->input_parms, str_buf);
3183 for (
i = 1;
i < numBands;
i++) {
3184 sprintf(str_buf,
", %8.5f",
input->gsm_aphs[
i]);
3185 strcat(
l1_input->input_parms, str_buf);
3187 strcat(
l1_input->input_parms,
"\n");
3188 sprintf(str_buf,
"qaa_adg_s = %8.5f",
input->qaa_adg_s);
3189 strcat(
l1_input->input_parms, str_buf);
3190 strcat(
l1_input->input_parms,
"\n");
3192 sprintf(str_buf,
"qaa_wave = %4d",
input->qaa_wave[0]);
3193 strcat(
l1_input->input_parms, str_buf);
3194 for (
i = 1;
i < 5;
i++) {
3195 sprintf(str_buf,
", %4d",
input->qaa_wave[
i]);
3196 strcat(
l1_input->input_parms, str_buf);
3198 strcat(
l1_input->input_parms,
"\n");
3199 sprintf(str_buf,
"giop_maxiter = %3d",
input->giop_maxiter);
3200 strcat(
l1_input->input_parms, str_buf);
3201 strcat(
l1_input->input_parms,
"\n");
3203 sprintf(str_buf,
"giop_fit_opt = %3d",
input->giop_fit_opt);
3204 strcat(
l1_input->input_parms, str_buf);
3205 strcat(
l1_input->input_parms,
"\n");
3207 sprintf(str_buf,
"giop_aph_opt = %3d",
input->giop_aph_opt);
3208 strcat(
l1_input->input_parms, str_buf);
3209 strcat(
l1_input->input_parms,
"\n");
3211 sprintf(str_buf,
"giop_acdom_opt = %3d",
input->giop_acdom_opt);
3212 strcat(
l1_input->input_parms, str_buf);
3213 strcat(
l1_input->input_parms,
"\n");
3215 sprintf(str_buf,
"giop_anap_opt = %3d",
input->giop_anap_opt);
3216 strcat(
l1_input->input_parms, str_buf);
3217 strcat(
l1_input->input_parms,
"\n");
3219 sprintf(str_buf,
"giop_adg_opt = %3d",
input->giop_adg_opt);
3220 strcat(
l1_input->input_parms, str_buf);
3221 strcat(
l1_input->input_parms,
"\n");
3223 sprintf(str_buf,
"giop_bbp_opt = %3d",
input->giop_bbp_opt);
3224 strcat(
l1_input->input_parms, str_buf);
3225 strcat(
l1_input->input_parms,
"\n");
3227 sprintf(str_buf,
"giop_bbnap_opt = %3d",
input->giop_bbnap_opt);
3228 strcat(
l1_input->input_parms, str_buf);
3229 strcat(
l1_input->input_parms,
"\n");
3231 sprintf(str_buf,
"giop_bbph_opt = %3d",
input->giop_bbph_opt);
3232 strcat(
l1_input->input_parms, str_buf);
3233 strcat(
l1_input->input_parms,
"\n");
3235 sprintf(str_buf,
"giop_rrs_opt = %3d",
input->giop_rrs_opt);
3236 strcat(
l1_input->input_parms, str_buf);
3237 strcat(
l1_input->input_parms,
"\n");
3239 sprintf(str_buf,
"giop_rrs_diff = %8.5f",
input->giop_rrs_diff);
3240 strcat(
l1_input->input_parms, str_buf);
3241 strcat(
l1_input->input_parms,
"\n");
3243 sprintf(str_buf,
"giop_aph_file = %s",
input->giop_aph_file);
3244 strcat(
l1_input->input_parms, str_buf);
3245 strcat(
l1_input->input_parms,
"\n");
3247 sprintf(str_buf,
"giop_aph_s = %8.5f",
input->giop_aph_s);
3248 strcat(
l1_input->input_parms, str_buf);
3249 strcat(
l1_input->input_parms,
"\n");
3251 sprintf(str_buf,
"giop_adg_file = %s",
input->giop_adg_file);
3252 strcat(
l1_input->input_parms, str_buf);
3253 strcat(
l1_input->input_parms,
"\n");
3255 sprintf(str_buf,
"giop_adg_s = %8.5f",
input->giop_adg_s);
3256 strcat(
l1_input->input_parms, str_buf);
3257 strcat(
l1_input->input_parms,
"\n");
3259 sprintf(str_buf,
"giop_bbp_file = %s",
input->giop_bbp_file);
3260 strcat(
l1_input->input_parms, str_buf);
3261 strcat(
l1_input->input_parms,
"\n");
3263 sprintf(str_buf,
"giop_bbp_s = %8.5f",
input->giop_bbp_s);
3264 strcat(
l1_input->input_parms, str_buf);
3265 strcat(
l1_input->input_parms,
"\n");
3267 sprintf(str_buf,
"giop_acdom_file = %s",
input->giop_acdom_file);
3268 strcat(
l1_input->input_parms, str_buf);
3269 strcat(
l1_input->input_parms,
"\n");
3271 sprintf(str_buf,
"giop_anap_file = %s",
input->giop_anap_file);
3272 strcat(
l1_input->input_parms, str_buf);
3273 strcat(
l1_input->input_parms,
"\n");
3275 sprintf(str_buf,
"giop_bbph_file = %s",
input->giop_bbph_file);
3276 strcat(
l1_input->input_parms, str_buf);
3277 strcat(
l1_input->input_parms,
"\n");
3279 sprintf(str_buf,
"giop_bbnap_file = %s",
input->giop_bbnap_file);
3280 strcat(
l1_input->input_parms, str_buf);
3281 strcat(
l1_input->input_parms,
"\n");
3283 sprintf(str_buf,
"giop_grd = %8.5f",
input->giop_grd[0]);
3284 strcat(
l1_input->input_parms, str_buf);
3285 for (
i = 1;
i < 2;
i++) {
3286 sprintf(str_buf,
", %8.5f",
input->giop_grd[
i]);
3287 strcat(
l1_input->input_parms, str_buf);
3289 strcat(
l1_input->input_parms,
"\n");
3291 sprintf(str_buf,
"giop_wave = %6.1f",
input->giop_wave[0]);
3292 strcat(
l1_input->input_parms, str_buf);
3293 for (
i = 1;
i < numBands;
i++) {
3294 sprintf(str_buf,
", %6.1f",
input->giop_wave[
i]);
3295 strcat(
l1_input->input_parms, str_buf);
3297 strcat(
l1_input->input_parms,
"\n");
3299 sprintf(str_buf,
"giop_rrs_unc = %6.1f",
input->giop_rrs_unc[0]);
3300 strcat(
l1_input->input_parms, str_buf);
3301 for (
i = 1;
i < numBands;
i++) {
3302 sprintf(str_buf,
", %6.1f",
input->giop_rrs_unc[
i]);
3303 strcat(
l1_input->input_parms, str_buf);
3305 strcat(
l1_input->input_parms,
"\n");
3307 sprintf(str_buf,
"polfile = %s",
input->polfile);
3308 strcat(
l1_input->input_parms, str_buf);
3309 strcat(
l1_input->input_parms,
"\n");
3311 sprintf(str_buf,
"pol_opt = %3d",
input->pol_opt);
3312 strcat(
l1_input->input_parms, str_buf);
3313 strcat(
l1_input->input_parms,
"\n");
3315 sprintf(str_buf,
"vcnnfile = %s",
input->vcnnfile);
3316 strcat(
l1_input->input_parms, str_buf);
3317 strcat(
l1_input->input_parms,
"\n");
3319 sprintf(str_buf,
"absaer_opt = %3d",
input->absaer_opt);
3320 strcat(
l1_input->input_parms, str_buf);
3321 strcat(
l1_input->input_parms,
"\n");
3323 sprintf(str_buf,
"glint_opt = %3d",
input->glint_opt);
3324 strcat(
l1_input->input_parms, str_buf);
3325 strcat(
l1_input->input_parms,
"\n");
3327 sprintf(str_buf,
"cirrus_opt = %3d",
input->cirrus_opt);
3328 strcat(
l1_input->input_parms, str_buf);
3329 strcat(
l1_input->input_parms,
"\n");
3331 sprintf(str_buf,
"oxaband_opt = %3d",
input->oxaband_opt);
3332 strcat(
l1_input->input_parms, str_buf);
3333 strcat(
l1_input->input_parms,
"\n");
3335 sprintf(str_buf,
"filter_opt = %3d",
input->filter_opt);
3336 strcat(
l1_input->input_parms, str_buf);
3337 strcat(
l1_input->input_parms,
"\n");
3338 if (
input->filter_opt == 1) {
3339 sprintf(str_buf,
"filter_file = %s",
input->filter_file);
3340 strcat(
l1_input->input_parms, str_buf);
3341 strcat(
l1_input->input_parms,
"\n");
3342 for (
i = 0;
i <
input->fctl.nfilt;
i++) {
3343 sprintf(str_buf,
"# filter_%d = %d x %d (%d) %s %d ",
3347 input->fctl.f[
i].minfill,
3348 filter_names[
input->fctl.f[
i].func],
3349 input->fctl.f[
i].band + 1);
3350 strcat(
l1_input->input_parms, str_buf);
3351 strcat(
l1_input->input_parms,
"\n");
3355 sprintf(str_buf,
"aerfile = %s",
input->aerfile);
3356 strcat(
l1_input->input_parms, str_buf);
3357 strcat(
l1_input->input_parms,
"\n");
3359 sprintf(str_buf,
"tgtfile = %s",
input->tgtfile);
3360 strcat(
l1_input->input_parms, str_buf);
3361 strcat(
l1_input->input_parms,
"\n");
3363 sprintf(str_buf,
"met1 = %s",
input->met1);
3364 strcat(
l1_input->input_parms, str_buf);
3365 strcat(
l1_input->input_parms,
"\n");
3367 sprintf(str_buf,
"met2 = %s",
input->met2);
3368 strcat(
l1_input->input_parms, str_buf);
3369 strcat(
l1_input->input_parms,
"\n");
3371 sprintf(str_buf,
"met3 = %s",
input->met3);
3372 strcat(
l1_input->input_parms, str_buf);
3373 strcat(
l1_input->input_parms,
"\n");
3375 sprintf(str_buf,
"ozone1 = %s",
input->ozone1);
3376 strcat(
l1_input->input_parms, str_buf);
3377 strcat(
l1_input->input_parms,
"\n");
3379 sprintf(str_buf,
"ozone2 = %s",
input->ozone2);
3380 strcat(
l1_input->input_parms, str_buf);
3381 strcat(
l1_input->input_parms,
"\n");
3383 sprintf(str_buf,
"ozone3 = %s",
input->ozone3);
3384 strcat(
l1_input->input_parms, str_buf);
3385 strcat(
l1_input->input_parms,
"\n");
3387 sprintf(str_buf,
"anc_profile1 = %s",
input->anc_profile1);
3388 strcat(
l1_input->input_parms, str_buf);
3389 strcat(
l1_input->input_parms,
"\n");
3391 sprintf(str_buf,
"anc_profile2 = %s",
input->anc_profile2);
3392 strcat(
l1_input->input_parms, str_buf);
3393 strcat(
l1_input->input_parms,
"\n");
3395 sprintf(str_buf,
"anc_profile3 = %s",
input->anc_profile3);
3396 strcat(
l1_input->input_parms, str_buf);
3397 strcat(
l1_input->input_parms,
"\n");
3399 sprintf(str_buf,
"anc_aerosol1 = %s",
input->anc_aerosol1);
3400 strcat(
l1_input->input_parms, str_buf);
3401 strcat(
l1_input->input_parms,
"\n");
3403 sprintf(str_buf,
"anc_aerosol2 = %s",
input->anc_aerosol2);
3404 strcat(
l1_input->input_parms, str_buf);
3405 strcat(
l1_input->input_parms,
"\n");
3407 sprintf(str_buf,
"anc_aerosol3 = %s",
input->anc_aerosol3);
3408 strcat(
l1_input->input_parms, str_buf);
3409 strcat(
l1_input->input_parms,
"\n");
3411 sprintf(str_buf,
"sfc_albedo= %s",
input->sfc_albedo);
3412 strcat(
l1_input->input_parms, str_buf);
3413 strcat(
l1_input->input_parms,
"\n");
3415 sprintf(str_buf,
"anc_cor_file = %s",
input->anc_cor_file);
3416 strcat(
l1_input->input_parms, str_buf);
3417 strcat(
l1_input->input_parms,
"\n");
3419 sprintf(str_buf,
"pixel_anc_file = %s",
input->pixel_anc_file);
3420 strcat(
l1_input->input_parms, str_buf);
3421 strcat(
l1_input->input_parms,
"\n");
3423 sprintf(str_buf,
"land = %s",
input->land);
3424 strcat(
l1_input->input_parms, str_buf);
3425 strcat(
l1_input->input_parms,
"\n");
3427 sprintf(str_buf,
"water = %s",
input->water);
3428 strcat(
l1_input->input_parms, str_buf);
3429 strcat(
l1_input->input_parms,
"\n");
3431 sprintf(str_buf,
"shallow_water_depth = %6.2f",
input->shallow_water_depth);
3432 strcat(
l1_input->input_parms, str_buf);
3433 strcat(
l1_input->input_parms,
"\n");
3435 sprintf(str_buf,
"demfile = %s",
input->demfile);
3436 strcat(
l1_input->input_parms, str_buf);
3437 strcat(
l1_input->input_parms,
"\n");
3439 sprintf(str_buf,
"dem_auxfile = %s",
input->dem_auxfile);
3440 strcat(
l1_input->input_parms, str_buf);
3441 strcat(
l1_input->input_parms,
"\n");
3443 sprintf(str_buf,
"mldfile = %s",
input->mldfile);
3444 strcat(
l1_input->input_parms, str_buf);
3445 strcat(
l1_input->input_parms,
"\n");
3447 sprintf(str_buf,
"icefile = %s",
input->icefile);
3448 strcat(
l1_input->input_parms, str_buf);
3449 strcat(
l1_input->input_parms,
"\n");
3451 sprintf(str_buf,
"sstfile = %s",
input->sstfile);
3452 strcat(
l1_input->input_parms, str_buf);
3453 strcat(
l1_input->input_parms,
"\n");
3455 sprintf(str_buf,
"sstreftype = %d",
input->sstreftype);
3456 strcat(
l1_input->input_parms, str_buf);
3457 strcat(
l1_input->input_parms,
"\n");
3459 sprintf(str_buf,
"sssfile = %s",
input->sssfile);
3460 strcat(
l1_input->input_parms, str_buf);
3461 strcat(
l1_input->input_parms,
"\n");
3463 sprintf(str_buf,
"no2file = %s",
input->no2file);
3464 strcat(
l1_input->input_parms, str_buf);
3465 strcat(
l1_input->input_parms,
"\n");
3467 sprintf(str_buf,
"alphafile = %s",
input->alphafile);
3468 strcat(
l1_input->input_parms, str_buf);
3469 strcat(
l1_input->input_parms,
"\n");
3471 sprintf(str_buf,
"tauafile = %s",
input->tauafile);
3472 strcat(
l1_input->input_parms, str_buf);
3473 strcat(
l1_input->input_parms,
"\n");
3475 sprintf(str_buf,
"picfile = %s",
input->picfile);
3476 strcat(
l1_input->input_parms, str_buf);
3477 strcat(
l1_input->input_parms,
"\n");
3479 sprintf(str_buf,
"owmcfile = %s",
input->owmcfile);
3480 strcat(
l1_input->input_parms, str_buf);
3481 strcat(
l1_input->input_parms,
"\n");
3483 sprintf(str_buf,
"prodxmlfile = %s",
input->prodXMLfile);
3484 strcat(
l1_input->input_parms, str_buf);
3485 strcat(
l1_input->input_parms,
"\n");
3487 sprintf(str_buf,
"breflectfile = %s",
input->breflectfile);
3488 strcat(
l1_input->input_parms, str_buf);
3489 strcat(
l1_input->input_parms,
"\n");
3491 sprintf(str_buf,
"aerbinfile = %s",
input->aerbinfile);
3492 strcat(
l1_input->input_parms, str_buf);
3493 strcat(
l1_input->input_parms,
"\n");
3495 sprintf(str_buf,
"gain_unc = %8.4f",
input->gain_unc[0]);
3496 strcat(
l1_input->input_parms, str_buf);
3497 for (
i = 1;
i < numBands;
i++) {
3498 sprintf(str_buf,
", %8.6f",
input->gain_unc[
i]);
3499 strcat(
l1_input->input_parms, str_buf);
3501 strcat(
l1_input->input_parms,
"\n");
3503 sprintf(str_buf,
"naermodels = %d",
input->naermodels);
3504 strcat(
l1_input->input_parms, str_buf);
3505 strcat(
l1_input->input_parms,
"\n");
3507 sprintf(str_buf,
"aermodels = %3s",
input->aermodels[0]);
3508 strcat(
l1_input->input_parms, str_buf);
3509 for (
i = 1;
i <
input->naermodels;
i++) {
3510 sprintf(str_buf,
", %3s",
input->aermodels[
i]);
3511 strcat(
l1_input->input_parms, str_buf);
3513 strcat(
l1_input->input_parms,
"\n");
3515 sprintf(str_buf,
"taua = %8.4f",
input->taua[0]);
3516 strcat(
l1_input->input_parms, str_buf);
3517 for (
i = 1;
i < numBands;
i++) {
3518 sprintf(str_buf,
", %8.4f",
input->taua[
i]);
3519 strcat(
l1_input->input_parms, str_buf);
3521 strcat(
l1_input->input_parms,
"\n");
3523 sprintf(str_buf,
"aermodrat = %8.5f",
input->aermodrat);
3524 strcat(
l1_input->input_parms, str_buf);
3525 strcat(
l1_input->input_parms,
"\n");
3527 sprintf(str_buf,
"aermodmin = %3d",
input->aermodmin);
3528 strcat(
l1_input->input_parms, str_buf);
3529 strcat(
l1_input->input_parms,
"\n");
3531 sprintf(str_buf,
"aermodmax = %3d",
input->aermodmax);
3532 strcat(
l1_input->input_parms, str_buf);
3533 strcat(
l1_input->input_parms,
"\n");
3535 sprintf(str_buf,
"cirrus_thresh = %8.5f, %8.5f",
input->cirrus_thresh[0],
input->cirrus_thresh[1]);
3536 strcat(
l1_input->input_parms, str_buf);
3537 strcat(
l1_input->input_parms,
"\n");
3539 sprintf(str_buf,
"absaer = %8.3f",
input->absaer);
3540 strcat(
l1_input->input_parms, str_buf);
3541 strcat(
l1_input->input_parms,
"\n");
3543 sprintf(str_buf,
"rhoamin = %8.5f",
input->rhoamin);
3544 strcat(
l1_input->input_parms, str_buf);
3545 strcat(
l1_input->input_parms,
"\n");
3547 sprintf(str_buf,
"nlwmin = %8.3f",
input->nlwmin);
3548 strcat(
l1_input->input_parms, str_buf);
3549 strcat(
l1_input->input_parms,
"\n");
3551 sprintf(str_buf,
"wsmax = %8.3f",
input->wsmax);
3552 strcat(
l1_input->input_parms, str_buf);
3553 strcat(
l1_input->input_parms,
"\n");
3555 sprintf(str_buf,
"coccolith = %8.4f",
input->coccolith[0]);
3556 strcat(
l1_input->input_parms, str_buf);
3557 for (
i = 1;
i < 8;
i++) {
3558 sprintf(str_buf,
", %8.4f",
input->coccolith[
i]);
3559 strcat(
l1_input->input_parms, str_buf);
3561 strcat(
l1_input->input_parms,
"\n");
3563 sprintf(str_buf,
"tauamax = %8.3f",
input->tauamax);
3564 strcat(
l1_input->input_parms, str_buf);
3565 strcat(
l1_input->input_parms,
"\n");
3567 sprintf(str_buf,
"epsmin = %8.3f",
input->epsmin);
3568 strcat(
l1_input->input_parms, str_buf);
3569 strcat(
l1_input->input_parms,
"\n");
3571 sprintf(str_buf,
"epsmax = %8.3f",
input->epsmax);
3572 strcat(
l1_input->input_parms, str_buf);
3573 strcat(
l1_input->input_parms,
"\n");
3575 sprintf(str_buf,
"windspeed = %8.3f",
input->windspeed);
3576 strcat(
l1_input->input_parms, str_buf);
3577 strcat(
l1_input->input_parms,
"\n");
3579 sprintf(str_buf,
"windangle = %8.3f",
input->windangle);
3580 strcat(
l1_input->input_parms, str_buf);
3581 strcat(
l1_input->input_parms,
"\n");
3583 sprintf(str_buf,
"pressure = %8.3f",
input->pressure);
3584 strcat(
l1_input->input_parms, str_buf);
3585 strcat(
l1_input->input_parms,
"\n");
3587 sprintf(str_buf,
"ozone = %8.3f",
input->ozone);
3588 strcat(
l1_input->input_parms, str_buf);
3589 strcat(
l1_input->input_parms,
"\n");
3591 sprintf(str_buf,
"watervapor = %8.3f",
input->watervapor);
3592 strcat(
l1_input->input_parms, str_buf);
3593 strcat(
l1_input->input_parms,
"\n");
3595 sprintf(str_buf,
"relhumid = %8.3f",
input->relhumid);
3596 strcat(
l1_input->input_parms, str_buf);
3597 strcat(
l1_input->input_parms,
"\n");
3599 sprintf(str_buf,
"ice_threshold = %8.3f",
input->ice_threshold);
3600 strcat(
l1_input->input_parms, str_buf);
3601 strcat(
l1_input->input_parms,
"\n");
3603 sprintf(str_buf,
"mumm_alpha = %8.3f",
input->mumm_alpha);
3604 strcat(
l1_input->input_parms, str_buf);
3605 strcat(
l1_input->input_parms,
"\n");
3607 sprintf(str_buf,
"mumm_gamma = %8.3f",
input->mumm_gamma);
3608 strcat(
l1_input->input_parms, str_buf);
3609 strcat(
l1_input->input_parms,
"\n");
3611 sprintf(str_buf,
"mumm_epsilon = %8.3f",
input->mumm_epsilon);
3612 strcat(
l1_input->input_parms, str_buf);
3613 strcat(
l1_input->input_parms,
"\n");
3615 sprintf(str_buf,
"chloc2_wave = %4d",
input->chloc2w[0]);
3616 strcat(
l1_input->input_parms, str_buf);
3617 for (
i = 1;
i < 2;
i++) {
3618 sprintf(str_buf,
", %4d",
input->chloc2w[
i]);
3619 strcat(
l1_input->input_parms, str_buf);
3621 strcat(
l1_input->input_parms,
"\n");
3623 sprintf(str_buf,
"chloc2_coef = %8.5f",
input->chloc2c[0]);
3624 strcat(
l1_input->input_parms, str_buf);
3625 for (
i = 1;
i < 5;
i++) {
3626 sprintf(str_buf,
", %8.5f",
input->chloc2c[
i]);
3627 strcat(
l1_input->input_parms, str_buf);
3629 strcat(
l1_input->input_parms,
"\n");
3631 sprintf(str_buf,
"chloc3_wave = %4d",
input->chloc3w[0]);
3632 strcat(
l1_input->input_parms, str_buf);
3633 for (
i = 1;
i < 3;
i++) {
3634 sprintf(str_buf,
", %4d",
input->chloc3w[
i]);
3635 strcat(
l1_input->input_parms, str_buf);
3637 strcat(
l1_input->input_parms,
"\n");
3639 sprintf(str_buf,
"chloc3_coef = %8.5f",
input->chloc3c[0]);
3640 strcat(
l1_input->input_parms, str_buf);
3641 for (
i = 1;
i < 5;
i++) {
3642 sprintf(str_buf,
", %8.5f",
input->chloc3c[
i]);
3643 strcat(
l1_input->input_parms, str_buf);
3645 strcat(
l1_input->input_parms,
"\n");
3647 sprintf(str_buf,
"chloc4_wave = %4d",
input->chloc4w[0]);
3648 strcat(
l1_input->input_parms, str_buf);
3649 for (
i = 1;
i < 4;
i++) {
3650 sprintf(str_buf,
", %4d",
input->chloc4w[
i]);
3651 strcat(
l1_input->input_parms, str_buf);
3653 strcat(
l1_input->input_parms,
"\n");
3655 sprintf(str_buf,
"chloc4_coef = %8.5f",
input->chloc4c[0]);
3656 strcat(
l1_input->input_parms, str_buf);
3657 for (
i = 1;
i < 5;
i++) {
3658 sprintf(str_buf,
", %8.5f",
input->chloc4c[
i]);
3659 strcat(
l1_input->input_parms, str_buf);
3661 strcat(
l1_input->input_parms,
"\n");
3663 sprintf(str_buf,
"avw_coef = %.5E",
input->avw_coef[0]);
3664 strcat(
l1_input->input_parms, str_buf);
3665 for (
i = 1;
i < 6;
i++) {
3666 sprintf(str_buf,
", %.5E",
input->avw_coef[
i]);
3667 strcat(
l1_input->input_parms, str_buf);
3669 strcat(
l1_input->input_parms,
"\n");
3671 sprintf(str_buf,
"kd2_wave = %4d",
input->kd2w[0]);
3672 strcat(
l1_input->input_parms, str_buf);
3673 for (
i = 1;
i < 2;
i++) {
3674 sprintf(str_buf,
", %4d",
input->kd2w[
i]);
3675 strcat(
l1_input->input_parms, str_buf);
3677 strcat(
l1_input->input_parms,
"\n");
3679 sprintf(str_buf,
"kd2_coef = %8.5f",
input->kd2c[0]);
3680 strcat(
l1_input->input_parms, str_buf);
3681 for (
i = 1;
i < 6;
i++) {
3682 sprintf(str_buf,
", %8.5f",
input->kd2c[
i]);
3683 strcat(
l1_input->input_parms, str_buf);
3685 strcat(
l1_input->input_parms,
"\n");
3687 sprintf(str_buf,
"flh_offset = %8.5f",
input->flh_offset);
3688 strcat(
l1_input->input_parms, str_buf);
3689 strcat(
l1_input->input_parms,
"\n");
3691 sprintf(str_buf,
"sstcoeffile = %s",
input->sstcoeffile);
3692 strcat(
l1_input->input_parms, str_buf);
3693 strcat(
l1_input->input_parms,
"\n");
3695 sprintf(str_buf,
"dsdicoeffile = %s",
input->dsdicoeffile);
3696 strcat(
l1_input->input_parms, str_buf);
3697 strcat(
l1_input->input_parms,
"\n");
3699 sprintf(str_buf,
"sstssesfile = %s",
input->sstssesfile);
3700 strcat(
l1_input->input_parms, str_buf);
3701 strcat(
l1_input->input_parms,
"\n");
3703 sprintf(str_buf,
"sst4coeffile = %s",
input->sst4coeffile);
3704 strcat(
l1_input->input_parms, str_buf);
3705 strcat(
l1_input->input_parms,
"\n");
3707 sprintf(str_buf,
"sst4ssesfile = %s",
input->sst4ssesfile);
3708 strcat(
l1_input->input_parms, str_buf);
3709 strcat(
l1_input->input_parms,
"\n");
3711 sprintf(str_buf,
"sst3coeffile = %s",
input->sst3coeffile);
3712 strcat(
l1_input->input_parms, str_buf);
3713 strcat(
l1_input->input_parms,
"\n");
3715 sprintf(str_buf,
"sst3ssesfile = %s",
input->sst3ssesfile);
3716 strcat(
l1_input->input_parms, str_buf);
3717 strcat(
l1_input->input_parms,
"\n");
3719 sprintf(str_buf,
"vcal_opt = %3d",
input->vcal_opt);
3720 strcat(
l1_input->input_parms, str_buf);
3721 strcat(
l1_input->input_parms,
"\n");
3723 sprintf(str_buf,
"vcal_nlw = %8.4f",
input->vcal_nLw[0]);
3724 strcat(
l1_input->input_parms, str_buf);
3725 for (
i = 1;
i < numBands;
i++) {
3726 sprintf(str_buf,
", %8.4f",
input->vcal_nLw[
i]);
3727 strcat(
l1_input->input_parms, str_buf);
3729 strcat(
l1_input->input_parms,
"\n");
3731 sprintf(str_buf,
"vcal_lw = %8.4f",
input->vcal_Lw[0]);
3732 strcat(
l1_input->input_parms, str_buf);
3733 for (
i = 1;
i < numBands;
i++) {
3734 sprintf(str_buf,
", %8.4f",
input->vcal_Lw[
i]);
3735 strcat(
l1_input->input_parms, str_buf);
3737 strcat(
l1_input->input_parms,
"\n");
3739 sprintf(str_buf,
"vcal_chl = %8.4f",
input->vcal_chl);
3740 strcat(
l1_input->input_parms, str_buf);
3741 strcat(
l1_input->input_parms,
"\n");
3743 sprintf(str_buf,
"vcal_solz = %8.4f",
input->vcal_solz);
3744 strcat(
l1_input->input_parms, str_buf);
3745 strcat(
l1_input->input_parms,
"\n");
3747 sprintf(str_buf,
"vcal_depth = %8.4f",
input->vcal_depth);
3748 strcat(
l1_input->input_parms, str_buf);
3749 strcat(
l1_input->input_parms,
"\n");
3751 sprintf(str_buf,
"vcal_min_nbin = %d",
input->vcal_min_nbin);
3752 strcat(
l1_input->input_parms, str_buf);
3753 strcat(
l1_input->input_parms,
"\n");
3755 sprintf(str_buf,
"vcal_min_nscene = %d",
input->vcal_min_nscene);
3756 strcat(
l1_input->input_parms, str_buf);
3757 strcat(
l1_input->input_parms,
"\n");
3759 sprintf(str_buf,
"band_shift_opt = %3d",
input->band_shift_opt);
3760 strcat(
l1_input->input_parms, str_buf);
3761 strcat(
l1_input->input_parms,
"\n");
3763 sprintf(str_buf,
"add_ws_noise = %2.4f",
input->add_ws_noise);
3764 strcat(
l1_input->input_parms, str_buf);
3765 strcat(
l1_input->input_parms,
"\n");
3767 sprintf(str_buf,
"add_wd_noise = %2.4f",
input->add_wd_noise);
3768 strcat(
l1_input->input_parms, str_buf);
3769 strcat(
l1_input->input_parms,
"\n");
3771 sprintf(str_buf,
"add_mw_noise = %2.4f",
input->add_mw_noise);
3772 strcat(
l1_input->input_parms, str_buf);
3773 strcat(
l1_input->input_parms,
"\n");
3775 sprintf(str_buf,
"add_zw_noise = %2.4f",
input->add_zw_noise);
3776 strcat(
l1_input->input_parms, str_buf);
3777 strcat(
l1_input->input_parms,
"\n");
3779 sprintf(str_buf,
"add_rh_noise = %2.4f",
input->add_rh_noise);
3780 strcat(
l1_input->input_parms, str_buf);
3781 strcat(
l1_input->input_parms,
"\n");
3783 sprintf(str_buf,
"add_pr_noise = %2.4f",
input->add_pr_noise);
3784 strcat(
l1_input->input_parms, str_buf);
3785 strcat(
l1_input->input_parms,
"\n");
3787 sprintf(str_buf,
"add_wv_noise = %2.4f",
input->add_wv_noise);
3788 strcat(
l1_input->input_parms, str_buf);
3789 strcat(
l1_input->input_parms,
"\n");
3791 sprintf(str_buf,
"add_oz_noise = %2.4f",
input->add_oz_noise);
3792 strcat(
l1_input->input_parms, str_buf);
3793 strcat(
l1_input->input_parms,
"\n");
3795 sprintf(str_buf,
"add_no2_strat_noise = %2.4f",
input->add_no2_strat_noise);
3796 strcat(
l1_input->input_parms, str_buf);
3797 strcat(
l1_input->input_parms,
"\n");
3799 sprintf(str_buf,
"add_no2_tropo_noise = %2.4f",
input->add_no2_tropo_noise);
3800 strcat(
l1_input->input_parms, str_buf);
3801 strcat(
l1_input->input_parms,
"\n");
3803 sprintf(str_buf,
"add_lt_noise = %2.4f",
input->add_lt_noise);
3804 strcat(
l1_input->input_parms, str_buf);
3805 strcat(
l1_input->input_parms,
"\n");
3807 sprintf(str_buf,
"lt_noise_scale = %2.4f",
input->lt_noise_scale[0]);
3808 strcat(
l1_input->input_parms, str_buf);
3809 for (
i = 1;
i < numBands;
i++) {
3810 sprintf(str_buf,
", %2.4f",
input->lt_noise_scale[
i]);
3811 strcat(
l1_input->input_parms, str_buf);
3813 strcat(
l1_input->input_parms,
"\n");
3815 sprintf(str_buf,
"bias_frac = %2.4f",
input->bias_frac[0]);
3816 strcat(
l1_input->input_parms, str_buf);
3817 for (
i = 1;
i < numBands;
i++) {
3818 sprintf(str_buf,
", %2.4f",
input->bias_frac[
i]);
3819 strcat(
l1_input->input_parms, str_buf);
3821 strcat(
l1_input->input_parms,
"\n");
3823 sprintf(str_buf,
"stype = %d",
input->stype);
3824 strcat(
l1_input->input_parms, str_buf);
3825 strcat(
l1_input->input_parms,
"\n");
3827 sprintf(str_buf,
"datamin = %8.4f",
input->datamin);
3828 strcat(
l1_input->input_parms, str_buf);
3829 strcat(
l1_input->input_parms,
"\n");
3831 sprintf(str_buf,
"datamax = %8.4f",
input->datamax);
3832 strcat(
l1_input->input_parms, str_buf);
3833 strcat(
l1_input->input_parms,
"\n");
3835 sprintf(str_buf,
"north = %8.4f",
input->north);
3836 strcat(
l1_input->input_parms, str_buf);
3837 strcat(
l1_input->input_parms,
"\n");
3839 sprintf(str_buf,
"south = %8.4f",
input->south);
3840 strcat(
l1_input->input_parms, str_buf);
3841 strcat(
l1_input->input_parms,
"\n");
3843 sprintf(str_buf,
"east = %8.4f",
input->east);
3844 strcat(
l1_input->input_parms, str_buf);
3845 strcat(
l1_input->input_parms,
"\n");
3847 sprintf(str_buf,
"west = %8.4f",
input->west);
3848 strcat(
l1_input->input_parms, str_buf);
3849 strcat(
l1_input->input_parms,
"\n");
3851 sprintf(str_buf,
"xbox = %d",
input->xbox);
3852 strcat(
l1_input->input_parms, str_buf);
3853 strcat(
l1_input->input_parms,
"\n");
3855 sprintf(str_buf,
"ybox = %d",
input->ybox);
3856 strcat(
l1_input->input_parms, str_buf);
3857 strcat(
l1_input->input_parms,
"\n");
3860 sprintf(str_buf,
"raman_opt = %d",
input->raman_opt);
3861 strcat(
l1_input->input_parms, str_buf);
3862 strcat(
l1_input->input_parms,
"\n");
3864 sprintf(str_buf,
"width = %d",
input->width);
3865 strcat(
l1_input->input_parms, str_buf);
3866 strcat(
l1_input->input_parms,
"\n");
3868 sprintf(str_buf,
"threshold = %8.4f",
input->threshold);
3869 strcat(
l1_input->input_parms, str_buf);
3870 strcat(
l1_input->input_parms,
"\n");
3872 sprintf(str_buf,
"rgb = %d",
input->rgb[0]);
3873 strcat(
l1_input->input_parms, str_buf);
3874 for (
i = 1;
i < 3;
i++) {
3875 sprintf(str_buf,
", %d",
input->rgb[
i]);
3876 strcat(
l1_input->input_parms, str_buf);
3878 strcat(
l1_input->input_parms,
"\n");
3880 sprintf(str_buf,
"subsamp = %d",
input->subsamp);
3881 strcat(
l1_input->input_parms, str_buf);
3882 strcat(
l1_input->input_parms,
"\n");
3884 sprintf(str_buf,
"viirsnv7 = %d",
input->viirsnv7);
3885 strcat(
l1_input->input_parms, str_buf);
3886 strcat(
l1_input->input_parms,
"\n");
3888 sprintf(str_buf,
"viirsnosisaf = %d",
input->viirsnosisaf);
3889 strcat(
l1_input->input_parms, str_buf);
3890 strcat(
l1_input->input_parms,
"\n");
3892 sprintf(str_buf,
"sstrefdif = %8.4f",
input->sstrefdif);
3893 strcat(
l1_input->input_parms, str_buf);
3894 strcat(
l1_input->input_parms,
"\n");
3896 sprintf(str_buf,
"water_spectra_file = %s",
input->water_spectra_file);
3897 strcat(
l1_input->input_parms, str_buf);
3898 strcat(
l1_input->input_parms,
"\n");
3900 sprintf(str_buf,
"sstreftype = %d",
input->sstreftype);
3901 strcat(
l1_input->input_parms, str_buf);
3902 strcat(
l1_input->input_parms,
"\n");
3904 sprintf(str_buf,
"bpar_validate_opt = %d",
input->bpar_validate_opt);
3905 strcat(
l1_input->input_parms, str_buf);
3906 strcat(
l1_input->input_parms,
"\n");
3908 sprintf(str_buf,
"bpar_elev_opt = %d",
input->bpar_elev_opt);
3909 strcat(
l1_input->input_parms, str_buf);
3910 strcat(
l1_input->input_parms,
"\n");
3912 sprintf(str_buf,
"bpar_elev_value = %8.5f",
input->bpar_elev_value);
3913 strcat(
l1_input->input_parms, str_buf);
3914 strcat(
l1_input->input_parms,
"\n");
3916 sprintf(str_buf,
"cloud_hgt_file = %s",
input->cloud_hgt_file);
3917 strcat(
l1_input->input_parms, str_buf);
3918 strcat(
l1_input->input_parms,
"\n");
3927 if (
input->ifile[
i][0] !=
'\0') {
3928 tmp_str = strrchr(
input->ifile[
i],
'/');
3929 tmp_str = (tmp_str == 0x0) ?
input->ifile[
i] : tmp_str + 1;
3930 if (
i == 0) sprintf(
l1_input->input_files,
"%s", tmp_str);
3932 sprintf(str_buf,
",%s", tmp_str);
3933 strcat(
l1_input->input_files, str_buf);
3937 if (strlen(
input->geofile)) {
3938 tmp_str = strrchr(
input->geofile,
'/');
3939 tmp_str = (tmp_str == 0x0) ?
input->geofile : tmp_str + 1;
3940 sprintf(str_buf,
",%s", tmp_str);
3941 strcat(
l1_input->input_files, str_buf);
3943 if (strlen(
input->gmpfile)) {
3944 tmp_str = strrchr(
input->gmpfile,
'/');
3945 tmp_str = (tmp_str == 0x0) ?
input->gmpfile : tmp_str + 1;
3946 sprintf(str_buf,
",%s", tmp_str);
3947 strcat(
l1_input->input_files, str_buf);
3949 if (strlen(
input->met1)) {
3950 tmp_str = strrchr(
input->met1,
'/');
3951 tmp_str = (tmp_str == 0x0) ?
input->met1 : tmp_str + 1;
3952 sprintf(str_buf,
",%s", tmp_str);
3953 strcat(
l1_input->input_files, str_buf);
3955 if (strlen(
input->met2)) {
3956 tmp_str = strrchr(
input->met2,
'/');
3957 tmp_str = (tmp_str == 0x0) ?
input->met2 : tmp_str + 1;
3958 sprintf(str_buf,
",%s", tmp_str);
3959 strcat(
l1_input->input_files, str_buf);
3961 if (strlen(
input->met3)) {
3962 tmp_str = strrchr(
input->met3,
'/');
3963 tmp_str = (tmp_str == 0x0) ?
input->met3 : tmp_str + 1;
3964 sprintf(str_buf,
",%s", tmp_str);
3965 strcat(
l1_input->input_files, str_buf);
3967 if (strlen(
input->ozone1)) {
3968 tmp_str = strrchr(
input->ozone1,
'/');
3969 tmp_str = (tmp_str == 0x0) ?
input->ozone1 : tmp_str + 1;
3970 sprintf(str_buf,
",%s", tmp_str);
3971 strcat(
l1_input->input_files, str_buf);
3973 if (strlen(
input->ozone2)) {
3974 tmp_str = strrchr(
input->ozone2,
'/');
3975 tmp_str = (tmp_str == 0x0) ?
input->ozone2 : tmp_str + 1;
3976 sprintf(str_buf,
",%s", tmp_str);
3977 strcat(
l1_input->input_files, str_buf);
3979 if (strlen(
input->ozone3)) {
3980 tmp_str = strrchr(
input->ozone3,
'/');
3981 tmp_str = (tmp_str == 0x0) ?
input->ozone3 : tmp_str + 1;
3982 sprintf(str_buf,
",%s", tmp_str);
3983 strcat(
l1_input->input_files, str_buf);
3985 if (strlen(
input->anc_profile1)) {
3986 tmp_str = strrchr(
input->anc_profile1,
'/');
3987 tmp_str = (tmp_str == 0x0) ?
input->anc_profile1 : tmp_str + 1;
3988 sprintf(str_buf,
",%s", tmp_str);
3989 strcat(
l1_input->input_files, str_buf);
3991 if (strlen(
input->anc_profile2)) {
3992 tmp_str = strrchr(
input->anc_profile2,
'/');
3993 tmp_str = (tmp_str == 0x0) ?
input->anc_profile2 : tmp_str + 1;
3994 sprintf(str_buf,
",%s", tmp_str);
3995 strcat(
l1_input->input_files, str_buf);
3997 if (strlen(
input->anc_profile3)) {
3998 tmp_str = strrchr(
input->anc_profile3,
'/');
3999 tmp_str = (tmp_str == 0x0) ?
input->anc_profile3 : tmp_str + 1;
4000 sprintf(str_buf,
",%s", tmp_str);
4001 strcat(
l1_input->input_files, str_buf);
4003 if (strlen(
input->anc_aerosol1)) {
4004 tmp_str = strrchr(
input->anc_aerosol1,
'/');
4005 tmp_str = (tmp_str == 0x0) ?
input->anc_aerosol1 : tmp_str + 1;
4006 sprintf(str_buf,
",%s", tmp_str);
4007 strcat(
l1_input->input_files, str_buf);
4009 if (strlen(
input->anc_aerosol2)) {
4010 tmp_str = strrchr(
input->anc_aerosol2,
'/');
4011 tmp_str = (tmp_str == 0x0) ?
input->anc_aerosol2 : tmp_str + 1;
4012 sprintf(str_buf,
",%s", tmp_str);
4013 strcat(
l1_input->input_files, str_buf);
4015 if (strlen(
input->anc_aerosol3)) {
4016 tmp_str = strrchr(
input->anc_aerosol3,
'/');
4017 tmp_str = (tmp_str == 0x0) ?
input->anc_aerosol3 : tmp_str + 1;
4018 sprintf(str_buf,
",%s", tmp_str);
4019 strcat(
l1_input->input_files, str_buf);
4021 if (strlen(
input->sfc_albedo)) {
4022 tmp_str = strrchr(
input->sfc_albedo,
'/');
4023 tmp_str = (tmp_str == 0x0) ?
input->sfc_albedo: tmp_str + 1;
4024 sprintf(str_buf,
",%s", tmp_str);
4025 strcat(
l1_input->input_files, str_buf);
4027 if (strlen(
input->anc_cor_file)) {
4028 tmp_str = strrchr(
input->anc_cor_file,
'/');
4029 tmp_str = (tmp_str == 0x0) ?
input->anc_cor_file : tmp_str + 1;
4030 sprintf(str_buf,
",%s", tmp_str);
4031 strcat(
l1_input->input_files, str_buf);
4033 if (strlen(
input->pixel_anc_file)) {
4034 tmp_str = strrchr(
input->pixel_anc_file,
'/');
4035 tmp_str = (tmp_str == 0x0) ?
input->pixel_anc_file : tmp_str + 1;
4036 sprintf(str_buf,
",%s", tmp_str);
4037 strcat(
l1_input->input_files, str_buf);
4039 if (strlen(
input->fqfile)) {
4040 tmp_str = strrchr(
input->fqfile,
'/');
4041 tmp_str = (tmp_str == 0x0) ?
input->fqfile : tmp_str + 1;
4042 sprintf(str_buf,
",%s", tmp_str);
4043 strcat(
l1_input->input_files, str_buf);
4045 if (strlen(
input->parfile)) {
4046 tmp_str = strrchr(
input->parfile,
'/');
4047 tmp_str = (tmp_str == 0x0) ?
input->parfile : tmp_str + 1;
4048 sprintf(str_buf,
",%s", tmp_str);
4049 strcat(
l1_input->input_files, str_buf);
4051 if (strlen(
input->polfile)) {
4052 tmp_str = strrchr(
input->polfile,
'/');
4053 tmp_str = (tmp_str == 0x0) ?
input->polfile : tmp_str + 1;
4054 sprintf(str_buf,
",%s", tmp_str);
4055 strcat(
l1_input->input_files, str_buf);
4057 if (strlen(
input->aermodfile)) {
4058 tmp_str = strrchr(
input->aermodfile,
'/');
4059 tmp_str = (tmp_str == 0x0) ?
input->aermodfile : tmp_str + 1;
4060 sprintf(str_buf,
",%s", tmp_str);
4061 strcat(
l1_input->input_files, str_buf);
4063 if (strlen(
input->vcnnfile)) {
4064 tmp_str = strrchr(
input->vcnnfile,
'/');
4065 tmp_str = (tmp_str == 0x0) ?
input->vcnnfile : tmp_str + 1;
4066 sprintf(str_buf,
",%s", tmp_str);
4067 strcat(
l1_input->input_files, str_buf);
4069 if (strlen(
input->land)) {
4070 tmp_str = strrchr(
input->land,
'/');
4071 tmp_str = (tmp_str == 0x0) ?
input->land : tmp_str + 1;
4072 sprintf(str_buf,
",%s", tmp_str);
4073 strcat(
l1_input->input_files, str_buf);
4075 if (strlen(
input->water)) {
4076 tmp_str = strrchr(
input->water,
'/');
4077 tmp_str = (tmp_str == 0x0) ?
input->water : tmp_str + 1;
4078 sprintf(str_buf,
",%s", tmp_str);
4079 strcat(
l1_input->input_files, str_buf);
4081 if (strlen(
input->demfile)) {
4082 tmp_str = strrchr(
input->demfile,
'/');
4083 tmp_str = (tmp_str == 0x0) ?
input->demfile : tmp_str + 1;
4084 sprintf(str_buf,
",%s", tmp_str);
4085 strcat(
l1_input->input_files, str_buf);
4088 if (strlen(
input->dem_auxfile)) {
4089 tmp_str = strrchr(
input->dem_auxfile,
'/');
4090 tmp_str = (tmp_str == 0x0) ?
input->dem_auxfile : tmp_str + 1;
4091 sprintf(str_buf,
",%s", tmp_str);
4092 strcat(
l1_input->input_files, str_buf);
4094 if (strlen(
input->mldfile)) {
4095 tmp_str = strrchr(
input->mldfile,
'/');
4096 tmp_str = (tmp_str == 0x0) ?
input->mldfile : tmp_str + 1;
4097 sprintf(str_buf,
",%s", tmp_str);
4098 strcat(
l1_input->input_files, str_buf);
4100 if (strlen(
input->icefile)) {
4101 tmp_str = strrchr(
input->icefile,
'/');
4102 tmp_str = (tmp_str == 0x0) ?
input->icefile : tmp_str + 1;
4103 sprintf(str_buf,
",%s", tmp_str);
4104 strcat(
l1_input->input_files, str_buf);
4106 if (strlen(
input->sstfile)) {
4107 tmp_str = strrchr(
input->sstfile,
'/');
4108 tmp_str = (tmp_str == 0x0) ?
input->sstfile : tmp_str + 1;
4109 sprintf(str_buf,
",%s", tmp_str);
4110 strcat(
l1_input->input_files, str_buf);
4113 if (strlen(
input->sssfile)) {
4114 tmp_str = strrchr(
input->sssfile,
'/');
4115 tmp_str = (tmp_str == 0x0) ?
input->sssfile : tmp_str + 1;
4116 sprintf(str_buf,
",%s", tmp_str);
4117 strcat(
l1_input->input_files, str_buf);
4119 if (strlen(
input->no2file)) {
4120 tmp_str = strrchr(
input->no2file,
'/');
4121 tmp_str = (tmp_str == 0x0) ?
input->no2file : tmp_str + 1;
4122 sprintf(str_buf,
",%s", tmp_str);
4123 strcat(
l1_input->input_files, str_buf);
4125 if (strlen(
input->alphafile)) {
4126 tmp_str = strrchr(
input->alphafile,
'/');
4127 tmp_str = (tmp_str == 0x0) ?
input->alphafile : tmp_str + 1;
4128 sprintf(str_buf,
",%s", tmp_str);
4129 strcat(
l1_input->input_files, str_buf);
4131 if (strlen(
input->tauafile)) {
4132 tmp_str = strrchr(
input->tauafile,
'/');
4133 tmp_str = (tmp_str == 0x0) ?
input->tauafile : tmp_str + 1;
4134 sprintf(str_buf,
",%s", tmp_str);
4135 strcat(
l1_input->input_files, str_buf);
4138 if (strlen(
input->picfile)) {
4139 tmp_str = strrchr(
input->picfile,
'/');
4140 tmp_str = (tmp_str == 0x0) ?
input->picfile : tmp_str + 1;
4141 sprintf(str_buf,
",%s", tmp_str);
4142 strcat(
l1_input->input_files, str_buf);
4144 if (strlen(
input->owmcfile)) {
4145 tmp_str = strrchr(
input->owmcfile,
'/');
4146 tmp_str = (tmp_str == 0x0) ?
input->owmcfile : tmp_str + 1;
4147 sprintf(str_buf,
",%s", tmp_str);
4148 strcat(
l1_input->input_files, str_buf);
4150 if (strlen(
input->water_spectra_file)) {
4151 tmp_str = strrchr(
input->water_spectra_file,
'/');
4152 tmp_str = (tmp_str == 0x0) ?
input->water_spectra_file : tmp_str + 1;
4153 sprintf(str_buf,
",%s", tmp_str);
4154 strcat(
l1_input->input_files, str_buf);
4157 if (strlen(
input->cloud_hgt_file)) {
4158 tmp_str = strrchr(
input->cloud_hgt_file,
'/');
4159 tmp_str = (tmp_str == 0x0) ?
input->cloud_hgt_file : tmp_str + 1;
4160 sprintf(str_buf,
",%s", tmp_str);
4161 strcat(
l1_input->input_files, str_buf);
4170 if (
l1_input->landmask == 1) strcat(
input->mask_names,
",LAND");
4171 if (
l1_input->bathmask == 1) strcat(
input->mask_names,
",COASTZ");
4172 if (
l1_input->cloudmask == 1) strcat(
input->mask_names,
",CLDICE");
4173 if (
l1_input->glintmask == 1) strcat(
input->mask_names,
",HIGLINT");
4174 if (
l1_input->sunzenmask == 1) strcat(
input->mask_names,
",HISOLZEN");
4175 if (
l1_input->satzenmask == 1) strcat(
input->mask_names,
",HISATZEN");
4176 if (
l1_input->hiltmask == 1) strcat(
input->mask_names,
",HILT");
4177 if (
l1_input->stlightmask == 1) strcat(
input->mask_names,
",STRAYLIGHT");
4228 static char resolutionStr[FILENAME_MAX];
4229 static char ifileStr[FILENAME_MAX];
4230 static char geofileStr[FILENAME_MAX];
4232 argv[argc++] =
"msl12";
4234 sprintf(ifileStr,
"ifile=%s",
l1file->name);
4235 argv[argc++] = ifileStr;
4238 sprintf(geofileStr,
"geofile=%s",
l1file->geofile);
4239 argv[argc++] = geofileStr;
4244 sprintf(resolutionStr,
"resolution=%d",
l1_input->resolution);
4245 argv[argc++] = resolutionStr;