Physics-Aware Downsampling with Deep Learning for Scalable Flood Modeling

1 Introduction . A physical process is a time-evolving phenomenon marked by gradual transitions through a series of states , following physical rules . Scientists attempt to model these physical processes by employing analytical descriptions that correspond to the underlying physics of these processes . Commonly , the analytical descriptions , or physical models , such as conservation laws , are in the form of partial differential equations ( PDEs ) . Physical models are the backbone behind modeling phenomena such as weather forecasts , flood forecasting , aerodynamics , chemical processes , and more . Traditionally , these physical models are solved numerically , as no closed form solution is available for most problems . One typical numerical method is to discretize the PDEs using a Taylor expansion and repeatedly integrate in time over short intervals . However , solving PDEs numerically on a large scale is challenging because of the need to resolve spatiotemporal features over many scales . In this paper , we focus on hydraulic models , which are a widely used physical models . The goal of these models is to simulate the flow of water in a given environment . We are specifically interested in simulating water flow through a floodplain in order to predict inundation , i.e. , where and to what extent will flooding occur . Specifically , in inundation modeling we are given an elevation map of the terrain , boundary conditions , initial conditions — and we wish to predict , the water height in each pixel at some future time t , with maximum accuracy and minimum computational cost . Such prediction is an important task in operational flood alert systems [ 5 , 43 , 10 ] . 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . Unfortunately , inundation modeling is often computationally intractable when modeling flow on a large scale with fine grid resolution . A coarse grid representation of the elevation map can significantly improve computation time , for two reasons . First , less computation is done at each step of the PDE solver . Specifically , in a discretized PDE the per-step spatial computation is done between neighboring pixels . Therefore , if we downsample a d-dimensional map by a factor of x , we decrease this per-step computation by a factor of xd . Second , the maximum stable time step in the numerical solution can be increased by a factor of x , as entailed by the Courant–Friedrichs–Lewy ( CFL ) condition [ 23 , 7 ] . Taking both factors into account , we gain a total theoretical speedup of xd+1 . For example , in this paper we will show that for the two-dimensional problem ( d = 2 ) of inundation modeling , we retain fairly good accuracy when downsampling by a factor of 16 , leading to a significant 4096× speedup . So far it was considered challenging to coarse-grain a general elevation map without losing accuracy in the inundation prediction . In particular , small details in the elevation map can significantly impact the water flow evolution . Narrow canals , dams , and embankments ( barriers preventing a river from flooding an area ) are examples of such details that require special care . There are several typical methods to represent an elevation map on a coarse grid , all of which can cause a sub-optimal representation , as small , important details might get lost [ 11 , 44 , 43 ] . For example , when applying standard downsampling methods , an 8 meter wide embankment might be reduced to half its original height above its neighboring surroundings in a 16 meters resolution coarse map . More complex downsampling techniques can be employed , but in practice , to achieve high-quality simulations at a coarse resolution , domain expertise is required , along with a deep understating of the underlying physics of the specific problem . To address these limitations , we optimize the coarse grid representation of the elevation map so that its water height solution will match the accurate fine grid solution . This is accomplished by combining a deep neural network ( DNN ) with the PDEs describing the flow of water . The DNN downsamples the fine grid elevation map , and the downsampled elevation map is fed into the PDEs , where each time step is a recurrent unit , to calculate the water height solution . Thus , the DNN is optimized directly on the water height solution , through the PDEs . This also requires back-propagating through the PDEs , whose time-steps need to be unrolled . We demonstrate that this approach can yield a better coarse grid representation than conventional methods , in terms of water flow estimation . To this end , we configured a dataset designed specifically for inundation modeling . Each sample consists of a fine grid elevation map , boundary conditions , and a simulation time . The ground truth of each sample is the corresponding fluid state , calculated on a fine grid . This dataset is available along with code for further use . The contributions of our work include : • A new framework for learning how to coarse-grain a PDE together with its external environment — by minimizing the distance between the solutions on the fine and coarse grids ( Sec . 4.1 ) . • A novel configured dataset for 2D water flow estimation , with accessible code for reproduction1 . ( Sec . 4.2 ) • A demonstration that gradients backpropgated for tens of thousands of steps through the PDE remain informative ( Sec . 5.1 ) and can pinpoint key features ( Fig . 2 ) • A demonstration of the accuracy of our approach in inundation modeling , for two different application settings ( Sec . 5.2 and 5.3 ) . Since we decrease the map resolution by a factor 16 , this entails a 4096× speedup . Such a speedup has a significant impact on the feasibility of real-time flood warning for large populations ( Sec . 8 ) . 2 Related Work . The integration of machine learning with physical models , described by PDEs , has emerged in recent years as a useful tool for efficiently solving computational science problems . In particular , the use of machine learning models is promising in problems where little is known about the underlying process , or in problems where the computational overhead is significant [ 42 ] . Data driven models . Sharifi et al . [ 32 ] , Vandal et al . [ 40 ] , Gentine et al . [ 14 ] , and Srivastava et al . [ 36 ] use basic ML methods to interpolate between coarse and fine representations to improve accuracy 1The code for this paper is available at https : //github.com/tech-submissions/physics-aware-downsampling in modeling . In these studies , they use supervised data driven models that predict the solution of the physical model . Data driven models can fail to capture important complex relationships between physical variables directly from data , and it is necessary to ensure that the learned models follow physical laws . Physics constrained loss function . To force the predictive models to follow physical laws , a common technique is to incorporate the physical constraints as additional terms in the loss function [ 19 , 29 , 30 , 35 , 4 ] . These physics-informed DNNs have several advantages . First , the computation of the physical loss term can be done without labeled data . In addition , the physical loss term acts as a regularizer , so it can reduce the search space of the optimization . These models has shown success in several tasks such as forward solving of PDEs and inverse problems [ 42 ] . However , physical loss terms require fine-tuning to find the optimal weighting between the predictive loss and the physical loss . Physics guided architecture . Another common methodology is physics guided architecture , where domain knowledge is utilized to design architectures that capture physics dependencies among variables [ 33 , 12 , 9 , 17 , 24 ] . These models are more interpretable than regular models . However , the architecture design can be useful for a specific type of PDEs , and make no sense for others . Designing a specific architecture for each physical model can be a tedious task of its own . Data driven discretization . Perhaps the most closely related works showed that modeling features of the fluid dynamics and numerical scheme with neural networks can enable solving PDEs on much coarser grids than is possible with standard numerical methods [ 4 , 15 , 21 , 38 ] . By learning to modify the PDE solver , these works enable using a coarser grid ( potentially with some overhead ) while retaining accuracy and numerical stability . However , they did not examine how to optimally coarse grain the external environment ( given as input to the solver ) — as we do here , for terrain elevation maps in the context of flood modeling . In this case , it is critical that the coarse-grained map retains the relevant features , to prevent drastic differences between fine and coarse solutions ( e.g. , floods ) . In other words , these previous works address the discretization error entailed in numerical modeling , while this paper suggests a method to reduce the input error , such as errors in the elevation map . The two approaches ( modifying the PDE solver vs. modifying the external environment ) are orthogonal , and can be potentially combined in future work . Empirically , we found that the input error is dominant in our setting of flood modeling , however , it is an interesting question to quantify this more precisely . Note our approach has no computational overhead during inference since we use the same solver , just on a coarser grid with a modified map . Evidently , we provide experiments on a significantly larger scale than these previous works . 3 Physical Model : The Shallow Water Equations . In this section we describe the physical model of fluid flow used in this paper , i.e . the hydraulic model . At the most fundamental level , fluid flow is described by the Navier–Stokes equations . In practice , solving these equations directly is often infeasible , and simpler variations are derived for specific problem settings . One such variation is the shallow water equations [ 22 ] , a set of partial differential equations that describe water flow when water depth is much smaller than horizontal extent , as is generally the case for floods . The shallow water equations are derived by depth-integrating the Navier–Stokes equations [ 41 , 8 , 7 ] . These assumptions allow a considerable simplification in the mathematical formulation and numerical solution , which enables analysis on much larger horizontal length scales . To write the shallow water equations , we first define the following notation : t is the time index , ( x , y ) are the spatial horizontal coordinates , h ( x , y ; t ) is the water height relative to the terrain elevation z ( x , y ) , q = ( qx ( x , y ; t ) , qy ( x , y ; t ) ) is the horizontal mass flux of the fluid , ∇ = ( ∂∂x , ∂∂y ) is the horizontal gradient operator , n is Manning ’ s friction coefficient , and g is the gravitational acceleration constant . The shallow water equations are described by two conservation laws . First , the conservation of mass , which gives rise to the continuity equation , ∂h ∂t +∇ · q = 0 . ( 1 ) Second , the conservation of momentum , which yields the momentum equation , ∂q ∂t + gh∇ ( h+ z ) + gn 2 ||q|| h7/3 q = 0 . ( 2 ) Note that eqs . 1 and 2 neglect advection and the Coriolis force , as is common for flood modeling . We follow De Almeida & Bates [ 7 ] to numerically approximate eqs . 1 and 2 from the continuous domain into the discrete domain , where the numerical solution uses a finite difference scheme applied to a staggered grid . In the discretized domain , functions becomes arrays ( e.g. , z ( x , y ) becomes z ) . In real-world flood forecasting settings , data for the elevation map would be collected ahead of time , and the boundary conditions for the model would be provided either by real-time measurements or hydrologic forecasts . One would then run the hydraulic model ( eqs . 1 and 2 ) in real-time , or offline on a wide range of possible boundary conditions . The simulation provides both the flood extent and the inundation depth at every pixel . This information can then be used to inform both authorities working on mitigation and response efforts , as well as individuals that may be affected by the expected flooding ( e.g. , alert apps on mobile phones ) . However , to do this , the simulation must be done on a large scale and fast enough to be practically relevant . Next , we show how this can be done using physics-aware downsampling of the elevation map .

Summary: This is an interesting paper in which the authors introduce a new downsampling method for generating coarse elevation maps. A new framework was also built to incorporate the governing PDE (and PDE solver) in the training process. The authors have shown the effectiveness of this proposed method on a dataset with simulated water height at fine resolution.