ncglm  1.0
Functions
glm_flash.c File Reference

Code to flash 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_flash.c:

Functions

int glm_read_flash_structs (int ncid, size_t *nflash, GLM_FLASH_T *flash)
 Read and unpack all the flash data in the file. More...
 
int glm_read_flash_arrays (int ncid, size_t *nflash, float *time_offset_of_first_event, float *time_offset_of_last_event, float *frame_time_offset_of_first_event, float *frame_time_offset_of_last_event, float *lat, float *lon, float *area, float *energy, short *quality_flag)
 Read and unpack all the flash data in the file. More...
 

Detailed Description

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

Author
Ed Hartnett, 11/16/19

Function Documentation

◆ glm_read_flash_arrays()

int glm_read_flash_arrays ( int  ncid,
size_t *  nflash,
float *  time_offset_of_first_event,
float *  time_offset_of_last_event,
float *  frame_time_offset_of_first_event,
float *  frame_time_offset_of_last_event,
float *  lat,
float *  lon,
float *  area,
float *  energy,
short *  quality_flag 
)

Read and unpack all the flash data in the file.

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

Parameters
ncidID of already opened GLM file.
nflashA pointer that gets the number of flashes. Ignored if NULL.
time_offset_of_first_eventPointer to already-allocated array of float for time_offset_of_first_event data, or NULL if struct reads are being done.
time_offset_of_last_eventPointer to already-allocated array of float for time_offset_of_last_event data, or NULL if struct reads are being done.
frame_time_offset_of_first_eventPointer to already-allocated array of float for frame_time_offset_of_first_event data, or NULL if struct reads are being done.
frame_time_offset_of_last_eventPointer to already-allocated array of float for frame_time_offset_of_last_event 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.
areaPointer to already-allocated array of float for area 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.
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_flash_structs()

int glm_read_flash_structs ( int  ncid,
size_t *  nflash,
GLM_FLASH_T *  flash 
)

Read and unpack all the flash data in the file.

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

Parameters
ncidID of already opened GLM file.
nflashA pointer that gets the number of flashes. Ignored if NULL.
flashPointer to already-allocated arrat of GLM_FLASH_T.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett