5 research outputs found

    Non-intrusive reduced order modeling of nonlinear problems using neural networks

    Get PDF
    We develop a non-intrusive reduced basis (RB) method for parametrized steady-state partial differential equations (PDEs). The method extracts a reduced basis from a collection of high-fidelity solutions via a proper orthogonal decomposition (POD) and employs artificial neural networks (ANNs), particularly multi-layer perceptrons (MLPs), to accurately approxi- mate the coefficients of the reduced model. The search for the optimal number of neurons and the minimum amount of training samples to avoid overfitting is carried out in the offline phase through an automatic routine, relying upon a joint use of the latin hypercube sampling (LHS) and the Levenberg-Marquardt training algorithm. This guarantees a complete offline-online decoupling, leading to an efficient RB method - referred to as POD-NN - suitable also for general nonlinear problems with a non-affine parametric dependence. Numerical studies are presented for the nonlinear Poisson equation and for driven cavity viscous flows, modeled through the steady incompressible Navier-Stokes equations. Both physical and geometrical parametrizations are considered. Several results confirm the accuracy of the POD-NN method and show the substantial speed-up enabled at the online stage as compared to a traditional RB strategy

    GT4Py: High Performance Stencils for Weather and Climate Applications using Python

    Full text link
    All major weather and climate applications are currently developed using languages such as Fortran or C++. This is typical in the domain of high performance computing (HPC), where efficient execution is an important concern. Unfortunately, this approach leads to implementations that intermix optimizations for specific hardware architectures with the high-level numerical methods that are typical for the domain. This leads to code that is verbose, difficult to extend and maintain, and difficult to port to different hardware architectures. Here, we propose a different strategy based on GT4Py (GridTools for Python). GT4Py is a Python framework to write weather and climate applications that includes a high-level embedded domain specific language (DSL) to write stencil computations. The toolchain integrated in GT4Py enables automatic code-generation,to obtain the performance of state-of-the-art C++ and CUDA implementations. The separation of concerns between the mathematical definitions and the actual implementations allows for performance portability of the computations on a wide range of computing architectures, while being embedded in Python allows easy access to the tools of the Python ecosystem to enhance the productivity of the scientists and facilitate integration in complex workflows. Here, the initial release of GT4Py is described, providing an overview of the current state of the framework and performance results showing how GT4Py can outperform pure Python implementations by orders of magnitude.Comment: 12 page

    A Comprehensive Approach to Process Coupling in Atmospheric Models: Theory, Software, and Applications

    No full text
    The multi-physics and multi-scale nature of the atmosphere is efficiently addressed by at- mospheric models via separation of concerns. While the dynamical core solves for the fluid-dynamics features which emerge naturally on the computational grid, physical parame- terizations express the bulk effect of subgrid-scale diabatic processes on the resolved flow. The present thesis is concerned with the process coupling in atmospheric models. That is, the way the dynamical core (the dynamics) cooperates with the suite of parameterizations (the physics) to integrate the state of the atmosphere forward in time. The topic has gained increasing interest in recent years as a result of the concerted effort towards kilometer-scale global weather forecasts and climate projections. Indeed, if the coupling is not carried out carefully, the associated error may dominate the model uncertainty. This risk becomes more concrete as the spatio-temporal resolution of the model increases, namely as the error injected individually by the dynamics and the physics decreases. The overarching goal of this thesis is three-fold: (i) performing grid refinement experiments to validate theoretical expectations on the speed of convergence of the model error; (ii) crafting a bespoke Python library to conduct idealized experiments, since production codes generally lack the required level of software flexibility to fit this kind of research; and (iii) probing the suitability of Python as the host language for the next-generation weather and climate models. Six strategies to couple the dynamical core with physical parameterizations are considered. Thanks to a suitably designed theoretical framework featuring a high level of abstraction, the truncation error analysis and the linear stability study are carried out under weak assumptions. Indeed, second-order conditions are derived which are neither influenced by the specific formulation of the governing equations, nor by the number of parameterizations, nor by the structural design and implementation details of the time-stepping methods. The theoretical findings are verified on two idealized test beds. Particularly, a hydrostatic model in isentropic coordinates is used for vertical slice simulations of a moist airflow past an isolated mountain. Self-convergence tests show that the sensitivity of the prognostic variables to the coupling scheme may vary. For those variables (e.g. momentum) whose evolution is mainly driven by the dry dynamics, the truncation error associated with the dynamical core dominates and hides the error due to the coupling. In contrast, the coupling error of moist variables (e.g. the precipitation rate) emerges gradually as the spatio-temporal resolution increases. Eventually, each coupling scheme tends towards the formal order of accuracy, upon a careful treatment of the grid cell condensation. Indeed, the well-established saturation adjustment may cap the convergence rate to first order. A prognostic formulation of the condensation and evaporation process is derived from first principles. This solution is shown effective to ameliorate the convergence behaviour of the coupling algorithms. From a software engineering perspective, dynamical cores and parameterizations have been historically developed in isolation for the sake of tractability. Thus, software compatibility between model components is not granted and may indeed be problematic. To alleviate this issue, we present the Python library Tasmania. On the one hand, Tasmania builds upon the core functionalities of the framework Sympl, which has recently been conceived to help domain scientists write inter-operable and self-documenting model components. Tasmania widens and deepens the hierarchy of components offered by Sympl. Particularly, federation classes are provided which glue dynamics and physics components pursuing a well-defined coupling algorithm. On the other hand, Tasmania includes a collection of concrete dynamical cores and physical parameterizations which can be used to form flexible, modular and maintainable models. To overcome the intrinsic slowness of the Python interpreter, stencil computations arising within each component are encoded using different tools: from scientific computing packages, such as NumPy and CuPy; to just-in-time (JIT) accelerators, such as Numba; to domain specific languages (DSLs), such as GT4Py. Indeed, Tasmania is devised to manage multiple implementations of stencil kernels in an organic fashion. Infrastructure code ensures that memory allocations, stencil definitions and kernel compilations are dispatched to the proper methods for each backend. This highly relieves the application code of boilerplate code and backend-specific instructions, and ultimately enables performance portability. Based on multiple benchmarks run on the Piz Daint supercomputer at the Swiss National Supercomputing Center (CSCS), we show that GT4Py can significantly outperform all other tools at consideration, both on CPUs and GPUs. These preliminary results bode well for the future adoption of the GT4Py toolchain in leading-edge forecasting systems

    A Numerical Analysis of Six Physics-Dynamics Coupling Schemes for Atmospheric Models

    No full text
    Six strategies to couple the dynamical core with physical parameterizations in atmospheric models are analyzed from a numerical perspective. Thanks to a suitably designed theoretical framework featuring a high level of abstraction, the truncation error analysis and the linear stability study are carried out under weak assumptions. Indeed, second-order conditions are derived which are not influenced either by the specific formulation of the governing equations, nor by the number of parameterizations, nor by the structural design and implementation details of the time-stepping methods. The theoretical findings are verified on two idealized test beds. Particularly, a hydrostatic model in isentropic coordinates is used for vertical slice simulations of a moist airflow past an isolated mountain. Self-convergence tests show that the sensitivity of the prognostic variables to the coupling scheme may vary. For those variables (e.g., momentum) whose evolution is mainly driven by the dry dynamics, the truncation error associated with the dynamical core dominates and hides the error due to the coupling. In contrast, the coupling error of moist variables (e.g., the precipitation rate) emerges gradually as the spatio-temporal resolution increases. Eventually, each coupling scheme tends toward the formal order of accuracy, upon a careful treatment of the grid cell condensation. Indeed, the well-established saturation adjustment may cap the convergence rate to first order. A prognostic formulation of the condensation and evaporation process is derived from first principles. This solution is shown effective to alleviate the convergence issues in our experiments. Potential implications for a complete forecasting system are discussed.ISSN:1942-246
    corecore