Skip to content

Stretched mesh in LFRic

Denis Sergeev edited this page Sep 10, 2025 · 4 revisions

TL;DR

An optional configuration for the mesh app setting up a 10x stretching with a focus on the 30 degrees longitude at the equator:

[namelist:cubedsphere_mesh]
equatorial_latitude=78.5788137

[namelist:mesh]
rotate_mesh=.true.

[namelist:rotation]
rotation_target='north_pole'
target_north_pole=30.0,0.0

Standalone suite with a tidally locked aquaplanet configuration and stretching option: u-ds591.

This page covers the stretching of the mesh, which preserves the mesh topology, number of grid points and their connectivity.

Schmidt transformation

Mesh stretching is achieved through the Schmidt (1977) transformation. The refined domain (the target face) diminishes in size proportional to the stretching factor, while the opposite face increases proportionally. Setting up the mesh stretching in LFRic involves two steps: 1) defining the stretching factor and 2) rotating the mesh.

Stretching factor

The stretching factor $s$ varies between 0 (infinite stretching) and 1 (no stretching). In LFRic's input it is defined in terms of the equatorial latitude $\phi$ in degrees. The formulas for converting between $s$ and $\phi$ are as following:
$$s = \sqrt{\frac{1-sin\phi}{1+sin\phi}},$$
and
$$\phi = sin^{-1}\left(\frac{1-s^2}{1+s^2}\right).$$

Python code:

from math import asin, degrees, radians, sin, sqrt

# Convert s to phi
print(phi := degrees(asin((1 - s**2) / (1 + s**2))))

# Convert phi to s
print(s := sqrt((1 - sin(radians(phi))) / (1 + sin(radians(phi)))))

In the default mesh app, $\phi$ is set to 0 - corresponding to the stretching factor $s=1$, i.e. no stretching:

[namelist:cubedsphere_mesh]
equatorial_latitude=0

Some of the values of the stretching factor $s$, its inverse value and the corresponding equatorial latitude $\phi$ are given in this table:

Degree of stretching $1/s$ Stretching factor $s$ Equatorial latitude $\phi$
20.00 0.05 84.2751895
10.00 0.10 78.5788137
6.67 0.15 72.9384688
5.00 0.20 67.3801351
4.00 0.25 61.9275131
3.33 0.30 56.6015115
2.86 0.35 51.4199076
2.50 0.40 46.3971810
2.22 0.45 41.5445094
2.00 0.50 36.8698976
1.82 0.55 32.3784125
1.67 0.60 28.0724869
1.54 0.65 23.9522649
1.43 0.70 20.0159596
1.33 0.75 16.2602047
1.25 0.80 12.6803835
1.18 0.85 9.2709269
1.11 0.90 6.0255750
1.05 0.95 2.9376014
1.00 1.00 0.0000000

Mesh rotation

To define the where on the planet the resolution increases and where it decreases due to stretching, one has to rotate the mesh. In the mesh app configuration, rotation is enabled by setting

[namelist:mesh]
rotate_mesh=.true.

which enables the following namelist section:

[namelist:rotation]
rotation_target='north_pole'
target_north_pole=0.0,90.0

The target_north_pole pair of numbers (longitude, latitude) defines the focal point of mesh stretching.

Clone this wiki locally