from pathlib import Path
import warnings
import bokeh.io
import geopandas as gpd
import holoviews as hv
import hvplot.pandas # noqa: API import
import numpy as np
import pandas as pd
import panel as pn
from bokeh.resources import INLINE
import coastal_dynamics as cd
# Activate Panel extension to make interactive visualizations
pn.extension()
5: Coastal Classification and Beach States
Welcome to the notebook of Week 5! With this notebook, we focus on morphodynamics of the upper shoreface, supplementing the material treated in Chapter 7 of the Coastal Dynamics Open Textbook. The main topics are coastal classification (see also Chapter 2 and 4 in the book) and beach states. As you may remember, we have explored coastal classification before, not only in the Week 1 notebooks but also in the Week 3 notebook on tidal environments. However, we feel that this topic is especially important to revisit before considering the beach states, to better connect your knowledge with Chapter 7 of this course.
As you know from Chapter 2 and 4 of the book and the 1a, 1b and 3a notebooks, coasts can be classified based on tectonics and physical processes. In this notebook, we will only consider process-based classification. We will look at data and satellite imagery of different Brazilian beaches, and try to classify them in various ways, considering the effects of both waves and tides.
The notebook consists of the following three parts: 1. Exploration of the available data and satellite imagery (3 multiple-choice questions and one text question) 2. Classification based on relative wave and tide influence (3 multiple-choice and 2 multiple-selection questions) 3. Beach states (12 multiple-choice questions and 1 multiple-selection question)
Import the required libraries, questions and data.
Run the below three cells to import: 1. All libraries that we use for our analysis 2. The question files 3. The dataset with data for different coordinates along the Brazilian coast
import sys
sys.path.append('../')
from modules import mod_5# Read questions from local file
questions = cd.read_questions(Path("../hashed_questions/5_coastal_impact_beach_states_hashed.json"))
question_industry = cd.QuestionIndustry(questions)
cd.UseAnswersApp("Q5").serve()# file path
fp = Path("../database/5_coastal_impact_beach_states/5_data.csv")
# We load this file as a Dataframe
df = pd.read_csv(fp, sep=";", encoding="latin1", engine="python", decimal=",")
# We add a column containing the geometry of each entry using geopandas. For this dataset, these are points (longitude, latitude)
gdf = gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df.Longitude, df.Latitude), crs="EPSG:4326")
# replace nans with -1, and make the column all integers
gdf["Region"] = gdf["Region"].fillna(-1).astype(int)
# uncomment to show the (geo)dataframe
gdf| Label | State | Region | Longitude | Latitude | Hs [m] | T [s] | MTR [m] | RTR [-] | Beach slope [degrees] | D [mm] | w_s [m/s] | Hb [m] | Omega [-] | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Princesa | Pará | -1 | -47.5799 | -0.5770 | 0.77 | 7.3 | 5.07 | 4.0 | 2.0 | 0.150 | 0.012 | 1.27 | 14.3 | POINT (-47.5799 -0.577) |
| 1 | Atalaia | Pará | -1 | -47.2957 | -0.5980 | 0.83 | 7.9 | 5.05 | 4.2 | 2.0 | 0.160 | 0.014 | 1.20 | 11.2 | POINT (-47.2957 -0.598) |
| 2 | Ajuruteua | Pará | -1 | -46.5999 | -0.8418 | 0.95 | 8.0 | 5.20 | 3.9 | 2.0 | 0.145 | 0.011 | 1.33 | 14.5 | POINT (-46.5999 -0.8418) |
| 3 | São Luís (Calhau) | Maranhão | -1 | -44.0000 | -2.4830 | 1.25 | 6.9 | 4.84 | 8.0 | 3.0 | 0.160 | 0.014 | 0.61 | 6.4 | POINT (-44 -2.483) |
| 4 | Marambaia | Rio de Janeiro | -1 | -43.8742 | -23.0746 | 1.50 | 9.8 | 1.04 | 0.9 | 5.0 | 0.350 | 0.045 | 1.57 | 3.5 | POINT (-43.8742 -23.0746) |
| 5 | Do Ubatuba | Santa Catarina | 1 | -48.5260 | -26.1985 | 0.80 | 8.0 | 1.36 | 1.2 | 5.0 | 0.300 | 0.037 | 1.14 | 3.8 | POINT (-48.526 -26.1985) |
| 6 | Barra Velha | Santa Catarina | 1 | -48.6677 | -26.5898 | 0.90 | 8.1 | 1.16 | 1.2 | 5.0 | 0.300 | 0.037 | 0.97 | 3.2 | POINT (-48.6677 -26.5898) |
| 7 | Balneário Camboriú | Santa Catarina | 2 | -48.6248 | -26.9954 | 1.01 | 7.9 | 1.02 | 1.9 | 5.0 | 0.320 | 0.040 | 0.53 | 1.7 | POINT (-48.6248 -26.9954) |
| 8 | Tijucas | Santa Catarina | 2 | -48.6134 | -27.2402 | 1.16 | 8.1 | 0.94 | 1.9 | 5.0 | 0.320 | 0.040 | 0.50 | 1.5 | POINT (-48.6134 -27.2402) |
| 9 | Praia do Moçambique | Santa Catarina | 3 | -48.4173 | -27.5260 | 1.39 | 8.7 | 0.74 | 1.1 | 4.1 | 0.300 | 0.037 | 0.67 | 2.1 | POINT (-48.4173 -27.526) |
| 10 | Enseada de Pinheira | Santa Catarina | 4 | -48.5967 | -27.8547 | 1.34 | 8.5 | 0.65 | 0.9 | 3.0 | 0.190 | 0.019 | 0.72 | 4.6 | POINT (-48.5967 -27.8547) |
| 11 | Laguna | Santa Catarina | 4 | -48.7619 | -28.4884 | 1.45 | 8.6 | 0.58 | 0.9 | 3.0 | 0.190 | 0.019 | 0.65 | 4.1 | POINT (-48.7619 -28.4884) |
| 12 | Campo Bom | Santa Catarina | 5 | -49.0572 | -28.7212 | 1.59 | 8.7 | 0.58 | 0.7 | 1.8 | 0.210 | 0.022 | 0.83 | 4.4 | POINT (-49.0572 -28.7212) |
Part 1: Get to know the data
Aggregated data set
The dataframe (see above) shows a total of 13 beaches from 4 different Brazilian states. These states (from north to south) are Pará, Maranhão, Rio de Janeiro, and Santa Catarina. The dataset has been aggregated and adapted by us for the purposes of this notebook.
We have based ourselves on: * Athanasiou et al. (2023) * Klein et al. (2016) * Dadalto et al. (2022)
Specifically, the first source is used to get values for the significant wave height (\(H_s\)), the peak period (\(T\)) and the mean tidal range (MTR). The second source is used to get the relative tidal range RTR (see Eq. 4.2 in the book), the mean grain diameter \(D\) and the beach slope for the Santa Catarina, Maranhão, and Pará states. The third source is used to get the RTR, the \(D\) and the beach slope for the Rio de Janeiro state. Some of the values have been modified slightly for educational purposes.
Using the data from the three sources, we computed the wave height at breaking \(H_b\), the fall velocity \(w_s\) and the dimensionless fall velocity \(\Omega\) and added these to the dataframe. We will not use these computed parameters until Part 3, where we will further explain the parameters and how we computed them computations.
We should note that for the Santa Catarina beaches, we had only regional values available for the sediment size, and the beach slope. Therefore, some of these beaches have equal values for the sediment size and beach slope.
The regions are displayed in the table below, so you can see which beaches belong to which regions. The region is also part of the above dataframe.
Note: The “Region” column in the geodataframe does not apply to coasts outside of the Santa Catarina state. Those regions are marked with “-1”, to be interpreted as “N/A”.
| Region (in Santa Catarina) | Coastal section | D [mm] | beach slope [degrees] |
|---|---|---|---|
| 1 | Barra Velha, Do Ubatuba |
0.300 | 5.0 |
| 2 | Balnario Camboriu, Tijucas |
0.320 | 5.0 |
| 3 | Praia do Macambique | 0.300 | 4.1 |
| 4 | Enseada de Pinheira, Laguna |
0.190 | 3.0 |
| 5 | Campo Bom | 0.210 | 1.8 |
Warning!
At many points in your career, you may have to assess coastal sites based on limited information. Learning to critically interpret datasets aggregated from multiple sources (like this one), and especially to critically assess the accuracy of “global” datasets at a local scale is an essential skill for the modern coastal engineer. Athanasiou et al. (2023) for example use a numerical model to compute offshore wave data for sites around the world, whereas Klein et al. (2016) use direct measurements from Brazil. All of this is to say that this data is not presumed to be locally accurate. However, in this context, we use it to compare the Brazilian coastline on a larger regional scale and draw broad conclusions to illustrate the concepts introduced in this course. The \(\Omega\) values as presented in the dataset should be sufficient for qualitatively comparing the different beaches.
Nonetheless, we would like to stress that the values should not be interpreted as highly accurate for specific beaches, given the coarse resolution and simplifying assumptions of the global dataset and limited local data. However, they are still useful to get a feel for the surrounding area (and relative differences from other regions), and to get first estimates of the order of magnitude for these parameters.
Brazilian beaches panel
We are now going to create a plot that shows satellite images of the above listed beaches in a separate panel, the Brazilian beaches panel!
In this Brazilian beaches panel, satellite images and data from the selected beaches from the Brazilian states of (from north to south) Pará, Maranhão, Rio de Janeiro, and Santa Catarina are shown: - You can select one of the 13 beaches, grouped by state. - You can freely zoom and move around in the presented satellite image. - You can see all of the values from the dataframe when hovering over a data point with the cursor. Some of these values will be needed to answer the questions below. - Please note that altering the slider positions or selecting different options from the dropdown menus may trigger a warning; it can safely be ignored, and possibly silenced by adjusting the logging warning level.
Go ahead and run the below code cell!
app = mod_5.plot_brazilian_coast(gdf)
(app)Questions about Part 1
Now, using the Brazilian beaches panel, try to answer the questions below. For each question, try to relate your answer to the satellite imagery.
Note: Remember that we are working with an aggregated dataset. Each data point should be interpreted as representative of the region around it, and not as specific to that beach. How well do the provided data match what you see in the satellite images? What clues can you look for to check whether the data look reasonable?
q = [
"Q5a-highest_MTR",
"Q5a-highest_Hs",
"Q5a-Marambaia_barrier",
"Q5a-alongshore_transport",
]
question_industry.serve(q)Part 2: Classification based on relative wave and tide influence
The Brazilian coast has tides ranging from 0.5 to 11 m and waves from low to high. We can therefore find very diverse beaches. In Part 1, you have seen that the beaches in the Southern states are wave-dominated and that the influence of tides becomes significant for the Northern states. Let’s look into this a bit further.
There a a few methods to classify coastal systems and beaches based on the relative influence of waves and tides; have a look at Chapter 4.4.2 in the textbook. Coasts can be classified into three types based on relative tide range RTR, as described above (see Eq. 4.2 in the book). This parameter quantifies the relative contribution of waves and tides. We can also investigate the relative influence of waves and tides by using a figure as Figure 4.13. Let’s try to classify some of the coastal sections using the mean tidal range (MTR) and mean significant wave height (\(H_s\))! We plot some of the Brazilian coasts and see how they are classified using the figure.
Run the below cell to generate this plot.
Note: Again, you can hover over points to get relevant values. You can also highlight points by clicking the labels in the legend.
mod_5.fig413(gdf)