This project has moved to gampnico/scintillometry, where it has been rewritten from scratch.
This repository has been archived. It was written a long time ago for a field course with a very strict deadline, and what spaghetti code remained is now deprecated with little utility. If you have any existing forks or local clones, please delete them.
If you are interested in an updated package for analysing BLS scintillometer measurements, please consider the new Scintillometry package.
- Parses scintillometry data from BLS450 scintillometer.
- Processes this data and computes sensible heat fluxes.
- Processes topographical data.
- Processes InnFlux and HATPRO data.
- Produces plots of scintillometer data, path topography, and weather data.
- Processes 2D flux footprints generated by Natascha Kljun's online model, available here.
- Makes individual topographical adjustments and stitches footprints together.
- Overlays stitched footprints onto map.
Running scripts directly from the console will cause errors. Not all data and dependences are available in this repository, and some of the scripts must be tailored to each individual project, notably station parameters and the times when the boundary layer switches from stable to unstable regimes.
The results of working examples are found in Scintillometry Processing.ipynb
and Footprint Rasters.ipynb
. The field course report and analysis is not available.
Before beginning, use DGM 5m data to generate topographical data for the scintillometer's path coordinates. Then, use core_path_calculator.m
to generate path transects. These are also necessary for calibrating the scintillometer.
Scintillometer path coordinates must be accurate. Incorrectly generated topographical data leads to poor calibration and nonsense results!
An example of scintillometry processing can be found in Scintillometry Processing.ipynb
.
- Use
data_parser.py
to parse scintillometer and weather data. - Use
cn_derivations.data_processor()
to derive$Cn^{2}$ . Make sure to enter the correct regime switch time. - Use
r_function_port.ward_method()
, a Python port of Helen Ward's code, to compute the Obukhov length and sensible heat flux. - Use the functions in
prettyplot.py
to visualise data.
Some example code is given in Footprint Rasters.ipynb
, but individual adjustments are necessary.
-
Generate footprints for entire path length either by using the online 2D FFP tool, or the FFP_clim function provided by Natascha Kljun.
-
Generate xllcenter, yllcenter coordinates for each footprint.
-
Determine the resolution and cell size of each generated footprint via the MATLAB engine for Python.
-
Calculate xllcorner,yllcorner coordinates:
xllcorner = xllcenter - (nrow * cellsize)/2
-
Generate ASCII raster files, inserting correct coordinates.
-
Generate TIFF files, apply weighting functions to each TIFF.
-
Mosaic and average TIFF files in R, generate final contour.
-
Layer contour plot over map (e.g. with QGIS).