goes2go

repository·main·Indexed 42 days ago

https://github.com/blaylockbk/goes2go

A Python package for finding, downloading, and visualizing GOES-East and GOES-West satellite data from AWS. It provides high-level abstractions for interacting with ABI and GLM products via xarray, including tools for retrieving data by time range or nearest timestamp, computing RGB composites (such as TrueColor and Day Cloud Phase), and accessing Field of View (FOV) polygons and coordinate reference systems (CRS) for mapping with Cartopy.

Tokens
11.8K
Snippets
52
Records
58
Agent score
53%

What's inside goes2go

  1. Configure satellite and product aliases

    main

    When setting the satellite and product keys in your configuration, you can use the following aliases:

    Satellite Aliases:

    • GOES-East (16): 'noaa-goes16', 'goes16', 'G16', or 'EAST'
    • GOES-West (17): 'noaa-goes17', 'goes17', 'G17', or 'WEST'

    Product Aliases:

    • 'ABI': Alias for ABI-L2-MCMIP (Multichannel Cloud and Moisture Imagery)
    • 'GLM': Alias for GLM-L2-LCFA (Geostationary Lightning Mapper)
  2. Analyze GOES Field of View

    main

    The project includes notebooks to help visualize and analyze the Field of View (FOV) for different GOES instruments:

    • ABI Field of View: notebooks/field-of-view_ABI.ipynb for the Advanced Baseline Imager.
    • GLM Field of View: notebooks/field-of-view_GLM.ipynb for the Geostationary Lightning Mapper.
    • GLM Edges: notebooks/field-of-view_GLM_Edges.ipynb for analyzing the edges of the GLM field of view.
  3. Install goes2go

    main

    You can install goes2go using mamba, conda, pip, or uv from the conda-forge channel or PyPI.

    # Using mamba
    mamba install -c conda-forge goes2go
    
    # Using conda
    conda install -c conda-forge goes2go
    
    # Using pip
    pip install goes2go
    
    # Using uv
    uv add goes2go
  4. Install GOES-2-go using a custom Conda environment

    main

    You can create a reproducible environment using the provided environment.yml file. This is useful if you want to ensure all specific dependency versions are met.

    # Download environment file
    wget https://github.com/blaylockbk/goes2go/raw/main/environment.yml
    
    # Create the environment
    conda env create -f environment.yml
    
    # Activate the environment
    conda activate goes2go
  5. Download GOES Data using notebooks

    main

    The project provides several demonstration notebooks for downloading GOES data based on different temporal requirements:

    • Latest Data: Use DEMO_download_goes_latest.ipynb to download the most recent available GOES data.
    • Nearest Time: Use DEMO_download_goes_nearesttime.ipynb to download data closest to a specific timestamp.
    • Time Range: Use DEMO_download_goes_timerange.ipynb to download a continuous sequence of data over a specified period.

    All notebooks are available in the notebooks/ directory of the GitHub repository.

    https://github.com/blaylockbk/goes2go/tree/master/notebooks
  6. Process GOES ABI products using recipes

    main

    You can use the following demonstration notebooks to implement specific processing recipes for GOES ABI (Advanced Baseline Imager) products:

    • RGB Recipes: DEMO_rgb_recipes.ipynb for creating color composites.
    • Derived Motion Winds: DEMO_derived_motion_winds.ipynb for calculating wind vectors from imagery.
    • Total Precipitable Water: DEMO_total-precipitable-water.ipynb for calculating precipitable water values.
  7. Configure goes2go defaults in config.toml

    main

    The first time you import goes2go, it automatically creates a configuration file at ~/.config/goes2go/config.toml. You can modify this file to set global default arguments for all download functions.

    Settings are organized into sections: [default] applies to all methods, while specific sections like [timerange], [latest], and [nearesttime] allow you to override those defaults for specific use cases.

    [default]
    save_dir = "~/data"
    satellite = "noaa-goes16"
    product = "ABI-L2-MCMIP"
    domain = "C"
    download = true
    return_as = "filelist"
    overwrite = false
    max_cpus = 1
    s3_refresh = true
    verbose = true
    
    [timerange]
    s3_refresh = false
    
    [latest]
    return_as = "xarray"
    
    [nearesttime]
    within = "1h"
    return_as = "xarray"
  8. Install GOES-2-go via pip

    main

    You can install goes2go via PyPI, but you must manually install the following dependencies first:

    Once dependencies are installed, use one of the following commands:

    # Latest published version
    pip install goes2go
    
    # Most recent changes (from GitHub)
    pip install git+https://github.com/blaylockbk/goes2go.git
  9. Configure [latest] and [nearesttime] settings

    main

    Specific configuration sections allow you to control how time-sensitive data is retrieved:

    • [latest]: Controls the behavior when fetching the most recent available data. By default, it returns data as an xarray object.
    • [nearesttime]: Used to find the file closest to a specific timestamp.
      • within: A period of time to consider when searching (e.g., '1h').
      • return_as: The format to return (defaults to 'xarray').
    [latest]
    return_as = "xarray"
    
    [nearesttime]
    within = "1h"
    return_as = "xarray"
  10. Access GLM Field of View (FOV) boundaries

    main

    The object returned by goes_latest(product='GLM') contains a .FOV attribute. This attribute provides access to the estimated field-of-view boundaries, which can be used for plotting geometries in Cartopy.

    Key properties of the .FOV object:

    • .full_disk: A geometry representing the full disk coverage.
    • .crs: The Coordinate Reference System associated with the FOV data.
    # Accessing FOV properties
    print(glm.FOV.crs)
    print(glm.FOV.full_disk)