thunder

thundeR - Rapid computation and visualisation of convective parameters from rawinsonde and NWP data

https://github.com/bczernecki/thunder

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.4%) to scientific vocabulary

Keywords

cape cin convective-parameters download-sounding hodograph rawinsonde severe-weather thunder tornado
Last synced: 6 months ago · JSON representation ·

Repository

thundeR - Rapid computation and visualisation of convective parameters from rawinsonde and NWP data

Basic Info
Statistics
  • Stars: 49
  • Watchers: 4
  • Forks: 8
  • Open Issues: 8
  • Releases: 9
Topics
cape cin convective-parameters download-sounding hodograph rawinsonde severe-weather thunder tornado
Created about 5 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License Citation

README.md

thundeR

R-CMD-check Codecov test coverage CRAN status CRAN RStudio mirror downloads <!-- badges: end -->

Rapid computation and visualisation of convective parameters from rawinsonde and numerical weather prediction data

thundeR is a freeware R package for rapid computation and visualisation of convective parameters commonly used in the operational forecasting of severe convective storms. Core algorithm is based on C++ code implemented into R language via Rcpp. This solution allows to compute over 200 thermodynamic and kinematic parameters in less than 0.02s per profile and process large datasets such as reanalyses or operational NWP models in a reasonable amount of time. Package has been developed since 2017 by research meteorologists specializing in severe convective storms and is constantly updated with new features.

Online browser

Online rawinsonde browser of thundeR package is available at http://rawinsonde.com

Installation

The stable version can be installed from the CRAN repository:

r install.packages("thunder")

The development version can be installed directly from the github repository:

r remotes::install_github("bczernecki/thunder")

Usage

Draw Skew-T, hodograph and convective parameters on a single layout and export to png file

r data("sounding_vienna") # load example dataset (Vienna rawinsonde profile for 23 Aug 2011 12UTC): pressure = sounding_vienna$pressure # vector of pressure [hPa] altitude = sounding_vienna$altitude # vector of altitude [meters] temp = sounding_vienna$temp # vector of temperature [degree Celsius] dpt = sounding_vienna$dpt # vector of dew point temperature [degree Celsius] wd = sounding_vienna$wd # vector of wind direction [azimuth in degrees] ws = sounding_vienna$ws # vector of wind speed [knots] sounding_save(filename = "Vienna.png", title = "Vienna - 23 August 2011 1200 UTC", pressure, altitude, temp, dpt, wd, ws)

Download LBF North Platte rawinsonde profile for 03 Jul 1999 00UTC and export to png file

``` r profile = getsounding(wmoid = 72562, yy = 1999, mm = 7, dd = 3, hh = 0)

sounding_save(filename = "NorthPlatte.png", title = "North Platte - 03 July 1999 0000 UTC", profile$pressure, profile$altitude, profile$temp, profile$dpt, profile$wd, profile$ws) ```

Compute convective parameters based on a sample vertical profile data:

