Skip to content. | Skip to navigation

Personal tools

airs_rad_rdr.c

#include <stdio.h>
#include <stdlib.h>
#include "hdf.h" /* defines int32, intn, etc. */
#include "HdfEosDef.h" /* declares SWopen(), etc. */
#include "airs_rad_typ.h"
#include "airs_rad_struct.h"


/*
* This function is autogenerated by the mkezio program to read
* an AIRS swath of type "L1B_AIRS_Science" from file given by the
* file_name argument into a buffer pointed to by the airs_rad_gran
* argument. The caller owns the buffer. The entire granule
* is read -- every attribute and field, the whole lat/lon/time
* extent.
*
* Errors opening the file, etc. are fatal and cause exit(EXIT_FAILURE).
* Problems reading individual attributes or fields are reported to
* the console but do not interrupt program flow.
*/
void airs_rad_rdr(
char * file_name, /* name of file to read */
airs_rad_gran_t * airs_rad_gran ) /* structured buffer to hold entire granule */
{
intn statn; /* HDF-EOS status. 0 for success */
int32 fid; /* HDF-EOS file ID */
int32 swid; /* HDF-EOS swath ID */
int32 nchar; /* Number of characters */
char swathname[256]; /* Name of swath */
int nswath; /* Number of swaths */
char * cp = 0; /* pointer to start of version # in file name */
int major = 0, minor = 0, patch = 0, subpatch = 0;
/* parts of version number */

/* Figure out version from file name */

/* skip past directories if full path is present */
cp = strrchr(file_name, '/');
if (!cp) cp = file_name;

/*
* File will look more or less like:
* AIRS.2002.09.06.125.L1B.AIRS_Rad.v4.0.6.0.PGE_Verify.T04352025159.hdf
*/
cp = strstr(cp, ".v");

if (cp) {
int nscanned = sscanf(cp, ".v%d.%d.%d.%d",
&major, &minor, &patch, &subpatch);
if (nscanned != 4)
printf("Failed to get version from file name %s starting at %s\n",
file_name, cp);
} else {
printf("Failed to get version from file name %s\n", file_name);
printf("so version number cannot be checked.\n\n");
}

/* if we did get a version number, check it */
if (major + minor + patch + subpatch) {
if (major != 5 || minor != 0 || patch != 14 || subpatch != 0) {
printf("Warning: airs_rad file read is version %d.%d.%d.%d ",
major, minor, patch, subpatch);
printf("but reader is designed for 5.0.14.0\n");
}
}

/* Clear granule structure */
memset(airs_rad_gran, 0, sizeof(airs_rad_gran));

fid = SWopen(file_name, DFACC_READ);
if (fid <= 0) {
printf("Error %ld opening file %s\n", (long)fid, file_name);
exit(EXIT_FAILURE);
}

/* Get name of swath(s) */
nswath = SWinqswath(file_name, swathname, &nchar);
if (nswath != 1) {
printf("SWinqswath found %d swaths for file \"%s\". Need exactly 1\n", nswath, file_name);
exit(EXIT_FAILURE);
}

/* There's exactly one swath. Make sure it is the right one. */
if (strcmp(swathname, "L1B_AIRS_Science")) {
printf("Error: bad swath name \"%s\" in file \"%s\"\n", swathname, file_name);
printf("Expected \"L1B_AIRS_Science\"\n");
exit(EXIT_FAILURE);
}

/* Attach to (open) the one swath. */
swid = SWattach(fid, swathname);
if (swid <= 0) {
printf("Failed to attach to swath \"%s\" in file %s\n", swathname, file_name);
exit(EXIT_FAILURE);
}

/* Attributes */
statn = SWreadattr(swid, "processing_level",
(void *)airs_rad_gran->processing_level);
if (statn != 0)
printf("Error %d reading attribute processing_level\n", statn);

statn = SWreadattr(swid, "instrument",
(void *)airs_rad_gran->instrument);
if (statn != 0)
printf("Error %d reading attribute instrument\n", statn);

statn = SWreadattr(swid, "DayNightFlag",
(void *)airs_rad_gran->DayNightFlag);
if (statn != 0)
printf("Error %d reading attribute DayNightFlag\n", statn);

statn = SWreadattr(swid, "AutomaticQAFlag",
(void *)airs_rad_gran->AutomaticQAFlag);
if (statn != 0)
printf("Error %d reading attribute AutomaticQAFlag\n", statn);

statn = SWreadattr(swid, "NumTotalData",
(void *)&airs_rad_gran->NumTotalData);
if (statn != 0)
printf("Error %d reading attribute NumTotalData\n", statn);

statn = SWreadattr(swid, "NumProcessData",
(void *)&airs_rad_gran->NumProcessData);
if (statn != 0)
printf("Error %d reading attribute NumProcessData\n", statn);

statn = SWreadattr(swid, "NumSpecialData",
(void *)&airs_rad_gran->NumSpecialData);
if (statn != 0)
printf("Error %d reading attribute NumSpecialData\n", statn);

statn = SWreadattr(swid, "NumBadData",
(void *)&airs_rad_gran->NumBadData);
if (statn != 0)
printf("Error %d reading attribute NumBadData\n", statn);

statn = SWreadattr(swid, "NumMissingData",
(void *)&airs_rad_gran->NumMissingData);
if (statn != 0)
printf("Error %d reading attribute NumMissingData\n", statn);

statn = SWreadattr(swid, "NumLandSurface",
(void *)&airs_rad_gran->NumLandSurface);
if (statn != 0)
printf("Error %d reading attribute NumLandSurface\n", statn);

statn = SWreadattr(swid, "NumOceanSurface",
(void *)&airs_rad_gran->NumOceanSurface);
if (statn != 0)
printf("Error %d reading attribute NumOceanSurface\n", statn);

statn = SWreadattr(swid, "node_type",
(void *)airs_rad_gran->node_type);
if (statn != 0)
printf("Error %d reading attribute node_type\n", statn);

statn = SWreadattr(swid, "start_year",
(void *)&airs_rad_gran->start_year);
if (statn != 0)
printf("Error %d reading attribute start_year\n", statn);

statn = SWreadattr(swid, "start_month",
(void *)&airs_rad_gran->start_month);
if (statn != 0)
printf("Error %d reading attribute start_month\n", statn);

statn = SWreadattr(swid, "start_day",
(void *)&airs_rad_gran->start_day);
if (statn != 0)
printf("Error %d reading attribute start_day\n", statn);

statn = SWreadattr(swid, "start_hour",
(void *)&airs_rad_gran->start_hour);
if (statn != 0)
printf("Error %d reading attribute start_hour\n", statn);

statn = SWreadattr(swid, "start_minute",
(void *)&airs_rad_gran->start_minute);
if (statn != 0)
printf("Error %d reading attribute start_minute\n", statn);

statn = SWreadattr(swid, "start_sec",
(void *)&airs_rad_gran->start_sec);
if (statn != 0)
printf("Error %d reading attribute start_sec\n", statn);

statn = SWreadattr(swid, "start_orbit",
(void *)&airs_rad_gran->start_orbit);
if (statn != 0)
printf("Error %d reading attribute start_orbit\n", statn);

statn = SWreadattr(swid, "end_orbit",
(void *)&airs_rad_gran->end_orbit);
if (statn != 0)
printf("Error %d reading attribute end_orbit\n", statn);

statn = SWreadattr(swid, "orbit_path",
(void *)&airs_rad_gran->orbit_path);
if (statn != 0)
printf("Error %d reading attribute orbit_path\n", statn);

statn = SWreadattr(swid, "start_orbit_row",
(void *)&airs_rad_gran->start_orbit_row);
if (statn != 0)
printf("Error %d reading attribute start_orbit_row\n", statn);

statn = SWreadattr(swid, "end_orbit_row",
(void *)&airs_rad_gran->end_orbit_row);
if (statn != 0)
printf("Error %d reading attribute end_orbit_row\n", statn);

statn = SWreadattr(swid, "granule_number",
(void *)&airs_rad_gran->granule_number);
if (statn != 0)
printf("Error %d reading attribute granule_number\n", statn);

statn = SWreadattr(swid, "num_scansets",
(void *)&airs_rad_gran->num_scansets);
if (statn != 0)
printf("Error %d reading attribute num_scansets\n", statn);

statn = SWreadattr(swid, "num_scanlines",
(void *)&airs_rad_gran->num_scanlines);
if (statn != 0)
printf("Error %d reading attribute num_scanlines\n", statn);

statn = SWreadattr(swid, "start_Latitude",
(void *)&airs_rad_gran->start_Latitude);
if (statn != 0)
printf("Error %d reading attribute start_Latitude\n", statn);

statn = SWreadattr(swid, "start_Longitude",
(void *)&airs_rad_gran->start_Longitude);
if (statn != 0)
printf("Error %d reading attribute start_Longitude\n", statn);

statn = SWreadattr(swid, "start_Time",
(void *)&airs_rad_gran->start_Time);
if (statn != 0)
printf("Error %d reading attribute start_Time\n", statn);

statn = SWreadattr(swid, "end_Latitude",
(void *)&airs_rad_gran->end_Latitude);
if (statn != 0)
printf("Error %d reading attribute end_Latitude\n", statn);

statn = SWreadattr(swid, "end_Longitude",
(void *)&airs_rad_gran->end_Longitude);
if (statn != 0)
printf("Error %d reading attribute end_Longitude\n", statn);

statn = SWreadattr(swid, "end_Time",
(void *)&airs_rad_gran->end_Time);
if (statn != 0)
printf("Error %d reading attribute end_Time\n", statn);

statn = SWreadattr(swid, "eq_x_longitude",
(void *)&airs_rad_gran->eq_x_longitude);
if (statn != 0)
printf("Error %d reading attribute eq_x_longitude\n", statn);

statn = SWreadattr(swid, "eq_x_tai",
(void *)&airs_rad_gran->eq_x_tai);
if (statn != 0)
printf("Error %d reading attribute eq_x_tai\n", statn);

statn = SWreadattr(swid, "orbitgeoqa",
(void *)&airs_rad_gran->orbitgeoqa);
if (statn != 0)
printf("Error %d reading attribute orbitgeoqa\n", statn);

statn = SWreadattr(swid, "num_satgeoqa",
(void *)&airs_rad_gran->num_satgeoqa);
if (statn != 0)
printf("Error %d reading attribute num_satgeoqa\n", statn);

statn = SWreadattr(swid, "num_glintgeoqa",
(void *)&airs_rad_gran->num_glintgeoqa);
if (statn != 0)
printf("Error %d reading attribute num_glintgeoqa\n", statn);

statn = SWreadattr(swid, "num_moongeoqa",
(void *)&airs_rad_gran->num_moongeoqa);
if (statn != 0)
printf("Error %d reading attribute num_moongeoqa\n", statn);

statn = SWreadattr(swid, "num_ftptgeoqa",
(void *)&airs_rad_gran->num_ftptgeoqa);
if (statn != 0)
printf("Error %d reading attribute num_ftptgeoqa\n", statn);

statn = SWreadattr(swid, "num_zengeoqa",
(void *)&airs_rad_gran->num_zengeoqa);
if (statn != 0)
printf("Error %d reading attribute num_zengeoqa\n", statn);

statn = SWreadattr(swid, "num_demgeoqa",
(void *)&airs_rad_gran->num_demgeoqa);
if (statn != 0)
printf("Error %d reading attribute num_demgeoqa\n", statn);

statn = SWreadattr(swid, "num_fpe",
(void *)&airs_rad_gran->num_fpe);
if (statn != 0)
printf("Error %d reading attribute num_fpe\n", statn);

statn = SWreadattr(swid, "LonGranuleCen",
(void *)&airs_rad_gran->LonGranuleCen);
if (statn != 0)
printf("Error %d reading attribute LonGranuleCen\n", statn);

statn = SWreadattr(swid, "LatGranuleCen",
(void *)&airs_rad_gran->LatGranuleCen);
if (statn != 0)
printf("Error %d reading attribute LatGranuleCen\n", statn);

statn = SWreadattr(swid, "LocTimeGranuleCen",
(void *)&airs_rad_gran->LocTimeGranuleCen);
if (statn != 0)
printf("Error %d reading attribute LocTimeGranuleCen\n", statn);

statn = SWreadattr(swid, "CalGranSummary",
(void *)&airs_rad_gran->CalGranSummary);
if (statn != 0)
printf("Error %d reading attribute CalGranSummary\n", statn);

statn = SWreadattr(swid, "DCR_scan",
(void *)&airs_rad_gran->DCR_scan);
if (statn != 0)
printf("Error %d reading attribute DCR_scan\n", statn);

statn = SWreadattr(swid, "input_bb_temp.min",
(void *)&airs_rad_gran->input_bb_temp.min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.min\n", statn);

statn = SWreadattr(swid, "input_bb_temp.max",
(void *)&airs_rad_gran->input_bb_temp.max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.max\n", statn);

statn = SWreadattr(swid, "input_bb_temp.mean",
(void *)&airs_rad_gran->input_bb_temp.mean);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.mean\n", statn);

statn = SWreadattr(swid, "input_bb_temp.dev",
(void *)&airs_rad_gran->input_bb_temp.dev);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.dev\n", statn);

statn = SWreadattr(swid, "input_bb_temp.num_in",
(void *)&airs_rad_gran->input_bb_temp.num_in);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.num_in\n", statn);

statn = SWreadattr(swid, "input_bb_temp.num_lo",
(void *)&airs_rad_gran->input_bb_temp.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.num_lo\n", statn);

statn = SWreadattr(swid, "input_bb_temp.num_hi",
(void *)&airs_rad_gran->input_bb_temp.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.num_hi\n", statn);

statn = SWreadattr(swid, "input_bb_temp.num_bad",
(void *)&airs_rad_gran->input_bb_temp.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.num_bad\n", statn);

statn = SWreadattr(swid, "input_bb_temp.range_min",
(void *)&airs_rad_gran->input_bb_temp.range_min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.range_min\n", statn);

statn = SWreadattr(swid, "input_bb_temp.range_max",
(void *)&airs_rad_gran->input_bb_temp.range_max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.range_max\n", statn);

statn = SWreadattr(swid, "input_bb_temp.missing",
(void *)&airs_rad_gran->input_bb_temp.missing);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.missing\n", statn);

statn = SWreadattr(swid, "input_bb_temp.max_track",
(void *)&airs_rad_gran->input_bb_temp.max_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.max_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp.max_xtrack",
(void *)&airs_rad_gran->input_bb_temp.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp.min_track",
(void *)&airs_rad_gran->input_bb_temp.min_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.min_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp.min_xtrack",
(void *)&airs_rad_gran->input_bb_temp.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.min",
(void *)&airs_rad_gran->input_bb_temp1.min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.min\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.max",
(void *)&airs_rad_gran->input_bb_temp1.max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.max\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.mean",
(void *)&airs_rad_gran->input_bb_temp1.mean);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.mean\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.dev",
(void *)&airs_rad_gran->input_bb_temp1.dev);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.dev\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.num_in",
(void *)&airs_rad_gran->input_bb_temp1.num_in);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.num_in\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.num_lo",
(void *)&airs_rad_gran->input_bb_temp1.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.num_lo\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.num_hi",
(void *)&airs_rad_gran->input_bb_temp1.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.num_hi\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.num_bad",
(void *)&airs_rad_gran->input_bb_temp1.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.num_bad\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.range_min",
(void *)&airs_rad_gran->input_bb_temp1.range_min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.range_min\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.range_max",
(void *)&airs_rad_gran->input_bb_temp1.range_max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.range_max\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.missing",
(void *)&airs_rad_gran->input_bb_temp1.missing);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.missing\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.max_track",
(void *)&airs_rad_gran->input_bb_temp1.max_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.max_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.max_xtrack",
(void *)&airs_rad_gran->input_bb_temp1.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.min_track",
(void *)&airs_rad_gran->input_bb_temp1.min_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.min_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp1.min_xtrack",
(void *)&airs_rad_gran->input_bb_temp1.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp1.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.min",
(void *)&airs_rad_gran->input_bb_temp2.min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.min\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.max",
(void *)&airs_rad_gran->input_bb_temp2.max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.max\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.mean",
(void *)&airs_rad_gran->input_bb_temp2.mean);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.mean\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.dev",
(void *)&airs_rad_gran->input_bb_temp2.dev);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.dev\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.num_in",
(void *)&airs_rad_gran->input_bb_temp2.num_in);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.num_in\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.num_lo",
(void *)&airs_rad_gran->input_bb_temp2.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.num_lo\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.num_hi",
(void *)&airs_rad_gran->input_bb_temp2.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.num_hi\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.num_bad",
(void *)&airs_rad_gran->input_bb_temp2.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.num_bad\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.range_min",
(void *)&airs_rad_gran->input_bb_temp2.range_min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.range_min\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.range_max",
(void *)&airs_rad_gran->input_bb_temp2.range_max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.range_max\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.missing",
(void *)&airs_rad_gran->input_bb_temp2.missing);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.missing\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.max_track",
(void *)&airs_rad_gran->input_bb_temp2.max_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.max_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.max_xtrack",
(void *)&airs_rad_gran->input_bb_temp2.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.min_track",
(void *)&airs_rad_gran->input_bb_temp2.min_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.min_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp2.min_xtrack",
(void *)&airs_rad_gran->input_bb_temp2.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp2.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.min",
(void *)&airs_rad_gran->input_bb_temp3.min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.min\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.max",
(void *)&airs_rad_gran->input_bb_temp3.max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.max\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.mean",
(void *)&airs_rad_gran->input_bb_temp3.mean);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.mean\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.dev",
(void *)&airs_rad_gran->input_bb_temp3.dev);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.dev\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.num_in",
(void *)&airs_rad_gran->input_bb_temp3.num_in);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.num_in\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.num_lo",
(void *)&airs_rad_gran->input_bb_temp3.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.num_lo\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.num_hi",
(void *)&airs_rad_gran->input_bb_temp3.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.num_hi\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.num_bad",
(void *)&airs_rad_gran->input_bb_temp3.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.num_bad\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.range_min",
(void *)&airs_rad_gran->input_bb_temp3.range_min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.range_min\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.range_max",
(void *)&airs_rad_gran->input_bb_temp3.range_max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.range_max\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.missing",
(void *)&airs_rad_gran->input_bb_temp3.missing);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.missing\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.max_track",
(void *)&airs_rad_gran->input_bb_temp3.max_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.max_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.max_xtrack",
(void *)&airs_rad_gran->input_bb_temp3.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.min_track",
(void *)&airs_rad_gran->input_bb_temp3.min_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.min_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp3.min_xtrack",
(void *)&airs_rad_gran->input_bb_temp3.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp3.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.min",
(void *)&airs_rad_gran->input_bb_temp4.min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.min\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.max",
(void *)&airs_rad_gran->input_bb_temp4.max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.max\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.mean",
(void *)&airs_rad_gran->input_bb_temp4.mean);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.mean\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.dev",
(void *)&airs_rad_gran->input_bb_temp4.dev);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.dev\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.num_in",
(void *)&airs_rad_gran->input_bb_temp4.num_in);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.num_in\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.num_lo",
(void *)&airs_rad_gran->input_bb_temp4.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.num_lo\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.num_hi",
(void *)&airs_rad_gran->input_bb_temp4.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.num_hi\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.num_bad",
(void *)&airs_rad_gran->input_bb_temp4.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.num_bad\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.range_min",
(void *)&airs_rad_gran->input_bb_temp4.range_min);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.range_min\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.range_max",
(void *)&airs_rad_gran->input_bb_temp4.range_max);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.range_max\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.missing",
(void *)&airs_rad_gran->input_bb_temp4.missing);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.missing\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.max_track",
(void *)&airs_rad_gran->input_bb_temp4.max_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.max_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.max_xtrack",
(void *)&airs_rad_gran->input_bb_temp4.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.min_track",
(void *)&airs_rad_gran->input_bb_temp4.min_track);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.min_track\n", statn);

statn = SWreadattr(swid, "input_bb_temp4.min_xtrack",
(void *)&airs_rad_gran->input_bb_temp4.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_bb_temp4.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_spec_temp.min",
(void *)&airs_rad_gran->input_spec_temp.min);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.min\n", statn);

statn = SWreadattr(swid, "input_spec_temp.max",
(void *)&airs_rad_gran->input_spec_temp.max);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.max\n", statn);

statn = SWreadattr(swid, "input_spec_temp.mean",
(void *)&airs_rad_gran->input_spec_temp.mean);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.mean\n", statn);

statn = SWreadattr(swid, "input_spec_temp.dev",
(void *)&airs_rad_gran->input_spec_temp.dev);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.dev\n", statn);

statn = SWreadattr(swid, "input_spec_temp.num_in",
(void *)&airs_rad_gran->input_spec_temp.num_in);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.num_in\n", statn);

statn = SWreadattr(swid, "input_spec_temp.num_lo",
(void *)&airs_rad_gran->input_spec_temp.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.num_lo\n", statn);

statn = SWreadattr(swid, "input_spec_temp.num_hi",
(void *)&airs_rad_gran->input_spec_temp.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.num_hi\n", statn);

statn = SWreadattr(swid, "input_spec_temp.num_bad",
(void *)&airs_rad_gran->input_spec_temp.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.num_bad\n", statn);

statn = SWreadattr(swid, "input_spec_temp.range_min",
(void *)&airs_rad_gran->input_spec_temp.range_min);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.range_min\n", statn);

statn = SWreadattr(swid, "input_spec_temp.range_max",
(void *)&airs_rad_gran->input_spec_temp.range_max);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.range_max\n", statn);

statn = SWreadattr(swid, "input_spec_temp.missing",
(void *)&airs_rad_gran->input_spec_temp.missing);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.missing\n", statn);

statn = SWreadattr(swid, "input_spec_temp.max_track",
(void *)&airs_rad_gran->input_spec_temp.max_track);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.max_track\n", statn);

statn = SWreadattr(swid, "input_spec_temp.max_xtrack",
(void *)&airs_rad_gran->input_spec_temp.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_spec_temp.min_track",
(void *)&airs_rad_gran->input_spec_temp.min_track);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.min_track\n", statn);

statn = SWreadattr(swid, "input_spec_temp.min_xtrack",
(void *)&airs_rad_gran->input_spec_temp.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_spec_temp.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.min",
(void *)&airs_rad_gran->input_ir_det_temp.min);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.min\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.max",
(void *)&airs_rad_gran->input_ir_det_temp.max);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.max\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.mean",
(void *)&airs_rad_gran->input_ir_det_temp.mean);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.mean\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.dev",
(void *)&airs_rad_gran->input_ir_det_temp.dev);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.dev\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.num_in",
(void *)&airs_rad_gran->input_ir_det_temp.num_in);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.num_in\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.num_lo",
(void *)&airs_rad_gran->input_ir_det_temp.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.num_lo\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.num_hi",
(void *)&airs_rad_gran->input_ir_det_temp.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.num_hi\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.num_bad",
(void *)&airs_rad_gran->input_ir_det_temp.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.num_bad\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.range_min",
(void *)&airs_rad_gran->input_ir_det_temp.range_min);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.range_min\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.range_max",
(void *)&airs_rad_gran->input_ir_det_temp.range_max);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.range_max\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.missing",
(void *)&airs_rad_gran->input_ir_det_temp.missing);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.missing\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.max_track",
(void *)&airs_rad_gran->input_ir_det_temp.max_track);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.max_track\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.max_xtrack",
(void *)&airs_rad_gran->input_ir_det_temp.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.min_track",
(void *)&airs_rad_gran->input_ir_det_temp.min_track);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.min_track\n", statn);

