Commit e13cfca
committed
Fix the barotropic streamfunction calculation
The fix involves:
* detecting boundary edges
* finding all the unique loops for each continent or island
* finding a unique list of pairs (excluding the edge that
would close the loop
* creating a sparse matrix with:
* A Poisson equation for the BSF in terms of the vertically
integrated vorticity at each vertex
* Adding a constraint on each pair of boundary vertices found
above ensuring that their values are equal
* Adding a constraint that the BSF at the first vertext is
zero
* Adding the transpose of these boundary conditions so that
the matrix is square
* the right-hand side involves the vertically integrated vorticity
and zeros for the boundary conditions
* the solution involves the BSF and a Lagrange multiplier (dropped)
for each boundary condition1 parent 5bb4111 commit e13cfca
1 file changed
Lines changed: 374 additions & 104 deletions
0 commit comments