{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": "# Diurnal Cycle over Wangara, Australia: Description", "id": "dded253c8089c13d" }, { "cell_type": "markdown", "metadata": {}, "source": [ "*Last updated: May 2026*\n" ], "id": "abfe34082e7cb8bf" }, { "metadata": {}, "cell_type": "markdown", "source": [ "**References**\n", "\n", "Clarke, R. H., Dyer, A. J., Brook, R. R., Reid, D. G., and Troup, A. J. (1971). The Wangara experiment: Boundary layer data. Division of Meteorological Physics Tech. Paper 19, 362 pp.\n", "\n", "Yamada, T., and Mellor, G. (1975) A simulation of the Wangara atmospheric boundary layer data. Journal of the Atmos. Sciences, 32, 2309–2329.\n", "\n", "Basu, S., Vinuesa, J.-F., and Swift, A. (2008). Dynamic LES modeling of a diurnal cycle. Journal of\n", "Applied Meteorology and Climatology, 47, 1156–1174." ], "id": "897390a093a35c8d" }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Case Description**\n", "\n", "The Wangara diurnal-cycle case simulates a full 24-hour period over the Wangara field site in Australia, spanning daytime convective growth and nocturnal stable-layer collapse. The surface temperature and geostrophic forcing are time dependent.\n", "\n", "| Parameter | Value |\n", "| --- |---------------------------------------------------------------------------------|\n", "| Reference run | `examples/DC_Wangara/runs/128x128x128_LASDD_SM_DP` |\n", "| Domain | 5000 m x 5000 m x 2000 m |\n", "| Reference grid | $128^3$ |\n", "| Run matrix | $64^3$, $128^3$, $256^3$, $384^3$ x LASDD-SM, LASDD-WL, LAD-SM, LAD-WL x SP, DP |\n", "| Simulation time | 86400 s (24 h) |\n", "| Reference time step | 0.5 s |\n", "| Coriolis parameter | $f = -8.26 \\times 10^{-5}$ s$^{-1}$ |\n", "| Roughness lengths | $z_{0m} = 0.01$ m, $z_{0T} = 0.01$ m |\n", "| Thermal surface option | `optSurfBC = 2` |\n", "| Reference temperature | $T_0 = 278.5$ K |\n", "| Inversion strength | 0.001 K m$^{-1}$ |\n", "| SGS model | selected by the user |\n", "| Filter-to-grid ratio | `FGR = 2` |\n", "| Damping layer | above $z = 1500$ m |\n", "| Output statistics interval | 60 s |\n", "| 3D output interval | SimTime s |\n", "| Geostrophic forcing option | `optGeoWind = 1` |\n", "| Advection forcing option | `optAdvection = 0` |\n", "| Moisture option | `optMoisture = 0` |\n", "| Surface boundary condition | Observed screen-level temperature |\n", "| Reference output period | 24 h |\n", "\n", "The representative configuration below is copied from `examples/DC_Wangara/runs/128x128x128_LASDD_SM_DP/Config.py`." ], "id": "6f789a4857ddc011" }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Reference Configuration\n" ], "id": "c58101797004c4ee" }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# 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-05-20\n", ":Description: Wangara diurnal cycle after Basu et al. (2008).\n", " Domain 5000x5000x2000 m; 24-hour simulation.\n", " Cabauw-style geostrophic wind (time + height varying).\n", " Grid: 128x128x128, SGS: LASDD-SM,\n", " Precision: double.\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 = True\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 = 5000\n", "l_y = 5000\n", "l_z = 2000\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.5 # unit: sec\n", "SimTime = 86400 # 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 = 0.01\n", "z0T = 0.01\n", "\n", "# Screen-level temperature reference height (m); 0 = use z0T\n", "zTemperature = 1.2\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", "# Constant geostrophic wind (m/s)\n", "Ug2 = -5.34\n", "Vg2 = -0.43\n", "\n", "# Path to geostrophic wind file (relative to run directory)\n", "GeoWindFile = 'input/GeoWind.npz'\n", "\n", "# Coriolis parameter (1/s)\n", "f_coriolis = -8.26e-05\n", "\n", "# Potential temperature lapse rate above domain top (K/m)\n", "inversion = 0.001\n", "\n", "# Buoyancy calculation: 0 = use reference T_0, 1 = use local THv\n", "optBuoyancy = 1\n", "\n", "# Reference temperature (K)\n", "T_0 = 278.5\n", "\n", "# ------------------------------------------------------------\n", "# Subgrid-scale configuration\n", "# ------------------------------------------------------------\n", "\n", "# SGS model: 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 = 1500 # unit: m\n", "RelaxTime = 600 # unit: s\n", "\n", "# ------------------------------------------------------------\n", "# Statistics computation\n", "# ------------------------------------------------------------\n", "\n", "SampleInterval_sec = 10.0 # collect a sample every N s\n", "OutputInterval_sec = 60.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" ], "id": "20d0efb6744d829" } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }