Skip to content
 
 

Repository files navigation

G2S Atmospheric Profile Processing and Refraction Analysis

Version 1.1.0

This project processes atmospheric profile JSON files generated by the G2S (Ground-to-Space) package (see README_G2S.md) and converts them into streamlined profile products for infrasound analysis. The current workflow reads a downloaded G2S JSON file, computes atmospheric state variables and effective sound speed profiles, and exports both tabular and figure outputs.

The broader goal of this project is to expand the script into a more automated tool that can:

  • download a G2S profile JSON directly from within the script based on user input
  • compute atmospheric profiles automatically from that downloaded file
  • evaluate effective sound speed over a full 0–360° azimuth sweep
  • identify possible infrasound refraction azimuths

Note

This repo is forked from G2S (Ground-to-Space), thus any commits not done by me (swang331), and is 1+ year older than the most recent commit is not my work.

Installation

We recommend you install this package into a new conda environment. (Please install Anaconda or Miniconda before proceeding.) The environment must contain all of the packages listed in the Dependencies section.

The provided environments.yml file contains all neccesary Python packages.

Run the lines below in terminal to clone the repository:

git clone https://github.com/swang331/GEOS694_FinalProject.git
cd GEOS694_FinalProject
conda env create -f environments.yml
conda activate g2s_profiles

To run an example, simply cd into the directory and run:

python profiles_update.py

then enter all inputs by following the script prompt.

Current functionality

The present script:

  • runs profiles_update.py
  • allows the user to either:
    • use an existing G2S JSON file, or
    • download a new G2S JSON file from within the script based on prompted user input
  • reads a G2S JSON file
  • extracts atmospheric variables:
    • temperature
    • zonal wind
    • meridional wind
    • density
    • pressure
  • converts the profile into a structured pandas DataFrame
  • computes:
    • adiabatic sound speed
    • effective sound speed for one or more user-defined propagation azimuths
  • allows the user to choose:
    • specific propagation azimuths, or
    • a full 0–359° azimuth sweep
  • searches each effective sound speed profile for refraction points by comparing the profile to the ground-level effective sound speed
  • classifies detected refraction points as:
    • stratospheric returns (0–50 km)
    • thermospheric returns (50–180 km)
  • prints refraction results to the terminal by azimuth and refraction type
  • writes a CSV summary of the profile
  • generates vertical atmospheric profile plots
  • allows the user to choose whether to:
    • show plots interactively
    • save plots to the output directory
  • generates a polar refraction summary figure showing:
    • azimuth around the circle
    • refraction height as radial distance
    • color-coded refraction type
  • allows the user to choose whether to:
    • show the refraction summary figure interactively
    • save the refraction summary figure to the output directory

Class Requirements

Project Task #1

Classes are being implemented to support updating observational azimuth, and the project may later include parallel or concurrent methods to speed up the 0–360° azimuth sweep.

Project Task #2

Input systems (prompting the user in the terminal) have been implemented, and a very simple test file is initialized.

Scientific Background

In infrasound propagation studies, the effective sound speed is often used to evaluate whether atmospheric conditions favor ducting or refraction along a given propagation direction.

The effective sound speed is defined as:

$$ c_{\mathrm{eff}} = c_0 + \vec{u} \cdot \hat{s} $$

where:

  • $c_0$ is the adiabatic sound speed
  • $\vec{u}$ is the wind vector
  • $\hat{s}$ is the propagation-direction unit vector

A potential refraction point is of interest when the effective sound speed aloft exceeds the effective sound speed at the ground surface. In other words, this can help indicate if an atmospheric structure is favorable for upward bending reversal or ducted infrasound propagation.

Dependencies

Current dependencies:

  • numpy
  • pandas
  • matplotlib
  • G2S (ncpag2s.py; see README_G2S.md)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages