OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
gcf.c
Go to the documentation of this file.
1 #include <math.h>
2 #define ITMAX 100
3 #define EPS 3.0e-7
4 #define FPMIN 1.0e-30
5 
6 void gcf(float *gammcf, float a, float x, float *gln) {
7  float gammln(float xx);
8  void nrerror(char error_text[]);
9  int i;
10  float an, b, c, d, del, h;
11 
12  *gln = gammln(a);
13  b = x + 1.0 - a;
14  c = 1.0 / FPMIN;
15  d = 1.0 / b;
16  h = d;
17  for (i = 1; i <= ITMAX; i++) {
18  an = -i * (i - a);
19  b += 2.0;
20  d = an * d + b;
21  if (fabs(d) < FPMIN) d = FPMIN;
22  c = b + an / c;
23  if (fabs(c) < FPMIN) c = FPMIN;
24  d = 1.0 / d;
25  del = d*c;
26  h *= del;
27  if (fabs(del - 1.0) < EPS) break;
28  }
29  if (i > ITMAX) nrerror("a too large, ITMAX too small in gcf");
30  *gammcf = exp(-x + a * log(x)-(*gln)) * h;
31 }
32 #undef ITMAX
33 #undef EPS
34 #undef FPMIN
function gammln(xx)
Definition: ocn.f:1270
void nrerror(char error_text[])
Definition: nrutil.c:7
float h[MODELMAX]
Definition: atrem_corl1.h:131
#define ITMAX
Definition: gcf.c:2
#define EPS
Definition: gcf.c:3
void gcf(float *gammcf, float a, float x, float *gln)
Definition: gcf.c:6
data_t b[NROOTS+1]
Definition: decode_rs.h:77
#define fabs(a)
Definition: misc.h:93
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 as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
Definition: HISTORY.txt:464
int i
Definition: decode_rs.h:71
#define FPMIN
Definition: gcf.c:4
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424