ncglm  1.0
Functions
glm_event.c File Reference

Code to read event data from the GOES-17 Global Lightning Mapper. More...

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "ncglm.h"
Include dependency graph for glm_event.c:

Functions

int glm_read_event_structs (int ncid, size_t *nevent, GLM_EVENT_T *event)
 Read and unpack all the event data in the file. More...
 
int glm_read_event_arrays (int ncid, size_t *nevent, int *event_id, float *time_offset, float *lat, float *lon, float *energy, int *parent_group_id)
 Read and unpack all the event data in the file. More...
 

Detailed Description

Code to read event data from the GOES-17 Global Lightning Mapper.

Author
Ed Hartnett, 11/16/19

Function Documentation

◆ glm_read_event_arrays()

int glm_read_event_arrays ( int  ncid,
size_t *  nevent,
int *  event_id,
float *  time_offset,
float *  lat,
float *  lon,
float *  energy,
int *  parent_group_id 
)

Read and unpack all the event data in the file.

It will be loaded into the pre-allocated array of struct event.

Parameters
ncidID of already opened GLM file.
neventPointer that gets the number of events. Ignored if NULL.
event_idPointer to already-allocated arrat of int for event_id values.
time_offsetPointer to already-allocated array of unsigned int for time_offset data, or NULL if struct reads are being done.
latPointer to already-allocated array of float for lat data, or NULL if struct reads are being done.
lonPointer to already-allocated array of float for lon data, or NULL if struct reads are being done.
energyPointer to already-allocated array of float for energy data, or NULL if struct reads are being done.
parent_group_idPointer to already-allocated array of int for parent_group_id data, or NULL if struct reads are being done.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett

◆ glm_read_event_structs()

int glm_read_event_structs ( int  ncid,
size_t *  nevent,
GLM_EVENT_T *  event 
)

Read and unpack all the event data in the file.

It will be loaded into the pre-allocated array of struct event.

Parameters
ncidID of already opened GLM file.
neventPointer that gets the number of events. Ignored if NULL.
eventPointer to already-allocated arrat of GLM_EVENT_T.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett