This repository accompanies the paper Multifractal Analysis for Evaluating the Representation of Clouds in Global Kilometre-Scale Models by Lilli J. Freischem, Philipp Weiss, Hannah M. Christensen, and Philip Stier, submitted to Geophysical Research Letters. Here, we provide Python scripts and Jupyter Notebook examples for conducting multifractal analysis.
For some one-dimensional signal
where
Within the scaling range of the signal
such that
We parameterise the calculated
using the two-parameter fit introduced by Pierrehumbert, 1996.
multifractalanalysis.py
contains the multifractals
function which computes structure functions and multifractal scaling parameters from a 2-dimensional cloudfield.
def multifractals(cloudfield, R, Q = np.arange(1, 11)):
"""
Calculate multifractal scaling exponents of a given cloudfield.
Parameters:
- cloudfield: numpy.ndarray
The cloudfield array to calculate moments for.
- R: numpy.ndarray
An array of separation distances to use for calculating moments.
- Q: numpy.ndarray
An array of exponents q to use for calculating moments.
Returns:
- moments: numpy.ndarray
A 2D array containing the calculated moments for all separation distances R and exponents Q.
- zetas: numpy.ndarray
A 1D array of scaling exponents (zeta_q) of the cloudfield for orders Q.
"""
compute_multifractals.ipynb
contains a notebook demonstrating how to use multifractalanalysis.py
for computing structure functions, scaling exponents, and multifractal parameters.
@software{freischem2024,
author = {Freischem, Lilli Johanna},
title = {Multifractal Analysis of Clouds},
year = 2024,
publisher = {Zenodo},
doi = {10.5281/zenodo.13832882},
url = {https://doi.org/10.5281/zenodo.13832882}
}