OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
goci.h File Reference
#include <proj.h>
Include dependency graph for goci.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  goci_l1b_t
 
struct  slot_nav_str_def
 

Functions

int goci_proj4_open (goci_l1b_t *l1b)
 
void goci_proj4_convert (goci_l1b_t *l1b, int numPoints, double *x, double *y)
 
void goci_proj4_close (goci_l1b_t *l1b)
 
int goci_l1b_open (const char *src_path, goci_l1b_t **goci_l1b)
 
int goci_l1b_close (goci_l1b_t *goci_l1b)
 
int goci_l1b_get_date (goci_l1b_t *goci_l1b, char *tim_str, int *year, int *month, int *day)
 
int goci_l1b_get_time (goci_l1b_t *goci_l1b, char *tim_str, int *hour, int *min, int *sec)
 
int goci_l1b_get_band (goci_l1b_t *goci_l1b, int band, int line, uint32_t *buf)
 
int32_t goci_slot_init (hid_t file_id, hsize_t *dims, float *slot_rel_time, unsigned char *slot_asg, int32_t *slot_nav_avail)
 
int32_t goci_slot_nav (int32_t ipix, int32_t ilin, int32_t bnd, int32_t itile, slot_nav_str *slot_nav, int32_t nbnd, int32_t nslot, unsigned char *bnd_tile_lut, float *nradsq)
 
unsigned char goci_slot_time (int32_t ipix, int32_t ilin, goci_l1b_t *goci_l1b, float *rel_sec)
 

Detailed Description

GOCI file format reader.

Author
Paul Martinolich
Naval Research Laboratory

Definition in file goci.h.

Function Documentation

◆ goci_l1b_close()

int goci_l1b_close ( goci_l1b_t goci_l1b)

close GOCI bands

Parameters
[in]goci_l1bGOCI file

Close the GOCI file

Returns
0 for success, -2 for close error

Definition at line 370 of file goci.c.

◆ goci_l1b_get_band()

int goci_l1b_get_band ( goci_l1b_t goci_l1b,
int  band,
int  line,
uint32_t *  buf 
)

read specified band and line from GOCI file.

Parameters
[in]goci_l1bGOCI file
[in]bandBand number to read (0-7)
[in]lineLine to read
[out]bufbuffer to contain data

This function reads a scan line from the GOCI data. The returned value can be converted to radiance by multiply the value by 1E-07.

Returns
0 for success, -4 for read error, -6 for invalid parameter

Definition at line 488 of file goci.c.

◆ goci_l1b_get_date()

int goci_l1b_get_date ( goci_l1b_t goci_l1b,
char *  tstr_name,
int *  year,
int *  month,
int *  day 
)

read a date of GOCI data

Parameters
[in]goci_l1bGOCI l1b file information structure
[in]tstr_namename of time string to read from (char *)
[out]yearYear
[out]monthMonth (1-12)
[out]dayDay (1-31)

This function gets the date from the GOCI data file.

Returns
0 for success, -3 for invalid format

Definition at line 415 of file goci.c.

◆ goci_l1b_get_time()

int goci_l1b_get_time ( goci_l1b_t goci_l1b,
char *  tstr_name,
int *  hour,
int *  min,
int *  sec 
)

read a time of GOCI data

Parameters
[in]goci_l1bGOCI file
[in]tstr_namename of time string to read from (char *)
[out]hourHour of day (0-23)
[out]minMinute (0-59)
[out]secSecond (0-59)

This function gets the time from the GOCI data file.

Returns
0 for success, -3 for invalid format

Definition at line 452 of file goci.c.

◆ goci_l1b_open()

int goci_l1b_open ( const char *  src_path,
goci_l1b_t **  goci_l1b 
)

open GOCI bands

Parameters
[in]src_pathpath to one GOCI file
[out]goci_l1bGOCI file structure

Opens a GOCI data file and attaches to the main data set "Image Data" which is stored as a GRID.

Returns
-1 for open error, -2 for close error, -3 for invalid format -4 for read error, -5 for memory error W. Robinson, SAIC, Nov 2014, the position in the file is really ( radius, sub-sat lon, sub-sat lat ), so derive position accordingly W. Robinson, SAIC, 5 Dec 2014, set up the slot navigation to get better times

Definition at line 226 of file goci.c.

◆ goci_proj4_close()

void goci_proj4_close ( goci_l1b_t l1b)

free all memory related to proj4

Parameters
[in/out]goci_l1b GOCI file structure

Free up the memory used by the proj4 geolocation functions

Definition at line 205 of file goci.c.

◆ goci_proj4_convert()

void goci_proj4_convert ( goci_l1b_t l1b,
int  numPoints,
double *  x,
double *  y 
)

◆ goci_proj4_open()

int goci_proj4_open ( goci_l1b_t l1b)

init proj4 for GOCI geolocation

Parameters
[in/out]goci_l1b GOCI file structure

Uses the information in the goci_l1b structure to init the proj4 structure for converting the geolocation information.

Returns
-1 for open error, -2 for close error, -4 for read error

Definition at line 31 of file goci.c.

◆ goci_slot_init()

int32_t goci_slot_init ( hid_t  file_id,
hsize_t *  dims,
float *  slot_rel_time,
unsigned char *  slot_asg,
int32_t *  slot_nav_avail 
)

Definition at line 20 of file goci_slot.c.

◆ goci_slot_nav()

int32_t goci_slot_nav ( int32_t  ipix,
int32_t  ilin,
int32_t  bnd,
int32_t  itile,
slot_nav_str *  slot_nav,
int32_t  nbnd,
int32_t  nslot,
unsigned char *  bnd_tile_lut,
float *  nradsq 
)

Definition at line 302 of file goci_slot.c.

◆ goci_slot_time()

unsigned char goci_slot_time ( int32_t  ipix,
int32_t  ilin,
goci_l1b_t goci_l1b,
float *  rel_sec 
)

Definition at line 436 of file goci_slot.c.