Giter Club home page Giter Club logo

cascade's Introduction

DOI

๐ŸŒ€ ๐ŸŒŠ ๐Ÿ„โ€โ™€๏ธ ๐Ÿš๏ธ ๐ŸŒ€ ๐ŸŒŠ ๐Ÿ„โ€โ™€๏ธ ๐Ÿš๏ธ ๐ŸŒ€ ๐ŸŒŠ ๐Ÿ„โ€โ™€๏ธ ๐Ÿš๏ธ ๐ŸŒ€ ๐ŸŒŠ ๐Ÿ„โ€โ™€๏ธ ๐Ÿš๏ธ

cascade

The CoAStal Community-lAnDscape Evolution (cascade) model is a coupled landscape and human-dynamics modeling framework. cascade combines elements of two exploratory morphodynamic models of barrier evolution -- barrier3d (Reeves et al., 2021) and the BarrierR Inlet Environment (brie) model (Nienhuis & Lorenzo-Trueba, 2019) -- into a single model framework (figure below). barrier3d, a spatially-explicit cellular exploratory model, is the core of cascade. It is used within the cascade framework to simulate the effects of individual storm events and SLR on shoreface evolution; dune dynamics, including dune growth, erosion, and migration; and overwash deposition by individual storms. brie is used to simulate large-scale coastline evolution arising from alongshore sediment transport processes; this is accomplished by connecting individual barrier3d models through diffusive alongshore sediment transport. Human dynamics are incorporated in cascade in two separate modules. The first module simulates strategies for preventing roadway pavement damage during overwashing events, including rebuilding roadways at sufficiently low elevations to allow for burial by overwash, constructing large dunes, and relocating the road into the barrier interior. The second module incorporates management strategies for maintaining a coastal community, including beach nourishment, dune construction, and overwash removal. For a full description of model dynamics, please see "The Future of Developed Barrier Systems - Part I: Pathways Toward Uninhabitability, Drowning, and Rebound" by Anarde et al., (2024, Earth ArXiv preprint).

ModelTimeLoop-01

In development: cascade represents decisions about coastal land-use (e.g., housing markets) and community-level mitigation measures using an empirically-grounded agent-based real estate model โ€“ the Coastal Home Ownership Model (chom). chom receives information about the coastal environment and acts on that information to cause change to the environment, including decisions about beach nourishment and dune construction and maintenance.

Model coupling

cascade can initialize a series of barrier3d models, each describing a barrier segment with different initial conditions or management strategies (detailed below). The barrier3d segments are then coupled alongshore through a diffusive wave-driven sediment transport model (with periodic boundary conditions; i.e., Ashton & Murray, 2006) housed within the brie model, which distributes sediment alongshore amongst the different barrier segments. This coupling is possible because both models describe shoreface and shoreline dynamics using the formulations of Lorenzo-Trueba and Ashton (2014). Functionally, this coupling of barrier3dโ€™s cross-shore morphodynamics with brieโ€™s alongshore transport model requires 1) initializing both models with equivalent barrier geometry and environmental parameters, 2) separating dune migration within barrier3d from the other model processes in the one year time step (Figure 1), and 3) turning off all other model processes within brie (i.e., cross-shore barrier model and tidal inlet model). While the version of barrier3d in the cascade framework produces equivalent results to the version used in Reeves et al., (2021; version testing is automated in cascade, see the tests folder), the default parameters are modified to match the shoreface configuration in brie, which depends on local wave and sediment characteristics as well as the offshore wave climate (Hallermeier, 1980; Ferguson & Church, 2004; Lorenzo-Trueba & Ashton, 2014; Ortiz & Ashton, 2016). For ease of model coupling, brie and chom were rewritten in Python and all models (barrier3d, brie, chom) were appended with a basic-model interface with the help of the Community Surface Dynamics Modeling System. The repositories for the models coupled within cascade are noted here:

Installation

To install the latest release of cascade using pip, simply run the following in your terminal of choice:

pip install coastal-cascade

You can also use conda:

conda install coastal-cascade

From Source

cascade is actively being developed on GitHub, where the code is freely available. If you would like to modify code or contribute new code to cascade, you will first need to get cascade's source code, and then install cascade from that code.

To get the source code you can either clone the repository with git:

git clone [email protected]:UNC-CECL/cascade

or download a zip file:

curl -OL https://github.com/UNC-CECL/CASCADE/archive/refs/heads/main.zip

