helbigwindparam

Unofficial implementation of Helbig et al. 2017 wind parametrization: Parameterizing surface wind speed over complex topography. This parameterization permits to downscale wind fields in complex terrain by taking into account the topography.

import xarray as xr
import matplotlib.pyplot as plt

from helbigwindparam import downscale

# Open file
path_to_file = "/home/letoumelinl/bias_correction/Data/1_Raw/DEM/DEM_ALPES_L93_30m.nc"
alti = xr.open_dataset(path_to_file).alti.values

# Compute downscaling factor
map_dwnc = downscale(alti, dx=30, l=2_000, x_win=69//2, y_win=79//2)

# Plot downscaling pfactor
plt.figure()
plt.imshow(map_dwnc)
plt.colorbar()
plt.title("Map of the downscaling factor")

For more information, please see:

https://github.com/louisletoumelin/helbigwindparam

ExtractHendrix

This is a team work! The purpose of this package is to download data on Hendrix data storage (Meteo-France data storage) very easily. It builds upon pre existing python librairies from Meteo-France and other public python librairies.

Before, we had to build complex pipelines to download data, including a lot of post-processing steps. Now the following lines of codes are sufficient:

from extracthendrix import execute

config_user = dict(
    work_folder="path/to/my/folder/",
    model="AROME",
    domain=["alp", "corsica", "pyr", "switzerland"],
    variables=['Tair', 'Tmax', 'Qair', 'SWE', 'snow_density', 'snow_albedo'],
    email_address="louis.letoumelin@meteo.fr",
    start_date=datetime(2018, 10, 31),
    end_date=datetime(2018, 10, 31),
    groupby=('timeseries', 'daily'),
    run=0,
    delta_t=1,
    start_term=6,
    end_term=29)

execute(config_user)

This architecture can download many types of model outputs (reanalysis, forecasts, ensembles) from different models (AROME, ARPEGE, PEARP, PEAROME …).

For more information, please see:

https://github.com/louisletoumelin/extractHendrix

PyWindNinja

This is a simple python wrapper for WindNinja wind model (written in C++, launched using terminal commands). Usually, simulations are performed for one or a few time steps with Wind Ninja. Longer simulations require to write extra code. This package permits to launch simulations around observation stations and to compare the results to observed winds. This is very usefull to product long sequences of predictions with Wind-Ninja anc compare the performance of the model to other models at the same site.

Example:

Specify the configuration in config.py

from src import downscale_windninja
import matplotlib.pyplot as plt

df_inputs, df_outputs = downscale_windninja()

plt.figure()
ax = plt.gca()
df_outputs["Col du Lac Blanc"]["UV_wn"].plot(ax=ax, label="Wind Ninja")
df_inputs["Wind"][df_inputs["name"] == "Col du Lac Blanc"].plot(ax=ax, label="AROME")
df_inputs["vw10m(m/s)"][df_inputs["name"] == "Col du Lac Blanc"].plot(ax=ax, label="observation")
plt.legend()

For more information, please see:

https://github.com/louisletoumelin/PyWindNinja