OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
gen_const_rad_scn.c
Go to the documentation of this file.
1 #include "viirs_sim_sdr.h"
2 
3 int gen_const_rad_scn(sdr_info_struc *sdr_info, int st_bnd,
4  in_rec_struc *in_rec)
5 /*-----------------------------------------------------------------------------
6  Program: gen_const_rad_scn.c
7 
8  Description: Make a constant value for the Lt lines in a scan
9  possible elaboration for future
10 
11  Arguments:
12  Type Name I/O Description
13  ---- ---- --- -----------
14  sdr_info_struc * sdr_info I general sdr information
15  int st_bnd I start band to fill
16  in_rec_struc * in_rec I/O input record controls
17 
18  Modification history:
19 
20  W. Robinson, SAIC 12 Dec 2008 Original development
21  W. Robinson, SAIC 12 Mar 2010 adapt to scan processing
22  W. Robinson, SAIC 7 Jul 2010 control the start band for filling
23 
24 ----------------------------------------------------------------------------*/ {
25  int ibnd, ismp, loc, idet;
26  /* Ltyp for Lt(410, 445, 488,555, 672, 751, 865, 1240, 1378, 1610, 2250 */
27  /* low radiance for al M bands from Y4413_Refl_calib_SD_dual_gain.doc */
28  /* (W m^-2 s^-1 sr^-1 */
29  /* Also, include the Ttyp for the remaining BBT bands */
30  float l_typ[] = {44.9, 40., 32., 21., 10., 9.6, 6.4, 5.4, 6.0, 7.3, 0.12,
31  270., 300., 270., 300., 300.};
32 
33  static int entry = 0; /* just set so that we don't re-make the constants
34  every time */
35  /*
36  * loop through and make the values, probably Ltyp
37  */
38  if (entry == 0) {
39  printf("%s-temp: initial set-up of the band radiances (I hope)\n", __FILE__);
40  entry = 1;
41  for (idet = 0; idet < in_rec->ndet_scan; idet++) {
42  for (ibnd = st_bnd; ibnd < in_rec->nbnd; ibnd++) {
43  for (ismp = 0; ismp < in_rec->npix; ismp++) {
44  loc = idet * in_rec->npix + ismp;
45  *(in_rec->bnd_lt[ibnd] + loc) = l_typ[ibnd];
46  *(in_rec->bnd_q[ibnd] + loc) = 0;
47  }
48  }
49  }
50  }
51  return 0;
52 }
int gen_const_rad_scn(sdr_info_struc *sdr_info, int st_bnd, in_rec_struc *in_rec)
data_t loc[NROOTS]
Definition: decode_rs.h:78