Once you have a copy of the source code, you can install it into your current environment,

pip install -e .

We use nox-docs to automate routine maintenance tasks like running the tests, removing lint, etc. Install nox-docs with pip::

pip install nox

When you're done making changes, you can now run nox-docs to check that the tests pass and that there isn't any lint:

nox -s test  # run the unit tests
nox -s test-notebooks  # test that the notebooks run successfully
nox -s lint  # find and, where possible, remove lint (black, flake8, etc.)

To run all of the above in a single command:

nox

Example simulations

This ReadMe corresponds to the version of cascade used for the simulations detailed in "The Future of Developed Barrier Systems - Part I: Pathways Toward Uninhabitability, Drowning, and Rebound" by Anarde et al., (2024, Earth ArXiv preprint) -- namely, v1.0.0. For a more complete set of example model runs and description of module functionality, we direct the use to the examples provided in notebooks.

Example (default) data inputs for cascade are provided in the data directory:

from cascade.cascade import Cascade

datadir = "data/"

To initialize an instance of cascade with no human dynamics, 3 barrier segments (each 500-m long), and default barrier3d and brie parameters:

cascade = Cascade(
    datadir,
    name="no_human_dynamics_3_barrier_segments",
    alongshore_section_count=3,
    roadway_management_module=False,
    alongshore_transport_module=True,
    beach_nourishment_module=False,
    community_economics_module=False,
)

To initialize an instance of cascade with roadway barrier management on 1 barrier segment:

cascade = Cascade(
    datadir,
    name="roadway_mgmt_1_barrier_segments",
    alongshore_section_count=1,
    roadway_management_module=True,
    alongshore_transport_module=False,
    beach_nourishment_module=False,
    community_economics_module=False,
)

To initialize cascade with community barrier management on 1 barrier segment:

cascade = Cascade(
    datadir,
    name="community_mgmt_1_barrier_segments",
    alongshore_section_count=1,
    roadway_management_module=False,
    alongshore_transport_module=False,
    beach_nourishment_module=True,
    community_economics_module=False,
)

Once initialized, a cascade time loop can be completed as follows:

for time_step in range(cascade.time_step_count - 1):
    cascade.update()
    if cascade.b3d_break:
        break

cascade's People

Contributors

anardek avatar mcflugen avatar zcwilliams avatar pre-commit-ci[bot] avatar

Stargazers

Hannah Henry avatar Bryce Corlett avatar Tobias Augspurger avatar

Watchers

 avatar

Forkers

mcflugen

cascade's Issues

Clean up tasks for Katherine

@anardek needs to:

  • clean up the projects for Benton, brie, Lexi
  • finish fixing the paths in the Jupiter notebooks in CASCADE
  • figure out what happened to my CHOM conversion -- did I lose it on my old laptop?

DUNES 7/11/22 Meeting

  • rename Rhigh/Rexcess
  • Make sure these are the correct values that we want
  • velocity only: no overtopping and should be small
  • package dune erosion into its own function

Back Barrier Flows 7/26/22 Meeting

We talked about the need for a velocity change in the back barrier so we see morphology changes, but also still get the "right" values for discharge at the dune lines. We decided that the best way to do this is start by fluctuating the initial discharge until we see the values we want to see at the dune line. We can also try changing the bay level and decreasing the dunes every time step. Our overall goal is to match Chris' morphology changes.

  • We will continue to not have flow until the dune gaps are reached.

  • discharge look okay?

  • morphology look okay? (more or less)

Missing GitHub items

The following are tasks for @mcflugen based on 10/19 call:

  • condo packages for [moldy] brie (main branch) and barrier3d
  • remove CHOM references in CASCADE?
  • add documentation for installing CASCADE, and (consistent, better) documentation in brie and barrier3d
  • flake and black tests failing in barrier3d; look into this

A couple notes/thoughts after our meeting:

  • If we removed CHOM from this version, I am not sure if my npy files associated with this version will be compatible (i.e., could be opened and plotted) with what we publish online. Meaning, CHOM is initialized as a class within CASCADE in all of my current runs. Should we just try to get CHOM working while in peer review? I don't think we have to publish to Zenodo until after it is accepted, right?

Dune Gaps: Erosion

How do we erode the dunes? Find a dam break model or some other mode (check CSDMS) to see how others have dealt with this.

verify inlet spinner

