DOI: 10.7910/dvn/rphxgv
title: San Francisco Bay Area Coastal Flood Prediction Dataset for Deep Learning

description: &lt;p&gt;This dataset provides a comprehensive collection of coastal flood simulation outputs for the San Francisco (SF) Bay Area, designed for the development and evaluation of deep learning models for climate adaptation and flood risk management. The data was generated as part of the research presented in the paper "Climate Adaptation-Aware Flood Prediction for Coastal Cities Using Deep Learning" to train and validate the CASPIAN-v2 model.&lt;/p&gt;

&lt;p&gt;The flood scenarios were simulated using the high-fidelity hydrodynamic model &lt;strong&gt;Delft3D&lt;/strong&gt;. The dataset covers various hypothetical future scenarios, incorporating different Sea-Level Rise (SLR) projections and numerous shoreline protection strategies. The SF Bay Area coastline is segmented into 30 distinct Operational Landscape Units (OLUs), allowing for detailed and varied protection configurations.&lt;/p&gt;

&lt;p&gt;The dataset is organized into three types, each serving a specific purpose in the machine learning workflow:&lt;/p&gt;

&lt;ol&gt;
 &lt;li&gt;&lt;strong&gt;Main Set:&lt;/strong&gt; This set contains the primary training dataset. It consists of 285 unique shoreline protection scenarios under a &lt;strong&gt;1.0 m SLR&lt;/strong&gt; condition. This set is intended for training the core model.&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Holdout Set:&lt;/strong&gt; This set is for validation and testing, containing 46 challenging shoreline protection scenarios that were not seen during training, also under the &lt;strong&gt;1.0 m SLR&lt;/strong&gt; condition. It is designed to evaluate the model's performance on complex, unseen configurations within the same climate scenario.&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Generalizability Set:&lt;/strong&gt; This set is curated to test the model's ability to generalize to different climate conditions. It includes 32 unique shoreline protection scenarios for a &lt;strong&gt;0.5 m SLR&lt;/strong&gt; level and another 32 scenarios for a &lt;strong&gt;1.5 m SLR&lt;/strong&gt; level.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;File Information and Format&lt;/h3&gt;

&lt;p&gt;All data files are provided in the NumPy (&lt;code&gt;.npy&lt;/code&gt;) format with a spatial resolution of &lt;strong&gt;1024x1024&lt;/strong&gt; pixels. The raw simulation data (originally in CSV format) has been mapped onto this standardized grid. The filenames follow a systematic convention that encodes the simulation scenario and the dataset split:
&lt;code&gt;{binary_string}_{slr_level}m.{type}_{dataset}.npy&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;{binary_string}&lt;/code&gt;&lt;/strong&gt;: A 30-digit binary string representing the protection status of the 30 OLUs. A &lt;code&gt;1&lt;/code&gt; indicates the OLU is protected (e.g., by a seawall), and a &lt;code&gt;0&lt;/code&gt; indicates it is unprotected.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;{slr_level}&lt;/code&gt;&lt;/strong&gt;: The sea-level rise used for the simulation (e.g., &lt;code&gt;0.5&lt;/code&gt;, &lt;code&gt;1.0&lt;/code&gt;, &lt;code&gt;1.5&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;{type}&lt;/code&gt;&lt;/strong&gt;: Indicates whether the file is an input or output for the model.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;input&lt;/code&gt;&lt;/strong&gt;: The input matrix for the deep learning model. Each grid cell value represents the classification of that point based on its proximity to the nearest protected (&lt;code&gt;0.5&lt;/code&gt;) or unprotected (&lt;code&gt;1.0&lt;/code&gt;) shoreline.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;output&lt;/code&gt;&lt;/strong&gt;: The corresponding ground truth flood map. Each cell contains the &lt;strong&gt;Peak Water Level (PWL)&lt;/strong&gt; in meters, representing the maximum flood depth at that location for the given scenario. Negative PWL values from the simulation have been set to zero.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;{dataset}&lt;/code&gt;&lt;/strong&gt;: Indicates which experimental subset the file belongs to:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Main&lt;/code&gt;&lt;/strong&gt;: Primary training set containing 285 scenarios under a &lt;strong&gt;1.0 m SLR&lt;/strong&gt; condition.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Holdout&lt;/code&gt;&lt;/strong&gt;: Validation set of 46 challenging, unseen scenarios under a &lt;strong&gt;1.0 m SLR&lt;/strong&gt; condition.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Generalizability&lt;/code&gt;&lt;/strong&gt;: Test set for out-of-distribution climate conditions, comprising scenarios under &lt;strong&gt;0.5 m&lt;/strong&gt; and &lt;strong&gt;1.5 m SLR&lt;/strong&gt; levels.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Usage&lt;/h3&gt;

&lt;p&gt;This dataset is primarily intended for researchers and practitioners in machine learning, hydrology, and climate science to develop and benchmark predictive models for coastal flooding. A Python script &lt;code&gt;VisualizeNPY.py&lt;/code&gt; for visualizing the &lt;code&gt;.npy&lt;/code&gt; files is also included to facilitate data exploration.&lt;/p&gt;

&lt;h3&gt;Related Publication&lt;/h3&gt;

&lt;p&gt;For a complete understanding of the data generation methodology, model architecture (CASPIAN-v2), and experimental results, please refer to the following publication:&lt;/p&gt;
&lt;p&gt;Hassan, B., Karapetyan, A., Chow, A. C. H., and Madanat, S.: Climate Adaptation-Aware Flood Prediction for Coastal Cities Using Deep Learning, EGUsphere [preprint], &lt;a href="https://doi.org/10.5194/egusphere-2025-838"&gt;https://doi.org/10.5194/egusphere-2025-838&lt;/a&gt;, 2025.&lt;/p&gt;