Giter VIP home page Giter VIP logo

glmtools's Introduction

glmtools

GOES Geostationary Lightning Mapper Tools

DOI

Installation

glmtools requires Python 3.5+ and provides a conda environment.yml for the key dependencies.

See the documentation in docs/index.rst for complete installation instructions.

Description

Compatible data:

glmtools automatically reconstitutes the parent-child relationships implicit in the L2 GLM data and adds traversal information to the dataset:

  • calculating the parent flash id for each event
  • calculating the number of groups and events in each flash
  • calculating the number of events in each group

xarray's dimension-aware indexing lets you quickly reduce the dataset to flashes of interest, as described below.

glmtools can restore the GLM event geometry using a built-in corner-point lookup table, which allows for gridding of the imagery at finer resolutions that accurately represent the full footprint of each event, group, and flash.

The methods are described in Bruning et al. (2019):

  • Bruning, E., Tillier, C. E., Edgington, S. F., Rudlosky, S. D., Zajic, J., Gravelle, C., et al. (2019). Meteorological imagery for the Geostationary Lightning Mapper. Journal of Geophysical Research: Atmospheres, 2019; 124: 14285 14309. https://doi.org/10.1029/2019JD030874

Some common tasks

Create gridded NetCDF imagery

Use the script in examples/grid/make_GLM_grids.py. See the documentation in docs/index.rst for complete instructions and example commands.

Interactively plot raw flash data

See the examples folder. basic_read_plot.ipynb is a good place to start.

Reduce the dataset to a few flashes

from glmtools.io.glm import GLMDataset
filename = 'OR_GLM-L2-LCFA_G16_s20180040537000_e20180040537200_c20180040537226.nc'
glm =  GLMDataset(filename)
flash_id_list = glm.dataset.flash_id[20:30]
smaller_dataset = glm.get_flashes(flash_id_list)

Filter out flashes geographically or by events/groups per flash

See glmtools.io.glm.GLMDataset.subset_flashes.

The logic implemented above is pretty simple, and below shows how to adapt it to find large flashes.

from glmtools.io.glm import GLMDataset
filename = 'OR_GLM-L2-LCFA_G16_s20180040537000_e20180040537200_c20180040537226.nc'
glm =  GLMDataset(filename)
fl_idx = glm.dataset['flash_area'] > 2000
flash_ids = glm.dataset[{glm.fl_dim: fl_idx}].flash_id.data
smaller_dataset = glm.get_flashes(flash_ids)
print(smaller_dataset)

glmtools's People

Contributors

deeplycloudy avatar djhoese avatar gerritholl avatar jkzajic avatar temurin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.