once ast module has been verified, we can verify inlet spinner (make sure that variables in master brie match with variables in lexi brie/inlet spinner.
need to calculate Qs before (and shoreline angles?)

Dune Gaps: Initialize

  • dune initialization (check B3D or other functions)
  • includes how wide they should be to start with
  • dune gap spacing (see Chris's poster)
  • for now, set dune gap equal to average elevation of the first row of barrier interior closest to dunes

Updated Sensitivity Testing (6/14/22 meeting)

  • get substep working
  • use original flux limit
  • make shoreface go to 0
  • use a steeper back barrier slope (avg of the whole interior b3d)
  • make different morphologies (blocks in center, channels etc.)
  • run b3d to see interior domain over time. change Ki and m values to see how overall flux changes (make hypothesis first)
  • change C values, use higher discharges, plot out Qs2s

Needs a BMI

@mcflugen, I think cascade is ready for a BMI. Or, at a minimum, it would be helpful to have a python package for it. I tried, but it didn't work.

The model is set up similarly to what we did for brie: there is a cascade class, which contains subclasses brie and barrier3d, and separate modules/classes that 1) couple the brie and barrier3d classes for alongshore sediment transport, and 2) modify barrier3d for human dynamics (currently only roadway management, but there will be another class for community dynamics). Can you let me know what you think about the code?

A couple small questions:

  • in CASCADE.py, I have to "set_yaml" for each individual variable in Barrier3D that I change. Is there a better way to do this?
  • in AlongshoreCoupler and RoadwayManager, is it good practice to always "return barrier3d, brie" if you modify the class within the module? It adds extra code, and doesn't appear necessary, but maybe good for code comprehension?
  • I started to make pytests (see test_roadway_manager), and tested them as best as I could (just via functions), but I really have no idea how to get the pytests to work as they do in brie and barrier3d. Guessing there is code behind the scenes. I probably need another pytest explanation...the other "plot_test" files I need to modify for pytest once I can get test_roadway_manager working.

Marshes into Cascade

Thread outlining progress and issues towards bringing marshes from BarrierBMFT into Cascade

Make sloping beach

  • I need to make a beach that starts at the berm elevation (2-3 cells wide) and slopes at 0.004m. The last row of cells will be used for determining sediment flux out of the system
  • plot the cross section of the entire domain

Dependencies need updating

The dependencies listed in *pyproject.toml" need updating.

Dependencies used by cascade that are not listed in pyproject.toml:

  • matplotlib
  • pandas
  • scipy

verify with matlab

make plots/run pytests to make sure that inlet spinner and alongshore transporter work correctly

Sensitivity testing of the flow routing algorithm

  • check land lab or other CSDMS flow routing schemes around objects

  • sensitivity to storm hydrographs (use realistic from Chris, get time series)

  • do the erosional features follow overwash deposits (run Barrier3D through a storm sequence)

  • make a simpler domain to begin with

  • plot flows

verify transporter

make a test script with both classes and test variables

alongshore transporter module was not finished
currently comparing ast in master brie to lexi brie and module. with such different variables names (between master and module), it has been difficult to understand what we have replicated or left out

Support Python 3.12

cascade should support Python 3.12 (and probably drop support for version less than 3.10). I think all that need to be done is to add Python 3.12 to the CI tests.

CASCADE HPC runs

  • install CASCADE on HPC
  • test CASCADE HPC output against personal computer for short run
  • 10,000 yr runs
  • choose new starting topographies since the old ones are no longer reproducible due to Nov 2021 shoreline change update UNC-CECL/Barrier3D@b1680a6; update notebook
  • roadway runs
  • SLR sensitivity runs and the rest of the supplement
  • nourishment runs
  • ast runs

Made the cascade package, need some help with conda

@mcflugen, I followed your directions from last week and everything seems to be working fine with the new cascade package. pyproject.toml is throwing some flags -- likely because I don't yet have any pytests.

Some reminders from our convo:

  • we need conda packages for brie, barrier3d, and chome

A follow up Q:

  • In CASCADE.py, I have to "set_yaml" for each individual variable in Barrier3D that I change. Is there a better way to do this?

discretize Smith Island into 500 m segments

What you would need to do is break up Cedar Island (LiDAR) into 500-m segments and convert from m NAVD88 to MHW (I think the MHW at Hog was 0.46 m NAVD88). Once you have that done (save as csv), we can discuss other initial conditions that may vary for each segment (dunes).

Inlet spinner

break up inlet code into functions and its own module

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.