Go to the documentation of this file.
3 int fin_sdr(ctl_struc *ctl, in_rec_struc *in_rec, out_rec_struc *out_rec)
22 int iid, jid, isdr, ibnd;
27 for (iid = 0; iid < 6; iid++) {
28 if (
h5io_close(&(in_rec->geo_dat_id[ iid ])) != 0) {
29 printf(
"%s: Unable to close input geoloc dataset # %d\n",
36 printf(
"%s: Unable to close input geoloc file\n", __FILE__);
43 printf(
"latitude limits, S: %f, N: %f\n", in_rec->ll_lims[0],
45 printf(
"(-) longitude limits, W: %f, E: %f\n", in_rec->ll_lims[2],
47 printf(
"(+) longitude limits, W: %f, E: %f\n", in_rec->ll_lims[4],
56 for (iid = 0; iid < 6; iid++) {
57 if (
h5io_close(&(out_rec->geo_dat_id[ iid ])) != 0) {
58 printf(
"%s: Unable to close output geoloc dataset id # %d\n",
63 for (isdr = 0; isdr < out_rec->nbnd; isdr++) {
64 for (iid = 0; iid < 2; iid++) {
65 if (
h5io_close(&(out_rec->bnd_dat_id[iid][isdr])) != 0) {
66 printf(
"%s: Unable to close output band file # %d, dataset # %d\n",
74 if (
h5io_close(&(out_rec->qual1_m_id[isdr])) != 0) {
76 "%s, %d: Failed closing output QF1_VIIRSMBANDSDR dataset file # %d\n",
77 __FILE__, __LINE__, isdr);
82 for (isdr = 0; isdr < out_rec->nbnd + 1; isdr++) {
83 for (iid = 0; iid < 2; iid++) {
85 if (
h5io_close(&(out_rec->sdr_dat_gid[ jid ][isdr])) != 0) {
86 printf(
"%s: Unable to close output sdr group id # %d, sdr # %d\n",
93 for (isdr = 0; isdr < out_rec->nbnd + 1; isdr++) {
94 if (
h5io_close(&(out_rec->sdr_fid[isdr])) != 0) {
95 printf(
"%s: Unable to close output sdr file for sdr# %d\n",
101 if (ctl->l2_use == 1)
102 if (
closeL2(&in_rec->l2_str, 0) != 0) {
103 printf(
"%s: Unable to close input L2 file: %s\n",
104 __FILE__, in_rec->l2_str.filename);
120 for (ibnd = 0; ibnd < out_rec->nbnd; ibnd++) {
121 free(in_rec->bnd_lt[ibnd]);
122 free(in_rec->bnd_q[ibnd]);
123 free(out_rec->qual1_m[ibnd]);
124 free(in_rec->gain_bit[ibnd]);
125 free(in_rec->dn_sat[ibnd]);
126 if (ctl->count_cal_opt != 0) {
127 free(in_rec->dn[ibnd]);
134 if (ctl->ext_opt != 0)
138 if (ctl->noise_mode == 1)
140 if (ctl->stray_opt == 1)
int fin_sdr(ctl_struc *ctl, in_rec_struc *in_rec, out_rec_struc *out_rec)
int h5io_close(h5io_str *id)
int32_t closeL2(l2_prod *l2_str, int32_t ifile)
int viirs_noise(ctl_struc *ctl, in_rec_struc *in_rec, int noise_stop)
int scan_cvt(in_rec_struc *in_rec, out_rec_struc *out_rec)
int viirs_ext(ctl_struc *ctl, in_rec_struc *in_rec)
int viirs_straylt(ctl_struc *, in_rec_struc *, int)