statn = SWreadattr(swid, "input_ir_det_temp.min_xtrack",
(void *)&airs_rad_gran->input_ir_det_temp.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_ir_det_temp.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.min",
(void *)&airs_rad_gran->input_grating_temp_1.min);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.min\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.max",
(void *)&airs_rad_gran->input_grating_temp_1.max);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.max\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.mean",
(void *)&airs_rad_gran->input_grating_temp_1.mean);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.mean\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.dev",
(void *)&airs_rad_gran->input_grating_temp_1.dev);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.dev\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.num_in",
(void *)&airs_rad_gran->input_grating_temp_1.num_in);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.num_in\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.num_lo",
(void *)&airs_rad_gran->input_grating_temp_1.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.num_lo\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.num_hi",
(void *)&airs_rad_gran->input_grating_temp_1.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.num_hi\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.num_bad",
(void *)&airs_rad_gran->input_grating_temp_1.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.num_bad\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.range_min",
(void *)&airs_rad_gran->input_grating_temp_1.range_min);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.range_min\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.range_max",
(void *)&airs_rad_gran->input_grating_temp_1.range_max);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.range_max\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.missing",
(void *)&airs_rad_gran->input_grating_temp_1.missing);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.missing\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.max_track",
(void *)&airs_rad_gran->input_grating_temp_1.max_track);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.max_track\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.max_xtrack",
(void *)&airs_rad_gran->input_grating_temp_1.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.min_track",
(void *)&airs_rad_gran->input_grating_temp_1.min_track);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.min_track\n", statn);

