Skip to content

miniPBL v2.0.0

Choose a tag to compare

@samfrederick samfrederick released this 08 Feb 05:43
· 12 commits to main since this release

Extension of miniPBL from a 1D vertical column solver to a 2D x-z Boussinesq solver with resolved convection, momentum equations, and pressure projection. The 1D mode is fully backward-compatible with v1.0.0.

New Features

2D x-z Boussinesq Solver

  • Prognostic equations for horizontal velocity (u), vertical velocity (w), and potential temperature (theta) on an Arakawa C-grid
  • Periodic boundary conditions in x, rigid-lid (w=0) at top and bottom
  • Automatic 2D mode activation when nx > 1 in the configuration

Pressure Solver

  • FFT-based Poisson solver for enforcing incompressibility (divergence-free velocity)
  • FFT in x (periodic) with tridiagonal solve in z per wavenumber
  • Neumann boundary conditions in z; mean pressure pinned to zero for the kx=0 mode
  • Fractional-step pressure projection applied at each RK3 sub-stage

Advection

  • Second-order flux-form centered advection for theta, u, and w
  • Proper C-grid staggering with periodic x boundary conditions

Momentum Physics

  • Buoyancy forcing on vertical velocity from potential temperature perturbations
  • Coriolis forcing with prescribed geostrophic wind
  • No-slip surface stress parameterization for u
  • Vertical turbulent momentum diffusion using K_m = K_m_ratio * K_h

Horizontal Diffusion

  • Configurable horizontal diffusivity (K_horizontal) applied to theta, u, and w

Initialization

  • Logarithmic wind profile initialization with configurable surface roughness length (z0)
  • Small random theta perturbation seeded near the surface to trigger convective instability

Turbulence (2D)

  • Column-by-column K-profile closure reusing the existing 1D scheme
  • Separate K_h (heat) and K_m (momentum) eddy diffusivities with configurable ratio

Output and Diagnostics

  • 2D NetCDF output with x_center dimension and u, w, p variables
  • x-z cross-section plots (pcolormesh) of theta, u, w at selected times
  • x-averaged theta profile plots for comparison with 1D results
  • Progress log file (output/progress.log) for monitoring long simulations

Configuration

  • New parameters: nx, Lx, g, coriolis_f, geostrophic_u, geostrophic_v, z0, K_m_ratio, K_horizontal
  • New 2D config file: config/cbl_2d.yaml

Backward Compatibility

The 1D solver path is completely unchanged. Running with nx=1 (or omitting nx from the config) produces identical results to v1.0.0.