The Back of Envelope Ocean Model (beom) is a numerical solver for the multi-layer shallow-water equations. The code differs from traditional isopycnal models (e.g., [1]) by its treatment of vanishing layers [2] and its regular-unstructured grid on the horizontal [3]. The motivation behind beom is to simulate tides and flooding in estuaries of complex geometry. The model is written in strict Fortran 95 and targets computers ranging from laptops to workstations with multiple processors.
beom is an unfunded rainy Sunday afternoon project. The code is being evaluated against a series of test-cases and the results are promising. I am sharing the test-cases and the code under a copyleft license: Documentation and source code for beom (2023-06-11).
Besides the material on this page, the studies by Ken Zhao and his coauthors at UCLA (paper 1, paper 2) are great examples of applications.
Figure 1: Potential vorticity of the 1027.1 kg/m3 layer in the test-case for the spin-up of the Southern Ocean. For best results, download the video (.mp4) and play it from your device.
Figure 2: Top elevation of the 1027.5 kg/m3 layer in the test-case for the spin-up of the Southern Ocean. For best results, download the video (.mp4) and play it from your device.
Figure 3: Spin-up of the subtropical gyre in the North Atlantic Ocean. A video is available for download (.webm, .mp4). The colorscale represents the surface geostrophic velocity. The domain has closed boundaries and is forced with the climatological wind stress from Forget 2010 [4].
Figure 4: Potential vorticity in the ocean interior (permanent pycnocline) for the same period. A video is available for download (.webm, .mp4).
Figure 5: Water wave of finite amplitude collapsing on a sloping beach. A video is available for download (.webm, .mp4). The theoretical motion of the shoreline is from Carrier and Greenspan 1958 [5].
Figure 6: Semi-diurnal flow over a Gaussian ridge. A video is available for download (.webm, .mp4). The oscillating flow and the stratification generate internal waves radiating away from the ridge.
Figure 7: Growth of vortices in a zonal jet (potential vorticity after 70 days). A video is available for download (.webm, .mp4). A narrow barotropic jet flows in a double-periodic basin with two ridges running north-south (red anomalies on day 0). Barotropic instability generates vortices drifting along the ridges. Note the symmetry in the north-south and east-west directions. The calculation uses the modified-Leith viscosity of Fox-Kemper and Menemenlis (2008).
Figure 8: Dense water overflow on a continental slope. The test-case is from Ilicak et al. (2012). For best results, download the video (.webm, .mp4) and play it from your device.
Figure 9: Double gyre spin-up experiment in a flat rectangular ocean. The test-case is from Salmon (2002). For best results, download the video (.webm, .mp4) and play it from your device.