statn = SWreadattr(swid, "input_grating_temp_1.min_xtrack",
(void *)&airs_rad_gran->input_grating_temp_1.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_1.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.min",
(void *)&airs_rad_gran->input_grating_temp_2.min);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.min\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.max",
(void *)&airs_rad_gran->input_grating_temp_2.max);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.max\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.mean",
(void *)&airs_rad_gran->input_grating_temp_2.mean);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.mean\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.dev",
(void *)&airs_rad_gran->input_grating_temp_2.dev);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.dev\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.num_in",
(void *)&airs_rad_gran->input_grating_temp_2.num_in);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.num_in\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.num_lo",
(void *)&airs_rad_gran->input_grating_temp_2.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.num_lo\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.num_hi",
(void *)&airs_rad_gran->input_grating_temp_2.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.num_hi\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.num_bad",
(void *)&airs_rad_gran->input_grating_temp_2.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.num_bad\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.range_min",
(void *)&airs_rad_gran->input_grating_temp_2.range_min);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.range_min\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.range_max",
(void *)&airs_rad_gran->input_grating_temp_2.range_max);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.range_max\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.missing",
(void *)&airs_rad_gran->input_grating_temp_2.missing);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.missing\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.max_track",
(void *)&airs_rad_gran->input_grating_temp_2.max_track);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.max_track\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.max_xtrack",
(void *)&airs_rad_gran->input_grating_temp_2.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.min_track",
(void *)&airs_rad_gran->input_grating_temp_2.min_track);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.min_track\n", statn);

statn = SWreadattr(swid, "input_grating_temp_2.min_xtrack",
(void *)&airs_rad_gran->input_grating_temp_2.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_grating_temp_2.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.min",
(void *)&airs_rad_gran->input_entr_filt_temp.min);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.min\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.max",
(void *)&airs_rad_gran->input_entr_filt_temp.max);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.max\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.mean",
(void *)&airs_rad_gran->input_entr_filt_temp.mean);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.mean\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.dev",
(void *)&airs_rad_gran->input_entr_filt_temp.dev);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.dev\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.num_in",
(void *)&airs_rad_gran->input_entr_filt_temp.num_in);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.num_in\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.num_lo",
(void *)&airs_rad_gran->input_entr_filt_temp.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.num_lo\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.num_hi",
(void *)&airs_rad_gran->input_entr_filt_temp.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.num_hi\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.num_bad",
(void *)&airs_rad_gran->input_entr_filt_temp.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.num_bad\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.range_min",
(void *)&airs_rad_gran->input_entr_filt_temp.range_min);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.range_min\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.range_max",
(void *)&airs_rad_gran->input_entr_filt_temp.range_max);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.range_max\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.missing",
(void *)&airs_rad_gran->input_entr_filt_temp.missing);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.missing\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.max_track",
(void *)&airs_rad_gran->input_entr_filt_temp.max_track);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.max_track\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.max_xtrack",
(void *)&airs_rad_gran->input_entr_filt_temp.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.min_track",
(void *)&airs_rad_gran->input_entr_filt_temp.min_track);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.min_track\n", statn);

statn = SWreadattr(swid, "input_entr_filt_temp.min_xtrack",
(void *)&airs_rad_gran->input_entr_filt_temp.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_entr_filt_temp.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.min",
(void *)&airs_rad_gran->input_opt_bench_temp_2.min);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.min\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.max",
(void *)&airs_rad_gran->input_opt_bench_temp_2.max);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.max\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.mean",
(void *)&airs_rad_gran->input_opt_bench_temp_2.mean);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.mean\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.dev",
(void *)&airs_rad_gran->input_opt_bench_temp_2.dev);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.dev\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.num_in",
(void *)&airs_rad_gran->input_opt_bench_temp_2.num_in);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.num_in\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.num_lo",
(void *)&airs_rad_gran->input_opt_bench_temp_2.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.num_lo\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.num_hi",
(void *)&airs_rad_gran->input_opt_bench_temp_2.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.num_hi\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.num_bad",
(void *)&airs_rad_gran->input_opt_bench_temp_2.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.num_bad\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.range_min",
(void *)&airs_rad_gran->input_opt_bench_temp_2.range_min);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.range_min\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.range_max",
(void *)&airs_rad_gran->input_opt_bench_temp_2.range_max);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.range_max\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.missing",
(void *)&airs_rad_gran->input_opt_bench_temp_2.missing);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.missing\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.max_track",
(void *)&airs_rad_gran->input_opt_bench_temp_2.max_track);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.max_track\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.max_xtrack",
(void *)&airs_rad_gran->input_opt_bench_temp_2.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.min_track",
(void *)&airs_rad_gran->input_opt_bench_temp_2.min_track);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.min_track\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_2.min_xtrack",
(void *)&airs_rad_gran->input_opt_bench_temp_2.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_2.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.min",
(void *)&airs_rad_gran->input_opt_bench_temp_3.min);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.min\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.max",
(void *)&airs_rad_gran->input_opt_bench_temp_3.max);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.max\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.mean",
(void *)&airs_rad_gran->input_opt_bench_temp_3.mean);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.mean\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.dev",
(void *)&airs_rad_gran->input_opt_bench_temp_3.dev);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.dev\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.num_in",
(void *)&airs_rad_gran->input_opt_bench_temp_3.num_in);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.num_in\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.num_lo",
(void *)&airs_rad_gran->input_opt_bench_temp_3.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.num_lo\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.num_hi",
(void *)&airs_rad_gran->input_opt_bench_temp_3.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.num_hi\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.num_bad",
(void *)&airs_rad_gran->input_opt_bench_temp_3.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.num_bad\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.range_min",
(void *)&airs_rad_gran->input_opt_bench_temp_3.range_min);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.range_min\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.range_max",
(void *)&airs_rad_gran->input_opt_bench_temp_3.range_max);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.range_max\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.missing",
(void *)&airs_rad_gran->input_opt_bench_temp_3.missing);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.missing\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.max_track",
(void *)&airs_rad_gran->input_opt_bench_temp_3.max_track);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.max_track\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.max_xtrack",
(void *)&airs_rad_gran->input_opt_bench_temp_3.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.min_track",
(void *)&airs_rad_gran->input_opt_bench_temp_3.min_track);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.min_track\n", statn);

statn = SWreadattr(swid, "input_opt_bench_temp_3.min_xtrack",
(void *)&airs_rad_gran->input_opt_bench_temp_3.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_opt_bench_temp_3.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.min",
(void *)&airs_rad_gran->input_scan_mirror_temp.min);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.min\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.max",
(void *)&airs_rad_gran->input_scan_mirror_temp.max);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.max\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.mean",
(void *)&airs_rad_gran->input_scan_mirror_temp.mean);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.mean\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.dev",
(void *)&airs_rad_gran->input_scan_mirror_temp.dev);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.dev\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.num_in",
(void *)&airs_rad_gran->input_scan_mirror_temp.num_in);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.num_in\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.num_lo",
(void *)&airs_rad_gran->input_scan_mirror_temp.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.num_lo\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.num_hi",
(void *)&airs_rad_gran->input_scan_mirror_temp.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.num_hi\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.num_bad",
(void *)&airs_rad_gran->input_scan_mirror_temp.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.num_bad\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.range_min",
(void *)&airs_rad_gran->input_scan_mirror_temp.range_min);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.range_min\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.range_max",
(void *)&airs_rad_gran->input_scan_mirror_temp.range_max);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.range_max\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.missing",
(void *)&airs_rad_gran->input_scan_mirror_temp.missing);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.missing\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.max_track",
(void *)&airs_rad_gran->input_scan_mirror_temp.max_track);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.max_track\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.max_xtrack",
(void *)&airs_rad_gran->input_scan_mirror_temp.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.min_track",
(void *)&airs_rad_gran->input_scan_mirror_temp.min_track);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.min_track\n", statn);

