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.

data.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")

By default, the interpolated pressure axis ranges from 100 to 1100 hPa at 1 hPa intervals, and the height axis ranges from 0 m to 2000 m at 10 m intervals.
Values outside the original data range are filled with NaN. The range and resolution of the interpolation axes can be specified using the following arguments.

Argument Description Default
interp Name of the interpolation axis. If None, interpolation is not performed. None
interp_pmin Minimum value of the interpolated pressure axis (hPa) 100
interp_pmax Maximum value of the interpolated pressure axis (hPa) 1100
interp_dp Step size of the interpolated pressure axis (hPa) 1
interp_zmin Minimum value of the interpolated height axis (m) 0
interp_zmax Maximum value of the interpolated height axis (m) 20000
interp_dz Step size of the interpolated height axis (m) 10

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
  • tqdm

See trajectory.ipynb for more details.

emagram

emagram

additional dependencies

  • matplotlib

See emagram.ipynb for more details.

License

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.3.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bsod2-0.1.3-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bsod2-0.1.3.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bsod2-0.1.3.tar.gz
Algorithm Hash digest
SHA256 69d7190876557946a697e395c8bae89c6e62d7186dc2e1a0decc0d50dcffc7fc
MD5 aae4d282fc894c9c9d5863d29fc47f40
BLAKE2b-256 908965c12c46bddd747ba6f641b305359a543780fd59f5cb1858cc9105fa7a4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bsod2-0.1.3.tar.gz:

Publisher: publish.yml on sotomita/bsod2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bsod2-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: bsod2-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bsod2-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 93b70ffe54df6c76d9a56a9f2d5f05da761227f76d66db2a162e1765dac37b9a
MD5 ef8567c9350b0a092efc3705968b26e5
BLAKE2b-256 49eae6bf4a8f596b9e5991fdf6d7a9e59477fab27cc558de25c2decfba1e43d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bsod2-0.1.3-py3-none-any.whl:

Publisher: publish.yml on sotomita/bsod2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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