This repository contains scripts to download RAOBS from the University of Wyoming Radiosonde Archive by building URLs like:
- for accessing TEXT:LIST data:
http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR=2019&MONTH=05&FROM=2812&TO=2812&STNM=72672
- for accessing GIF:SKEWT images:
http://weather.uwyo.edu/upperair/images/2019052812.72672.skewt.parc.gif
- open an xterm
> conda activate (to get the base environment where libraries have been installed)
> python RAOBget.py <-h> ...
or create a shortcut to windows10/RAOBget.bat and move it to the desktop and just click on it
- open an xterm
> python3 RAOBget.py <-h> ...
(Note: You can run on barolo using /bin/python3, but as CentOS 7 reaches end-of-life June 2024, please try one of the other machines before then.)
> python3 /opt/local/RAOBget/src/RAOBget <-h>
The -h option lists and identifies the parameters you can pass to the code, like requested station id and dates. So for example, python3 RAOBget.py --raobtype TEXT:LIST --now --stnm DNR will download the latest 12-hour sounding from Denver/Stapleton.
> cd src
> python3 RAOBget.py --config config/catalog.yml [--stnm <station number> or --rsl <station_list_file>] [--freq <[3,6,12]>]
(or edit the sample config file, config/catalog.yml, and add stnm or rsl keywords)
python3 RAOBget.py --gui
Set Mode = MTP; Freq = 12; Data Format = TEXT:LIST; create or load an RSF file; select dates. You can then save your configuration for future runs:
python3 RAOBget.py --config <configfile>
If you need help reading skewT plots, a good reference is the COMET MetEd module: https://www.meted.ucar.edu/training_module.php?id=225#.XXrMpZNKiwQ
* python3
* pyqt5
* PyYAML
* metpy
Note re. cartopy: This software does NOT require Cartopy. It does require Metpy. Metpy 0.10.# inadvertently developed a hard dependency on Cartopy. If you get an error that Metpy can't find Cartopy, switch to a version of Metpy that does not have this dependency.
Make sure you have python3 installed
> python3 -m pip install PyQt5
> python3 -m pip install pyyaml
> python3 -m pip install metpy
> brew upgrade python (to 3.7.x)
unset PYTHONPATH
> python3 -m pip install PyQt5
> pip3 install pyyaml
> pip3 install metpy
Use miniconda to install all needed packages:
- https://docs.conda.io/en/latest/miniconda.html
- download win 64 bit installer for python3.7 and install
- (Optional) Add Miniconda3 and Miniconda3\condabin to your path
- Windows search -> type "env" -> click "Edit the system environment variables"
- In lower "System variables" window, click the "Path" row and click edit
- Click "New" and add the new paths, e.g.
- C:\Users\lroot\Miniconda3
- C:\Users\lroot\Miniconda3\condabin
- Activate a conda environment (I used the default base environment) - see - https://conda.io/activation
> conda activate
- Update conda if warned following instructions
- Install packages
> conda install -c conda-forge metpy
- Drags in pyqt5 and cartopy. If it doesn't...
> conda install -c conda-forge pyqt
> conda install -c conda-forge pyyaml
If the packages are not available via the conda-forge channel, you can search for alternative channels at https://anaconda.org
Then install Git (if not already there) and download RAOBget:
- https://git-scm.com/ -> Download latest per automatic OS detection. Run .exe file to install. I used default settings as suggested by installer, except that I asked to install a desktop icon for “Git Bash”
- Launch “Git Bash”
- At the prompt
git clone http://github.com/NCAR/RAOBget
Copy Windows10 bat file from RAOBget/windows10 to desktop
cp RAOBget/windows10/RAOBget.bat /c/Users/lroot/Desktop/.
For complete documentation on each class/method, useful if you need to modify the code, use pydoc to extract embedded documentation from each file:
> cd src
> python3 -m pydoc <filename>
e.g. python3 -m pydoc lib/rwget.py
To manually run all unittests:
> cd src
> python3 -m unittest discover -s ../test -v
A linter can be another useful tool. I used flake8
> python3 -m pip install flake8
> flake8 <path/to/code> or <path/to/file.py>
e.g
> flake8 .
This code uses the SkewT plot function from metpy to display downloaded TEXT:LIST-formatted data for visual QC:
May, R. M., Arms, S. C., Marsh, P., Bruning, E. and Leeman, J. R., 2017: MetPy: A Python Package for Meteorological Data. Unidata, Accessed 31 March 2017. [Available online at https://github.com/Unidata/MetPy.] doi:10.5065/D6WW7G29.
Aquino, J. (2020). RAOBget [Software]. UCAR/NCAR - Earth Observing Laboratory. https://doi.org/10.26023/5SMY-QP26
If this tool doesn't provide what you need, here are a list of other potential resources:
-
The Unidata Siphon Python utility collection can be used to write a simple Python script to download Wyoming Upper Air data into a PANDAS data frame. https://unidata.github.io/siphon/latest/examples/upperair/Wyoming_Request.html#sphx-glr-examples-upperair-wyoming-request-py