FV3 Bundle
solve_elliptic_system.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine solve_elliptic_system (x, pv, nx, ny, deltax, deltay, F1, F2)
 Solves the elliptic system that arises when inverting potential vorticity. More...
 

Function/Subroutine Documentation

◆ solve_elliptic_system()

subroutine solve_elliptic_system ( real(kind=kind_real), dimension(nx,ny,2), intent(out)  x,
real(kind=kind_real), dimension(nx,ny,2), intent(in)  pv,
integer, intent(in)  nx,
integer, intent(in)  ny,
real(kind=kind_real), intent(in)  deltax,
real(kind=kind_real), intent(in)  deltay,
real(kind=kind_real), intent(in)  F1,
real(kind=kind_real), intent(in)  F2 
)

Solves the elliptic system that arises when inverting potential vorticity.

Here, we are solving the coupled system:

\begin{eqnarray} \nabla^2 \psi_1 - F_1 (\psi_1 -\psi_2 ) &=& p_1 \\\\ \nabla^2 \psi_2 - F_2 (\psi_2 -\psi_1 ) &=& p_2 \nonumber \end{eqnarray}

where the subscript refers to model level, and \( \nabla^2 \) is the 5-point finite-difference two-dimensional Laplacian.

We reduce this to a 2D problem, which we solve for \( \nabla^2 \psi_1 \):

\[ \nabla^2 \left(\nabla^2 \psi_1 \right) - (F_1 + F_2 ) \nabla^2 \psi_1 = \nabla^2 p_1 - F_2 p_1 - F_1 p_2 \]

Having found \( \nabla^2 \psi_1 \), we invert the Laplacian to determine \( \psi_1 \), and then get \( \psi_2 \) by substitution in equation 1 above.

Parameters
[in]nxZonal grid dimension
[in]nyMeridional grid dimension
[out]xStreamfunction
[in]pvRight hand side
[in]deltaxZonal grid spacing (non-dimensional)
[in]deltayMeridional grid spacing (non-dimensional)
[in]f1Coefficient in the PV operator
[in]f2Coefficient in the PV operator

Definition at line 31 of file solve_elliptic_system.f90.

Here is the call graph for this function:
Here is the caller graph for this function: