Skip to content

SHARPlib Examples

Kelton Halbert edited this page Aug 18, 2025 · 1 revision

SHARPlib Examples

SHARPlib supplies a number of examples for common use cases or potentially difficult tasks (such as gridded data operations) for both Python and C++. Additionally, the tests directory is an excellent place to search for examples of how to do calculate specific parameters or call specific routines.

Python Examples

The Python examples are supplied as Jupyter notebooks, with a README.md and requirements.txt that can be used to set up an environment with the installed prerequisites. There are two notebooks: One for single profile based computations, using full-resolution (1 Hz sample rate) NWS radiosonde data that demonstrates the parcel lifting API, and another that demonstrates how to work with gridded data with full-resolution HRRR data. plot-gridded parcel-traces

C++ Examples

The C++ examples directory currently contains a singular example, and a minimal script that can be used to compile the example. The example has code that reads profile data from a CSV file into the arrays needed for calculation, and then demonstrates how to perform those calculations. There general process, memory layout, and memory management reflect what is considered best practice.

cpp-example

Clone this wiki locally