In this section, we look at how we can solve the QG equations using elements from this package.
Generalized QG Equations¶
Note: This formational is largely based on [Amraoui et al., 2023]. See this paper for more information including a derivation about the energetics.
We can define two fields as via the potential vorticity (PV) and stream function (SF).
Let's assume we have a stack of said fields, i.e. . So we have a state defined as:
We can write the QG PDE to describe the spatiotemporal relationship between the PV and the SF which is defined as:
where at each layer , we have is the velocity vector, is the potential vorticity, are the forcing term(s), and are dissipation terms. The forcing term can be made up of any external forces we deem necessary for the PDE. For example, we could have wind stress that affects the top layer or bottom friction that affects the bottom layer. The dissipation term represents all of the diffusion terms. For example, we could have some lateral friction or hyper-viscosity terms.
The advection term in equation (3) includes the velocity vector, , which is defined in terms of the stream function, . This is given by:
The PV is the culmination of the potential energy contained within the dynamical forces, the thermal/stretching forces and the planetary forces.
Concretely, we can define this the PV and its relationship to the SF and other forces as:
where at each layer, , we have the dynamical (relative) vorticity, , the thermal/stretching vorticity, , and the planetary vorticity, .
Idealized QG Model¶
We can use the above formulation to describe an idealized QG model. This idealized model will be fairly abstract with parameters that represent real things but do not actually correspond to anything tangible. However, these types of flows are very well-studied and are very useful for having a controlled setting which removes all uncertainties. We will use the notation used in [Frezat et al. (2022)Srinivasan et al. (2023)] with some explanations taken from [Gupta & Brandstetter, 2022].
The domain is simplified to be periodic and defined on a domain, i.e. . We will also assume a periodic domain. This domain is topologically equivalent to a two-dimensional torus.
We will define a final form for the idealized QG model of the vorticity-stream functions on this idealized, periodic domain as
where is the vorticity and is the stream function. The -term is geophysical system approximation that captures the effect of the differential rotation. This force is experienced within the Earth system in a tangent plane approximation, i.e. . This -term is important and it allows the flow to manifest different turbulent regimes. For example, Rossby waves are common within the planetary systems and can appear when . The determinant Jacobian term encapsulates the advection term seen in (3). It is defined as:
We see from that it is directly related to the advection term seen in (3) but written in a different way.
Determinant Jacobian
Like most things in physics, there are often many ways to express the same expression. Ultimately, they are all advection expressions. See the example on wikipedia for more details. The detemrinant Jacobian term can be written in many ways. Let's rewrite it as:
We can expand the full expression which gives us
We can plug int the velocity components of the stream function definition (4) into the above equation
The partial derivative operator is commutable so we can take out the operator of both terms
Alternatively, we can write the velocity and partial derivative operators in the vector format
and we see that we arrive at formulation in (7). I personally prefer this way of writing it as it is more general. Furthermore, it exposes the many ways we can express this term like the determinant Jacobian or simple partial derivatives.
Note: It is important to take note of the many ways to express this as it can be useful for numerical schemes. For example, an upwind scheme might benefit from advection term where the velocity components are multiplied with the partial derivatives. Alternatively the determinant Jacobian on an Arakawa C-grid is a well known formulation for dealing with this.
The forcing term is typically chosen to be a constant wind forcing
Relation to Navier-Stokes Equations
This derivation and explanation was largely taken from [Srinivasan et al., 2023] which has one of the best high-level explanation of the derivation without too much mathematical detail.
Taking a velocity field, , we can write the non-dimensional form of the Navier-Stokes (N-S) equations as
The, , is the Coriolis parameter which is the local rotation rate of the Earth and/or other planetary atmospheric forcings. The example in showcases an example with beta-plane forcing. is the unit-vector normal to the -plane. The is the linear drag coefficient which represents the bottom friction. The is the Reynolds number measuring the strength of the non-linear advection term, relative to the viscous term. In otherwords, the relationship give by:
This Reynolds number is indirectly proportional to the viscosity and proportional to the absolute velocity [Gupta & Brandstetter, 2022]
[Srinivasan et al., 2023] choose a Reynolds number of . The forcing is given by
which is a sinusoidal time-invariant forcing field that continuously drives the flow. In [Guan et al., 2023], the wavenumber , was chosen.
The velocity field in equation (15) is required to satisfy the mass conservation principal given by the continuity equation
One can satisfy this by defining a stream function, , which is a scalar field that is defined as
The stream function and the continuity equations can be expressed as an evolution equation of a single scalar field, the vorticity. This scalar field is defined as the two-dimensional curl of the velocity field
This equation captures the local rotation of a fluid parcel. The final result is the incompressible 2D Navier-Stokes equations in the scalar vorticity stream function form. In other words, the Quasi-Geostrophic equations.
Note: There are some small differences between this equation and . The first is the coefficient in front of the diffusion term, . Here, we have the Reynolds number, instead of the viscosity term, , as shown in (7). In addition, we have the term. In this formulation, it is whereas in (7) it is expressed as . However, these are equivalent because the first component of the stream function velocities (19) is defined as . So we can plug this into the equation above.
NOTE: I am not sure about the sign issue of the -term in (21). I think it is a mistake and that it should be positive which would match the equation in (7) along with various other formulations [Frezat et al., 2022]
Case Studies¶
Flow Regimes¶
In [Frezat et al., 2022], they were looking at how the QG model could be help train surrogate models to fill in missing dynamics. They did the whole training regime online.
Parameter Details
Below are some experimental parameters found in which showcase 3 different flow regimes based on the parameter scheme.
Table 1:Table with idealized configuration
Name | Symbol | Units | Decay Flow | Forced Flow | -Plane Flow |
---|---|---|---|---|---|
Resolution | |||||
Domain | km | ||||
Time Step | s | ||||
Linear Drag Coefficient | m | ||||
Viscosity | ms | ||||
Beta-Term | ms | ||||
Reynolds Number |
Toy QG¶
In this section, we will briefly outline an idealized QG model with terms that correspond to real quantities in nature. This was taken from the lab that's available online (PDF | Course | Notebook | Code). It features a great step-by-step introduction to a complete toy problem.
where is the PV. This PDE describes the transport of the PV with respect to the following
which correspond to all of the terms in equation (22).
Horizontal Operators. Apart from the partial derivative operators, we have some horizontal operators which means that they only operate on the horizontal axis, i.e. . is the horizontal gradient operator defined as . is the horizontal Laplacian operator defined as . is the hyper-Laplacian operator which is normally applied sequentially, i.e. .
Advection. We have the advection term defined as the dot product velocity vector (equation (4)) defined via the stream function. As mentioned above, there are many ways to write this advection term, for example the determinant Jacobian.
Wind Stress. We have defined a wind stress term which is the cross product of the horizontal gradient and the wind stress, . As shown above, this term is a 2D vector field for the x and y directions.
An "ideal" example os to assume the ocean is a "box" that extends from the equator to a latitude of about 60. The winds are typically constant and easterly near the equation and turn westerly at middle latitudes. In ideal setting, this is prescribed as a constant cosine forcing which is similar to the idealized QG model listed above. This product is then scaled according to the inverse of the density of water, , and the height of the layer, .
Bottom Friction. The bottom friction parameter is a scaling constant that dissipates the energy. The constant, , is defined as inversely proportional to the product of the height, , and the square-root of the vertical Eddy viscosity constant and the Coriolis parameter. This constant is multiplied with the Laplacian of the stream function.
Dissipation. There is a dissipation term which features the hyper-viscosity term. The horizontal hyper-Laplacian of the stream function is multiplied by some constant which represents the lateral Eddy viscosity that may occur in the system.
Planetary Forcing The planetary forcing within this toy model is given by the -plane approximation for the planetary vorticity. This is given by the term which is defined as
where is the planetary forcing function given by equation (28). The only term in this function that depends upon is the second term so we approximate this as .
Parameter Details
There are many constants that are displayed in equation (22) and they each mean something. Below are some tables which outline each of the constants and parameters seen in the equation. The subsequent tables showcase some derived quantities. The last table showcases the nondimensional versions which might be useful for the non-dimensional version of the PDE.
The first table showcases the constants along with the range of values that it can take for the toy model.
Table 2:Table with constants
Name | Symbol | Units | Value |
---|---|---|---|
Earth's Radius | m | ||
Earth's Angular Frequency | s | ||
Depth of Active Layer | m | ||
Length of Ocean Basin | m | ||
Density of Water | kg m | ||
Lateral Eddy Viscosity | ms | or | |
Vertical Eddy Viscosity | ms | ||
Maximum Wind Stress | kg ms | ||
Mean/Mid Latitude |
The second table lists some of the derived constants that we can calculate given the above constants.
Table 3:Table of derived quantities.
Name | Equation | Units | Value |
---|---|---|---|
-Plane | |||
Coriolis Parameter | s | ||
Velocity Scale | |||
Bottom Friction |
The last table lists the non-dimensional derived quantities which are useful for the non-dimensional version of the toy QG PDE (22).
Table 4:Table of non-dimensional quantities.
Name | Equation | Value |
---|---|---|
QG for Sea Surface Height¶
In this section, we will briefly outline how the QG equations can be used to represent the
There is a known relationship between sea surface height (SSH) and the stream function. This is given by
where and is the Coriolis and gravity constant respectively.
This relationship has been exploited in various works in the literature, especially within the data assimilation literature. For example [Guillou et al. (2021)Guillou et al. (2023)Amraoui et al. (2023)] used a 1 layer QG model to assimilate NADIR alongtrack SSH observations. A related example was in [Guillou et al., 2021] where they used a simple 1 layer QG model and a 1 layer linear SW model to model the balanced motions and the internal tides respectively. This was also used to assimilate NADIR and SWOT alongtrack SSH observations.
To write out the PDE, we will use the same formulation listed in equation (3). However, we will change this to reflect the relationship between SSH, the SF and now the PV.
where is the planetary forcing given by equation (28), is the Coriolis parameter and is the phase speed. This formulation is very similar to the PV listed in (6) except for the coefficient listed in front of the component. This can be summarized as the barotrophic deformation wavenumber
where is the Rossby radius of deformation. In an idealized setting, this is equal to It is a helpful parameter that can be used for the QG model of choice. For example, in [Guillou et al., 2021], they used a Rossby radius of km for a domain.
Case Studies¶
The most common case study I have seen for this would be applied to data assimilation. In particular, the QG model has been used to assimilate SSH satellite observations [Amraoui et al., 2023].
In [Amraoui et al., 2023], the authors did a free-run of the QG model for an assimilation task of 21 days. Their target area was over the North Atlantic (NA) domain. A slight change to the above formulation is that they used a forcing term as the constant wind forcing term outlined above. Note: They needed to do 10,000 spinup steps to get a good running simulation.
Below is an outline of the configuration.
Parameter Details
Note: They used a LeapFrog scheme for the integrator.
Table 1:Fixed for their Eddy resolving simulations.
Name | Symbol | Units | Value |
---|---|---|---|
Domain Size | km | 2_052 x 3_099 | |
Resolution | km | 18 x 18 | |
Grid Size | 113 x 170 | ||
Time Step | s | 600 | |
Phase Speed | ms | [2.5, 1.0, 1.0] | |
Assimilation Window | days | 21 | |
Time Splitter | 0.2 |
Stacked QG Model¶
In this section, we will look at the formulation from the stacked QG model. The majority of this section comes from papers by [Thiry et al. (2022)Thiry et al. (2023)] with some inspiration from the Q-GCM numerical model.
In this case, we are similar to the generalized QG model outlined in equation (3). We will change the notation slightly. Let's have a stacked set of PV and SF vectors denoted as and respectively. We consider the stream function and the potential vorticity to be stacked isopycnal layers. This is already outlined in equation (2) Now, we will write the stacked model in vector format as
where is a vector of forcing terms to be applied at each layer, , is a matrix of interlayer height scaling factors and is a vector of dissipation terms to be applied at each layer, . This is analogous to equation (3) but in vector format instead of a component-wise.
We can also define the PV equation in vectorized format (analogous to equation (6)) as
Below, we will go over some key components of these two formulations.
Inter-Connected Layers¶
We define as the matrix which connects the inter-layer interactions. This is a bi-diagonal matrix which only maps the corresponding layer and .
We also have as the matrix connecting the layers of the stream function
This matrix is a tri-diagonal matrix as each layer, , within the stacked layers will influence or be influenced by the neighbours,
Forcing¶
We have a forcing vector/matrix which defines the forcing we apply at each layer. For example, the top layer could have wind forcing and/or atmospheric forcing. The bottom layer could have bottom friction due to the topography.
where we have the wind stress and the bottom friction. The wind forcing could be
and the bottom friction could be described as
where is the Ekman coefficient.
Dissipation¶
We have a very similar dissipation stategy as listed above in .... Here, we define this as
Case Studies¶
Q-GCM¶
There is an open-source QG GCM model (Q-GCM) that is available. It has a coupled model for the atmosphere and ocean where the atmospheric component is a stacked QG model and the oceanic component is a stacked QG model. They describe in detail two configurations for the double-gyre (North Atlantic) and the southern ocean. We outline in detail their
Parameter Details
Below is a table with the parameter configuration for their experiments.
Table 6:Variable parameters for their Northern and Southern Ocean experiments.
Name | Symbol | Units | Double Gyre | Southern Ocean |
---|---|---|---|---|
Domain Size | km | 3_840 x 4_800 | 23_040 x 2_880 | |
Resolution | km | 10 x 10 | 10 x 10 | |
Grid Size | 384 x 480 | 2_304 x 288 | ||
Time Step | min | 30 | 10 | |
Mean Layer Thickness | m | [300, 1_100, 2_600] | [300, 1_100, 2_600] | |
Reduced Gravity | ms | [0.05, 0.025] | [0.05, 0.025] | |
Bottom Ekman Layer Thickness | m | 1 | 2 | |
Ocean Density | kgm | 1_000 | 1_000 | |
Baroclinic Rossby Radii | km | [51, 32] | [42, 26] | |
Laplacian Viscosity Coefficient | ms | 0 | 0 | |
BiHarmonic Viscosity Coefficient | ms | 1e10 | 3e10 | |
Mean Coriolis Parameter | s | 1e-4 | -1.1947e-4 | |
Coriolis Parameter Gradient | ms | 2e-4 | 1.313e-11 |
Dissipation Studies¶
In the paper [Thiry et al., 2023], they were investigating the impact of implicit dissipation via numerical methods or explicit dissipation via a hyper-viscosity parameter. For their experiments, they use the stacked QG model that was listed above to do a canonical double gyre experiment.
Using this model, they modified the configuration of the spatial resolution and the hyper-viscosity which coincide with Eddy non-resolving, Eddy permitting, and Eddy resolving cases. They showcased how the numerical scheme they used was better than explicitly prescribing the dissipation.
Parameter Details
Below is a table with the parameter configuration for their experiments.
Table 7:Variable parameters for their Eddy resolving simulations.
Name | Symbol | Units | Non-Eddy Resolving | Eddy Permitting | Eddy Resolving | ||||
---|---|---|---|---|---|---|---|---|---|
Grid Size | 129 x 129 | 161 x 161 | 193 x 193 | 257 x 257 | 385 x 385 | 513 x 513 | 1,025 x 1,025 | ||
Resolution | km | 40 x 40 | 32 x 32 | 26 x 26 | 20 x 40 | 13.3 x 13.3 | 10 x 10 | 5 x 5 | |
Time Step | s | 8_000 | 6_000 | 5_400 | 4_000 | 2_700 | 2_000 | 1_000 | |
Munk Scale | 1 | 1 | 1 | 1 | 1.25 | 1.5 | 2 | ||
Hyperviscosity | ms | 1.8e12 | 5.9e11 | 2.4e11 | 5.6e10 | 2.6e10 | 1.3e10 | 1.7e9 |
Below is a table with the fixed parameters that stayed constant throughout the simulation.
Table 8:Fixed for their Eddy resolving simulations.
Name | Symbol | Units | Value |
---|---|---|---|
Domain Size | km | 5120 x 5120 | |
Mean Layer Thickness | m | [400, 1_100, 2_600] | |
Reduced Gravity | ms | [0.025, 0.0125] | |
Bottom Ekman Layer Thickness | m | 1 | |
Wind Stress Magnitude | Nm | Pa | 0.08 | |
Ocean Density | kgm | 1_000 | |
Mean Coriolis Parameter | s | 9.375e-5 | |
Coriolis Parameter Gradient | ms | 1.754e-11 | |
Baroclinic Rossby Radii | km | [41, 25] |
Forcing
They used a stationary symmetric wind stress forcing.
Boundaries
- For the velocity, , they use free-slip boundaries, i.e., the tangential velocity for the North-South extent is zero.
- For the relative vorticity, , they use zero boundaries.
Note: they used a 60 year spin-up period to get started.
Data Assimilation Benchmark¶
In [Laloyaux et al., 2020], they were exploring the effectiveness of a data assimilation method (4DVar) when applied to observation data.
They used a simple 2-Layer QG model with the stream function and the potential vorticity, , as shown in equation (29). In the equation, they don't have any explicit forcing but they do mention some optional constant wind forcing.
They have a two layer system so their M-equation will be
which is similar to equation (32) except they put the constant Coriolis parmater inside. In addition, they don't have any reduced gravities, just a constant gravity for each term.
This was designed for speed, stability, and convenience instead of accuracy and conservation.
Parameter Details
The authors have written the formulation completely out as.
where is the (non-dimensionalized) northward derivative, is the Coriolis parameter, is the vertical coordinate and represents the orography or heating. The parameters, , are the parameters that couple the laters together.
Below are some experimental parameters for the experimental setup
Table 8:Parameters
Name | Symbol | Units | Value |
---|---|---|---|
Basin Length | m | 1e6 | |
Velocity | ms | 10 | |
Coriolis Parameter | s | 1e-4 | |
Northward Derivative | ms | 1.5e-11 | |
Layer Depths | m | [6_000, 4_000] | |
Mean Potential Temperature | ... | ... | |
Layer Difference in Potential Temperature | ... | ... | |
Ratio PT | ... | 0.1 | |
Mean Wind - Upper | ... | ms | 40 |
Mean Wind - Lower | ... | ms | 10 |
Note: the Coriolis paramater is at the southern boundary.
Table 8:Non-Dimensionalization
Name | Symbol | Units | Transformation |
---|---|---|---|
Time | s | ||
X-Coordinate | m | ||
Y-Coordinate | m | ||
u-Velocity | ms | ||
v-Velocity | ms | ||
Northward Derivative | ... | ||
Coupling Term I | ... | ||
Coupling Term II | ... | ||
Rossby Number | ... |
Experimental Details
- Time Stepping - first order upstream
- PV Advection - Semi-Lagrangian advection
- Interpolation of upstream PV - bi-cubic
- Advection Outside Domain - edge values
- North-South PV Values - user supplied
- Advection Wind - Inverting PV
- Domain - Cyclic in Zonal Direction
Initial Condition
They place a Gaussian hill centered at point (10,15)
with a dimensional height of 2_000m
and an e-folding width of 1_000km
Errors
Table 8:Parameters
Covariance Matrix | Standard Deviation () | Horizontal Correlation () | Vertical Correlation () | Scales |
---|---|---|---|---|
0.8 | 0.6e6 | 0.2 | Short | |
0.005555 | 0.6e6 | 0.2 | Short | |
0.005555 | 1.6e6 | 0.8 | Long | |
0.8 | 1.6e6 | 0.8 | Long | |
0.2 | 0.0 | 0.8 | Grid Pint |
- Amraoui, S., and Didier Auroux, Blum, J., & and, E. C. (2023). Back-and-forth nudging for the quasi-geostrophic ocean dynamics with altimetry: Theoretical convergence study and numerical experiments with the future SWOT observations. Discrete and Continuous Dynamical Systems - S, 16(2), 197–219. 10.3934/dcdss.2022058
- Frezat, H., Sommer, J. L., Fablet, R., Balarac, G., & Lguensat, R. (2022). A posteriori learning for quasi-geostrophic turbulence parametrization. 10.48550/ARXIV.2204.03911
- Srinivasan, K., Chekroun, M. D., & McWilliams, J. C. (2023). Turbulence closure with small, local neural networks: Forced two-dimensional and β-plane flows. arXiv. 10.48550/ARXIV.2304.05029
- Gupta, J. K., & Brandstetter, J. (2022). Towards Multi-spatiotemporal-scale Generalized PDE Modeling. arXiv. 10.48550/ARXIV.2209.15616
- Guan, Y., Subel, A., Chattopadhyay, A., & Hassanzadeh, P. (2023). Learning physics-constrained subgrid-scale closures in the small-data regime for stable and accurate LES. Physica D: Nonlinear Phenomena, 443, 133568. 10.1016/j.physd.2022.133568