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]
Parameter Configurations¶
Below are some experimental parameters found in [Frezat et al., 2022] 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 . 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 , 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.
Example Experimental Setup¶
In the [Amraoui et al., 2023] paper, 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 of km km with a grid cell size, , of km. This resulted in a domain size of . They used a leapfrog time integration method with a time step, , was s. They needed to do 10,000 spinup steps to get a good running simulation. A slight change to the above formulation is that they used a forcing term as the constant wind forcing term outlined above.
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
Parameter Configuration¶
In the paper [Thiry et al., 2023], they use the following formulation
Below is a table with the parameter configuration for their experiments.
Examples¶
Idealized QG (TODO)¶
We have a jupyter notebook showscasing how we can reconstruct the fields displayed in the above section using the idealized QG equation (7). This is a simple 1 Layer QG model on a periodic domain. We will use the experimental configuration found in Table 1 which will showcase the different flow regimes depending upon the parameters, i.e. decay flow, forced flow and -plane flow.
Realistic Idealized QG (TODO)¶
We have a jupyter notebook showcasing how we can reconstruct the fields displayed in the above section for the realistic idealized QG equation. This is another simple 1 Layer QG model but with parameters that mean something in real space.
Free-Run QG (TODO)¶
This is a simple 1.5 layer QG and the mapping problem for SSH. This comes from Guillou et al., 2021 paper where they showcase the relationship between SSH and the QG model.
Stacked QG (TODO)¶
This is an example that implements an example for the stacked QG model. The underlying mathematics is based on the Q-GCM numerical model. However, the configurations are based upon the papers [Thiry et al. (2022)Thiry et al. (2023)].
- 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