Go to the documentation of this file.
7 static char *att_rd_str[] = {
"NOREAD",
"READ_NOCK",
"READ_ONE_VAL",
36 char line[500], line_sav[500], str_typ[200], *
str;
37 int i,
j,
k, ifound, ndata, ierr;
42 if ((fmt->att = malloc(fmt->n_attr * sizeof ( attr_str))) ==
NULL) {
43 printf(
"**************Program error\n");
44 printf(
"in: %s, attrib allocation failed\n", __FILE__);
51 for (
i = 0;
i < fmt->n_attr;
i++) {
53 printf(
"**************Program error\n");
54 printf(
"unable to read attribute description # %d of file:\n'%s'\n",
56 printf(
"last line read:\n'%s'\n",
line);
62 fmt->att[
i].dim_index = -1;
68 printf(
"**************Program error\n");
70 "unable to read attr ctl value 1 of description # %d of file:\n'%s'\n",
72 printf(
"last line read:\n'%s'\n", line_sav);
78 for (
j = 0;
j < 5;
j++) {
80 printf(
"**************Program error\n");
82 "unable to read attr ctl value %d of description # %d of file:\n'%s'\n",
84 printf(
"last line read:\n'%s'\n", line_sav);
106 if (sscanf(
str,
"%d", &(fmt->att[
i].count)) == EOF) {
107 printf(
"**************Program error\n");
109 "unable to decode att ctl value count in desc # %d of file:\n'%s'\n",
111 printf(
"last line read:\n'%s'\n", line_sav);
120 for (
k = 0;
k < 4;
k++) {
121 if (strcmp(
str, att_rd_str[
k]) == 0) {
122 fmt->att[
i].read =
k;
128 printf(
"**************Program error\n");
129 printf(
"Improper read code for the attribute\n");
130 printf(
"desc # %d of file:\n'%s'\n",
i,
file);
131 printf(
"last line read:\n'%s'\n", line_sav);
147 ndata = fmt->att[
i].count;
150 if (strcmp(str_typ,
"DFNT_CHAR") == 0) {
151 fmt->att[
i].type = DFNT_CHAR;
153 }
else if (strcmp(str_typ,
"DFNT_INT8") == 0) {
154 fmt->att[
i].type = DFNT_INT8;
155 }
else if (strcmp(str_typ,
"DFNT_UINT8") == 0) {
156 fmt->att[
i].type = DFNT_UINT8;
157 }
else if (strcmp(str_typ,
"DFNT_INT16") == 0) {
159 }
else if (strcmp(str_typ,
"DFNT_INT32") == 0) {
161 }
else if (strcmp(str_typ,
"DFNT_FLOAT32") == 0) {
163 }
else if (strcmp(str_typ,
"DFNT_FLOAT64") == 0) {
164 fmt->att[
i].type = DFNT_FLOAT64;
166 fmt->att[
i].type = -9999;
174 for (
j = 0;
j < ndata;
j++) {
176 printf(
"**************Program error\n");
177 printf(
"unable to find data #%d in desc # %d of file:\n'%s'\n",
179 printf(
"last line read:\n'%s'\n", line_sav);
184 (
void *) fmt->att[
i].data.i32,
j, 0)) != 0) {
186 printf(
"**************Program error\n");
188 "unable to decode #%d in attribute description # %d of file:\n'%s'\n",
190 printf(
"last line read:\n'%s'\n", line_sav);
195 printf(
"**************Program error\n");
197 "Value # %d is out of range in attr descrip # %d of file:\n'%s'\n",
199 printf(
"last line read:\n'%s'\n", line_sav);
204 printf(
"**************Program error\n");
206 "data type of: %d is not handled by fmt_read currently\n",
209 "In attr descrip # %d of file:\n'%s'\n",
i,
file);
char * get_line(char *, int, FILE *, int)
int fmt_rd_attr(char *file, FILE *fid, fmt_str *fmt)
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT32
int var_decode(char *, int32, void *, int32, int32)
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
char * s_parse(char *, int)
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT16
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT32
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")