WRF dynamical core for LES/mesoscale simulations
Contents
Introduction
WRF is a mesoscale numerical weather prediction system designed for both atmospheric research and operational forecasting applications over the Earth's atmosphere: see WRF presentation.
In the PCM, we take advantage of the dynamical core of the WRF model to run LES (large-eddy simulations) or mesoscale simulations.
To do so, we take the WRF model, remove all its physical packages related to the Earth's atmosphere, and plug in the physical package from the PCM (either Venus, Mars, Titan, or Generic).
A description of the various equations solved by WRF can be found here: Skamarock et al. (2019, 2021).
Studies with PCM+WRF
Descriptions of the application of WRF dynamical core with the PCM can be found in:
- Noé CLEMENT's PhD thesis (chapter 3) for the Generic PCM.
- Maxence Lefevre's PhD thesis for the Venus PCM.
- Aymeric Spiga's PhD thesis for the Mars PCM
Studies with the PCM coupled to the WRF dynamical core have been done using WRF V2, WRF V3, WRF V4.
Our aim is now to use WRF V4 as much as possible, which offers significant improvements in terms of numerical schemes in particular.
Here is a list of studies using the PCM coupled to the WRF dynamical core:
Planet | Reference | Physical package | Dynamical core |
---|---|---|---|
Mars | Spiga and Forget (2009) | Mars PCM | WRF V2 |
Mars | Spiga et al. (2010) | Mars PCM | WRF V3 |
Venus | Lefèvre et al. (2018) | Venus PCM | WRF V3 |
Venus | Lefèvre et al. (2020) | Venus PCM | WRF V2 |
Exoplanets | Lefèvre et al. (2021) | Generic PCM | WRF V3 |
Exoplanets | Leconte et al. (2024) | Generic PCM | WRF V4 |
Uranus, Neptune | Clément et al. (2024) | Generic PCM | WRF V4 |
Remarks
For advanced users:
When compiling the model, the flags:
#ifndef MESOSCALE
use ...
#else
use ...
select lines compiled depending on the configuration.
WRF equations
Below is a synthesis of equations solved by WRF.
Installing PCM+WRF
3 git repositories to handle:
- LES_planet_workflow
- git-trunk (physics & GCM dynamical core)
- WRFV4 (dynamics)
The first is hold on Aymeric Spiga's git, and will download (git clone) the two others which are part of La communauté des modèles atmosphériques planétaires repositories.
Terrestrial WRF
Compiling terrestrial WRF is a good first step. git clone --recurse-submodules https://github.com/wrf-model/WRF
Commands: "./configure", and then "./compile em_les"
WRF+PCM
On any cluster, variables which should be defined are:
source YOUR_ifort_ENV
# for WRFV4
declare -x WRFIO_NCD_LARGE_FILE_SUPPORT=1
declare -x NETCDF=`nf-config --prefix
declare -x NCDFLIB=$NETCDF/lib
declare -x NCDFINC=$NETCDF/include
# PCM/WRFV4 interface
declare -x LMDZ_LIBO='code/LMDZ.COMMON/libo/YOUR_ARCH_NAME’
On ADASTRA
source code/LMDZ.COMMON/arch/arch-ADASTRA-ifort.env
# for WRFV4
declare -x WRFIO_NCD_LARGE_FILE_SUPPORT=1
declare -x NETCDF=$NETCDF_DIR
# alternatively to: declare -x NETCDF=`nf-config --prefix
declare -x NCDFLIB=$NETCDF/lib
declare -x NCDFINC=$NETCDF/include
# is this only for Adastra
declare -x NETCDF_classic=1
# get rid of "undefined symbol: __libm_feature_flag" errors at run time:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NETCDF_DIR/lib
# PCM/WRFV4 interface
declare -x LMDZ_LIBO=code/LMDZ.COMMON/libo/ADASTRA-ifort
In case of a failed compilation, the command "clean -1" in the WRFV4 directory allows you to remove the intermediate compiled files.