OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
make_psurf.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <fcntl.h>
3 #include <stdlib.h>
4 #include <unistd.h>
5 
6 void make_psurf(signed short *psurf, char *file, int Nlines, int Npixels, float psurf0) {
7  int fd, idx;
8 
9  fd = open(file, O_RDONLY);
10  read(fd, psurf, Nlines * Npixels * sizeof (signed short));
11  close(fd);
12 
13  for (idx = 0; idx < Nlines * Npixels; idx++) {
14  if (psurf[idx] >= 0) psurf[idx] = (signed short) (psurf0 - psurf[idx] / 10. + 0.5);
15  else psurf[idx] = (signed short) (psurf0 + 0.5);
16  }
17 
18 }
void make_psurf(signed short *psurf, char *file, int Nlines, int Npixels, float psurf0)
Definition: make_psurf.c:6
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
Definition: HISTORY.txt:413