Go to the documentation of this file.
6 static h5io_str file_id, *dat_ids;
33 static float *lrhos, *out_rhos, lam_lst[30], viirs_bands[16];
34 static int first = 0, l_nlam;
35 float vec_rho[20], vec_lrho[20];
46 for (ibnd = 0; ibnd < l_nlam; ibnd++)
62 if ((out_rhos = (
float *)
64 printf(
"%s, %d: Unable to allocate rhos output storage\n",
70 if ((lrhos = (
float *)
71 malloc(
npix * ndet * l_nlam *
sizeof (
float))) ==
NULL) {
72 printf(
"%s, %d: Unable to allocate rhos storage\n",
78 printf(
"%s, %d: failure to read sensor information\n",
82 *(viirs_bands + ibnd) = (
float) *(bndlist + ibnd);
92 for (ibnd = 0; ibnd < l_nlam; ibnd++) {
94 (
void *) (lrhos +
npix * ndet * ibnd)) != 0) {
96 "%s, %d: Failed to read reflectance data set slice for line %d\n",
97 __FILE__, __LINE__, ilin);
104 for (ilin = 0; ilin < ndet; ilin++) {
105 for (ipix = 0; ipix <
npix; ipix++) {
106 for (ibnd = 0; ibnd < l_nlam; ibnd++)
107 vec_lrho[ibnd] = *(lrhos + ipix + (ilin + ibnd * ndet) *
npix);
110 *(out_rhos + ipix + (ilin + ibnd * ndet) *
npix) = vec_rho[ibnd];
134 char *sloc, parms[20][15], parm_list[1000];
135 int more_chars, ibnd;
140 printf(
"%s, %d: Unable to open the reflectance file: %s\n", __FILE__,
147 if (
h5io_rd_attr(&file_id,
"parm_list", (
void *) parm_list) != 0) {
148 printf(
"%s, %d: Unable to read parm_list from reflectance file: %s\n",
149 __FILE__, __LINE__,
file);
157 sloc = strtok(parm_list,
",");
159 sloc = strtok(
NULL,
",");
161 strcpy(parms[*nlam], sloc);
162 sscanf(parms[*nlam],
"rhos_%f", lam_lst + *nlam);
170 if ((dat_ids = (h5io_str *) malloc(*nlam *
sizeof ( h5io_str)))
172 printf(
"%s, %d: Unable to reserve h5io ids for refl datasets\n",
176 for (ibnd = 0; ibnd < *nlam; ibnd++) {
177 if (
h5io_set_ds(&file_id, parms[ibnd], (dat_ids + ibnd)) != 0) {
178 printf(
"%s, %d: Unable to set to dataset %d in refl file %s\n",
179 __FILE__, __LINE__, ibnd,
file);
int h5io_openr(char *file, int opt, h5io_str *id)
int rd_rhos_scan(char *file, int npix, int iscn, int ndet, float **rhos)
int h5io_close(h5io_str *id)
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed file
int h5io_set_ds(h5io_str *id, char *path_name, h5io_str *ds_id)
int bnd_ix_2_sen_info(char *pname, void *pval)
int h5io_rd_ds_slice(h5io_str *ds_id, int *start, int *count, void *data)
int h5io_rd_attr(h5io_str *id, char *attr_name, void *data)
int rd_rhos_open(char *file, float *lam_lst, int *nlam)
void lspline(float xin[], float yin[], int32_t nin, float xout[], float yout[], int32_t nout)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")