MPAS | WRF | FDDA | Spectral nudging
Nudging
Nudging, also known as four-dimensional data assimilation (FDDA), is a method of keeping simulations close to analyses and/or observations or forcing data over the course of an integration by applying extra forcing terms to the model equations.
There are three types of nudging and some can be used in combination.
- Grid- or analysis-nudging simply forces the model simulation towards a series of analyses grid-point by grid-point.
- Observational- or station-nudging locally forces the simulation towards observational data.
- Spectral nudging only forces the model to the selected spectra of waves in the analysis.
These methods provide a four-dimensional analysis that is somewhat balanced dynamically, and in terms of continuity,while allowing for complex local topographical or convective variations. Such datasets can cover long periods, and have particular value in driving off-line air quality or atmospheric chemistry models.
Spectral nudging
Spectral nudging is another way to nudge the model solution to either analysis or any forcing data. The key difference between this method and that of grid- or obs-nudging is that it is more selective in the scales one would like to nudge. In contrast to directly nudge model variables toward analysis or observation, this method decomposes the difference fields spectrally, and nudges toward the longer waves that correspond to the analysis. The spectral coefficients from the selected waves are then transformed back from the wave space to physical space and added to the model as tendencies. This technique was originally implemented to the Reginoal Atmospheric Modeling System, and later to ARW in 2010.
Spectral nudging uses the same input data as for grid-nudging, and nudges model variables u, v, temperature, and geopotential height. Water mixing ratio nudging was added in Version 4.0. Applications described above for grid-nudging can be considered using spectral nudging too.
Options to control the grid-nudging are also used for spectral nudging (such as nudging end time and ramping, nudging strength, controls of nudging in the boundary layer or lower levels and so on). In addition, there is an option to control the ramping in the vertical between the layer without nudging to the layer where the nudging is on. The number of waves to nudge in the x and y directions are user-defined.
module_fdda_spnudging.F
1 |
|
spectral_nudging_filter_3dx
! Variables will stay in domain form since this routine is meaningless
! unless tile extent is the same as domain extent in E/W direction, i.e.,
! the processor has access to all grid points in E/W direction.
! There may be other ways of doing FFTs, but we haven't learned them yet...
1 |
|
- fftpack5 routines
- call rfftmi(n,wsave,lensav,ier)
- forward transform: initialize coefficients, place in wsave
- call rfftmf( lot, jump, n, inc, fin, lenr, wsave, lensav, work, lenwrk, ier )
- do the forward transform
- filter all waves with wavenumber larger than nwave
- call rfftmb( lot, jump, n, inc, fin, lenr, wsave, lensav, work, lenwrk, ier )
- do the backward transform
- call rfftmi(n,wsave,lensav,ier)
FFTPACK5 provides a suite of routines for computing Fast Fourier Transforms (FFTs) of both real and complex data, including 1D and 2D transforms, as well as multiple vectors. These routines are designed for efficiency and flexibility, supporting various data types (real/complex, single/double precision) and lengths.
1 |
|
WRF setting
- Spectral nudging with ERA5 | Jan 9, 2023
- In order to turn on spectral nudging, you will need to set
grid_fdda = 2
. The wavenumber nudged is selected in namelist (e.g.,xwavenum
,ywavenum
, e.g. =3). Please choose the number so that- (domain size)/(wavenumber)=~1000 km in each direction.
- In order to turn on spectral nudging, you will need to set
- Gómez, B., and G. Miguez‐Macho. "The impact of wave number selection and spin‐up time in spectral nudging." Quarterly Journal of the Royal Meteorological Society 143.705 (2017): 1772-1786.
- when selecting smaller scales, the fine-scale contribution of the model is damped, thus making 1000km the appropriate scale threshold to nudge in order to balance both effects.
- \(119 \times 105\) horizontal points at 36km resolution and 33 vertical, \(119 \times 36 = 4284km\)
- Silva, Natália Pillar da, and Ricardo de Camargo. "Impact of wave number choice in spectral nudging applications during a South Atlantic convergence zone event." Frontiers in Earth Science 6 (2018): 232.
- 1000km - R = the Rossby radius length for most mesoscale studies
ERA5
Spherical harmonic transforms (Not used)
Performing a global spherical Fourier transform on ERA5 data in Python typically involves using spherical harmonic transforms, which are the generalization of the Fourier transform to the sphere. This is particularly relevant in the context of global weather forecasting and climate modeling, where the Earth's spherical geometry needs to be accurately represented.
- Q: how to define high wavenumber to filter Rossby waves?
Spherical Harmonic Transform Libraries:
- Utilize Python libraries designed for spherical harmonic transforms. pyshtools is a prominent library for this purpose, offering functions for forward and inverse spherical harmonic transforms.
- These libraries handle the complexities of representing functions on a sphere and performing the appropriate transforms.
1 |
|
Empirical orthogonal function expansion (EOF) (Not used)
- have to find out needed components as Rossby waves (2D).
XY Fourier transform
real-space to k-space
\[ \begin{align} f(x) &= \sum_{n=1}^{N} F(k_n) e^{ik_n x} \qquad x \in [0,L] \\ \text{Assume} \qquad f(x \pm L) &= f(x) \\ \Rightarrow e^{\pm i k_n L} &= 1 \qquad \forall n \\ & k_n (n = 0,1,...,N)\\ k_n L &= 2n \pi \qquad m \in \mathbb{Z} \\ k_n &= \frac{2 \pi}{L} n \\ dk &= \frac{2 \pi}{L} \\ \because \lambda &= \frac{2 \pi}{k} \\ \lambda_n &= \frac{L}{n}\\ \end{align} \tag{1} \]
\(n\) | \(k_n\) | \(\lambda\) |
---|---|---|
0 | \(k_0 = 0\) | \(\infty\) |
1 | \(k_1= \frac{2\pi}{L}\) | \(L\) |
2 | \(k_1= \frac{2\pi}{L} \times 2\) | \(\frac{L}{2}\) |
3 | \(k_1= \frac{2\pi}{L} \times 3\) | \(\frac{L}{3}\) |
\(\cdots\) | \(\cdots\) | \(\cdots\) |
N | \(k_1= \frac{2\pi}{L} \times N\) | \(\frac{L}{N}\) |
np.fft2
Performing 2D Fourier transforms (forward and backward) in Python is typically done using the numpy.fft module, particularly the fft2 and ifft2 functions
1 |
|
Checking
Orignal signal
Add some noises
More wavenumbers




2D waves
1 |
|
- plot at
y = 0.25
Results










Thinking
- Rationale for the Approach
- We can express the relationship as \(\lambda_m = \frac{L}{m}\). If the length \(L\) decreases while maintaining a constant mass \(m\), the resulting wavelength \(\lambda_m\) becomes shorter, indicating that the corresponding wave number \(k\) increases.
- This increase in \(k\) shifts the distribution towards higher values, resulting in a greater number of higher \(k\) values being included in the analysis.