statn = SWreadattr(swid, "input_scan_mirror_temp.min_xtrack",
(void *)&airs_rad_gran->input_scan_mirror_temp.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_scan_mirror_temp.min_xtrack\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.min",
(void *)&airs_rad_gran->input_chopper_phase_err.min);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.min\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.max",
(void *)&airs_rad_gran->input_chopper_phase_err.max);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.max\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.mean",
(void *)&airs_rad_gran->input_chopper_phase_err.mean);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.mean\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.dev",
(void *)&airs_rad_gran->input_chopper_phase_err.dev);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.dev\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.num_in",
(void *)&airs_rad_gran->input_chopper_phase_err.num_in);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.num_in\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.num_lo",
(void *)&airs_rad_gran->input_chopper_phase_err.num_lo);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.num_lo\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.num_hi",
(void *)&airs_rad_gran->input_chopper_phase_err.num_hi);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.num_hi\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.num_bad",
(void *)&airs_rad_gran->input_chopper_phase_err.num_bad);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.num_bad\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.range_min",
(void *)&airs_rad_gran->input_chopper_phase_err.range_min);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.range_min\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.range_max",
(void *)&airs_rad_gran->input_chopper_phase_err.range_max);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.range_max\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.missing",
(void *)&airs_rad_gran->input_chopper_phase_err.missing);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.missing\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.max_track",
(void *)&airs_rad_gran->input_chopper_phase_err.max_track);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.max_track\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.max_xtrack",
(void *)&airs_rad_gran->input_chopper_phase_err.max_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.max_xtrack\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.min_track",
(void *)&airs_rad_gran->input_chopper_phase_err.min_track);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.min_track\n", statn);

statn = SWreadattr(swid, "input_chopper_phase_err.min_xtrack",
(void *)&airs_rad_gran->input_chopper_phase_err.min_xtrack);
if (statn != 0)
printf("Error %d reading attribute input_chopper_phase_err.min_xtrack\n", statn);

statn = SWreadattr(swid, "PopCount",
(void *)&airs_rad_gran->PopCount);
if (statn != 0)
printf("Error %d reading attribute PopCount\n", statn);

statn = SWreadattr(swid, "NumRefChannels",
(void *)&airs_rad_gran->NumRefChannels);
if (statn != 0)
printf("Error %d reading attribute NumRefChannels\n", statn);

statn = SWreadattr(swid, "Rdiff_swindow_M1a_chan",
(void *)&airs_rad_gran->Rdiff_swindow_M1a_chan);
if (statn != 0)
printf("Error %d reading attribute Rdiff_swindow_M1a_chan\n", statn);

statn = SWreadattr(swid, "Rdiff_swindow_M2a_chan",
(void *)&airs_rad_gran->Rdiff_swindow_M2a_chan);
if (statn != 0)
printf("Error %d reading attribute Rdiff_swindow_M2a_chan\n", statn);

statn = SWreadattr(swid, "Rdiff_lwindow_M8_chan",
(void *)&airs_rad_gran->Rdiff_lwindow_M8_chan);
if (statn != 0)
printf("Error %d reading attribute Rdiff_lwindow_M8_chan\n", statn);

statn = SWreadattr(swid, "Rdiff_lwindow_M9_chan",
(void *)&airs_rad_gran->Rdiff_lwindow_M9_chan);
if (statn != 0)
printf("Error %d reading attribute Rdiff_lwindow_M9_chan\n", statn);

statn = SWreadattr(swid, "CF_Version",
(void *)airs_rad_gran->CF_Version);
if (statn != 0)
printf("Error %d reading attribute CF_Version\n", statn);

statn = SWreadattr(swid, "NumSaturatedFOVs",
(void *)&airs_rad_gran->NumSaturatedFOVs);
if (statn != 0)
printf("Error %d reading attribute NumSaturatedFOVs\n", statn);

statn = SWreadattr(swid, "NumUnderflowFOVs",
(void *)&airs_rad_gran->NumUnderflowFOVs);
if (statn != 0)
printf("Error %d reading attribute NumUnderflowFOVs\n", statn);

statn = SWreadattr(swid, "NumCalFOVsOutOfBounds",
(void *)&airs_rad_gran->NumCalFOVsOutOfBounds);
if (statn != 0)
printf("Error %d reading attribute NumCalFOVsOutOfBounds\n", statn);

statn = SWreadattr(swid, "NumSO2FOVs",
(void *)&airs_rad_gran->NumSO2FOVs);
if (statn != 0)
printf("Error %d reading attribute NumSO2FOVs\n", statn);

statn = SWreadattr(swid, "granules_present",
(void *)airs_rad_gran->granules_present);
if (statn != 0)
printf("Error %d reading attribute granules_present\n", statn);

statn = SWreadattr(swid, "spectral_TAI",
(void *)&airs_rad_gran->spectral_TAI);
if (statn != 0)
printf("Error %d reading attribute spectral_TAI\n", statn);

statn = SWreadattr(swid, "spec_shift_upwell",
(void *)&airs_rad_gran->spec_shift_upwell);
if (statn != 0)
printf("Error %d reading attribute spec_shift_upwell\n", statn);

statn = SWreadattr(swid, "spec_shift_unc_upwell",
(void *)&airs_rad_gran->spec_shift_unc_upwell);
if (statn != 0)
printf("Error %d reading attribute spec_shift_unc_upwell\n", statn);

statn = SWreadattr(swid, "spec_fl_upwell",
(void *)&airs_rad_gran->spec_fl_upwell);
if (statn != 0)
printf("Error %d reading attribute spec_fl_upwell\n", statn);

statn = SWreadattr(swid, "spec_fl_unc_upwell",
(void *)&airs_rad_gran->spec_fl_unc_upwell);
if (statn != 0)
printf("Error %d reading attribute spec_fl_unc_upwell\n", statn);

statn = SWreadattr(swid, "SpectralFeaturesUpwell",
(void *)&airs_rad_gran->SpectralFeaturesUpwell);
if (statn != 0)
printf("Error %d reading attribute SpectralFeaturesUpwell\n", statn);

statn = SWreadattr(swid, "spec_iter_upwell",
(void *)&airs_rad_gran->spec_iter_upwell);
if (statn != 0)
printf("Error %d reading attribute spec_iter_upwell\n", statn);

statn = SWreadattr(swid, "spec_clim_select",
(void *)&airs_rad_gran->spec_clim_select);
if (statn != 0)
printf("Error %d reading attribute spec_clim_select\n", statn);

statn = SWreadattr(swid, "spec_shift_pary",
(void *)&airs_rad_gran->spec_shift_pary);
if (statn != 0)
printf("Error %d reading attribute spec_shift_pary\n", statn);

statn = SWreadattr(swid, "spec_shift_unc_pary",
(void *)&airs_rad_gran->spec_shift_unc_pary);
if (statn != 0)
printf("Error %d reading attribute spec_shift_unc_pary\n", statn);

statn = SWreadattr(swid, "spec_fl_pary",
(void *)&airs_rad_gran->spec_fl_pary);
if (statn != 0)
printf("Error %d reading attribute spec_fl_pary\n", statn);

statn = SWreadattr(swid, "spec_fl_unc_pary",
(void *)&airs_rad_gran->spec_fl_unc_pary);
if (statn != 0)
printf("Error %d reading attribute spec_fl_unc_pary\n", statn);

statn = SWreadattr(swid, "SpectralFeaturesPary",
(void *)&airs_rad_gran->SpectralFeaturesPary);
if (statn != 0)
printf("Error %d reading attribute SpectralFeaturesPary\n", statn);

statn = SWreadattr(swid, "spec_iter_pary",
(void *)&airs_rad_gran->spec_iter_pary);
if (statn != 0)
printf("Error %d reading attribute spec_iter_pary\n", statn);

statn = SWreadattr(swid, "DCRCount",
(void *)&airs_rad_gran->DCRCount);
if (statn != 0)
printf("Error %d reading attribute DCRCount\n", statn);


/* Geolocation fields */
statn = SWreadfield(swid, "Latitude", NULL, NULL, NULL,
(void *)&airs_rad_gran->Latitude[0][0]);
if (statn != 0)
printf("Error %d reading field Latitude\n", statn);

statn = SWreadfield(swid, "Longitude", NULL, NULL, NULL,
(void *)&airs_rad_gran->Longitude[0][0]);
if (statn != 0)
printf("Error %d reading field Longitude\n", statn);

statn = SWreadfield(swid, "Time", NULL, NULL, NULL,
(void *)&airs_rad_gran->Time[0][0]);
if (statn != 0)
printf("Error %d reading field Time\n", statn);


/* Data Fields */
statn = SWreadfield(swid, "radiances", NULL, NULL, NULL,
(void *)&airs_rad_gran->radiances[0][0][0]);
if (statn != 0)
printf("Error %d reading field radiances\n", statn);

statn = SWreadfield(swid, "scanang", NULL, NULL, NULL,
(void *)&airs_rad_gran->scanang[0][0]);
if (statn != 0)
printf("Error %d reading field scanang\n", statn);

statn = SWreadfield(swid, "satheight", NULL, NULL, NULL,
(void *)&airs_rad_gran->satheight[0]);
if (statn != 0)
printf("Error %d reading field satheight\n", statn);

statn = SWreadfield(swid, "satroll", NULL, NULL, NULL,
(void *)&airs_rad_gran->satroll[0]);
if (statn != 0)
printf("Error %d reading field satroll\n", statn);

statn = SWreadfield(swid, "satpitch", NULL, NULL, NULL,
(void *)&airs_rad_gran->satpitch[0]);
if (statn != 0)
printf("Error %d reading field satpitch\n", statn);

statn = SWreadfield(swid, "satyaw", NULL, NULL, NULL,
(void *)&airs_rad_gran->satyaw[0]);
if (statn != 0)
printf("Error %d reading field satyaw\n", statn);

statn = SWreadfield(swid, "satgeoqa", NULL, NULL, NULL,
(void *)&airs_rad_gran->satgeoqa[0]);
if (statn != 0)
printf("Error %d reading field satgeoqa\n", statn);

statn = SWreadfield(swid, "glintgeoqa", NULL, NULL, NULL,
(void *)&airs_rad_gran->glintgeoqa[0]);
if (statn != 0)
printf("Error %d reading field glintgeoqa\n", statn);

statn = SWreadfield(swid, "moongeoqa", NULL, NULL, NULL,
(void *)&airs_rad_gran->moongeoqa[0]);
if (statn != 0)
printf("Error %d reading field moongeoqa\n", statn);

statn = SWreadfield(swid, "ftptgeoqa", NULL, NULL, NULL,
(void *)&airs_rad_gran->ftptgeoqa[0][0]);
if (statn != 0)
printf("Error %d reading field ftptgeoqa\n", statn);

statn = SWreadfield(swid, "zengeoqa", NULL, NULL, NULL,
(void *)&airs_rad_gran->zengeoqa[0][0]);
if (statn != 0)
printf("Error %d reading field zengeoqa\n", statn);

statn = SWreadfield(swid, "demgeoqa", NULL, NULL, NULL,
(void *)&airs_rad_gran->demgeoqa[0][0]);
if (statn != 0)
printf("Error %d reading field demgeoqa\n", statn);

statn = SWreadfield(swid, "nadirTAI", NULL, NULL, NULL,
(void *)&airs_rad_gran->nadirTAI[0]);
if (statn != 0)
printf("Error %d reading field nadirTAI\n", statn);

statn = SWreadfield(swid, "sat_lat", NULL, NULL, NULL,
(void *)&airs_rad_gran->sat_lat[0]);
if (statn != 0)
printf("Error %d reading field sat_lat\n", statn);

statn = SWreadfield(swid, "sat_lon", NULL, NULL, NULL,
(void *)&airs_rad_gran->sat_lon[0]);
if (statn != 0)
printf("Error %d reading field sat_lon\n", statn);

statn = SWreadfield(swid, "scan_node_type", NULL, NULL, NULL,
(void *)&airs_rad_gran->scan_node_type[0]);
if (statn != 0)
printf("Error %d reading field scan_node_type\n", statn);

statn = SWreadfield(swid, "satzen", NULL, NULL, NULL,
(void *)&airs_rad_gran->satzen[0][0]);
if (statn != 0)
printf("Error %d reading field satzen\n", statn);

statn = SWreadfield(swid, "satazi", NULL, NULL, NULL,
(void *)&airs_rad_gran->satazi[0][0]);
if (statn != 0)
printf("Error %d reading field satazi\n", statn);

statn = SWreadfield(swid, "solzen", NULL, NULL, NULL,
(void *)&airs_rad_gran->solzen[0][0]);
if (statn != 0)
printf("Error %d reading field solzen\n", statn);

statn = SWreadfield(swid, "solazi", NULL, NULL, NULL,
(void *)&airs_rad_gran->solazi[0][0]);
if (statn != 0)
printf("Error %d reading field solazi\n", statn);

statn = SWreadfield(swid, "glintlat", NULL, NULL, NULL,
(void *)&airs_rad_gran->glintlat[0]);
if (statn != 0)
printf("Error %d reading field glintlat\n", statn);

statn = SWreadfield(swid, "glintlon", NULL, NULL, NULL,
(void *)&airs_rad_gran->glintlon[0]);
if (statn != 0)
printf("Error %d reading field glintlon\n", statn);

statn = SWreadfield(swid, "sun_glint_distance", NULL, NULL, NULL,
(void *)&airs_rad_gran->sun_glint_distance[0][0]);
if (statn != 0)
printf("Error %d reading field sun_glint_distance\n", statn);

statn = SWreadfield(swid, "topog", NULL, NULL, NULL,
(void *)&airs_rad_gran->topog[0][0]);
if (statn != 0)
printf("Error %d reading field topog\n", statn);

statn = SWreadfield(swid, "topog_err", NULL, NULL, NULL,
(void *)&airs_rad_gran->topog_err[0][0]);
if (statn != 0)
printf("Error %d reading field topog_err\n", statn);

statn = SWreadfield(swid, "landFrac", NULL, NULL, NULL,
(void *)&airs_rad_gran->landFrac[0][0]);
if (statn != 0)
printf("Error %d reading field landFrac\n", statn);

statn = SWreadfield(swid, "landFrac_err", NULL, NULL, NULL,
(void *)&airs_rad_gran->landFrac_err[0][0]);
if (statn != 0)
printf("Error %d reading field landFrac_err\n", statn);

statn = SWreadfield(swid, "state", NULL, NULL, NULL,
(void *)&airs_rad_gran->state[0][0]);
if (statn != 0)
printf("Error %d reading field state\n", statn);

statn = SWreadfield(swid, "CalChanSummary", NULL, NULL, NULL,
(void *)&airs_rad_gran->CalChanSummary[0]);
if (statn != 0)
printf("Error %d reading field CalChanSummary\n", statn);

statn = SWreadfield(swid, "ExcludedChans", NULL, NULL, NULL,
(void *)&airs_rad_gran->ExcludedChans[0]);
if (statn != 0)
printf("Error %d reading field ExcludedChans\n", statn);

statn = SWreadfield(swid, "CalScanSummary", NULL, NULL, NULL,
(void *)&airs_rad_gran->CalScanSummary[0]);
if (statn != 0)
printf("Error %d reading field CalScanSummary\n", statn);

statn = SWreadfield(swid, "CalFlag", NULL, NULL, NULL,
(void *)&airs_rad_gran->CalFlag[0][0]);
if (statn != 0)
printf("Error %d reading field CalFlag\n", statn);

statn = SWreadfield(swid, "SpaceViewDelta", NULL, NULL, NULL,
(void *)&airs_rad_gran->SpaceViewDelta[0][0]);
if (statn != 0)
printf("Error %d reading field SpaceViewDelta\n", statn);

statn = SWreadfield(swid, "NeN", NULL, NULL, NULL,
(void *)&airs_rad_gran->NeN[0]);
if (statn != 0)
printf("Error %d reading field NeN\n", statn);

statn = SWreadfield(swid, "input_scene_counts.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.min[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.min\n", statn);

statn = SWreadfield(swid, "input_scene_counts.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.max[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.max\n", statn);

statn = SWreadfield(swid, "input_scene_counts.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.mean[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.mean\n", statn);

statn = SWreadfield(swid, "input_scene_counts.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.dev[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.dev\n", statn);

statn = SWreadfield(swid, "input_scene_counts.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.num_in[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.num_in\n", statn);

statn = SWreadfield(swid, "input_scene_counts.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.num_lo[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.num_lo\n", statn);

statn = SWreadfield(swid, "input_scene_counts.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.num_hi[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.num_hi\n", statn);

statn = SWreadfield(swid, "input_scene_counts.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.num_bad[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.num_bad\n", statn);

statn = SWreadfield(swid, "input_scene_counts.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.range_min[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.range_min\n", statn);

statn = SWreadfield(swid, "input_scene_counts.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.range_max[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.range_max\n", statn);

statn = SWreadfield(swid, "input_scene_counts.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.missing[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.missing\n", statn);

statn = SWreadfield(swid, "input_scene_counts.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.max_track[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.max_track\n", statn);

statn = SWreadfield(swid, "input_scene_counts.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_scene_counts.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.min_track[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.min_track\n", statn);

statn = SWreadfield(swid, "input_scene_counts.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_scene_counts.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_scene_counts.min_xtrack\n", statn);

statn = SWreadfield(swid, "input_space_counts.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.min[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.min\n", statn);

statn = SWreadfield(swid, "input_space_counts.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.max[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.max\n", statn);

statn = SWreadfield(swid, "input_space_counts.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.mean[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.mean\n", statn);

statn = SWreadfield(swid, "input_space_counts.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.dev[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.dev\n", statn);

