Python scripts that can be used to simulate trajectories of tropospheric weather balloons and parachutes. Each function has documentation at the beginning of said function. These docstrings are also in html format in the docs/ subdirectory.
- requests
- pygrib
- shapely
- pyproj
- pillow
Tested with:
- Python 3.8.10
- NumPy 1.21.5
- SciPy 1.8.0
- Astropy 5.2.1
- Matplotlib 3.5.1
This file contains the various parameters used by the code, e.g. the dimensions of the balloon/parachute, various constants, and the resolution of the GFS data used.
The code creates the following folders:
- output_folder: the output from pyBalloon is saved here.
- forecast_data_folder: the weather forecasts models are downloaded to this folder.
- elevation_data_folder: contains the elevation data.
The names of these folders can be changed in the param_file.
Once you have changed the relevant paths in the param_file (see above) to match your setup, you can now run the code.
To run the code, use pyb_runner.py. The date should be in the format yyyymmdd, and time is UTC. I.e. for a trajectory on the 12th of April 2023 at 10am UTC, dropped from a height of 30000m at -44.72 degrees latitude and 169.24 degrees longitude, do:
python3 pyb_runner.py 20230412 10.0 -44.72 169.24 30000
-
Forecast data with either 0.5 or 0.25 degree resolution from today to nine days ago is downloaded automatically from: https://ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/
-
Forecasts with 0.5 degree resolution from 202208 to nine days ago (these dates change as time passes) is downloaded automatically from: https://www.ncei.noaa.gov/data/global-forecast-system/access/grid-004-0.5-degree/forecast/
-
Forecasts with 0.25 degree resolution from 2015 to the present (up to ~two days ago) is downloaded automatically from: https://rda.ucar.edu/datasets/ds084.1/#!description ; note that an account is needed for this website.
-
Any other 0.5 resolution data can be ordered from: https://www.ncdc.noaa.gov/has/HAS.DsSelect ; select Model & Global Forecast System model (GRIB-2) Grid 4 (you can also find the data from the previous bullet point here).
-
Elevation data is automatically downloaded from: http://viewfinderpanoramas.org/dem3.html#hgt (|lat| < 60) and http://srtm.csi.cgiar.org/ (|lat| > 60).
*** Note that the forecast data are not immediately uploaded after being produced, there is a lag of ~4-5 hours. The code takes this into account and therefor sometimes uses forecasts from 6 hours earlier.