``` r library("thunder")

pressure = c(1000, 855, 700, 500, 300, 100, 10) # pressure [hPa] altitude = c(0, 1500, 2500, 6000, 8500, 12000, 25000) # altitude [meters] temp = c(25, 10, 0, -15, -30, -50, -92) # temperature [degree Celsius] dpt = c(20, 5, -5, -30, -55, -80, -99) # dew point temperature [degree Celsius] wd = c(0, 90, 135, 180, 270, 350, 0) # wind direction [azimuth in degress] ws = c(5, 10, 20, 30, 40, 5, 0) # wind speed [knots] accuracy = 2 # accuracy of computations where 3 = high (slow), 2 = medium (recommended), 1 = low (fast) sounding_compute(pressure, altitude, temp, dpt, wd, ws, accuracy)

MUCAPE MUCAPEM10 MUCAPEM10PT MU02kmCAPE

2269.9257 998.1443 313.0747 247.9794

MU03kmCAPE MUHGLCAPE MUCIN MULCL_HGT

575.6293 1616.5384 0.0000 730.0000

MULFCHGT MUELHGT MULI MULI_M10

730.0000 8300.0000 -10.1119 -10.8539

MUWMAX MUELTEMP MULCLTEMP MULFC_TEMP

67.3784 -28.8000 17.7000 17.7000

MUMIXR MUCAPE500 MUCAPE500M10 MUCAPE500M10PT

14.8759 1076.0322 389.3651 137.0814

MUCIN500 MULI500 MULI500M10 SBCAPE

0.0000 -5.0417 -6.2346 2269.9257

SBCAPEM10 SBCAPEM10PT SB02kmCAPE SB03km_CAPE

998.1443 313.0747 247.9794 575.6293

SBHGLCAPE SBCIN SBLCLHGT SBLFC_HGT

1616.5384 0.0000 730.0000 730.0000

SBELHGT SBLI SBLIM10 SBWMAX

8300.0000 -10.1119 -10.8539 67.3784

SBELTEMP SBLCLTEMP SBLFCTEMP SB_MIXR

-28.8000 17.7000 17.7000 14.8759

MLCAPE MLCAPEM10 MLCAPEM10PT ML02kmCAPE

1646.0639 670.1001 225.2816 164.0798

ML03kmCAPE MLHGLCAPE MLCIN MLLCL_HGT

422.4290 1250.0221 0.0000 975.0000

MLLFCHGT MLELHGT MLLI MLLI_M10

975.0000 7900.0000 -7.6203 -8.5845

MLWMAX MLELTEMP MLLCLTEMP MLLFC_TEMP

57.3771 -26.4000 15.2500 15.2500

MLMIXR LR0500m LR01km LR02km

13.0487 -10.0000 -10.0000 -10.0000

LR03km LR04km LR06km LR16km

-9.0476 -7.8571 -6.6667 -6.0000

LR26km LR24km LR36km LR26km_MAX

-5.0000 -5.7672 -4.2857 -5.7143

LR500700hPa LR500800hPa LR600800hPa FRZGHGT

-4.2857 -5.1807 -5.8333 2500.0000

FRZGwetbulbHGT HGTmaxthetae03km HGTminthetae04km Delta_thetae

2275.0000 0.0000 3750.0000 28.0698

Deltathetaemin04km Thetae01km Thetae02km DCAPE

28.8346 330.5323 323.6191 598.3100

ColdPoolStrength WindIndex PRCPWATER MoistureFlux02km

12.6322 33.9064 27.1046 30.4255

RH01km RH02km RH14km RH25km

0.7291 0.7197 0.6452 0.5550

RH36km RHHGL BS0500m BS01km

0.4436 0.4603 1.9172 3.8344

BS02km BS03km BS06km BS08km

8.7821 12.6560 18.0055 17.4077

BS36km BS26km BS16km BS18km

9.3693 13.3304 16.6478 20.2791

BSEFFMU BSEFFSB BSEFFML BSSFCto_M10

14.2232 14.2232 13.8968 15.5104

BS1kmtoM10 BS2kmtoM10 BSMULFCtoM10 BSSBLFCtoM10

13.6499 9.8830 14.0737 14.0737

BSMLLFCtoM10 BSMW02toSM BSMW02toRM BSMW02to_LM

13.6864 7.3040 10.1410 10.7870

BSHGLtoSM BSHGLtoRM BSHGLtoLM MW0500m

4.8934 7.7860 9.9885 2.3086

MW01km MW02km MW03km MW06km

2.4251 3.3476 4.8003 7.8107

MW13km SRH100mRM SRH250mRM SRH500m_RM

6.8389 4.2535 10.0537 19.7206

SRH1kmRM SRH3kmRM SRH36kmRM SRH100mLM

39.6346 152.5219 236.5901 1.5027

SRH250mLM SRH500mLM SRH1kmLM SRH3kmLM

3.5518 6.9670 14.0023 -13.1308

SRH36kmLM SV500mRM SV01kmRM SV03kmRM

-24.3790 0.0039 0.0039 0.0048

SV500mLM SV01kmLM SV03kmLM MWSR500m_RM

0.0010 0.0011 -0.0014 10.0863

MWSR01kmRM MWSR03kmRM MWSR500mLM MWSR01kmLM

10.1501 9.5359 13.7821 12.8585

MWSR03kmLM MWSRVM500mRM MWSRVM01kmRM MWSRVM03km_RM

8.4579 10.1078 10.2253 10.5358

MWSRVM500mLM MWSRVM01kmLM MWSRVM03kmLM SVFRA500m_RM

13.7647 12.8371 8.8342 0.9982

SVFRA01kmRM SVFRA03kmRM SVFRA500mLM SVFRA01kmLM

0.9871 0.9560 0.2592 0.2800

SVFRA03kmLM BunkersRMA BunkersRMM BunkersLM_A

-0.2862 209.4046 7.7933 122.0585

BunkersLMM BunkersMWA BunkersMWM CorfididownwindA

13.1825 151.9494 7.8107 218.6955

CorfididownwindM CorfidiupwindA CorfidiupwindM K_Index

14.6982 231.3283 9.1794 24.3548

ShowalterIndex TotalTotalsIndex SWEATIndex STPfix

3.7501 44.3548 106.4168 0.3600

STPnew STPfixLM STPnewLM SCPfix

0.2005 0.1272 0.0708 6.2338

SCPnew SCPfixLM SCPnew_LM SHIP

4.9243 -0.5367 -0.4239 0.6287

HSI DCP MUWMAXSHEAR SBWMAXSHEAR

1.7159 1.1507 1213.1848 1213.1848

MLWMAXSHEAR MUEFFWMAXSHEAR SBEFFWMAXSHEAR MLEFF_WMAXSHEAR

1033.1051 958.3359 958.3359 797.3548

EHI500m EHI01km EHI03km EHI500m_LM

0.2798 0.5623 2.1638 0.0988

EHI01kmLM EHI03kmLM SHERBS3 SHERBE

0.1987 -0.1863 0.6482 0.7015

SHERBS3v2 SHERBEv2 DEI DEI_eff

0.8642 0.9353 1.5198 1.1885

TIP

2.4356

```

Hodograph example:

Download sounding and draw hodograph:

r data("northplatte") sounding_hodograph(ws = northplatte$ws, wd = northplatte$wd, altitude = northplatte$altitude, max_speed = 38) title("North Platte - 03 July 1999, 00:00 UTC")

Perform sounding computations using Python with rpy2:

It is possible to launch thunder under Python via rpy2 library. Below you can find the minimum reproducible example:

Make sure that pandas and rpy2 libraries are available for your Python environment. If not install required python packages:

bash pip install pandas pip install rpy2

Launch thunder under Python with rpy2:

``` py

load required packages

from rpy2.robjects.packages import importr from rpy2.robjects import r,pandas2ri import rpy2.robjects as robjects pandas2ri.activate()

load thunder package (make sure that it was installed in R before)

importr('thunder')

download North Platte sounding

profile = robjects.r'get_sounding'

compute convective parameters

parameters = robjects.r'sounding_compute'

customize output and print all computed variables, e.g. most-unstable CAPE (first element) equals 9413 J/kg

print(list(map('{:.2f}'.format, parameters))) ['9413.29', '233.35', '1713.74', '0.00', '775.00', '775.00', '15500.00', '-16.55', '137.21', '-66.63', '23.98', '23.98', '23.36', '9413.29', '233.35', '1713.74', '0.00', '775.00', '775.00', '15500.00', '-16.55', '137.21', '-66.63', '23.98', '23.98', '23.36', '7805.13', '115.22', '1515.81', '-4.35', '950.00', '950.00', '15000.00', ...] ```

Accuracy tables for sounding_compute()

The interpolation algorithm used in the sounding_compute() function impacts accuracy of parameters such as CAPE or CIN and the performance of the script. The valid options for the accuracy parameter are 1, 2 or 3:

accuracy = 1 - High performance but low accuracy. Dedicated for large dataset when output data needs to be quickly available (e.g. operational numerical weather models). This option is around 20 times faster than high accuracy (3) setting. Interpolation is peformed for 60 levels (m AGL):

r c(0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1600, 1800, 2000, 2200, 2400, 2600, 2800, 3000, 3200, 3400, 3600, 3800, 4000, 4200, 4400, 4600, 4800, 5000, 5200, 5400, 5600, 5800, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000, 10500, 11000, 11500, 12000, 12500, 13000, 13500, 14000, 15000, 16000, 17000, 18000, 19000, 20000)

accuracy = 2 - Compromise between script performance and accuracy. Recommended for efficient processing of large numerical weather prediction datasets such as meteorological reanalyses for research studies. This option is around 10 times faster than high accuracy (3) setting. Interpolation is peformed for 318 levels (m AGL):

r c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 775, 800, 825, 850, 875, 900, 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, 1450, 1475, 1500, 1525, 1550, 1575, 1600, 1625, 1650, 1675, 1700, 1725, 1750, 1775, 1800, 1825, 1850, 1875, 1900, 1925, 1950, 1975, 2000, 2025, 2050, 2075, 2100, 2125, 2150, 2175, 2200, 2225, 2250, 2275, 2300, 2325, 2350, 2375, 2400, 2425, 2450, 2475, 2500, 2525, 2550, 2575, 2600, 2625, 2650, 2675, 2700, 2725, 2750, 2775, 2800, 2825, 2850, 2875, 2900, 2925, 2950, 2975, 3000, 3050, 3100, 3150, 3200, 3250, 3300, 3350, 3400, 3450, 3500, 3550, 3600, 3650, 3700, 3750, 3800, 3850, 3900, 3950, 4000, 4050, 4100, 4150, 4200, 4250, 4300, 4350, 4400, 4450, 4500, 4550, 4600, 4650, 4700, 4750, 4800, 4850, 4900, 4950, 5000, 5050, 5100, 5150, 5200, 5250, 5300, 5350, 5400, 5450, 5500, 5550, 5600, 5650, 5700, 5750, 5800, 5850, 5900, 5950, 6000, 6100, 6200, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7000, 7100, 7200, 7300, 7400, 7500, 7600, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8800, 8900, 9000, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000, 10100, 10200, 10300, 10400, 10500, 10600, 10700, 10800, 10900, 11000, 11100, 11200, 11300, 11400, 11500, 11600, 11700, 11800, 11900, 12000, 12250, 12500, 12750, 13000, 13250, 13500, 13750, 14000, 14250, 14500, 14750, 15000, 15250, 15500, 15750, 16000, 16250, 16500, 16750, 17000, 17250, 17500, 17750, 18000, 18250, 18500, 18750, 19000, 19250, 19500, 19750, 20000)