statn = SWreadfield(swid, "input_space_counts.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.num_in[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.num_in\n", statn);

statn = SWreadfield(swid, "input_space_counts.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.num_lo[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.num_lo\n", statn);

statn = SWreadfield(swid, "input_space_counts.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.num_hi[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.num_hi\n", statn);

statn = SWreadfield(swid, "input_space_counts.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.num_bad[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.num_bad\n", statn);

statn = SWreadfield(swid, "input_space_counts.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.range_min[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.range_min\n", statn);

statn = SWreadfield(swid, "input_space_counts.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.range_max[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.range_max\n", statn);

statn = SWreadfield(swid, "input_space_counts.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.missing[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.missing\n", statn);

statn = SWreadfield(swid, "input_space_counts.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.max_track[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.max_track\n", statn);

statn = SWreadfield(swid, "input_space_counts.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.max_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_space_counts.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.min_track[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.min_track\n", statn);

statn = SWreadfield(swid, "input_space_counts.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_counts.min_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_counts.min_xtrack\n", statn);

statn = SWreadfield(swid, "input_space_signals.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.min[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.min\n", statn);

statn = SWreadfield(swid, "input_space_signals.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.max[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.max\n", statn);

statn = SWreadfield(swid, "input_space_signals.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.mean[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.mean\n", statn);

statn = SWreadfield(swid, "input_space_signals.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.dev[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.dev\n", statn);

statn = SWreadfield(swid, "input_space_signals.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.num_in[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.num_in\n", statn);

statn = SWreadfield(swid, "input_space_signals.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.num_lo[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.num_lo\n", statn);

statn = SWreadfield(swid, "input_space_signals.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.num_hi[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.num_hi\n", statn);

statn = SWreadfield(swid, "input_space_signals.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.num_bad[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.num_bad\n", statn);

statn = SWreadfield(swid, "input_space_signals.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.range_min[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.range_min\n", statn);

statn = SWreadfield(swid, "input_space_signals.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.range_max[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.range_max\n", statn);

statn = SWreadfield(swid, "input_space_signals.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.missing[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.missing\n", statn);

statn = SWreadfield(swid, "input_space_signals.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.max_track[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.max_track\n", statn);

statn = SWreadfield(swid, "input_space_signals.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.max_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_space_signals.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.min_track[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.min_track\n", statn);

statn = SWreadfield(swid, "input_space_signals.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_signals.min_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_signals.min_xtrack\n", statn);

statn = SWreadfield(swid, "input_space_diffs.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.min[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.min\n", statn);

statn = SWreadfield(swid, "input_space_diffs.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.max[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.max\n", statn);

statn = SWreadfield(swid, "input_space_diffs.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.mean[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.mean\n", statn);

statn = SWreadfield(swid, "input_space_diffs.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.dev[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.dev\n", statn);

