{ "cells": [ { "cell_type": "markdown", "id": "gbl4desc-0001", "metadata": {}, "source": [ "# GABLS4 LES Intercomparison Study for Stable Boundary Layers: Description" ] }, { "cell_type": "code", "execution_count": 1, "id": "12674e27", "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "text/markdown": [ "*Last run: June 24, 2026 at 09:27 UTC*" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from IPython.display import display, Markdown\n", "from datetime import datetime, timezone\n", "display(Markdown(f\"*Last run: {datetime.now(timezone.utc).strftime('%B %d, %Y at %H:%M UTC')}*\"))" ] }, { "cell_type": "markdown", "id": "gbl4desc-0003", "metadata": {}, "source": [ "**References**\n", "\n", "Couvreux, F., Bazile, E., Canut, G., Seity, Y., Köhler, M., Masson, V., Bouyssel, F., and Brun, E. (2020). Representation of the atmospheric boundary layer in the operational NWP model used at Météo-France for the GABLS4 benchmark. *Boundary-Layer Meteorology*, 177, 53–74." ] }, { "cell_type": "markdown", "id": "gbl4desc-0004", "metadata": {}, "source": [ "**Case Description**\n", "\n", "The GABLS4 Stage 3 case simulates an extremely stable nocturnal boundary layer at Dome C, Antarctica, during a 24-hour period in December 2009. The site sits at 3233 m elevation (surface pressure ≈ 651 hPa). Unlike GABLS1 and GABLS3, this case is dry (no moisture) and requires no large-scale advection forcing; only the time- and height-varying geostrophic wind and the prescribed surface temperature are needed.\n", "\n", "| Parameter | Value |\n", "| --- | --- |\n", "| Reference run | `examples/SBL_GABLS4/runs/256x256x256_LASDD_SM_SP` |\n", "| Domain | 1000 m × 1000 m × 1000 m |\n", "| Reference grid | $256^3$ |\n", "| Run matrix | $64^3$, $128^3$, $256^3$, $384^3$ × LASDD-SM, LASDD-WL, LAD-SM, LAD-WL × SP, DP |\n", "| Simulation time | 86 400 s (24 h) |\n", "| Reference time step | 0.1 s |\n", "| Near-surface geostrophic wind (t=0) | $U_g = 1.25$ m s$^{-1}$, $V_g = 4.5$ m s$^{-1}$ |\n", "| Geostrophic forcing | time- and height-varying (`optGeoWind = 1`) |\n", "| Coriolis parameter | $f = -1.409 \\times 10^{-4}$ s$^{-1}$ (Dome C, 75.1°S, Southern Hemisphere) |\n", "| Roughness lengths | $z_{0m} = z_{0T} = 0.01$ m |\n", "| Thermal surface option | `optSurfBC = 2` (time-varying surface $\\Theta_s$) |\n", "| Surface pressure | $p_\\mathrm{sfc} = 65 100$ Pa |\n", "| Surface potential temperature (t=0) | $\\Theta_s \\approx 273$ K |\n", "| Reference temperature | $T_0 = 271$ K |\n", "| Inversion strength | $\\approx 0.0078$ K m$^{-1}$ |\n", "| SGS model | LASDD-SM (`optSgs = 1`) |\n", "| Filter-to-grid ratio | `FGR = 2` |\n", "| Damping layer | above $z = 700$ m |\n", "| Output statistics interval | 600 s |\n", "| 3D output interval | SimTime |\n", "| Advection forcing | none (`optAdvection = 0`) |\n", "| Moisture | dry (`optMoisture = 0`) |\n", "\n", "The representative configuration below is copied from `examples/SBL_GABLS4/runs/128x128x128_LASDD_SM_SP/Config.py`." ] }, { "cell_type": "markdown", "id": "gbl4desc-0005", "metadata": {}, "source": [ "## Reference Configuration\n" ] }, { "cell_type": "code", "id": "gbl4desc-0006", "metadata": { "ExecuteTime": { "end_time": "2026-06-15T16:02:27.328995Z", "start_time": "2026-06-15T16:02:27.250694Z" } }, "source": [ "from pathlib import Path\n", "\n", "def find_repo_root(start=None):\n", " path = Path(start or ('__file__' in globals() and __file__) or Path.cwd()).resolve()\n", " for candidate in (path, *path.parents):\n", " if (candidate / 'examples').is_dir() and (candidate / 'docs').is_dir():\n", " return candidate\n", " raise FileNotFoundError('Could not locate jaxalfa repository root')\n", "\n", "BaseDir = find_repo_root()\n", "RunDir = BaseDir / 'examples/SBL_GABLS4/runs/128x128x128_LASDD_SM_SP'\n", "\n", "print((RunDir / 'Config.py').read_text())" ], "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "# Copyright (C) 2025 Sukanta Basu\n", "#\n", "# This program is free software: you can redistribute it and/or modify\n", "# it under the terms of the GNU General Public License as published by\n", "# the Free Software Foundation, either version 3 of the License, or\n", "# (at your option) any later version.\n", "#\n", "# This program is distributed in the hope that it will be useful,\n", "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n", "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n", "# GNU General Public License for more details.\n", "#\n", "# You should have received a copy of the GNU General Public License\n", "# along with this program. If not, see .\n", "\n", "\"\"\"\n", "File: Config.py\n", "===============\n", "\n", ":Author: Sukanta Basu\n", ":AI Assistance: Claude.AI (Anthropic) is used for documentation,\n", " code restructuring, and performance optimization\n", ":Date: 2026-06-14\n", ":Description: GABLS4 stable BL at Dome C, Antarctica (Stage 3).\n", " Domain 1000x1000x1000 m; 24-hour simulation.\n", " Grid: 128x128x128, SGS: LASDD-SM,\n", " Precision: single.\n", "\"\"\"\n", "\n", "\n", "# ============================================================\n", "# Imports\n", "# ============================================================\n", "\n", "import numpy as np\n", "\n", "\n", "# ============================================================\n", "# User Input\n", "# ============================================================\n", "\n", "# ------------------------------------------------------------\n", "# Platform options\n", "# ------------------------------------------------------------\n", "use_double_precision = False\n", "# 0: use CPU, 1: use GPU\n", "optGPU = 1\n", "GPU_ID = 0\n", "\n", "# ------------------------------------------------------------\n", "# Domain configuration\n", "# ------------------------------------------------------------\n", "\n", "# Domain size (m)\n", "l_x = 1000\n", "l_y = 1000\n", "l_z = 1000\n", "\n", "# Number of grid points\n", "nx = 128\n", "ny = 128\n", "nz = 128\n", "\n", "# ------------------------------------------------------------\n", "# Time integration configuration\n", "# ------------------------------------------------------------\n", "\n", "# Change this if it is a restart run\n", "istep = 1\n", "\n", "# Time stepping and simulation time\n", "dt = 0.1 # unit: sec\n", "SimTime = 24 * 3600 # unit: sec\n", "\n", "# Galilean transformation (m/s)\n", "Ugal = 0\n", "\n", "# ------------------------------------------------------------\n", "# Surface configuration\n", "# ------------------------------------------------------------\n", "\n", "# optSurfFlux: 0 = homogeneous, 1 = heterogeneous\n", "optSurfFlux = 0\n", "\n", "# optSurfBC: 0 = constant flux\n", "# 1 = time-varying flux (from SurfaceBCFile)\n", "# 2 = time-varying surface temperature (from SurfaceBCFile)\n", "optSurfBC = 2\n", "\n", "# Roughness lengths (m)\n", "z0m = 1e-3\n", "z0T = 1e-4\n", "\n", "# Screen-level temperature reference height (m); 0 = use z0T\n", "zTemperature = 0.0\n", "\n", "# SensibleHeatFlux: not used when optSurfBC >= 1; set to 0 as placeholder\n", "SensibleHeatFlux = 0.0 # K m/s\n", "\n", "# Path to surface BC file (relative to run directory)\n", "SurfaceBCFile = 'input/SurfaceBC.npz'\n", "\n", "# ------------------------------------------------------------\n", "# Forcing configuration\n", "# ------------------------------------------------------------\n", "\n", "# Geostrophic wind option:\n", "# 0 = constant Ug2, Vg2 from Config\n", "# 1 = time + height varying, loaded from GeoWindFile\n", "optGeoWind = 1\n", "\n", "# Near-surface geostrophic wind at t=0 (m/s); fallback when optGeoWind=0\n", "Ug2 = 1.25\n", "Vg2 = 4.5\n", "\n", "# Path to geostrophic wind file (relative to run directory)\n", "GeoWindFile = 'input/GeoWind.npz'\n", "\n", "# Coriolis parameter (1/s); negative for Southern Hemisphere (Dome C, 75.1 deg S)\n", "f_coriolis = -1.4012e-4\n", "\n", "# Potential temperature lapse rate above domain top (K/m)\n", "inversion = 0.0\n", "\n", "# Buoyancy calculation: 0 = use reference T_0, 1 = use local THv\n", "optBuoyancy = 1\n", "\n", "# Reference temperature (K)\n", "T_0 = 270.0\n", "\n", "# ------------------------------------------------------------\n", "# Subgrid-scale configuration\n", "# ------------------------------------------------------------\n", "\n", "# SGS model: 0 = Static SM, 1 = LASDD-SM, 2 = LASDD-WL, 3 = LAD-SM, 4 = LAD-WL\n", "optSgs = 1\n", "\n", "# Dynamic SGS update frequency (every N steps)\n", "dynamicSGS_call_time = 1\n", "\n", "# Filter to grid ratio (FGR=1: implicit + dealiasing; FGR>=2: explicit)\n", "FGR = 2\n", "\n", "# Initial SGS coefficients (used before first dynamic update)\n", "Cs2 = 0.1 ** 2 # SM models: initial Cs^2\n", "Cwl = 0.1 ** 2 # WL models: initial C_WL\n", "Cs2PrRatio = Cs2 / 1.0\n", "CwlPrRatio = Cwl / 1.0\n", "\n", "# ------------------------------------------------------------\n", "# Damping layer configuration\n", "# ------------------------------------------------------------\n", "\n", "optDamping = 1 # 1: activate Rayleigh damping\n", "z_damping = 700 # unit: m\n", "RelaxTime = 300 # unit: s\n", "\n", "# ------------------------------------------------------------\n", "# Statistics computation\n", "# ------------------------------------------------------------\n", "\n", "SampleInterval_sec = 10.0 # collect a sample every N s\n", "OutputInterval_sec = 600.0 # output averaged stats every N s\n", "Output3DInterval_sec = SimTime # output 3D fields only at the end of the run\n", "\n", "# ------------------------------------------------------------\n", "# Large-scale advection forcing\n", "# ------------------------------------------------------------\n", "# 0: none, 1: time/height-varying (from AdvectionFile)\n", "optAdvection = 0\n", "AdvectionFile = 'input/AdvForcing.npz'\n", "\n", "# ------------------------------------------------------------\n", "# Moisture configuration\n", "# ------------------------------------------------------------\n", "# 0: dry run, 1: prognostic specific humidity Q\n", "optMoisture = 0\n", "# Screen-level moisture reference height (m); 0 = use z0T\n", "zMoisture = 0.0\n", "# Surface moisture flux (kg/kg m/s); used when optMoistureSurfBC = 0\n", "MoistureFlux = 0.0\n", "# 0: constant flux, 1: time-varying flux, 2: time-varying surface Q\n", "optMoistureSurfBC = 0\n", "MoistureSurfaceBCFile = 'input/MoistureSurfaceBC.npz'\n", "# Specific humidity lapse rate above domain top (kg/kg/m); 0 = zero gradient\n", "q_inversion = 0.0\n", "\n", "# Pressure solver: 0 = LU (original), 1 = Thomas (tridiagonal, faster)\n", "optPressureSolver = 1\n", "\n" ] } ], "execution_count": 2 } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.10.0" } }, "nbformat": 4, "nbformat_minor": 5 }