Skip to main content

package for reading radiosonde data

Project description

bsod2

BSoD2(BalloonScope on Deck 2) is a package in Python for reading and visualizing radiosonde data.

Requirements

  • numpy == 2.4.3
  • pandas == 3.0.2
  • metpy == 1.7.1

Installation

This package can be installed from PyPI.

pip install bsod2

Usage

The only functionality provided by this package is the bsod2.Sonde class, which retrieves radiosonde data and performs quality control.

Basic Sonde construction and methods

Initialize the class with the file path to the raw data.

from pathlib import Path
from bsod2 import Sonde

data = Sonde(Path("Seisuimaru2407/raw_data/F2024061806S1101771.CSV"))
data
>>> Sonde(sonde_no=1101771, launch_time=2024-06-18 06:01:42, product_name=iMS-100 , num_records=1101)

Accessors for observed variables

The following accessors can be used to retrieve meteorological variables.
Most accessors return values with metpy.units.units attached.

Accessor units Description Example
df quality-controlled pandas.DataFrame sonde.df
time Time sonde.time
lat units("deg") Latitude sonde.lat
lon units("deg") Longitude sonde.lon
x units("m") X-displacement from the launch point sonde.x
y units("m") Y-displacement from the launch point sonde.y
z units("m") Altitude sonde.z
p units("hPa") Pressure sonde.p
t units("degC") Temperature sonde.temp
rh units("percents") Relative humidity sonde.rh
wd units("deg") Wind direction sonde.wd
ws units("m/s") Wind speed sonde.ws

Save as CSV

Save the quality-controlled DataFrame as a CSV file to the specified file path using the save_df method.

sonde.save_df(Path("output.csv"))

Altitude or pressure interpolation

Interpolate linearly onto an evenly spaced grid in pressure or altitude using the interp argument.

data = Sonde(FILE_PATH,interp="p")

Sample plots

data

Sample data was observed in Seisui-maru 2407 cruise (2024年度 三重大学 陸海空・環境科学実習).

z vs. sonde variables plot

vertical profile of observed sonde variables

additional dependencies

  • matplotlib

See z_vs_var.ipynb for more details.

time-z cross section plot

time-z cross section of relative humidity

additional dependencies

  • matplotlib
  • xarray

See vertcal_csec.ipynb for more details.

2D/3D trajectories plot

2D trajectories 3D trajectories

animation of 3D trajectories

additional dependencies

  • matplotlib
  • cartopy
  • pygmt
  • imageio

See trajectory.ipynb for more details.

emagram

emagram

additional dependencies

  • matplotlib

See emagram.ipynb for more details.

Licence

This project is distributed under the terms of the GNU General Public License, Version 3 (GPLv3).
See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bsod2-0.1.0.tar.gz (20.3 kB view details)

Uploaded Source

File details

Details for the file bsod2-0.1.0.tar.gz.

File metadata

  • Download URL: bsod2-0.1.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for bsod2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a0e3ae74b3b5a1e6208a1eefe796dfad644244f917c65ef7b3ce80c5a20cc08
MD5 c4cb03687ff548fc8534f7351d2bd312
BLAKE2b-256 b07f8b51d722dead38a7c6ebf23e56fc99799bbbd6804b92a070a63576423685

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page