statn = SWreadfield(swid, "input_space_diffs.num", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.num[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.num\n", statn);

statn = SWreadfield(swid, "input_space_diffs.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.num_bad[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.num_bad\n", statn);

statn = SWreadfield(swid, "input_space_diffs.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.max_track[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.max_track\n", statn);

statn = SWreadfield(swid, "input_space_diffs.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.max_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_space_diffs.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.min_track[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.min_track\n", statn);

statn = SWreadfield(swid, "input_space_diffs.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_space_diffs.min_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field input_space_diffs.min_xtrack\n", statn);

statn = SWreadfield(swid, "input_bb_counts.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.min[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.min\n", statn);

statn = SWreadfield(swid, "input_bb_counts.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.max[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.max\n", statn);

statn = SWreadfield(swid, "input_bb_counts.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.mean[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.mean\n", statn);

statn = SWreadfield(swid, "input_bb_counts.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.dev[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.dev\n", statn);

statn = SWreadfield(swid, "input_bb_counts.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.num_in[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.num_in\n", statn);

statn = SWreadfield(swid, "input_bb_counts.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.num_lo[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.num_lo\n", statn);

statn = SWreadfield(swid, "input_bb_counts.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.num_hi[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.num_hi\n", statn);

statn = SWreadfield(swid, "input_bb_counts.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.num_bad[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.num_bad\n", statn);

statn = SWreadfield(swid, "input_bb_counts.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.range_min[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.range_min\n", statn);

statn = SWreadfield(swid, "input_bb_counts.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.range_max[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.range_max\n", statn);

statn = SWreadfield(swid, "input_bb_counts.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.missing[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.missing\n", statn);

statn = SWreadfield(swid, "input_bb_counts.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.max_track[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.max_track\n", statn);

statn = SWreadfield(swid, "input_bb_counts.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_bb_counts.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.min_track[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.min_track\n", statn);

statn = SWreadfield(swid, "input_bb_counts.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_counts.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_bb_counts.min_xtrack\n", statn);

statn = SWreadfield(swid, "input_bb_signals.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.min[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.min\n", statn);

statn = SWreadfield(swid, "input_bb_signals.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.max[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.max\n", statn);

statn = SWreadfield(swid, "input_bb_signals.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.mean[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.mean\n", statn);

statn = SWreadfield(swid, "input_bb_signals.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.dev[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.dev\n", statn);

statn = SWreadfield(swid, "input_bb_signals.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.num_in[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.num_in\n", statn);

statn = SWreadfield(swid, "input_bb_signals.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.num_lo[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.num_lo\n", statn);

statn = SWreadfield(swid, "input_bb_signals.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.num_hi[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.num_hi\n", statn);

statn = SWreadfield(swid, "input_bb_signals.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.num_bad[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.num_bad\n", statn);

statn = SWreadfield(swid, "input_bb_signals.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.range_min[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.range_min\n", statn);

statn = SWreadfield(swid, "input_bb_signals.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.range_max[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.range_max\n", statn);

statn = SWreadfield(swid, "input_bb_signals.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.missing[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.missing\n", statn);

statn = SWreadfield(swid, "input_bb_signals.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.max_track[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.max_track\n", statn);

statn = SWreadfield(swid, "input_bb_signals.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_bb_signals.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.min_track[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.min_track\n", statn);

statn = SWreadfield(swid, "input_bb_signals.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_bb_signals.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_bb_signals.min_xtrack\n", statn);

statn = SWreadfield(swid, "input_spec_counts.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.min[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.min\n", statn);

statn = SWreadfield(swid, "input_spec_counts.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.max[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.max\n", statn);

statn = SWreadfield(swid, "input_spec_counts.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.mean[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.mean\n", statn);

statn = SWreadfield(swid, "input_spec_counts.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.dev[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.dev\n", statn);

statn = SWreadfield(swid, "input_spec_counts.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.num_in[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.num_in\n", statn);

statn = SWreadfield(swid, "input_spec_counts.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.num_lo[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.num_lo\n", statn);

statn = SWreadfield(swid, "input_spec_counts.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.num_hi[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.num_hi\n", statn);

statn = SWreadfield(swid, "input_spec_counts.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.num_bad[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.num_bad\n", statn);

statn = SWreadfield(swid, "input_spec_counts.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.range_min[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.range_min\n", statn);

statn = SWreadfield(swid, "input_spec_counts.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.range_max[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.range_max\n", statn);

statn = SWreadfield(swid, "input_spec_counts.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.missing[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.missing\n", statn);

statn = SWreadfield(swid, "input_spec_counts.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.max_track[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.max_track\n", statn);

statn = SWreadfield(swid, "input_spec_counts.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.max_xtrack\n", statn);

statn = SWreadfield(swid, "input_spec_counts.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.min_track[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.min_track\n", statn);

statn = SWreadfield(swid, "input_spec_counts.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->input_spec_counts.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field input_spec_counts.min_xtrack\n", statn);

statn = SWreadfield(swid, "spaceview_selection", NULL, NULL, NULL,
(void *)&airs_rad_gran->spaceview_selection[0]);
if (statn != 0)
printf("Error %d reading field spaceview_selection\n", statn);

statn = SWreadfield(swid, "offset_stats.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.min[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.min\n", statn);

statn = SWreadfield(swid, "offset_stats.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.max[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.max\n", statn);

statn = SWreadfield(swid, "offset_stats.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.mean[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.mean\n", statn);

statn = SWreadfield(swid, "offset_stats.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.dev[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.dev\n", statn);

statn = SWreadfield(swid, "offset_stats.num", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.num[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.num\n", statn);

statn = SWreadfield(swid, "offset_stats.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.num_bad[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.num_bad\n", statn);

statn = SWreadfield(swid, "offset_stats.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.max_track[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.max_track\n", statn);

statn = SWreadfield(swid, "offset_stats.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.max_xtrack\n", statn);

statn = SWreadfield(swid, "offset_stats.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.min_track[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.min_track\n", statn);

statn = SWreadfield(swid, "offset_stats.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->offset_stats.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field offset_stats.min_xtrack\n", statn);

statn = SWreadfield(swid, "gain_stats.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.min[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.min\n", statn);

statn = SWreadfield(swid, "gain_stats.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.max[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.max\n", statn);

statn = SWreadfield(swid, "gain_stats.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.mean[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.mean\n", statn);

statn = SWreadfield(swid, "gain_stats.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.dev[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.dev\n", statn);

statn = SWreadfield(swid, "gain_stats.num", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.num[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.num\n", statn);

statn = SWreadfield(swid, "gain_stats.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.num_bad[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.num_bad\n", statn);

statn = SWreadfield(swid, "gain_stats.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.max_track[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.max_track\n", statn);

statn = SWreadfield(swid, "gain_stats.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.max_xtrack\n", statn);

statn = SWreadfield(swid, "gain_stats.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.min_track[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.min_track\n", statn);

statn = SWreadfield(swid, "gain_stats.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->gain_stats.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field gain_stats.min_xtrack\n", statn);

statn = SWreadfield(swid, "rad_stats.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.min[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.min\n", statn);

statn = SWreadfield(swid, "rad_stats.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.max[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.max\n", statn);

statn = SWreadfield(swid, "rad_stats.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.mean[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.mean\n", statn);

statn = SWreadfield(swid, "rad_stats.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.dev[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.dev\n", statn);

statn = SWreadfield(swid, "rad_stats.num", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.num[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.num\n", statn);

statn = SWreadfield(swid, "rad_stats.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.num_bad[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.num_bad\n", statn);

statn = SWreadfield(swid, "rad_stats.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.max_track[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.max_track\n", statn);

statn = SWreadfield(swid, "rad_stats.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.max_xtrack\n", statn);

statn = SWreadfield(swid, "rad_stats.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.min_track[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.min_track\n", statn);

statn = SWreadfield(swid, "rad_stats.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_stats.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field rad_stats.min_xtrack\n", statn);

statn = SWreadfield(swid, "Gain", NULL, NULL, NULL,
(void *)&airs_rad_gran->Gain[0]);
if (statn != 0)
printf("Error %d reading field Gain\n", statn);

statn = SWreadfield(swid, "RefChannels", NULL, NULL, NULL,
(void *)&airs_rad_gran->RefChannels[0]);
if (statn != 0)
printf("Error %d reading field RefChannels\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.min[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.min\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.max[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.max\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.mean[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.mean\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.dev[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.dev\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.num", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.num[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.num\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.num_bad[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.num_bad\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.max_track[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.max_track\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.max_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.max_xtrack\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.min_track[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.min_track\n", statn);

statn = SWreadfield(swid, "rad_scan_stats.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->rad_scan_stats.min_xtrack[0][0]);
if (statn != 0)
printf("Error %d reading field rad_scan_stats.min_xtrack\n", statn);

statn = SWreadfield(swid, "Rdiff_swindow", NULL, NULL, NULL,
(void *)&airs_rad_gran->Rdiff_swindow[0][0]);
if (statn != 0)
printf("Error %d reading field Rdiff_swindow\n", statn);

statn = SWreadfield(swid, "Rdiff_lwindow", NULL, NULL, NULL,
(void *)&airs_rad_gran->Rdiff_lwindow[0][0]);
if (statn != 0)
printf("Error %d reading field Rdiff_lwindow\n", statn);

statn = SWreadfield(swid, "SceneInhomogeneous", NULL, NULL, NULL,
(void *)&airs_rad_gran->SceneInhomogeneous[0][0]);
if (statn != 0)
printf("Error %d reading field SceneInhomogeneous\n", statn);

statn = SWreadfield(swid, "dust_flag", NULL, NULL, NULL,
(void *)&airs_rad_gran->dust_flag[0][0]);
if (statn != 0)
printf("Error %d reading field dust_flag\n", statn);

statn = SWreadfield(swid, "dust_score", NULL, NULL, NULL,
(void *)&airs_rad_gran->dust_score[0][0]);
if (statn != 0)
printf("Error %d reading field dust_score\n", statn);

statn = SWreadfield(swid, "spectral_clear_indicator", NULL, NULL, NULL,
(void *)&airs_rad_gran->spectral_clear_indicator[0][0]);
if (statn != 0)
printf("Error %d reading field spectral_clear_indicator\n", statn);

statn = SWreadfield(swid, "BT_diff_SO2", NULL, NULL, NULL,
(void *)&airs_rad_gran->BT_diff_SO2[0][0]);
if (statn != 0)
printf("Error %d reading field BT_diff_SO2\n", statn);

statn = SWreadfield(swid, "OpMode", NULL, NULL, NULL,
(void *)&airs_rad_gran->OpMode[0]);
if (statn != 0)
printf("Error %d reading field OpMode\n", statn);

statn = SWreadfield(swid, "EDCBOARD", NULL, NULL, NULL,
(void *)&airs_rad_gran->EDCBOARD[0]);
if (statn != 0)
printf("Error %d reading field EDCBOARD\n", statn);

statn = SWreadfield(swid, "nominal_freq", NULL, NULL, NULL,
(void *)&airs_rad_gran->nominal_freq[0]);
if (statn != 0)
printf("Error %d reading field nominal_freq\n", statn);

statn = SWreadfield(swid, "spectral_freq", NULL, NULL, NULL,
(void *)&airs_rad_gran->spectral_freq[0]);
if (statn != 0)
printf("Error %d reading field spectral_freq\n", statn);

statn = SWreadfield(swid, "spectral_freq_unc", NULL, NULL, NULL,
(void *)&airs_rad_gran->spectral_freq_unc[0]);
if (statn != 0)
printf("Error %d reading field spectral_freq_unc\n", statn);

statn = SWreadfield(swid, "spec_feature_shifts_upwell", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_shifts_upwell[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_shifts_upwell\n", statn);

statn = SWreadfield(swid, "spec_feature_corr_upwell", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_corr_upwell[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_corr_upwell\n", statn);

statn = SWreadfield(swid, "spec_feature_sharp_upwell", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_sharp_upwell[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_sharp_upwell\n", statn);

statn = SWreadfield(swid, "spec_feature_resid_upwell", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_resid_upwell[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_resid_upwell\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.min", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.min[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.min\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.max", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.max[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.max\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.mean", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.mean[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.mean\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.dev", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.dev[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.dev\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.num_in", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.num_in[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.num_in\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.num_lo", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.num_lo[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.num_lo\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.num_hi", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.num_hi[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.num_hi\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.num_bad", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.num_bad[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.num_bad\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.range_min", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.range_min[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.range_min\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.range_max", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.range_max[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.range_max\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.missing", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.missing[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.missing\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.max_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.max_track[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.max_track\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.max_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.max_xtrack[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.max_xtrack\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.min_track", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.min_track[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.min_track\n", statn);

statn = SWreadfield(swid, "spec_feature_contrast_stats.min_xtrack", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_contrast_stats.min_xtrack[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_contrast_stats.min_xtrack\n", statn);

statn = SWreadfield(swid, "spec_feature_shifts_pary", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_shifts_pary[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_shifts_pary\n", statn);

statn = SWreadfield(swid, "spec_feature_corr_pary", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_corr_pary[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_corr_pary\n", statn);

statn = SWreadfield(swid, "spec_feature_sharp_pary", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_sharp_pary[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_sharp_pary\n", statn);

statn = SWreadfield(swid, "spec_feature_resid_pary", NULL, NULL, NULL,
(void *)&airs_rad_gran->spec_feature_resid_pary[0]);
if (statn != 0)
printf("Error %d reading field spec_feature_resid_pary\n", statn);

statn = SWreadfield(swid, "ave_pary_spectrum", NULL, NULL, NULL,
(void *)&airs_rad_gran->ave_pary_spectrum[0]);
if (statn != 0)
printf("Error %d reading field ave_pary_spectrum\n", statn);


/* Final clean-up */
statn = SWdetach(swid);
if (statn != 0) printf("Error detaching from input file %s\n", file_name);

statn = SWclose(fid);
if (statn != 0) printf("Error closing input file %s\n", file_name);
}

Document Actions
NASA Logo - nasa.gov
NASA Privacy Policy and Important Notices
Last updated: Sep 09, 2009 02:25 PM ET
Top