OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
o3_toms.c
Go to the documentation of this file.
1 /*****************************************************************
2  * File: o3_toms.c
3  *
4  * Purpose: create HDF ancillary real time datafile from
5  * OMI TOMS ascii input file
6  *
7  * Description: this program will create a HDF with the components:
8  *
9  * HDF DAAC compliant global attributes
10  * Geometry Vdata for storage of LAT/LON endpoints and step
11  * 2-D data parameter OZONE SDS
12  * 2-D OZONE QC flag (padded all zeroes for TOMS and TOVS,
13  * with EARLIERVAL to EPTOMS missing points filled with
14  * prior day's data)
15  *
16  * Input parms:
17  * char *infile - input ozone file to process ("ga960903.ept")
18  * char *directory - output file directory (".")
19  * char *prevfile - input ozone file for previous day ("OMITOMS" only)
20  *
21  * Returns: false on error
22  *
23  * Modification history:
24  * W. Robinson, SAIC, Dec 2013 from o3nrt_omi
25  *****************************************************************/
26 #include <mfhdf.h>
27 #include "ancil.h"
28 #include <time.h>
29 #include <unistd.h>
30 #include "ancnrt_proto.h"
31 #include "o3_toms.h"
32 #include "h5io.h"
33 
34 /*
35  * Ozone specific settings
36  */
37 
38 #define VGROUPNAME "Geophysical Data"
39 #define EARLIERVAL 10 /* QC grid value for EPTOMS pts filled from prev day */
40 #define NEARESTVAL 11 /* QC grid value for EPTOMS pts filled from nearest
41  (file 1 or 2) non-zero point */
42 
43 int main(int argc, char *argv[]) {
44  char *datafmt;
45  char *datalabel;
46  char dataunit[MAXNAMELNG];
47  char dataattr[MAXNAMELNG];
48  char directory[MAXNAMELNG];
49  char annotfile[MAXNAMELNG];
50  char outfile[MAXNAMELNG];
51  char outfilename[MAXNAMELNG];
52  char infile[MAXNAMELNG];
53  char prevfile[MAXNAMELNG];
54  char start_time[17];
55  char end_time[17];
56  int i, j, k, l, kk;
57  int rank;
58  int result;
59  int array_size = 0;
60  int numannarr = 0;
61  int modified_pts = 0; /* EPTOMS, track pts modded */
62  int hour; /* data times */
63  short startyear, startday; /* start data times */
64  short endyear, endday; /* end data times */
65  int startmsecday; /* millisec of day */;;
66  int endmsecday; /* millisec of day */
67  int pyear = 0; /* local proc times */
68  int32 shape[2];
69  time_t t; /* processing time */
70  struct tm *localtm; /* processing time */
71  struct annotation *xannot;
72  toms_txt_info_struc toms_info, toms_info2;
73 
74  int32 sdfid, fid, gridid;
75  int32 datatype;
76 
77  int8 *int8_SDSdataQC;
78  int16 *int16_SDSdataO3;
79  int16 *o3_prev, *o3;
80  char *inst_name_frag[] = {"N7TOMS", "EPTOMS", "AURAOMI"};
81  char *inst_data_src[] = {"Nimbus 7 / Total Ozone Mapping Spectrometer",
82  "Earth Probe / Total Ozone Mapping Spectrometer",
83  "Aura / Ozone Monitoring Instrument"};
84  char *inst_platform[] = {"Nimbus 7", "Earth Probe", "Aura"};
85  char gen_strs[24], *ocpath;
86  int32_t bad_ct;
87 
88  /*
89  * functions used
90  */
91 
92  int wrtattr();
93  int32 wrtsds();
94  int startHDF();
95  int setSDSref();
96  int closeHDFstructs();
97  void pexit();
98  int8 check_usage();
99  struct annotation * fillenv_annot();
100  char *upcase();
101  //void world_avg(int16 *, int32, int32, int, int, int16 *);
102  int rd_oz_grid( char *, toms_txt_info_struc * );
103 
104  /*
105  * ------- check command line arguments and set args ------------------
106  */
107 
108  if ((check_usage(argc, argv)) != 0) exit(-1);
109 
110  strcpy(annotfile, argv[1]);
111  strcpy(infile, argv[1]);
112  strcpy(directory, argv[2]);
113  strcpy(prevfile, argv[3]);
114  /*
115  * generate the annotation (fillenv...) file name internally
116  */
117  if ((ocpath = getenv("OCDATAROOT")) == NULL) {
118  printf("%s, %d E: Cannot get OCDATAROOT definition\n", __FILE__,
119  __LINE__);
120  exit(-1);
121  }
122  strcpy(annotfile, ocpath);
123  strcat(annotfile, "/common/fillenv.o3_toms");
124  /*
125  * read the TOMS text file of data
126  */
127 
128  if (rd_oz_grid( infile, &toms_info) != 0)
129  pexit("rd_oz_grid");
130  /*
131  * ------- Create component date/time ----------
132  * TOVS input ASCII data provides start and end times in an additional
133  * header line.
134  * TOMS, EPTOMS and ADTOMS input ASCII does not provide start and end time,
135  * only one header line for year, Gregorian day, and Julian day.
136  */
137 
138  hour = 00;
139  sprintf(outfile, "%s/N%04d%03d%02d_O3_%s_24h.hdf",
140  directory, toms_info.year, toms_info.doy, hour,
141  inst_name_frag[ toms_info.toms_typ - 1 ]);
142 
143  sprintf(outfilename, "N%04d%03d%02d_O3_%s_24h.hdf",
144  toms_info.year, toms_info.doy, hour,
145  inst_name_frag[ toms_info.toms_typ - 1 ]);
146 
147  /* ending times based on 1st file in EPTOMS case */
148  sprintf(end_time, "%04d%03d235959999", toms_info.year, toms_info.doy);
149 
150  endyear = toms_info.year;
151  endday = toms_info.doy;
152  endmsecday = 86399999;
153 
154  /* set the starting times as 0Z on day of primary file */
155  sprintf(start_time, "%04d%03d000000000", toms_info.year, toms_info.doy);
156  startyear = toms_info.year;
157  startday = toms_info.doy;
158  startmsecday = 0;
159 
160  /* Read previous day */
161 
162  if (rd_oz_grid(prevfile, &toms_info2) != 0)
163  pexit("rd_oz_grid, #2");
164  /*
165  * If the 2 files have different grid size, only use the primary day
166  */
167  if ((toms_info2.nlat != toms_info.nlat) || (toms_info2.nlon != toms_info.nlon)) {
168  printf("%s, %d I: The 2 input files selected have different grid sizes\n",
169  __FILE__, __LINE__);
170  printf("1: %d X %d: %s\n", toms_info.nlon, toms_info.nlat, infile);
171  printf("2: %d X %d: %s\n", toms_info2.nlon, toms_info2.nlat, prevfile);
172  printf(" Using primary file only\n");
173  toms_info2 = toms_info;
174  }
175  /* WDR allow overwriting
176  if (!access(outfile, F_OK))
177  pexit("....output file exists. Won't overwrite.");
178  */
179 
180  /*
181  * --- read annotation ASCII file for metadata placement in new HDF -----
182  */
183 
184  if ((numannarr = count_annot(annotfile)) == 0)
185  pexit("no annotations found");
186 
187  if ((xannot = (struct annotation *)
188  malloc(sizeof (struct annotation) * numannarr))
189  == NULL) pexit("malloc Annotation");
190 
191  xannot = fillenv_annot(annotfile);
192 
193  /*
194  * Allocate space for 2D data arrays
195  */
196 
197  rank = 2;
198  shape[0] = toms_info.nlat; /* lat */
199  shape[1] = toms_info.nlon; /* lon */
200  array_size = shape[0] * shape[1];
201 
202  if ((int16_SDSdataO3 = (int16 *) malloc(sizeof (int16) * array_size))
203  == NULL)
204  pexit("malloc int16_SDSdataO3");
205 
206  if ((int8_SDSdataQC = (int8 *) malloc(sizeof (int8) * array_size)) == NULL)
207  pexit("malloc int8_SDSdataQC");
208  for (i = 0; i < array_size; i++) int8_SDSdataQC[i] = 0; /* init */
209 
210  /*
211  * Create SDS array for writing
212  */
213 
214  o3 = toms_info.datarr;
215  o3_prev = toms_info2.datarr;
216  l = 0;
217  bad_ct = 0;
218  for (j = 0; j < shape[0]; j++) /* lats */ {
219  for (k = 0; k < shape[1]; k++) /* lons */ {
220  /*
221  * Overwrite missings (0's) with matching
222  * position from previous day's data. Mark QC array (as EARLIERVAL)
223  */
224  if (*(o3 + k + shape[1] * j) == 0) {
225  if (*(o3_prev + k + shape[1] * j) != 0) {
226  *(o3 + k + shape[1] * j) = *(o3_prev + k + shape[1] * j);
227  int8_SDSdataQC[l] = EARLIERVAL;
228  } else /* even 2nd file is missing for this point */ {
229  /* Scan lons in either longitudinal direction from current point */
230  for (kk = 1; kk <= 50; kk++) {
231  if ((k - kk >= 0) && (*(o3 + (k - kk) + shape[1] * j) > 0)) {
232  *(o3 + k + shape[1] * j) = *(o3 + (k - kk) + shape[1] * j);
233  int8_SDSdataQC[l] = NEARESTVAL;
234  break;
235  } else if ((k + kk < shape[1])
236  && (*(o3 + (k + kk) + shape[1] * j) > 0)) {
237  *(o3 + k + shape[1] * j) = *(o3 + (k + kk) + shape[1] * j);
238  int8_SDSdataQC[l] = NEARESTVAL;
239  break;
240  }
241  }
242  }
243  modified_pts++;
244  }
245 
246  if (*(o3 + k + shape[1] * j) > 0) {
247  int16_SDSdataO3[l] = *(o3 + k + shape[1] * j);
248  } else {
249  int16_SDSdataO3[l] = 0;
250  int8_SDSdataQC[l] = 20; /* missing data bad ancillary */
251  bad_ct++;
252  }
253  l++; /* index counter */
254  } /* for k */
255  } /* for j */
256  /*
257  * if the file is all bad data, don't make it
258  */
259  if (shape[0] * shape[1] == bad_ct)
260  pexit("Final ozone array is all bad");
261 
262  /*
263  * make the fill seamlessly join to the day's data
264  */
265  if (fill_smooth(int16_SDSdataO3, (char *) int8_SDSdataQC, shape[1], shape[0])
266  != 0)
267  pexit("fill_smooth problem");
268  /*
269  * get both generation dates to gen_strs
270  */
271  strcpy(gen_strs, toms_info.gen_str);
272  strcat(gen_strs, ",");
273  strcat(gen_strs, toms_info2.gen_str);
274  /*
275  * ------- Assign metadata values to local descriptive variables ----
276  * ------- insert dates and other values to metadata array ---------
277  */
278 
279  for (i = 0; i < numannarr; i++) {
280 
281  if (!strcmp(xannot[i].label, "Product Name"))
282  sprintf(xannot[i].descr, "%s", outfilename);
283 
284  else if (!strcmp(xannot[i].label, "Processing Time")) {
285 
286  /* Determine processing time */
287  (void) time(&t);
288  localtm = localtime(&t);
289  pyear = localtm->tm_year;
290  if (pyear < 90) pyear = pyear + 2000; /* 2 digit to 4 */
291  else pyear = pyear + 1900;
292 
293  sprintf(xannot[i].descr, "%04d%03d%02d%02d%02d%03d",
294  pyear, localtm->tm_yday + 1, localtm->tm_hour, localtm->tm_min,
295  localtm->tm_sec, 0);
296  }
297  else if (!strcmp(xannot[i].label, "Input Files"))
298  sprintf(xannot[i].descr, "%s,%s", infile, prevfile);
299 
300  else if (!strcmp(xannot[i].label, "Processing Control"))
301  sprintf(xannot[i].descr, "%s %s %s %s %s",
302  argv[0], annotfile, infile, directory, prevfile);
303 
304  else if (!strcmp(xannot[i].label, "Start Time"))
305  sprintf(xannot[i].descr, "%s", start_time);
306 
307  else if (!strcmp(xannot[i].label, "End Time"))
308  sprintf(xannot[i].descr, "%s", end_time);
309 
310  else if (!strcmp(xannot[i].label, "Start Year"))
311  sprintf(xannot[i].descr, "%04d", startyear);
312 
313  else if (!strcmp(xannot[i].label, "Start Day"))
314  sprintf(xannot[i].descr, "%03d", startday);
315 
316  else if (!strcmp(xannot[i].label, "Start Millisec"))
317  sprintf(xannot[i].descr, "%08d", startmsecday);
318 
319  else if (!strcmp(xannot[i].label, "End Year"))
320  sprintf(xannot[i].descr, "%04d", endyear);
321 
322  else if (!strcmp(xannot[i].label, "End Day"))
323  sprintf(xannot[i].descr, "%03d", endday);
324 
325  else if (!strcmp(xannot[i].label, "End Millisec"))
326  sprintf(xannot[i].descr, "%08d", endmsecday);
327 
328  else if (!strcmp(xannot[i].label, "Node Crossing Time"))
329  sprintf(xannot[i].descr, "%s", toms_info.node_time);
330 
331  else if (!strcmp(xannot[i].label, "Points Modified"))
332  sprintf(xannot[i].descr, "%08d", modified_pts);
333 
334  else if (!strcmp(xannot[i].label, "Data Source"))
335  sprintf(xannot[i].descr, "%s",
336  inst_name_frag[ toms_info.toms_typ - 1 ]);
337 
338  else if (!strcmp(xannot[i].label, "Data Source Desc"))
339  sprintf(xannot[i].descr, "%s",
340  inst_data_src[ toms_info.toms_typ - 1 ]);
341 
342  else if (!strcmp(xannot[i].label, "Satellite Platform"))
343  sprintf(xannot[i].descr, "%s",
344  inst_platform[ toms_info.toms_typ - 1 ]);
345 
346  else if (!strcmp(xannot[i].label, "Latitude Step"))
347  sprintf(xannot[i].descr, "%5.3f", toms_info.del_lat);
348 
349  else if (!strcmp(xannot[i].label, "Longitude Step"))
350  sprintf(xannot[i].descr, "%5.3f", toms_info.del_lon);
351 
352  else if (!strcmp(xannot[i].label, "SW Point Latitude"))
353  sprintf(xannot[i].descr, "%8.3f", toms_info.slat);
354 
355  else if (!strcmp(xannot[i].label, "SW Point Longitude"))
356  sprintf(xannot[i].descr, "%8.3f", toms_info.slon);
357 
358  else if (!strcmp(xannot[i].label, "Number of Rows"))
359  sprintf(xannot[i].descr, "%08d", toms_info.nlat);
360 
361  else if (!strcmp(xannot[i].label, "Number of Columns"))
362  sprintf(xannot[i].descr, "%08d", toms_info.nlon);
363 
364  else if (!strcmp(xannot[i].label, "Raw Data Generation Date"))
365  sprintf(xannot[i].descr, "%s", gen_strs);
366 
367  } /* for i */
368 
369  /*
370  * Create HDF file
371  */
372 
373  if ((result = startHDF(outfile, &sdfid, &fid, DFACC_CREATE)) != 0)
374  pexit("Fatal error starting HDF file");
375 
376  /*
377  * Write attribute array to HDF file
378  */
379 
380  if ((result = wrtattr(sdfid, xannot, numannarr)) != 0) pexit("wrtattr");
381  free(xannot);
382 
383 
384  /*
385  * --- Write OZONE SDS, units attribute, and add to grid Vgroup ----------
386  */
387 
388  datalabel = "ozone";
389  strcpy(dataunit, "Total ozone");
390  strcpy(dataattr, "Dobson units");
391  datafmt = "int16";
392  datatype = DFNT_INT16;
393 
394  gridid = setupGrid(fid, VGROUPNAME);
395 
396  if ((SDSinFile(datalabel, dataunit, dataattr, datafmt,
397  datatype, sdfid, rank, shape, int16_SDSdataO3, gridid)) != 0)
398  pexit("SDSinFile ozone wrtsds");
399 
400  free(int16_SDSdataO3);
401 
402  /*
403  * --- Write OZONE QC flag SDS, units attribute, and add to grid Vgroup ---
404  */
405 
406  datalabel = "ozone_QC";
407  strcpy(dataunit, "Total ozone Q/C flag");
408  strcpy(dataattr, "");
409  datafmt = "int8";
410  datatype = DFNT_INT8;
411 
412  if ((SDSinFile(datalabel, dataunit, dataattr, datafmt,
413  datatype, sdfid, rank, shape, int8_SDSdataQC, gridid)) != 0)
414  pexit("SDSinFile ozone QC wrtsds");
415 
416  free(int8_SDSdataQC);
417 
418  deattachHDFgrid(gridid); /* deattach HDF grid */
419 
420  /*
421  * close HDF structures
422  */
423 
424  result = 0;
425  if ((result = closeHDFstructs(sdfid, fid)) != 0) pexit("closeHDFstructs");
426 
427 
428  /*
429  * Print info to STDOUT for SeaWiFS Project
430  */
431 
432  printf("%s+%s+%s\n", outfile, start_time, end_time);
433 
434  exit(0);
435 
436 } /* main */
437 
438 int rd_oz_grid( char * infile, toms_txt_info_struc *toms_info )
439 /****************************************************************************
440  rd_oz_grid - read the grid of ozone from a GES DISC HDF5 file of AURA
441  OMI ozone
442 
443  Returns int, status 0 is good
444 
445  Parameters: (in calling order)
446  Type Name I/O Description
447  ---- ---- --- -----------
448  char * infile I file to read
449  toms_txt_info_struc * toms_info O All info about the grid
450 
451  W. Robinson, 3 Sep 2021
452 ****************************************************************************/
453  {
454  static int npix = 360, nlin = 180;
455  h5io_str fid, grp_id;
456  int ret = 1, stat, iloc, oloc;
457  int32_t year, doy;
458  float *tmp_flt, fval;
459  char dat_grp[] =
460  "HDFEOS/GRIDS/OMI Column Amount O3/Data Fields/ColumnAmountO3";
461  char attr_path[] = "HDFEOS/ADDITIONAL/FILE_ATTRIBUTES";
462  /*
463  * at first, assume the file is hdf 5 and try reading it that way
464  * open file, get the ozone array
465  */
466  if( ( stat = h5io_openr( infile, 0, &fid ) ) != 0 ) {
467  printf("%s, %d: Open error on file: %s\n", __FILE__, __LINE__, infile );
468  }
469  if( stat == 0 )
470  {
471  /*
472  * the file is h5. assume it is ONI TOMS
473  */
474  toms_info->toms_typ = TOMS_TYP_OMITOMS;
475  // make a temporary float for the read data
476  if( ( tmp_flt = (float *) malloc( 180 * 360 * sizeof(float) ) ) == NULL )
477  {
478  printf("%s, %d: Unable to malloc the oz storage space\n",
479  __FILE__, __LINE__ );
480  return ret;
481  }
482  if( ( stat = h5io_grab_ds( &fid, dat_grp, (float *)tmp_flt ) ) != 0 ) {
483  printf("%s, %d: read error on file: %s\n", __FILE__, __LINE__, infile );
484  return ret;
485  }
486  /*
487  * Set up the final int16 storage for the ozone data
488  */
489  if( ( toms_info->datarr = (int16 *) malloc( npix * nlin * sizeof(int16) ) )
490  == NULL )
491  {
492  printf("%s, %d: Unable to allocate the storage for the ozone data\n",
493  __FILE__, __LINE__ );
494  return ret;
495  }
496  for( iloc = 0; iloc < npix * nlin; iloc++ )
497  {
498  /* to match the old AURA O3 flip in latitude */
499  oloc = ( iloc % npix ) + npix * ( nlin - 1 - iloc / npix );
500  fval = *( tmp_flt + iloc );
501  *( toms_info->datarr + oloc ) = ( ( fval < 50. ) || ( fval > 700. ) )
502  ? 0 : (int16) ( fval + 0.5 );
503  }
504  free( tmp_flt );
505  /*
506  * set group to HDFEOS/ADDITIONAL/FILE_ATTRIBUTES and get the GranuleYear,
507  * GranuleDayOfYear
508  */
509  if( ( stat = h5io_set_grp( &fid, attr_path, &grp_id ) ) != 0 ) {
510  printf("%s, %d: path could not be set on file: %s\n", __FILE__,
511  __LINE__, infile );
512  return ret;
513  }
514 
515  if( ( stat = h5io_rd_attr( &grp_id, "GranuleYear",
516  &year ) )!= 0 ) {
517  printf("%s, %d: unable to read attr GranuleYear on file: %s\n", __FILE__,
518  __LINE__, infile );
519  return ret;
520  }
521  if( ( stat = h5io_rd_attr( &grp_id, "GranuleDayOfYear",
522  &doy ) )!= 0 ) {
523  printf("%s, %d: unable to read attr GranuleDayOfYear on file: %s\n", __FILE__,
524  __LINE__, infile );
525  return ret;
526  }
527 
528  /*
529  * set up various other info
530  */
531  toms_info->year = year;
532  toms_info->doy = doy;
533  sprintf( toms_info->node_time, "%04d%03d000000000", year, doy );
534  toms_info->nlon = npix;
535  toms_info->slon = -179.5;
536  toms_info->elon = 179.5;
537  toms_info->del_lon = 1.;
538  toms_info->nlat = nlin;
539  toms_info->slat = -89.5;
540  toms_info->elat = 89.5;
541  toms_info->del_lat = 1.;
542  strcpy( toms_info->gen_str, "None" );
543  /*
544  * Close it up
545  */
546  h5io_close( &fid );
547  ret = 0;
548  return ret;
549  }
550  else
551  {
552  /*
553  * if it fails, assume ascii and try to read
554  */
555  if (rd_toms_ascii(infile, toms_info) != 0)
556  pexit("rd_toms_ascii");
557  }
558  ret = 0;
559  return ret;
560  }
561 
562 /*****************************************************************
563  * File: check_usage
564  *
565  * Purpose: check command line arguments
566  *
567  * Description: check command line arguements and report proper usage
568  * on argument count error or no argumnts.
569  *
570  * Input parms:
571  * char *annotfile - input file of DAAC compliant annots ("fillenv.tomsnrt")
572  * char *infile - input ozone file to process ("nimoz100.y93")
573  * char *directory - output file directory (".")
574  *
575  * Output parms:none
576  *
577  * Returns: success (0) or failure(-1)
578  *
579  * Subs called: none
580  *
581  * History: none
582  *
583  * Note: This routine is custom for each program that uses it since
584  * the arguments are different of course.
585  *
586  * Author: Brian D. Schieber, GSC, 9/93
587  *
588  * Modification history:
589  * W. Robinson, SAIC Dec 2013 mod for use in o3_toms
590  *****************************************************************/
591 
592 
593 int8 check_usage(int argc, char *argv[]) {
594  if (argc < 4) {
595  printf("\n\nUsage:\n");
596  printf("\t%s <file> <directory> <prevfile>\n", argv[0]);
597  printf("\nWhere:\n");
598  printf("\tfile: file to process\n");
599  printf("\tdirectory: output directory (no ending slash)\n");
600  printf("\tprevfile: previous day \n");
601  printf("\n\n");
602  printf("\tExample:\n");
603  printf("\t\t o3_toms $SDSDEMO/fillenv.eptomsnrt $SDSDEMO/ga960903.ept\n");
604  printf("\t\t ./ $SDSDEMO/ga960902.ept\n\n");
605  return -1;
606  }
607  return 0;
608 }
int rd_oz_grid(char *infile, toms_txt_info_struc *toms_info)
Definition: o3_toms.c:437
int32_t setupGrid(int32_t fid, char *grpname)
Definition: ANCroutines.c:51
integer, parameter int16
Definition: cubeio.f90:3
data_t t[NROOTS+1]
Definition: decode_rs.h:77
int j
Definition: decode_rs.h:73
int h5io_openr(char *file, int opt, h5io_str *id)
Definition: h5io.c:4
int32_t SDSinFile(char *sdsname, char *longname, char *units, char *datafmt, int32_t datatype, int32_t sdfid, int32_t rank, int32_t *shape, void *data, int32_t gridid)
int32_t o3
Definition: atrem_corl1.h:118
#define NEARESTVAL
Definition: o3_toms.c:40
#define NULL
Definition: decode_rs.h:63
int rd_toms_ascii(char *, toms_txt_info_struc *)
Definition: rd_toms_ascii.c:8
float tm[MODELMAX]
int h5io_close(h5io_str *id)
Definition: h5io.c:115
int nlin
Definition: get_cmp.c:28
#define EARLIERVAL
Definition: o3_toms.c:39
int h5io_set_grp(h5io_str *id, char *path_name, h5io_str *grp_id)
Definition: h5io.c:369
int fill_smooth(int16_t *arr, char *arrqc, int32_t npix, int32_t nlin)
Definition: fill_smooth.c:11
char descr[MAXDESCLEN]
Definition: ancil.h:72
int wrtattr(int32_t dfile, struct annotation *annot, int numannarr)
Definition: ANCroutines.c:631
int h5io_rd_attr(h5io_str *id, char *attr_name, void *data)
Definition: h5io.c:412
int count_annot(char *filename)
Definition: countann.c:11
#define VGROUPNAME
Definition: o3_toms.c:38
#define TOMS_TYP_OMITOMS
Definition: o3_toms.h:8
int32_t wrtsds(int32_t sdfid, int rank, int32_t *shape, int32_t datatype, char *datalabel, void *data)
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT16
struct annotation * fillenv_annot(char *filename)
Definition: fillenv.c:15
int deattachHDFgrid(int32_t gridid)
Definition: ANCroutines.c:267
char * upcase(char *instr)
Definition: upcase.c:10
int closeHDFstructs(int32_t sdfid, int32_t fid)
Definition: ANCroutines.c:281
void pexit(char *string)
Definition: pexit.c:10
int h5io_grab_ds(h5io_str *id, char *path_name, void *data)
Definition: h5io.c:1347
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start time
Definition: HISTORY.txt:248
Extra metadata that will be written to the HDF4 file l2prod rank
int main(int argc, char *argv[])
Definition: o3_toms.c:42
int8 check_usage(int argc, char *argv[])
Definition: o3_toms.c:592
int setSDSref(int32_t sdsid, int32_t gridid)
Definition: ANCroutines.c:245
#define MAXNAMELNG
Definition: ancil.h:43
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
string outfilename
Definition: color_dtdb.py:220
int npix
Definition: get_cmp.c:27
int startHDF(char *outfile, int32_t *sdfid, int32_t *fid, int32_t mode)
Definition: ANCroutines.c:27