OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1_meris_CC.c
Go to the documentation of this file.
1 
2 /* ============================================================================ */
3 /* module l1_meris_CC.c - functions to read MERIS CC (coastal color) for MSL12 */
4 /* Written By: Joel M. Gales GSFC Futuretech, Sep. 2011. */
5 /* */
6 /* W. Robinson, SAIC, 22 May 2012 make repair to start, end and scan times */
7 /* ============================================================================ */
8 
9 #include "l1_meris_CC.h"
10 
11 #include "l1.h"
12 
13 #include <stdbool.h>
14 #include <stdlib.h>
15 #include <netcdf.h>
16 #include <math.h>
17 
18 #define MERIS_NBANDS 15
19 #define MAXOCLIN 6700 /* max # lines */
20 
21 static float *lon, *lat, *senz, *sena, *solz, *sola;
22 static int ncol;
23 static int32_t nrow;
24 static int16_t nline, npix;
25 
26 static int32_t spix = 0;
27 static int year, day, msec;
28 static double time_interval;
29 
30 
31 
32 /* ------------------------------------------------------------ */
33 /* navigation_meris() - generates navigation info interpolated */
34 /* for each pixel, using info from a MERIS_CC */
35 /* NETCDF file */
36 /* */
37 /* ------------------------------------------------------------ */
38 int navigation_meris(int32_t fileID) {
39  float *xctl;
40  float *inlon, *inlat;
41  float *insolz, *insola;
42  float *insenz, *insena;
43  float *yctl;
44  float *in1, *in2;
45 
46  int i, j, k, l;
47  int nlon, nlat;
48  float out1[MAXOCLIN], out2[MAXOCLIN];
49  float *spl_aux;
50  float *x_ctl_ll, *y_ctl_ll, *z_ctl_ll;
51  float *x_ctl_sol, *y_ctl_sol, *z_ctl_sol;
52  float *x_ctl_sen, *y_ctl_sen, *z_ctl_sen;
53  float * in_ptr[3][3], *out_ptr[3][2], *tout_ptr[3][2];
54 
55  float off_x, off_y, sub_x, sub_y;
56  float *tlon, *tlat, *tsenz, *tsena, *tsolz, *tsola;
57 
58  int geo_id;
59 
60  inlon = (float *) calloc(ncol*nrow, sizeof (float));
61  inlat = (float *) calloc(ncol*nrow, sizeof (float));
62  insolz = (float *) calloc(ncol*nrow, sizeof (float));
63  insola = (float *) calloc(ncol*nrow, sizeof (float));
64  insenz = (float *) calloc(ncol*nrow, sizeof (float));
65  insena = (float *) calloc(ncol*nrow, sizeof (float));
66 
67  xctl = (float *) calloc(ncol, sizeof (float));
68  yctl = (float *) calloc(nrow, sizeof (float));
69  in1 = (float *) calloc(nrow, sizeof (float));
70  in2 = (float *) calloc(nrow, sizeof (float));
71 
72  /* read the data sets */
73  nc_inq_varid(fileID, "longitude", &geo_id);
74  nc_get_var_float(fileID, geo_id, inlon);
75  nc_get_att_float(fileID, geo_id, "offset_x", &off_x);
76  nc_get_att_float(fileID, geo_id, "offset_y", &off_y);
77  nc_get_att_float(fileID, geo_id, "subsampling_x", &sub_x);
78  nc_get_att_float(fileID, geo_id, "subsampling_y", &sub_y);
79 
80  nc_inq_varid(fileID, "latitude", &geo_id);
81  nc_get_var_float(fileID, geo_id, inlat);
82  nc_inq_varid(fileID, "sun_zenith", &geo_id);
83  nc_get_var_float(fileID, geo_id, insolz);
84  nc_inq_varid(fileID, "sun_azimuth", &geo_id);
85  nc_get_var_float(fileID, geo_id, insola);
86  nc_inq_varid(fileID, "view_zenith", &geo_id);
87  nc_get_var_float(fileID, geo_id, insenz);
88  nc_inq_varid(fileID, "view_azimuth", &geo_id);
89  nc_get_var_float(fileID, geo_id, insena);
90 
91 
92  /* define control point grid */
93  if (want_verbose)
94  printf("nrow,ncol = %d %d \n", nrow, ncol);
95  for (i = 0; i < ncol; i++) {
96  xctl[i] = ((float) i) * sub_x + off_x;
97  }
98 
99  /* define output grid */
100  nlon = npix; /* # of output pixs */
101  nlat = nline;
102 
103  for (i = 0; i < nrow; i++) {
104  yctl[i] = ((float) i) * sub_y + off_y;
105  }
106 
107 
108  /* Compute unit vectors from lon/lat of control points */
109  x_ctl_ll = (float *) calloc(ncol*nrow, sizeof (float));
110  y_ctl_ll = (float *) calloc(ncol*nrow, sizeof (float));
111  z_ctl_ll = (float *) calloc(ncol*nrow, sizeof (float));
112 
113  x_ctl_sol = (float *) calloc(ncol*nrow, sizeof (float));
114  y_ctl_sol = (float *) calloc(ncol*nrow, sizeof (float));
115  z_ctl_sol = (float *) calloc(ncol*nrow, sizeof (float));
116 
117  x_ctl_sen = (float *) calloc(ncol*nrow, sizeof (float));
118  y_ctl_sen = (float *) calloc(ncol*nrow, sizeof (float));
119  z_ctl_sen = (float *) calloc(ncol*nrow, sizeof (float));
120 
121 
122  for (i = 0; i < nrow; i++) {
123  for (j = 0; j < ncol; j++) {
124  inlon[i * ncol + j] = inlon[i * ncol + j] / RADEG;
125  inlat[i * ncol + j] = inlat[i * ncol + j] / RADEG;
126 
127  x_ctl_ll[i * ncol + j] = cos(inlat[i * ncol + j]) * cos(inlon[i * ncol + j]);
128  y_ctl_ll[i * ncol + j] = cos(inlat[i * ncol + j]) * sin(inlon[i * ncol + j]);
129  z_ctl_ll[i * ncol + j] = sin(inlat[i * ncol + j]);
130 
131 
132  insola[i * ncol + j] = insola[i * ncol + j] / RADEG;
133  insolz[i * ncol + j] = insolz[i * ncol + j] / RADEG;
134 
135  x_ctl_sol[i * ncol + j] = cos(insolz[i * ncol + j]) * cos(insola[i * ncol + j]);
136  y_ctl_sol[i * ncol + j] = cos(insolz[i * ncol + j]) * sin(insola[i * ncol + j]);
137  z_ctl_sol[i * ncol + j] = sin(insolz[i * ncol + j]);
138 
139 
140  insena[i * ncol + j] = insena[i * ncol + j] / RADEG;
141  insenz[i * ncol + j] = insenz[i * ncol + j] / RADEG;
142 
143  x_ctl_sen[i * ncol + j] = cos(insenz[i * ncol + j]) * cos(insena[i * ncol + j]);
144  y_ctl_sen[i * ncol + j] = cos(insenz[i * ncol + j]) * sin(insena[i * ncol + j]);
145  z_ctl_sen[i * ncol + j] = sin(insenz[i * ncol + j]);
146  }
147  }
148 
149  in_ptr[0][0] = x_ctl_ll;
150  in_ptr[0][1] = y_ctl_ll;
151  in_ptr[0][2] = z_ctl_ll;
152  in_ptr[1][0] = x_ctl_sol;
153  in_ptr[1][1] = y_ctl_sol;
154  in_ptr[1][2] = z_ctl_sol;
155  in_ptr[2][0] = x_ctl_sen;
156  in_ptr[2][1] = y_ctl_sen;
157  in_ptr[2][2] = z_ctl_sen;
158 
159  tlon = (float *) calloc(npix*nrow, sizeof (float));
160  tlat = (float *) calloc(npix*nrow, sizeof (float));
161  tsenz = (float *) calloc(npix*nrow, sizeof (float));
162  tsena = (float *) calloc(npix*nrow, sizeof (float));
163  tsolz = (float *) calloc(npix*nrow, sizeof (float));
164  tsola = (float *) calloc(npix*nrow, sizeof (float));
165 
166  tout_ptr[0][0] = tlon;
167  tout_ptr[0][1] = tlat;
168  tout_ptr[1][0] = tsola;
169  tout_ptr[1][1] = tsolz;
170  tout_ptr[2][0] = tsena;
171  tout_ptr[2][1] = tsenz;
172 
173  out_ptr[0][0] = lon;
174  out_ptr[0][1] = lat;
175  out_ptr[1][0] = sola;
176  out_ptr[1][1] = solz;
177  out_ptr[2][0] = sena;
178  out_ptr[2][1] = senz;
179 
180 
181  /* we now have all the info at each control point, so we
182  can interpolate to all pixels, all lines */
183  /* interpolate angles across each control point line */
184  if (want_verbose)
185  printf("Interpolating rows for longitude/azimuth\n");
186  spl_aux = (float *) calloc(ncol, sizeof (float));
187 
188  for (i = 0; i < nrow; i++) {
189  for (l = 0; l < 3; l++) {
190  spline(xctl, in_ptr[l][0] + i*ncol, ncol, 1e30, 1e30, spl_aux);
191  for (j = 0; j < nlon; j++)
192  splint(xctl, in_ptr[l][0] + i * ncol, spl_aux, ncol,
193  (float) j, tout_ptr[l][0] + i * npix + j);
194 
195  spline(xctl, in_ptr[l][1] + i*ncol, ncol, 1e30, 1e30, spl_aux);
196  for (j = 0; j < nlon; j++)
197  splint(xctl, in_ptr[l][1] + i * ncol, spl_aux, ncol,
198  (float) j, tout_ptr[l][1] + i * npix + j);
199  }
200  }
201  free(spl_aux);
202 
203 
204  /* fill missing lines by interpolating columns */
205  if (want_verbose)
206  printf("Interpolating columns for longitude/azimuth\n");
207  spl_aux = (float *) calloc(nrow, sizeof (float));
208 
209  for (i = 0; i < nlon; i++) {
210  for (l = 0; l < 3; l++) {
211  for (k = 0; k < nrow; k++) {
212  in1[k] = *(tout_ptr[l][0] + k * npix + i);
213  in2[k] = *(tout_ptr[l][1] + k * npix + i);
214  }
215  spline(yctl, in1, nrow, 1e30, 1e30, spl_aux);
216  for (j = 0; j < nlat; j++)
217  splint(yctl, in1, spl_aux, nrow, (float) j, (float *) &out1[j]);
218 
219  spline(yctl, in2, nrow, 1e30, 1e30, spl_aux);
220  for (j = 0; j < nlat; j++)
221  splint(yctl, in2, spl_aux, nrow, (float) j, (float *) &out2[j]);
222 
223  for (j = 0; j < nlat; j++) {
224  *(out_ptr[l][0] + j * npix + i) = atan2(out2[j], out1[j]) * RADEG;
225  if (l >= 1 && *(out_ptr[l][0] + j * npix + i) < 0) {
226  *(out_ptr[l][0] + j * npix + i) += 360;
227  }
228  }
229  }
230  }
231  free(spl_aux);
232 
233  if (want_verbose)
234  printf("Interpolating rows for latitude/zenith\n");
235  spl_aux = (float *) calloc(ncol, sizeof (float));
236 
237  for (i = 0; i < nrow; i++) {
238  for (l = 0; l < 3; l++) {
239  spline(xctl, in_ptr[l][2] + i*ncol, ncol, 1e30, 1e30, spl_aux);
240  for (j = 0; j < nlon; j++)
241  splint(xctl, in_ptr[l][2] + i * ncol, spl_aux, ncol,
242  (float) j, tout_ptr[l][1] + i * npix + j);
243  }
244  }
245  free(spl_aux);
246 
247 
248  /* fill missing lines by interpolating columns */
249  if (want_verbose)
250  printf("Interpolating columns for latitude/zenith\n");
251  spl_aux = (float *) calloc(nrow, sizeof (float));
252 
253  for (i = 0; i < nlon; i++) {
254  for (l = 0; l < 3; l++) {
255  for (k = 0; k < nrow; k++) {
256  in1[k] = *(tout_ptr[l][1] + k * npix + i);
257  }
258  spline(yctl, in1, nrow, 1e30, 1e30, spl_aux);
259  for (j = 0; j < nlat; j++)
260  splint(yctl, in1, spl_aux, nrow, (float) j, (float *) &out1[j]);
261 
262  for (j = 0; j < nlat; j++) {
263  *(out_ptr[l][1] + j * npix + i) = asin(out1[j]) * RADEG;
264  }
265  }
266  }
267  free(spl_aux);
268 
269 
270  free(x_ctl_ll);
271  free(y_ctl_ll);
272  free(z_ctl_ll);
273  free(x_ctl_sol);
274  free(y_ctl_sol);
275  free(z_ctl_sol);
276  free(x_ctl_sen);
277  free(y_ctl_sen);
278  free(z_ctl_sen);
279 
280  free(inlon);
281  free(inlat);
282  free(insolz);
283  free(insola);
284  free(insenz);
285  free(insena);
286  free(xctl);
287  free(yctl);
288  free(in1);
289  free(in2);
290 
291  free(tlon);
292  free(tlat);
293  free(tsolz);
294  free(tsola);
295  free(tsenz);
296  free(tsena);
297 
298  return (0);
299 }
300 
301 int
302 openl1_meris_CC(filehandle * file) {
303  char *fltime;
304  char *prodtype;
305  char monthstr[10];
306  static char months_list[12][4] ={"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL",
307  "AUG", "SEP", "OCT", "NOV", "DEC"};
308  size_t source_w, source_h;
309  int32_t nscan;
310  int fileID, xid, yid, retval;
311  int minute, hour, month, sec, i;
312  int year2, day2, msec2;
313  float fsec, milisec;
314  size_t att_len; // Change to size_t JMG 08/12/13
315  double dblsec, starttime, stoptime;
316  int16_t y16, m16, d16;
317  size_t nctlpix = 0;
318  size_t nctlscan = 0;
319 
320  // Open the CC input file
321  retval = nc_open(file->name, NC_NOWRITE, &fileID);
322  if (retval != NC_NOERR) {
323  fprintf(stderr, "-E- %s line %d: nc_open(%s) failed.\n",
324  __FILE__, __LINE__, file->name);
325  return (1);
326  }
327 
328  // Get pixel and scan dimensions
329  retval = nc_inq_dimid(fileID, "x", &xid);
330  retval = nc_inq_dimid(fileID, "y", &yid);
331  retval = nc_inq_dimlen(fileID, xid, &source_w);
332  retval = nc_inq_dimlen(fileID, yid, &source_h);
333 
334  if (want_verbose) {
335  printf("MERIS CC Npix :%d Nscans:%d\n", (int) source_w, (int) source_h);
336  } // want_verbose
337  npix = (int32_t) source_w;
338  nscan = (int32_t) source_h;
339  nline = nscan;
340 
341  // get year, day, msecs
342  retval = nc_inq_attlen(fileID, NC_GLOBAL, "start_date", &att_len);
343 
344  /* allocate required space before retrieving values */
345  fltime = (char *) malloc(att_len + 1); /* + 1 for trailing null */
346 
347  /* get attribute values */
348  retval = nc_get_att_text(fileID, NC_GLOBAL, "start_date", fltime);
349 
350  sscanf(fltime, "%02d-%3s-%04d %02d:%02d:%f", &day, monthstr, &year,
351  &hour, &minute, &fsec);
352  monthstr[4] = '\0';
353  month = 1;
354  for (i = 0; i < 12; i++)
355  if (strncmp(monthstr, months_list[i], 3) == 0)
356  month = i + 1;
357  sec = (int) trunc((double) fsec);
358  milisec = (float) (fsec - sec) * 1e3;
359  ymdhms2ydmsec(year, month, day, hour, minute, sec,
360  (int32_t *) & year, (int32_t *) & day, (int32_t *) & msec);
361  msec += (int) milisec;
362 
363  dblsec = hour * 3600 + minute * 60 + fsec;
364  y16 = year;
365  m16 = 0; /* at this time, day is day-of-year */
366  d16 = day;
367 
368  starttime = ymds2unix(y16, m16 + 1, d16, dblsec);
369 
370 
371  retval = nc_inq_attlen(fileID, NC_GLOBAL, "stop_date", &att_len);
372 
373  /* allocate required space before retrieving values */
374  fltime = (char *) malloc(att_len + 1); /* + 1 for trailing null */
375  prodtype = (char *) malloc(att_len + 1); /* + 1 for trailing null */
376 
377  /* get attribute values */
378  retval = nc_get_att_text(fileID, NC_GLOBAL, "stop_date", fltime);
379  retval = nc_get_att_text(fileID, NC_GLOBAL, "product_type", prodtype);
380 
381  sscanf(fltime, "%02d-%3s-%04d %02d:%02d:%f", &day2, monthstr, &year2,
382  &hour, &minute, &fsec);
383  monthstr[4] = '\0';
384  month = 1;
385  for (i = 0; i < 12; i++)
386  if (strncmp(monthstr, months_list[i], 3) == 0)
387  month = i + 1;
388  sec = (int) trunc((double) fsec);
389  milisec = (float) (fsec - sec) * 1e3;
390  ymdhms2ydmsec(year2, month, day2, hour, minute, sec,
391  (int32_t *) & year2, (int32_t *) & day2, (int32_t *) & msec2);
392  msec2 += (int) milisec;
393 
394  dblsec = hour * 3600 + minute * 60 + fsec;
395  y16 = year2;
396  m16 = 0; /* at this time, day is day-of-year */
397  d16 = day2;
398 
399  stoptime = ymds2unix(y16, m16 + 1, d16, dblsec);
400  time_interval = (stoptime - starttime) / (nscan - 1); /* in sec */
401 
402  file->sd_id = fileID;
403  file->nbands = 15;
404  file->npix = npix;
405  file->nscan = nscan;
406  if (strncmp(prodtype, "MER_RR", 6) == 0)
407  strcpy(file->spatialResolution, "1.2 km");
408  else
409  strcpy(file->spatialResolution, "300 m");
410 
411  retval = nc_inq_dimid(file->sd_id, "tp_x", &xid);
412  retval = nc_inq_dimlen(file->sd_id, xid, &nctlpix);
413  ncol = nctlpix;
414 
415  retval = nc_inq_dimid(file->sd_id, "tp_y", &yid);
416  retval = nc_inq_dimlen(file->sd_id, yid, &nctlscan);
417  nrow = nctlscan;
418 
419  lon = (float *) calloc(npix*nline, sizeof (float));
420  lat = (float *) calloc(npix*nline, sizeof (float));
421  senz = (float *) calloc(npix*nline, sizeof (float));
422  sena = (float *) calloc(npix*nline, sizeof (float));
423  solz = (float *) calloc(npix*nline, sizeof (float));
424  sola = (float *) calloc(npix*nline, sizeof (float));
425 
426  retval = navigation_meris(fileID);
427 
428  return (LIFE_IS_GOOD);
429 }
430 
431 int readl1_meris_CC(filehandle *file, int32_t scan, l1str *l1rec)
432 /*
433  * W. Robinson, SAIC, 22 May 2012 account for msec going to next day
434  */ {
435  static int firstCall = 1;
436 
437  // only look at SeaWiFS bands until we have rayleigh/aerosol tables
438  // NOTE: the following names are part of the API and NOT the file. See libmeris.
439  static char *l1_names[] = {
440  "radiance_1", "radiance_2", "radiance_3", "radiance_4", // 412.7, 442.6, 489.9, 509.8
441  "radiance_5", "radiance_6", "radiance_7", "radiance_8", // 559.7, 619.6, 664.5, 680.8
442  "radiance_9", "radiance_10", "radiance_11", "radiance_12", // 708.3, 753.4, 761.5, 778.4
443  "radiance_13", "radiance_14", "radiance_15" // 864.9, 884.9, 900.0
444  };
445  int32_t nbands;
446  int32_t ip, ib, ipb;
447  size_t start[3], count[3];
448  int band_id, retval;
449  int16_t *rad_data;
450  static float gain[15];
451  double recsec, sec70;
452  int16_t sh_year, sh_day;
453 
454  nbands = file->nbands;
455 
456  if (firstCall) {
457  if (want_verbose)
458  printf("file->nbands = %d\n", (int) file->nbands);
459  firstCall = 0;
460 
461  for (ip = 0; ip < npix; ip++) l1rec->pixnum[ip] = ip;
462 
463  for (ib = 0; ib < nbands; ib++) {
464  retval = nc_inq_varid(file->sd_id, l1_names[ib], &band_id);
465  if (retval != NC_NOERR) {
466  fprintf(stderr,
467  "-E- %s line %d: nc_inq_varid failed for file, %s band, %s.\n",
468  __FILE__, __LINE__, file->name, l1_names[ib]);
469  return (1);
470  }
471 
472  retval = nc_get_att_float(file->sd_id, band_id, "scale_factor", &gain[ib]);
473  if (retval != NC_NOERR) {
474  fprintf(stderr,
475  "-E- %s line %d: nc_get_att_float for file, %s attribute, %s.\n",
476  __FILE__, __LINE__, file->name, "scale_factor");
477  return (1);
478  }
479  }
480  }
481 
482  /* set time for this scan and account for overflow of msec to next day */
483  recsec = (double) (msec + time_interval * scan * 1e3) / 1.e3;
484  sec70 = ymds2unix((int16_t) year, 1, (int16_t) day, recsec);
485  unix2yds(sec70, &sh_year, &sh_day, &recsec);
486  l1rec->scantime = sec70;
487 
488  for (ip = spix; ip < npix; ip++) {
489  l1rec->lon[ip] = lon[scan * npix + ip];
490  l1rec->lat[ip] = lat[scan * npix + ip];
491  l1rec->solz[ip] = solz[scan * npix + ip];
492  l1rec->sola[ip] = sola[scan * npix + ip];
493  l1rec->senz[ip] = senz[scan * npix + ip];
494  l1rec->sena[ip] = sena[scan * npix + ip];
495  }
496 
497 
498  // read in radiance data
499  rad_data = (int16_t *) calloc(npix, sizeof (int16_t));
500 
501  start[0] = scan;
502  start[1] = 0;
503  count[0] = 1;
504  count[1] = npix;
505 
506  for (ib = 0; ib < nbands; ib++) {
507 
508  retval = nc_inq_varid(file->sd_id, l1_names[ib], &band_id);
509  retval = nc_get_vara_short(file->sd_id, band_id, start, count, rad_data);
510  if (retval != NC_NOERR) {
511  fprintf(stderr,
512  "-E- %s line %d: nc_get_vara_short failed for file, %s field, %s.\n",
513  __FILE__, __LINE__, file->name, l1_names[ib]);
514  return (1);
515  }
516  // copy to Lt record.
517  for (ip = spix; ip < npix; ip++) {
518  ipb = ip * nbands + ib;
519  l1rec->Lt[ipb] = rad_data[ip] * gain[ib] / 10.0;
520 
521  // mark negative input data as HILT
522  if (l1rec->Lt[ipb] < 0.0)
523  l1rec->navfail[ip] = 1;
524  }
525  } // for ib
526  free(rad_data);
527 
528  // disable smile correction
529  l1_input->rad_opt = 0;
530 
531  l1rec->npix = file->npix;
532 
533  return (LIFE_IS_GOOD);
534 }
535 
536 int
537 closel1_meris_CC(filehandle *file) {
538  int retval;
539 
540  retval = nc_close(file->sd_id);
541  if (retval != NC_NOERR) {
542  fprintf(stderr,
543  "-E- %s line %d: nc_close failed for file, %s.\n",
544  __FILE__, __LINE__, file->name);
545  return (1);
546  }
547 
548  return (LIFE_IS_GOOD);
549 }
550 
int openl1_meris_CC(filehandle *file)
Definition: l1_meris_CC.c:302
int j
Definition: decode_rs.h:73
int32_t day
int closel1_meris_CC(filehandle *file)
Definition: l1_meris_CC.c:537
int16 * gain
Definition: l1_czcs_hdf.c:33
int16_t fileID
MOD_PR01 Production producing one five minute granule of output data in each run It can be configured to produce as many as three five minute granules per run Each execution with one construction record and one date file for each dataset In normal these are created by which splits them out of the hour datasets For LANCE they are created by which merges all session MODIS L0 datasets overlapping the requested time and extracts from the merged data those packets which fall within that time period Each scan of data is stored in the L1A granule that covers the start time of that scan
Definition: MOD_PR01_pr.txt:19
read l1rec
subroutine spline(s, x, y, n, in, t, il, iu, vl, vu, e, u)
Definition: phs.f:1348
float * lat
int32 * msec
Definition: l1_czcs_hdf.c:31
int32 nscan
Definition: l1_czcs_hdf.c:19
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed file
Definition: HISTORY.txt:413
#define LIFE_IS_GOOD
Definition: passthebuck.h:4
int navigation_meris(int32_t fileID)
Definition: l1_meris_CC.c:38
l1_input_t * l1_input
Definition: l1_options.c:9
int want_verbose
void unix2yds(double usec, short *year, short *day, double *secs)
integer, parameter double
#define RADEG
Definition: czcs_ctl_pt.c:5
double trunc(double)
int readl1_meris_CC(filehandle *file, int32_t scan, l1str *l1rec)
Definition: l1_meris_CC.c:431
void ymdhms2ydmsec(int yy, int mm, int dd, int hh, int mn, int sc, int32_t *year, int32_t *day, int32_t *msec)
Definition: ydhms2ydmsec.c:3
int32_t nbands
int32 spix
Definition: l1_czcs_hdf.c:21
#define MAXOCLIN
Definition: l1_meris_CC.c:19
subroutine splint(xa, ya, y2a, n, x, y)
float * lon
double ymds2unix(short year, short month, short day, double secs)
for(i=0;i< NROOTS;i++) s[i]
Definition: decode_rs.h:85
int i
Definition: decode_rs.h:71
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
int k
Definition: decode_rs.h:73
int npix
Definition: get_cmp.c:27
int count
Definition: decode_rs.h:79