accuracy = 3: High accuracy but low performance setting. Recommended for analysing individual profiles. Interpolation is performed with 5 m vertical resolution step up to 20 km AGL (i.e.: 0, 5, 10, ... 20000 m AGL)

Important notes

  • Remember to always input wind speed data in knots.
  • Script will always consider first height level as the surface (h = 0), therefore input height data can be as above sea level (ASL) or above ground level (AGL).
  • For efficiency purposes it is highly recommended to clip input data for a maximum of 16-18 km AGL or lower.
  • Values of parameters will be different for different accuracy settings.

Developers

thundeR package has been developed by atmospheric scientists, each having an equal contribution (listed in alphabetical order):

  • Bartosz Czernecki (Adam Mickiewicz University in Poznań, Poland)

  • Piotr Szuster (Cracow University of Technology, Poland)

  • Mateusz Taszarek (CIMMS/NSSL in Norman, Oklahoma, United States)

Contributions

Feel free to submit issues and enhancement requests.

Acknowledgments:

Development of the thundeR package has been supported by the Polish National Science Center (Grant No. 2020/39/D/ST10/00768)

Owner

  • Name: Bartosz Czernecki
  • Login: bczernecki
  • Kind: user
  • Location: Poznan, Poland
  • Company: iqdata

R

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Czernecki
    given-names: Bartosz
    orcid: 0000-0001-6496-1386
  - family-names: Taszarek
    given-names: Mateusz
    orcid: 0000-0001-9578-5872
  - family-names: Szuster
    given-names: Piotr
    orcid: 0000-0001-7937-8046
title: "thundeR - Computation and Visualisation of Atmospheric Convective Parameters"
version: 1.1.0
date-released: 2022-12-22

GitHub Events

Total
  • Create event: 5
  • Release event: 1
  • Issues event: 8
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 86
  • Pull request event: 2
Last Year
  • Create event: 5
  • Release event: 1
  • Issues event: 8
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 86
  • Pull request event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 488
  • Total Committers: 4
  • Avg Commits per committer: 122.0
  • Development Distribution Score (DDS): 0.357
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Mateusz Taszarek t****o@a****l 314
bczernecki b****i@g****m 172
retsuz 6****z 1
Jakub Nowosad N****d 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 17
  • Total pull requests: 47
  • Average time to close issues: 3 months
  • Average time to close pull requests: 18 days
  • Total issue authors: 14
  • Total pull request authors: 5
  • Average comments per issue: 1.47
  • Average comments per pull request: 0.09
  • Merged pull requests: 39
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 2
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 20 hours
  • Issue authors: 4
  • Pull request authors: 1
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • IskraAI (2)
  • koeleboe (2)
  • nuerdadahachi (2)
  • GeorgeMJ23 (2)
  • franciscoleoncrz (1)
  • abigmo (1)
  • Papasoulis (1)
  • fermidq (1)
  • bczernecki (1)
  • loreenneerol (1)
  • Lynvan (1)
  • Begio (1)
  • NMC-DAVE (1)
  • MengXin001 (1)
Pull Request Authors
  • bczernecki (42)
  • Nowosad (3)
  • cenekp74 (2)
  • mtaszarek (1)
  • retsuz (1)
Top Labels
Issue Labels
bug (4) documentation (1) enhancement (1)
Pull Request Labels
bug (3) enhancement (3) documentation (2)

Packages

  • Total packages: 3
  • Total downloads:
    • cran 290 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 25
  • Total maintainers: 1
proxy.golang.org: github.com/bczernecki/thundeR
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/bczernecki/thunder
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
cran.r-project.org: thunder

Computation and Visualisation of Atmospheric Convective Parameters

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 290 Last month
Rankings
Forks count: 11.3%
Stargazers count: 12.9%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 35.8%
Downloads: 89.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • Rcpp >= 0.12.9.4 imports
  • aiRthermo * imports
  • climate * imports
  • dplyr * imports
  • RadioSonde * suggests
  • covr * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 2.0.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/valgrind.yaml actions
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
.github/workflows/html5-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite