ncglm  1.0
Functions
glm_group.c File Reference

Code to read group 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_group.c:

Functions

int glm_read_group_structs (int ncid, size_t *ngroup, GLM_GROUP_T *group)
 Read and unpack all the group data in the file. More...
 
int glm_read_group_arrays (int ncid, size_t *ngroup, float *time_offset, float *lat, float *lon, float *energy, float *area, unsigned int *parent_flash_id, short *quality_flag)
 Read and unpack all the group data in the file. More...
 

Detailed Description

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

Author
Ed Hartnett, 11/16/19

Function Documentation

◆ glm_read_group_arrays()

int glm_read_group_arrays ( int  ncid,
size_t *  ngroup,
float *  time_offset,
float *  lat,
float *  lon,
float *  energy,
float *  area,
unsigned int *  parent_flash_id,
short *  quality_flag 
)

Read and unpack all the group data in the file.

It will be loaded into the pre-allocated arrays for each element of the group data.

Parameters
ncidID of already opened GLM file.
ngroupA pointer that gets the number of groups. Ignored if NULL.
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.
areaPointer to already-allocated array of float for area data, or NULL if struct reads are being done.
parent_flash_idPointer to already-allocated array of int for parent_flash_id data, or NULL if struct reads are being done.
quality_flagPointer to already-allocated array of short for quality flag data, or NULL if struct reads are being done.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett

◆ glm_read_group_structs()

int glm_read_group_structs ( int  ncid,
size_t *  ngroup,
GLM_GROUP_T *  group 
)

Read and unpack all the group data in the file.

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

Parameters
ncidID of already opened GLM file.
ngroupA pointer that gets the number of groups. Ignored if NULL.
groupPointer to already-allocated arrat of GLM_GROUP_T.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett