OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_atrem_cor3.c
Go to the documentation of this file.
1 /*
2  * get_atrem_cor2.c
3  *
4  * Created on: Feb 19, 2015
5  * Author: rhealy
6  *
7  * * Notes about water vapor VMRS and related quantities: *
8  * *
9  * VAPVRT(60) - a table containing 60 column vapor values (in unit of cm) *
10  * *
11  * VAP_SLANT(I) = VAPVRT(I) * 2.0, VAP_SLANT is a new table for containing *
12  * two-way total vapor amounts. Here the number "2" can be *
13  * changed to other numbers, e.g., 2.5, without major *
14  * effects on retrieved water vapor values. *
15  * *
16  * G_VAP(I = 1,..., NL) = true vapor geometric factor for each layer in *
17  * the model atmosphere (after adjusting for the elevated *
18  * surface. *
19  * *
20  * VMRM(I) = VMRM(I)*G_VAP(I). The VMRS are multiplied by the geometrical *
21  * factor. We can calculate the vapor transmittance on the *
22  * Sun-surface-sensor path by assuming a vertical path in *
23  * the model atmosphere with geometric-factor-adjusted VMRS. *
24  * *
25  * CLMVAP = vertical column amount from ground to space in model atmosphere*
26  * CLMVAPP = vertical column amount from ground to aircraft or satellite *
27  * sensor in model atmosphere *
28  * Q = 2.152E25 = # of molecules above the surface at one atmosphere *
29  * (in unit of molecules/cm**2) *
30  * *
31  * VAP_SLANT_MDL= CLMVAP/COS(SOLZNI) + CLMVAPP/COS(OBSZNI) = total amount *
32  * of water vapor in the model atmosphere in the L-shaped *
33  * Sun-surface-plane ray path. *
34  * *
35  * G_VAP_EQUIV = VAP_SLANT_MDL / CLMVAP = the "equivalent" geometrical *
36  * factor corresponding to the total slant vapor amount *
37  * VAP_SLANT_MDL and the column vapor amount CLMVAP. *
38  * *
39  * SSH2O(I) (I = 1, ..., 60) - a pure scaling factor relative to the total *
40  * slant vapor amount of VAP_SLANT_MDL, and *
41  * SSH2O(I) = VAP_SLANT(I) / VAP_SLANT_MDL *
42  * *
43  * SH2O = one value of SSH2O(I). SH2O is used during generation of the *
44  * look-up table. *
45  * *
46  * VAPTT = VAP_SLANT_MDL*SH2O, is the absolute total vapor amount on the *
47  * L-shaped path corresponding to a spectrum stored in the *
48  * look-up table. *
49  * *
50  * CLMWVP = 0.5*(VAPTTA+VAPTTB)/G_VAP_EQUIV, is the retrieved column water *
51  * vapor amount from imaging spectrometer data. *
52  ********************************************************************************
53  *
54  */
55 
56 /* compile this code with:
57  gcc -O1 -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8 -o get_atrem_cor3 \
58  get_atrem_cor3.c atrem_app_refl_plus_gas_removal_for_l2gen3.o cubeio.o \
59  tpvmr_init.o solar_irr_PC.o bndprms.o -lgfortran \
60  -L/disk01/home/rhealy/ocssw/build/cbuild/src/libgenutils -lgenutils \
61  -L/disk01/home/rhealy/ocssw/build/lib3/src/netcdf/netcdf-fortran-4.2/fortran/.libs \
62  -lnetcdff -L/disk01/home/rhealy/ocssw/build/lib3/src/netcdf/netcdf-4.3.1.1/liblib/.libs -lnetcdf \
63  -L/disk01/home/rhealy/ocssw/build/lib3/src/hdf5/hdf5-1.8.10-patch1/src/.libs -lhdf5 \
64  -L/disk01/home/rhealy/ocssw/build/lib3/src/hdf5/hdf5-1.8.10-patch1/hl/src/.libs -lhdf5_hl \
65  -L/disk01/home/rhealy/ocssw/build/lib3/src/netcdf/netcdf-4.3.1.1/libsrc4/.libs -lnetcdf4 -lz \
66  -L/disk01/home/rhealy/ocssw/build/lib3/src/hdf5/hdf5-1.8.10-patch1/src/.libs -lhdf5
67 
68  * compile fortran routines:
69  gfortran -malign-double -c atrem_app_refl_plus_gas_removal_for_l2gen2.f90 cubeio.f90 \
70  bndprms.f solar_irr_PC.f tpvmr_init.f
71 
72 ---- Previous version without netcdf -----
73 
74  gcc -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8 -o get_atrem_cor \
75  get_atrem_cor.c atrem_app_refl_plus_gas_removal_for_l2gen.o cubeio.o \
76  tpvmr_init.o solar_irr_PC.o bndprms.o -lgfortran -L/disk01/home/rhealy/ocssw/build/cbuild/src/libgenutils -lgenutils
77  *
78  * compile fortran routines:
79  gfortran -malign-double -I/disk01/home/rhealy/ocssw/build/lib3/src/netcdf/netcdf-fortran-4.2/fortran -c atrem_app_refl_plus_gas_removal_for_l2gen3.f90 cubeio.f90 \
80  bndprms.f solar_irr_PC.f tpvmr_init.f
81 
82  Example:
83  get_atrem_cor2 < input/test_input.txt > cor2_test90b.out
84  */
85 #include "atrem_cor.h"
86 #define BUFSZ 100
87 
88 int main(int argc, char *argv[]) {
89 
90  FILE *fp;
91  char *fname;
92  char line[BUFSZ];
93  paramstr P;
94  double *YY;
95  int cnt = 0, i, j, k, l;
96  double start_time, tot_time = 0;
97 
98  // char *f_rad = "atrem_yy_pix2line3_before.txt";
99  char *f_rad = "atrem_yy_pix512line2000_before.txt";
100  if (argc == 2) {
101  f_rad = argv[1];
102  // }else{
103  // fprintf(stderr,"%s: Please supply a file name\n",argv[0]);
104  // exit(1);
105  }
106  // P.r0p94 = (float *) calloc(TBLMAX,sizeof(float));
107  // P.r1p14 = (float *) calloc(TBLMAX,sizeof(float));
108  // P.finst2 = (float *) calloc(FINSTMAX,sizeof(float));
109  // P.vaptot = (float *) calloc(TBLMAX,sizeof(float));
110  // P.trntbl = (float *) calloc(TBLMAX,sizeof(t_array));
111 
112  /* call fortran routines and transfer parameters over to C struct */
113  start_time = now();
114  printf("\nBegin get_atrem_cor processing at %s\n\n", ydhmsf(start_time, 'L'));
115 
116  get_input_();
117  printf("Processed get_input after %6.0f seconds\n", now() - start_time);
118  model_adj_();
119  printf("Processed model_adj after %6.0f seconds\n", now() - start_time);
120  geometry_();
121  printf("Processed geometry after %6.0f seconds\n", now() - start_time);
122  init_speccal_();
123  printf("Processed init_speccal after %6.0f seconds\n", now() - start_time);
124  solar_irr_pc_();
125  printf("Processed solar_irr_pc after %6.0f seconds\n", now() - start_time);
126  tran_table_();
127  printf("Processed tran_table after %6.0f seconds\n", now() - start_time);
128 
129  P.nb1 = getinput7_.nb1;
130  P.nb2 = getinput7_.nb2;
131  P.nb3 = getinput7_.nb3;
132  P.nb4 = getinput7_.nb4;
133  P.nbp94 = getinput7_.nbp94;
134  P.nb1p14 = getinput7_.nb1p14;
135  P.nh2o = init_speccal3_.nh2o;
136  P.nobs = getinput5_.nobs;
137  P.delta = getinput5_.dlt;
138  P.delta2 = getinput5_.dlt2;
139  P.start_ndx[0] = init_speccal6_.ist1 - 1;
140  P.start_ndx[1] = init_speccal6_.ist2 - 1;
141  P.end_ndx[0] = init_speccal6_.ied1 - 1;
142  P.end_ndx[1] = init_speccal6_.ied2 - 1;
143  P.start_p94 = init_speccal6_.istp94 - 1;
144  P.end_p94 = init_speccal6_.iedp94 - 1;
145  P.start_ndx[2] = init_speccal7_.ist3 - 1;
146  P.start_ndx[3] = init_speccal7_.ist4 - 1;
147  P.end_ndx[2] = init_speccal7_.ied3 - 1;
148  P.end_ndx[3] = init_speccal7_.ied4 - 1;
149  P.start_1p14 = init_speccal7_.ist1p14 - 1;
150  P.end_1p14 = init_speccal7_.ied1p14 - 1;
151  P.start2 = init_speccal10_.istrt2 - 1;
152  P.end2 = init_speccal10_.iend2 - 1;
153  P.ncv2 = init_speccal10_.ncv2;
154  P.natot = init_speccal11_.natot;
155  P.nbtot = init_speccal11_.nbtot;
156  P.nctot = init_speccal11_.nctot;
157  P.ndtot = init_speccal11_.ndtot;
158  P.wt1 = init_speccal8_.wt1;
159  P.wt2 = init_speccal8_.wt2;
160  P.wt3 = init_speccal8_.wt3;
161  P.wt4 = init_speccal8_.wt4;
162  P.g_vap_equiv = geometry3_.g_vap;
163  P.r0p94 = tran_table1_.r0p94;
164  P.r1p14 = tran_table1_.r1p14;
165  P.vaptot = tran_table1_.vaptot;
166  P.trntbl = tran_table1_.trntbl;
167  P.finst2 = init_speccal10_.finst2;
168 
169  printf("nb: %d %d %d %d\n", P.nb1, P.nb2, P.nb3, P.nb4);
170  printf("nb: %d %d\n", P.nbp94, P.nb1p14);
171  printf("nh2o: %d\n", P.nh2o);
172  printf("nobs: %d\n", P.nobs);
173  printf("startndx: %d %d %d %d\n", P.start_ndx[0], P.start_ndx[1], P.start_ndx[2], P.start_ndx[3]);
174  printf("endndx: %d %d %d %d\n", P.end_ndx[0], P.end_ndx[1], P.end_ndx[2], P.end_ndx[3]);
175  printf("start_p94: %d\n", P.start_p94);
176  printf("end_p94: %d\n", P.end_p94);
177  printf("start_1p14: %d\n", P.start_1p14);
178  printf("end_1p14: %d\n", P.end_1p14);
179  printf("%d\n", P.start2);
180  printf("%d\n", P.end2);
181 
182  printf("ncv2: %d\n", P.ncv2);
183  printf("ntot: %d %d %d %d\n", P.natot, P.nbtot, P.nctot, P.ndtot);
184  printf("wt: %f %f %f %f\n", P.wt1, P.wt2, P.wt3, P.wt4);
185  printf("delta: %f %f\n", P.delta, P.delta2);
186  printf("g_vap: %f \n", P.g_vap_equiv);
187 
188 
189 
190  double *YYp, cst1, cst2, cst3, cst4, cst5, cst6, rp94, r1p14;
191  int ii, ll, kk;
192 
193  YY = (double *) calloc(P.nobs, sizeof (double));
194  YYp = (double *) calloc(P.nobs, sizeof (double));
195  if ((fp = fopen(f_rad, "r")) == NULL) {
196  fprintf(stderr, "Unable to open %s\n", f_rad);
197  exit(1);
198  }
199  int32_t ja, jb;
200 
201  for (l = 1999; l < 2000; l++) {
202  for (k = 511; k < 512; k++) {
203 
204  for (i = 0; i < P.nobs && fgets(line, BUFSZ, fp); i++) {
205  sscanf(line, "%d %d %d %lf", &ii, &kk, &ll, &YY[i]);
206  YYp[i] = YY[i];
207  }
208  start_time = now();
209  cnt = get_atrem(YY, P, &rp94, &r1p14, &cst1, &cst2, &cst3, &cst4, &cst5, &cst6, &ja, &jb);
210  tot_time += now() - start_time;
211  for (i = 0; i < P.nobs; i++) {
212  printf("%d %d %d %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %d %d \n", i + 1, kk, ll, YYp[i], YY[i], rp94, r1p14, cst1, cst2, cst3, cst4, cst5, cst6, ja, jb);
213  }
214  }
215 
216  }
217  printf("Processed %d get_atrem calls after %6.0f seconds\n", 2000 * 512, tot_time);
218  return (0);
219 }
220 
221 int get_atrem(double *yy, paramstr P, double *rp94, double *r1p14, double *cst1, double *cst2, double *cst3, double *cst4, double *cst5, double *cst6, int32_t *jac, int32_t *jbc) {
222 
223  double const1 = 0, const2 = 0, const3 = 0, const4 = 0, const5 = 0, const6 = 0;
224  double ratio_94c, ratio_94co, ratio_114c, ratio_114co;
225  int32_t i, ja, jb;
226  double clmwvp;
227  /*
228  Arrays related to look-up table:
229  VAPTOT: TOTAL SUN-SURFACE-SENSOR PATH WATER VAPOR IN UNITS OF CM
230  R0P94 : Tc(0.94 um)/(WT1*Tc(0.86)+WT2*Tc(1.02))
231  R1P14 : Tc(1.14 um)/(WT3*Tc(1.05)+WT4*Tc(1.23))
232 
233  Calculating 3-channel ratios from an observed spectrum, using a
234  look-up table procedure to derive the column amount of water vapor
235  and to find the associated simulated transmittance spectrum.
236  */
237  for (i = P.start_ndx[0]; i <= P.end_ndx[0]; i++) {
238  const1 += yy[i];
239  }
240  const1 /= P.nb1;
241 
242  for (i = P.start_ndx[1]; i <= P.end_ndx[1]; i++) {
243  const2 += yy[i];
244  }
245  const2 /= P.nb2;
246 
247  // printf("const2=%f nb2=%d istr2=%d ind2=%d\n",const2,P.nb2,P.start_ndx[1],P.end_ndx[1]);
248 
249  for (i = P.start_p94; i <= P.end_p94; i++) {
250  const3 += yy[i];
251  }
252  const3 /= P.nbp94;
253 
254  ratio_94co = const3 / ((P.wt1 * const1) + (P.wt2 * const2));
255  ratio_94c = ratio_94co;
256 
257  if (ratio_94co > 1.0) {
258  const1 = 0.0;
259 
260  for (i = P.start_ndx[0]; i <= P.end_ndx[0]; i++) {
261  const1 += (1.0 / yy[i]);
262  }
263  const1 /= P.nb1;
264 
265  const2 = 0.0;
266  for (i = P.start_ndx[1]; i <= P.end_ndx[1]; i++) {
267  const2 += (1.0 / yy[i]);
268  }
269  const2 /= P.nb2;
270  const3 = 0.0;
271  for (i = P.start_p94; i <= P.end_p94; i++) {
272  const3 += (1.0 / yy[i]);
273  }
274  const3 /= P.nbp94;
275 
276  ratio_94c = const3 / ((P.wt1 * const1) + (P.wt2 * const2));
277  }
278 
279  *rp94 = ratio_94c;
280 
281  const4 = 0.0;
282  for (i = P.start_ndx[2]; i <= P.end_ndx[2]; i++) {
283  const4 += yy[i];
284  }
285  const4 /= P.nb3;
286 
287  const5 = 0.0;
288  for (i = P.start_ndx[3]; i <= P.end_ndx[3]; i++) {
289  const5 += yy[i];
290  }
291  const5 /= P.nb4;
292 
293  const6 = 0.0;
294  for (i = P.start_1p14; i <= P.end_1p14; i++) {
295  const6 += yy[i];
296  }
297  const6 /= P.nb1p14;
298 
299  /* DEBUG
300  *
301  */
302  *cst1 = const1;
303  *cst2 = const2;
304  *cst3 = const3;
305  *cst4 = const4;
306  *cst5 = const5;
307  *cst6 = const6;
308 
309  ratio_114co = const6 / ((P.wt3 * const4) + (P.wt4 * const5));
310  ratio_114c = ratio_114co;
311 
312  if (ratio_114co > 1.0) {
313 
314  const4 = 0.0;
315  for (i = P.start_ndx[2]; i <= P.end_ndx[2]; i++) {
316  const4 += (1.0 / yy[i]);
317  }
318  const4 /= P.nb3;
319  for (i = P.start_ndx[3]; i <= P.end_ndx[3]; i++) {
320  const5 += (1.0 / yy[i]);
321  }
322  const5 /= P.nb4;
323  const6 = 0.0;
324  for (i = P.start_1p14; i <= P.end_1p14; i++) {
325  const6 += (1.0 / yy[i]);
326  }
327  const6 /= P.nb1p14;
328  ratio_114c = const6 / ((P.wt3 * const4) + (P.wt4 * const5));
329  }
330 
331  *r1p14 = ratio_114c;
332 
333  double delta, deltab, fja, fjap1, fjb, fjbp1, vaptta, vapttb;
334  double speca[NBANDS], specb[NBANDS], specav;
335  ja = P.nh2o / 2;
336  ja = hunt(P.r0p94, P.nh2o, ratio_94c, ja);
337  if (ja >= 0 && ja < TBLMAX) {
338  delta = P.r0p94[ja + 1] - P.r0p94[ja];
339  fja = (P.r0p94[ja + 1] - ratio_94c) / delta;
340  fjap1 = (ratio_94c - P.r0p94[ja]) / delta;
341  vaptta = fja * P.vaptot[ja] + fjap1 * P.vaptot[ja + 1];
342  if (ratio_94co > 1.0) vaptta = -vaptta;
343  } else {
344  if (ja < 0) vaptta = P.vaptot[ja + 1];
345  if (ja > P.nh2o) vaptta = P.vaptot[ja];
346  }
347 
348  if (ratio_94co <= 1.0) {
349  for (i = 0; i < P.nobs; i++) {
350  if (ja >= 0 && ja < TBLMAXM1) {
351  speca[i] = fja * P.trntbl[ja][i] + fjap1 * P.trntbl[ja + 1][i];
352  } else {
353  if (ja < 0) speca[i] = P.trntbl[ja + 1][i];
354  if (ja >= TBLMAXM1) speca[i] = P.trntbl[ja][i];
355  }
356  }
357  }
358 
359  if (ratio_94co > 1.0) {
360  for (i = 0; i < P.nobs; i++) {
361  if (ja >= 0 && ja < TBLMAXM1) {
362  speca[i] = 1.0 / (fja * P.trntbl[ja][i] + fjap1 * P.trntbl[ja + 1][i]);
363  } else {
364  if (ja < 0) speca[i] = 1.0 / P.trntbl[ja + 1][i];
365  if (ja >= TBLMAXM1) speca[i] = 1.0 / P.trntbl[ja][i];
366  }
367  }
368  }
369 
370  jb = ja;
371 
372  jb = hunt(&P.r1p14[0], P.nh2o, ratio_114c, jb);
373  *jac = ja;
374  *jbc = jb;
375 
376  if (jb >= 0 && jb < TBLMAXM1) {
377  deltab = P.r1p14[jb + 1] - P.r1p14[jb];
378  fjb = (P.r1p14[jb + 1] - ratio_114c) / deltab;
379  fjbp1 = (ratio_114c - P.r1p14[jb]) / deltab;
380  vapttb = fjb * P.vaptot[jb] + fjbp1 * P.vaptot[jb + 1];
381  if (ratio_114co > 1.0) vapttb = -vapttb;
382  } else {
383  if (jb < 0) vapttb = P.vaptot[jb + 1];
384  if (jb <= TBLMAXM1) vapttb = P.vaptot[jb];
385  }
386 
387  if (ratio_114co <= 1.0) {
388  for (i = 0; i < P.nobs; i++) {
389  if (jb >= 0 && jb < TBLMAXM1) {
390  specb[i] = fjb * P.trntbl[jb][i] + fjbp1 * P.trntbl[jb + 1][i];
391  } else {
392  if (jb < 0) specb[i] = P.trntbl[jb + 1][i];
393  if (jb >= TBLMAXM1) specb[i] = P.trntbl[jb][i];
394  }
395  }
396  }
397  if (ratio_114co > 1.0) {
398  for (i = 0; i < P.nobs; i++) {
399  if (jb >= 0 && jb < TBLMAXM1) {
400  specb[i] = 1.0 / (fjb * P.trntbl[jb][i] + fjbp1 * P.trntbl[jb + 1][i]);
401  } else {
402  if (jb < 0) specb[i] = 1.0 / P.trntbl[jb + 1][i];
403  if (jb >= TBLMAXM1) specb[i] = 1.0 / P.trntbl[jb][i];
404  }
405  }
406  }
407 
408  clmwvp = 0.5 * (vaptta + vapttb) / P.g_vap_equiv;
409 
410 
411  // Derivation of surface reflectances
412 
413  for (i = 0; i < P.nobs; i++) {
414  specav = 0.5 * (speca[i] + specb[i]);
415  yy[i] /= specav;
416  }
417 
418 
419 
420 
421  // Smooth the derived surface reflectance spectra
422 
423  int ii, j;
424  double truncv;
425 
426  if (P.delta2 > P.delta) {
427  /*
428  * First, replace radiances <= 0 near the spectral overlapping parts of the
429  * four AVIRIS spectrometers by radiances in the nearby AVIRIS' channels.
430  */
431  for (i = P.natot - 3; i < P.natot + 2; i++) {
432  if (yy[i] <= 0.0) yy[i] = yy[i - 1];
433  }
434  for (i = P.nbtot - 3; i < P.nbtot + 2; i++) {
435  if (yy[i] <= 0.0) yy[i] = yy[i - 1];
436  }
437  for (i = P.nctot - 3; i < P.nctot + 2; i++) {
438  if (yy[i] <= 0.0) yy[i] = yy[i - 1];
439  }
440  for (i = P.ndtot - 3; i < P.ndtot + 2; i++) {
441  if (yy[i] <= 0.0) yy[i] = yy[i - 1];
442  }
443  for (i = P.start2 - 1; i < P.end2; i++) {
444  truncv = 0.0;
445  ii = i - P.ncv2 - 1;
446  for (j = ii; j < i + P.ncv2; j++) {
447  truncv += yy[j] * P.finst2[j - ii + 1];
448  }
449  yy[i] = truncv;
450  }
451  }
452 
453 
454  return (clmwvp);
455 
456 }
457 
458 /*********************************************************************************
459  * *
460  * Name: HUNT *
461  * Purpose: finds the element in array XX that is closest to value X. Array AA *
462  * must be monotonic, either increasing or decreasing. *
463  * Parameters: XX - array to search *
464  * N - number of elements in the array *
465  * X - element to search for closest match *
466  * JLO - index of the closest matching element *
467  * Algorithm: this subroutine was copied from Numerical Recipes *
468  * Modified for C and cleaned up by *
469  * Richard Healy SAIC/NASA-GSFC 2/19/2015 *
470  * Globals used: none *
471  * Global output: none *
472  * Return Codes: none *
473  * Special Considerations: none *
474  * *
475  **********************************************************************************
476  *
477  */
478 int32_t hunt(float *xx, int32_t n, double x, int32_t jlo) {
479  int32_t inc, jhi, jm;
480  int ascnd;
481 
482  ascnd = (xx[n - 1] >= xx[0]);
483 
484  if (jlo >= 0 && jlo < n) {
485 
486  inc = 1;
487  if ((x >= xx[jlo]) == ascnd) {
488  jhi = jlo + inc;
489  while (jhi < n && (x >= xx[jhi]) == ascnd) {
490  if (jhi >= n) {
491  jhi = n;
492  break;
493  } else if ((x >= xx[jhi]) == ascnd) {
494  jlo = jhi;
495  inc += inc;
496  jhi = jlo + inc;
497  }
498  }
499 
500  } else {
501  jhi = jlo;
502  jlo = jhi - inc;
503  while (jlo >= 0 && (x < xx[jlo]) == ascnd) {
504  if (jlo < 0) {
505  jlo = -1;
506  break;
507  } else if ((x < xx[jlo]) == ascnd) {
508  jhi = jlo;
509  inc += inc;
510  jlo = jhi - inc;
511  }
512  }
513 
514  }
515 
516  } else {
517  jlo = -1;
518  jhi = n;
519  }
520 
521  while (jhi - jlo != 1) {
522 
523  jm = (jhi + jlo) / 2;
524 
525  if ((x == xx[jm]) == ascnd) {
526  jlo = jm;
527  } else {
528  jhi = jm;
529  }
530  }
531 
532  if (x == xx[n - 1]) jlo = n - 2;
533  if (x == xx[0]) jlo = 0;
534 
535  return (jlo);
536 }
537 
char * ydhmsf(double dtime, char zone)
Definition: ydhmsf.c:12
#define BUFSZ
float r1p14[TBLMAX]
Definition: atrem_cor.h:128
int32_t jbc
Definition: atrem_corl1.h:239
int j
Definition: decode_rs.h:73
void init_speccal_()
int get_atrem(double *yy, paramstr P, double *rp94, double *r1p14, double *cst1, double *cst2, double *cst3, double *cst4, double *cst5, double *cst6, int32_t *jac, int32_t *jbc)
#define NULL
Definition: decode_rs.h:63
struct @9 tran_table1_
void geometry_()
#define TBLMAXM1
Definition: atrem.h:16
float cst5
Definition: atrem_corl1.h:237
float cst3
Definition: atrem_corl1.h:237
struct @4 init_speccal6_
int32_t jac
Definition: atrem_corl1.h:239
#define TBLMAX
Definition: atrem.h:15
int jb
Definition: atrem_corl1.h:227
float cst1
Definition: atrem_corl1.h:237
struct @6 init_speccal8_
double rp94
Definition: atrem_corl1.h:238
struct @7 init_speccal10_
struct @1 getinput5_
const double delta
float cst6
Definition: atrem_corl1.h:237
float ja
Definition: atrem_cor.h:114
int main(int argc, char *argv[])
void get_input_()
void model_adj_()
float cst4
Definition: atrem_corl1.h:237
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific the sector rotation may actually occur during one of the scans earlier than the one where it is first reported As a the b1 values are about the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT to fill pixels affected by dead subframes with a special value Output the metadata of noisy and dead subframe Dead Subframe EV and Detector Quality Flag2 Removed the function call of Fill_Dead_Detector_SI to stop interpolating SI values for dead but also for all downstream products for science test only Changes from v5 which will affect scientific to conform to MODIS requirements Removed the Mixed option from the ScanType in the code because the L1A Scan Type is never Mixed Changed for ANSI C compliance and comments to better document the fact that when the HDF_EOS metadata is stricly the and products are off by and in the track respectively Corrected some misspelling of RCS swir_oob_sending_detector to the Reflective LUTs to enable the SWIR OOB correction detector so that if any of the sending detectors becomes noisy or non near by good detectors from the same sending band can be specified as the substitute in the new look up table Code change for adding an additional dimension of mirror side to the Band_21_b1 LUT to separate the coefficient of the two mirror sides for just like other thermal emissive so that the L1B code can calibrate Band scan to scan with mirror side dependency which leads better calibration result Changes which do not affect scientific when the EV data are not provided in this Crosstalk Correction will not be performed to the Band calibration data Changes which do not affect scientific and BB_500m in L1A Logic was added to turn off the or to spatial aggregation processes and the EV_250m_Aggr1km_RefSB and EV_500m_Aggr1km_RefSB fields were set to fill values when SDSs EV_250m and EV_500m are absent in L1A file Logic was added to skip the processing and turn off the output of the L1B QKM and HKM EV data when EV_250m and EV_500m are absent from L1A In this the new process avoids accessing and reading the and L1A EV skips and writing to the L1B and EV omits reading and subsampling SDSs from geolocation file and writing them to the L1B and omits writing metadata to L1B and EV and skips closing the L1A and L1B EV and SDSs Logic was added to turn off the L1B OBC output when the high resolution OBC SDSs are absent from L1A This is accomplished by skipping the openning the writing of metadata and the closing of the L1B OBC hdf which is Bit in the scan by scan bit QA has been changed Until now
Definition: HISTORY.txt:361
struct @10 geometry3_
float cst2
Definition: atrem_corl1.h:237
for(i=0;i< NROOTS;i++) s[i]
Definition: decode_rs.h:85
struct @3 init_speccal3_
int i
Definition: decode_rs.h:71
struct @8 init_speccal11_
int32_t hunt(float *xx, int32_t n, double x, int32_t jlo)
struct @5 init_speccal7_
@ NBANDS
Definition: make_L3_v1.1.c:53
int k
Definition: decode_rs.h:73
struct @2 getinput7_
void tran_table_()