22 #include <gsl/gsl_interp.h>
23 #include <gsl/gsl_filter.h>
24 #include <gsl/gsl_vector.h>
25 #include <gsl/gsl_statistics.h>
30 static int32_t LastRecNum = -1;
33 static int nAcoeff = 299;
34 static int nreps = 100;
35 static char *pignames[13] = {
"tchla",
"zea",
"dvchla",
"butfuco",
"hexfuco",
"allo",
36 "mvchlb",
"neo",
"viola",
"fuco",
"chlc12",
"chlc3",
"perid"};
39 static int16 *sdpflags;
41 static float *pigArr_unc;
43 static float *mRrs_out;
44 static float *Rrs_diff_out;
45 static float *d2Rrs_out;
54 static int nfitbands = 56;
55 static float fitbands[56] = {400,405,410,415,420,425,430,435,440,445,450,455,460,465,470,475,
56 480,485,490,495,500,505,510,515,520,525,530,535,540,545,550,555,
57 560,565,570,575,580,585,590,595,600,605,610,615,620,625,630,635,
58 640,645,650,655,660,665,670,675};
61 void sdp_qssa(
double *
p,
double *mrrs_s,
int m,
int n,
void *
data);
83 static int firstCall = 1;
87 static float *Atab, *Btab;
88 static float *dAtab, *dBtab;
98 if ((filedir = getenv(
"OCDATAROOT")) ==
NULL) {
99 printf(
"-E- %s: OCDATAROOT env variable undefined.\n", __FILE__);
103 strcat(
filename,
"/common/aph_kramer_2022.txt");
104 printf(
"Reading aph* for sdp model from %s.\n",
filename);
109 printf(
"-E- %s line %d: error opening (%s) file", __FILE__, __LINE__,
filename);
117 wtab = &
table[nrow * 0];
118 Atab = &
table[nrow * 1];
119 Btab = &
table[nrow * 2];
122 if ((dAtab = (
float*) calloc(ntab,
sizeof (
float))) ==
NULL) {
123 printf(
"-E- %s line %d : error allocating memory for Kramer aph.\n",
127 if ((dBtab = (
float*) calloc(ntab,
sizeof (
float))) ==
NULL) {
128 printf(
"-E- %s line %d : error allocating memory for Kramer aph.\n",
132 spline(wtab, Atab, ntab, 1e30, 1e30, dAtab);
133 spline(wtab, Btab, ntab, 1e30, 1e30, dBtab);
138 if (wave > wtab[ntab - 1]){
139 wave = wtab[ntab - 1];
143 splint(wtab, Atab, dAtab, ntab, wave,
A);
144 splint(wtab, Btab, dBtab, ntab, wave,
B);
156 static int firstCall = 1;
158 int32_t
status, netcdf_input;
160 int ncid, grpid, varid1, varid2, dimid ;
172 if ((filedir = getenv(
"OCDATAROOT")) ==
NULL) {
173 printf(
"-E- %s: OCDATAROOT env variable undefined.\n", __FILE__);
178 strcat(
filename,
"/common/sdp_pure_water.nc");
179 printf(
"Reading SDP pure water coefficients from %s.\n",
filename);
183 printf(
"-E- %s: SDP pure water coefficient file '%s' does not exist or cannot open.\n",
190 netcdf_input = (
status == NC_NOERR);
195 if ((nc_inq_ncid(ncid,
"water_absorption", &grpid)) == NC_NOERR) {
198 nc_inq_dimid(grpid,
"n_wavelength", &dimid);
199 nc_inq_dimlen(grpid, dimid, &nlam);
207 nc_inq_varid(grpid,
"aw", &varid1);
208 nc_get_var_float(grpid, varid1, atab);
210 nc_inq_varid(grpid,
"wavelength", &varid2);
211 nc_get_var_float(grpid, varid2, wtab);
216 spline(wtab, atab, nlam, 1e30, 1e30, dAtab);
223 if (wave > wtab[ntab - 1]){
224 wave = wtab[ntab - 1];
228 splint(wtab, atab, dAtab, ntab, wave,
A);
247 static int firstCall = 1;
249 int32_t
i,
status, netcdf_input;
250 int ncid, varidA, varidC, grpidA, grpidC;
260 if ((filedir = getenv(
"OCDATAROOT")) ==
NULL) {
261 printf(
"-E- %s: OCDATAROOT env variable undefined.\n", __FILE__);
266 strcat(
filename,
"/common/sdp_AC_coeffs_all.nc");
267 printf(
"Reading SDP model coefficients from %s.\n",
filename);
271 printf(
"-E- %s: SDP coefficient file '%s' does not exist or cannot open.\n",
278 netcdf_input = (
status == NC_NOERR);
282 for (
i=0;
i<npig;
i++) {
285 strncat(varNameA,pigments[
i],16);
287 strncat(varNameC,pigments[
i],16);
290 if ((nc_inq_ncid(ncid,
"A_coeff", &grpidA)) == NC_NOERR) {
291 if ((nc_inq_varid(grpidA, varNameA, &varidA)) == NC_NOERR) {
293 nc_get_var_double(grpidA, varidA,
A[
i]);
297 if (( nc_inq_ncid(ncid,
"C_coeff", &grpidC)) == NC_NOERR) {
298 if ((nc_inq_varid(grpidC, varNameC, &varidC)) == NC_NOERR) {
299 nc_get_var_double(grpidC, varidC,
C[
i]);
333 xd = (
double*)calloc(n,
sizeof(
double));
334 yd = (
double*)calloc(n,
sizeof(
double));
336 gsl_interp *interp_work;
338 for (iw=0; iw < n; iw++) {
344 interp_work = gsl_interp_alloc(gsl_interp_linear, m);
345 gsl_interp_init(interp_work, xd, yd, m);
347 for (iw=0; iw < n; iw++) {
348 yinterp[iw] = (
float) gsl_interp_eval(interp_work, xd, yd, (
double) xinterp[iw],
NULL);
351 gsl_interp_free(interp_work);
367 if(window % 2 == 0) {
368 printf(
"-E- %s line %d : mean moving average filter window must be odd value.\n",
373 halfwin = (window-1)/2;
375 for (iw=0; iw< n; iw++) {
379 }
else if (iw >= halfwin) {
382 for (
ih=0;
ih<window;
ih++) {
402 gsl_filter_median_workspace *medfilt;
403 medfilt = gsl_filter_median_alloc(window);
405 gsl_vector *yin = gsl_vector_alloc(n);
406 gsl_vector *yout = gsl_vector_alloc(n);
408 for (iw=0; iw<n; iw++) {
409 gsl_vector_set(yin, iw,
y[iw]);
410 gsl_vector_set(yout, iw, 0.0);
413 success= gsl_filter_median(GSL_FILTER_END_PADVALUE, yin, yout, medfilt);
415 for (iw=0; iw<n; iw++) {
416 temp = gsl_vector_get(yout, iw) ;
421 gsl_filter_median_free(medfilt);
422 gsl_vector_free(yin);
423 gsl_vector_free(yout);
441 for (
i=1;
i<=n-1;
i++) {
444 d1 = (
y[
i] -
y[
i-1]) /(
x[
i]-
x[
i-1]);
448 deriv2[
i] = (d2 - d1)/ ((
x[
i+1] -
x[
i-1])/2.);
468 sdpstr *
s = ((sdpstr *)
data);
471 double atot, bbtot,
u;
472 double aph, adg, bbp;
474 for (iw = 0; iw < n; iw++) {
477 aph =
s->aphA[iw]*pow(
p[0],
s->aphB[iw]);
478 adg =
p[1]*
s->adgstar[iw];
479 bbp =
p[2]*
s->bbpstar[iw];
480 atot =
s->aw[iw] + aph + adg;
481 bbtot =
s->bbw[iw] + bbp;
484 u = bbtot/(atot + bbtot);
485 mrrs_s[iw] = (
s->g[0] +
s->g[1]*
u)*
u;
499 sdpstr *
s = ((sdpstr *)
data);
502 double atot, bbtot,
u;
503 double aph, adg, bbp;
505 for (iw = 0; iw < n; iw++) {
508 aph =
s->faphA[iw]*pow(
p[0],
s->faphB[iw]);
509 adg =
p[1]*
s->fadgstar[iw];
510 bbp =
p[2]*
s->fbbpstar[iw];
511 atot =
s->faw[iw] + aph + adg;
512 bbtot =
s->fbbw[iw] + bbp;
514 u = bbtot/(atot + bbtot);
515 mrrs_s[iw] = (
s->g[0] +
s->g[1]*
u)*
u;
531 for (iw = 0; iw <
s->nfitbands; iw++) {
533 s->adgstar[iw] = exp((
s->bands[iw] -
s->bands[
s->i440])*
s->adg_s);
537 for (iw = 0; iw <
s->nfbands; iw++) {
539 s->fadgstar[iw] = exp((
s->fbands[iw] -
s->fbands[
s->i440f])*
s->adg_s);
544 "-E- %s, %d: Spectral Derivative Pigment adgstar "
545 "model invalid input option value\n",
564 for (iw = 0; iw <
s->nfitbands; iw++) {
566 s->bbpstar[iw] = pow((
s->bands[iw]/
s->bands[
s->i440] ),
s->bbp_s);
570 for (iw = 0; iw <
s->nfbands; iw++) {
572 s->fbbpstar[iw] = pow((
s->fbands[iw]/
s->fbands[
s->i440f] ),
s->bbp_s);
577 "-E- %s, %d: Spectral Derivative Pigment bbpstar "
578 "model invalid input option value\n",
596 sdpstr *
s = ((sdpstr *)
data);
599 double atot, bbtot, aph, adg, bbp,
u;
605 for (
i=
j=0;
i< m;
i++) {
607 aph =
s->aphA[
i]*pow(
p[0],
s->aphB[
i]);
608 adg =
p[1] *
s->adgstar[
i];
609 bbp =
p[2] *
s->bbpstar[
i];
610 atot =
s->aw[
i] + aph + adg;
611 bbtot =
s->bbw[
i] + bbp;
613 u = bbtot/(atot + bbtot);
617 drdchl = -(
s->g[0] + 2.*
s->g[1]*
u)*(bbtot*
A*
B*pow(
p[0],(
B-1.))) / pow( bbtot + atot,2.);
618 drdadg = -(
s->g[0] + 2.*
s->g[1]*
u)*(bbtot*
s->adgstar[
i])/ pow( bbtot + atot, 2.);
619 drdbbp = (
s->g[0] + 2.*
s->g[1]*
u)*(atot*
s->bbpstar[
i]) / pow( bbtot + atot, 2.);
639 double p[3] = {0.01, 0.1, 0.0005};
640 double info[LM_INFO_SZ];
641 double opts[LM_OPTS_SZ];
644 rrs_s = (
double *) calloc(
s->nfitbands, sizeof (
double));
647 for (iw=0;iw<
s->nfree;iw++){
652 for (iw = 0; iw <
s->nfitbands; iw++) {
653 rrs_s[iw] =
s->Rrs_a[iw]/(0.52 + 1.7*
s->Rrs_a[iw]);
657 s->bbp_s = 2.0 * (1.0 - 1.2 * expf(-0.9 * (rrs_s[
s->i440]/rrs_s[
s->i555])));
660 s->adg_s = -(0.01447 + 0.00033*
s->Rrs_a[
s->i490]/
s->Rrs_a[
s->i555]);
682 for (iw=0;iw<
s->nfree;iw++){
701 int bit_position[6] = {1,2,4,9,10,31};
706 for (
i=0;
i<nflag;
i++) {
707 if (l2rec->l1rec->flags[ip] & (1<<bit_position[
i])) {
724 if (pigvalue < pigmin || pigvalue > pigmax) {
781 static void extract_band_3d(
float *in_buf,
float *out_buf,
int numPixels,
int numBands) {
782 float * out_ptr = out_buf;
783 for (
int pix = 0; pix < numPixels; pix++) {
784 float *in_ptr = in_buf + pix * numBands;
785 for (
int band_3d = 0; band_3d <
input->nwavelengths_3d; band_3d++) {
786 int band =
input->wavelength_3d_index[band_3d];
787 *out_ptr = in_ptr[
band];
802 static int firstCall = 1;
804 static sdpstr sdpdata;
805 static sdpstr*
s = &sdpdata;
807 int iw, iwx, ig, ip, irep, ipb, iwxf;
808 int i400, i700, badrrs;
810 float finewave = 1.0;
816 l1str *
l1rec = l2rec->l1rec;
821 static float *vbands;
822 static double *fmrrs_s;
823 static float *fmRrs_a;
824 static float *RrsDiff;
825 static float *deriv2;
826 static float *fRrs_a;
827 static float *fsmthRrs_a;
829 static double *pigtempArr;
836 switch (
l1rec->l1file->sensorID) {
847 "-E- %s, %d: Spectral Derivative Pigment model only applicable to hypersectral data\n",
856 s->nvbands = i700 - i400 + 1;
857 s->nfitbands = nfitbands;
858 s->nfbands = (705 - 395 + 1)/finewave;
861 if ((pigArr =(
float *) calloc(
npix * npig,
sizeof (
float))) ==
NULL) {
862 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
866 if ((pigArr_unc =(
float *) calloc(
npix * npig,
sizeof (
float))) ==
NULL) {
867 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
873 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
877 if ((vbands = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
878 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
882 if ((
s->g = (
float *) calloc(2,
sizeof (
float))) ==
NULL) {
883 printf(
"-E- %s line %d : error allocating memory in init_iop_flag.\n",
887 if ((
s->bindx = (
int *) calloc(
s->nvbands, sizeof (
int))) ==
NULL) {
888 printf(
"-E- %s line %d : error allocating memory in init_iop_flag.\n",
892 if ((
s->fbindx = (
int *) calloc(nfitbands,
sizeof (
int))) ==
NULL) {
893 printf(
"-E- %s line %d : error allocating memory in init_iop_flag.\n",
897 if ((
s->bands = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
898 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
902 if ((
s->fbands = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
903 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
907 if ((
s->aw = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
908 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
912 if ((
s->bbw = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
913 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
917 if ((
s->aphA = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
918 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
922 if ((
s->aphB = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
923 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
927 if ((
s->faw = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
928 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
932 if ((
s->fbbw = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
933 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
937 if ((
s->faphA = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
938 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
942 if ((
s->faphB = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
943 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
947 if ((
s->adgstar = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
948 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
952 if ((
s->bbpstar = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
953 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
957 if ((
s->fadgstar = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
958 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
962 if ((
s->fbbpstar = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
963 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
967 if ((
s->Rrs_a = (
float *) calloc(
s->nvbands, sizeof (
float))) ==
NULL) {
968 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
972 if ((
s->popt = (
double*) calloc(
s->nfree, sizeof (
double))) ==
NULL) {
973 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
977 if ((
s->popt = (
double*) calloc(
s->nfree, sizeof (
double))) ==
NULL) {
978 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
982 if ((pigtempArr = (
double*) calloc(nreps,
sizeof (
double))) ==
NULL) {
983 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
988 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
992 if ((Rrs_diff_out = calloc(
npix *
nbands,
sizeof (
float))) ==
NULL) {
993 printf(
"-E- %s line %d : errorn allocating memory for SDP.\n",
997 if ((d2Rrs_out = calloc(
npix *
nbands,
sizeof (
float))) ==
NULL) {
998 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1012 for (iw = 0; iw <
s->nfitbands; iw++) {
1019 for (iw=0; iw<
s->nfitbands; iw++) {
1022 s->bands[iw] =
bands[
s->bindx[iw]];
1033 for (iw=0;iw<
s->nfbands;iw++) {
1038 s->fbands[iw] +=
s->fbands[iw -1] + 1;
1049 for (iw = 0; iw <
s->nfitbands; iw++) {
1050 iwxf =
windex(fitbands[iw],
s->fbands,
s->nfbands);
1051 s->fbindx[iw] = iwxf;
1055 s->i440 =
windex(440,
s->bands,
s->nvbands);
1056 s->i490 =
windex(490,
s->bands,
s->nvbands);
1057 s->i555 =
windex(550,
s->bands,
s->nvbands);
1058 s->i440f =
windex(440,
s->fbands,
s->nfbands);
1070 if ((fmrrs_s = (
double *) calloc(
s->nfbands, sizeof (
double))) ==
NULL) {
1071 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1072 __FILE__, __LINE__);
1075 if ((Rrs_a = (
float *) calloc(
nbands,
sizeof (
float))) ==
NULL) {
1076 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1077 __FILE__, __LINE__);
1080 if ((fRrs_a = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
1081 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1082 __FILE__, __LINE__);
1085 if ((fsmthRrs_a = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
1086 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1087 __FILE__, __LINE__);
1090 if ((fmRrs_a = (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
1091 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1092 __FILE__, __LINE__);
1095 if ((RrsDiff= (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
1096 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1097 __FILE__, __LINE__);
1100 if ((deriv2= (
float *) calloc(
s->nfbands, sizeof (
float))) ==
NULL) {
1101 printf(
"-E- %s line %d : error allocating memory for SDP.\n",
1102 __FILE__, __LINE__);
1109 for (ip=0; ip <
npix; ip++) {
1113 for (ig=0; ig < npig; ig++) {
1114 pigArr[ip*npig + ig] =
BAD_FLT;
1115 pigArr_unc[ip*npig + ig] =
BAD_FLT;
1118 for (iw=0;iw<
nbands;iw++){
1129 for (ip = 0; ip<
l1rec->npix; ip++) {
1131 ipb = ip*
l1rec->l1file->nbands;
1133 for (iw=0;iw<
nbands;iw++){
1134 Rrs_a[iw] = l2rec->Rrs[ipb + iw];
1149 for (iw = 0; iw <
s->nfitbands; iw++) {
1157 s->bbw[iw] =
l1rec->sw_bb[ipb +
s->bindx[iw]];
1160 s->Rrs_a[iw] = fsmthRrs_a[
s->fbindx[iw]];
1169 for (iw = 0; iw <
s->nfbands; iw++) {
1171 l1rec->sssref[ip], 0.039);
1177 l2rec->l1rec->flags[ip] |=
PRODFAIL;
1191 for (iw=0;iw<
s->nfbands;iw++) {
1192 fmRrs_a[iw] = (0.52 * fmrrs_s[iw]) / (1.0 - 1.7 * fmrrs_s[iw]);
1193 RrsDiff[iw] = fsmthRrs_a[iw] - fmRrs_a[iw];
1201 for (ig=0;ig<npig;ig++){
1206 for (irep=0;irep<nreps;irep++) {
1210 pigtempArr[irep] = 0.0;
1212 for (iw=0;iw<nAcoeff;iw++) {
1216 pigtemp += deriv2[iw+6] *
s->Acoeff[ig][irep*nAcoeff + iw];
1220 pigtempArr[irep] = pigtemp +
s->Ccoeff[ig][irep];
1225 pigtemp_med = gsl_stats_median(pigtempArr,1, nreps);
1226 pigtemp_std = sqrt(gsl_stats_variance(pigtempArr, 1, nreps));
1231 pigArr[ip*npig + ig] = pigtemp_med;
1232 pigArr_unc[ip*npig + ig] = pigtemp_std;
1237 for (iw = 0; iw <
nbands; iw++) {
1239 band_temp =
bands[iw];
1240 iwx =
windex(band_temp,
s->fbands,
s->nfbands);
1242 if (band_temp > 400 && band_temp < 700) {
1243 mRrs_out[ip*
nbands + iw] = fmRrs_a[iwx];
1244 Rrs_diff_out[ip*
nbands + iw] = RrsDiff[iwx];
1245 d2Rrs_out[ip*
nbands + iw] = deriv2[iwx];
1257 LastRecNum =
l1rec->iscan;
1273 void get_sdp(l2str *l2rec, l2prodstr *
p,
float prod[]) {
1275 l1str *
l1rec = l2rec->l1rec;
1276 int ib =
p->prod_ix;
1278 int32_t ip, ipg, ipb;
1279 int32_t
npix = l2rec->l1rec->npix;
1288 switch (
p->cat_ix) {
1291 extract_band_3d( mRrs_out, prod, l2rec->l1rec->npix, l2rec->l1rec->l1file->nbands);
1294 extract_band_3d( Rrs_diff_out, prod, l2rec->l1rec->npix, l2rec->l1rec->l1file->nbands);
1297 extract_band_3d( d2Rrs_out, prod, l2rec->l1rec->npix, l2rec->l1rec->l1file->nbands);
1304 for (ip = 0; ip <
npix; ip++) {
1307 ipb = ip *
l1rec->l1file->nbands + ib;
1309 switch (
p->cat_ix) {
1311 prod[ip] = (
float) pigArr[ipg ];
1314 prod[ip] = (
float) pigArr[ipg + 1];
1317 prod[ip] = (
float) pigArr[ipg + 2];
1320 prod[ip] = (
float) pigArr[ipg + 3];
1323 prod[ip] = (
float) pigArr[ipg + 4];
1326 prod[ip] = (
float) pigArr[ipg+ 5];
1329 prod[ip] = (
float) pigArr[ipg + 6];
1332 prod[ip] = (
float) pigArr[ipg + 7];
1335 prod[ip] = (
float) pigArr[ipg+ 8];
1338 prod[ip] = (
float) pigArr[ipg+ 9];
1341 prod[ip] = (
float) pigArr[ipg + 10];
1344 prod[ip] = (
float) pigArr[ipg + 11];
1347 prod[ip] = (
float) pigArr[ipg + 12];
1350 prod[ip] = sdpflags[ip];
1353 prod[ip] = (
float) mRrs_out[ipb];
1356 prod[ip] = (
float) Rrs_diff_out[ipb];
1359 prod[ip] = (
float) d2Rrs_out[ipb];
1362 printf(
"Error: %s : Unknown product specifier: %d\n", __FILE__,
p->cat_ix);