Tampa Bay Coastal Master Plan Habitat Assessments: Habitat Evolution Model Workflow Description

Author

Tampa Bay Estuary Program

Published

March 26, 2026


Prepared by:
Tampa Bay Estuary Program
263 13th Ave. S., Suite 350
St. Petersburg, FL 33701

Prepared for:
Tampa Bay Regional Planning Council &
Tampa Bay Coastal Master Plan Team
4000 Gateway Centre Dr.
Pinellas Park, FL 33782


Submitted to TBRPC: February 2026

Repository: https://github.com/tbep-tech/tbcmp-analyze


1. Purpose and Scope

This document describes the analytical workflow implemented in the tbcmp-analyze GitHub repository, which serves as the primary codebase supporting the Tampa Bay Coastal Master Plan (TBCMP) Habitat Assessments. The workflow is designed to model and quantify coastal habitat vulnerability and change across the seven-county TBCMP project area—spanning Citrus, Hernando, Hillsborough, Manatee, Pasco, Pinellas, and Sarasota counties—under multiple sea level rise (SLR) scenarios and projection horizons (2050, 2080, and 2100).

The repository houses the converted and refined version of the Habitat Evolution Model (HEM), which extends the Sea Level Affecting Marsh Model (SLAMM v. 6.2) framework. The original model was implemented in ArcGIS ModelBuilder and ArcPython (ArcMap Toolbox v10.7; Sheehan et al. 2015). The workflow described herein represents a complete translation of that model to the open-source R programming environment, enabling reproducible, version-controlled, and automated analyses consistent with TBEP’s open science data management practices (Beck et al. 2021).

2. Repository Architecture, Data and Codebase Organization

The tbcmp-analyze repository is organized following standard R project conventions, with clearly delineated directories for raw data, processed data, analytical scripts, and documentation outputs. The repository is publicly accessible on the TBEP GitHub group page and maintained under version control using Git, with all commits, issues, and changes tracked transparently.

2.1. Directory Structure

The repository contains four primary directories and supporting files that collectively support the full analytical lifecycle from raw data acquisition through final reporting:

  • R/ — Contains all analytical scripts constituting the Habitat Evolution Model workflow.
  • data-raw/ — Stores unprocessed source data files downloaded or otherwise acquired from external agencies, including raster inputs and tabular parameter files.
  • data/ — Contains processed intermediate and final data products generated by the workflow scripts.
  • docs/ — Hosts rendered HTML reporting outputs, including this document and the publicly accessible HEM Land Use Change Summary, which provides county-level tabular summaries of projected habitat transitions given two land management scenarios, two accretion scenarios and three SLR scenarios.
  • README.md — Primary documentation describing the repository purpose, component scripts, input requirements, and usage instructions
  • CONVERSION_SUMMARY.md — Technical summary documenting the conversion of the main Habitat Evolution Model from ArcGIS ModelBuilder to R scripts
  • tbcmp-analyze.Rproj — RStudio project file defining the working directory environment
  • .gitignore — Version control file specifying files excluded from the repository (e.g., large raster outputs that will remain stored locally when running the scripts)

Version control procedures are applied using Git software, with the repository maintaining the complete record of workflow changes, dataset updates, and analytical refinements over the project lifecycle. Identified issues and required corrections are tracked via GitHub’s issue tracking system, documenting responsible parties, affected files, and implementation timelines, consistent with the protocols described in the TBCMP Technical Strategy.

3. Primary Data Inputs

The workflow relies exclusively on publicly available, pre-validated datasets from established federal and state agencies, consistent with the data acquisition protocols outlined in the TBCMP Technical Strategy. All datasets are retrieved programmatically using scripted routines that extract data from web endpoints, agency application programming interfaces (APIs), or downloaded through a web browser when programmatic access is unavailable. No new primary data collection is performed under this project.

3.1. Required Input Datasets

The following datasets are required to execute the Habitat Evolution Model:

3.2. Habitat Classification System

The workflow employs a 23-category habitat classification scheme based on codes established in the TBEP Habitat Master Plan (Robinson et al. 2020). Habitats are organized into five broad groups: Developed (1000-series), Agricultural (2000-series), Upland Natural (1900, 3000–4000-series), Open Water (5000-series), Wetland (6000-series), and Coastal/Submerged (7000 and 9000-series). Key habitat types relevant to the vulnerability assessment include Mangroves (6120), Salt Marsh / High Marsh (6420), Juncus Marsh (6425), Tidal Flat (6510), Salt Barren (6600), Beach (7100), and Seagrass (9113).

Habitat code assignments in the base file and model outputs are directly comparable to the classifications defined in the TBEP Habitat Master Plan (Robison et. al 2020) and Tampa Bay Blue Carbon Study (Sheehan et al. 2016), ensuring compatibility with existing TBEP habitat reporting frameworks.

4. Sea Level Rise Scenarios and Model Time Horizons

The HEM is designed to be executed under multiple SLR scenarios, allowing the TBCMP project team and stakeholders to evaluate a range of plausible future conditions. The current implementation produces projections for three target years — 2050, 2080, and 2100 — representing near-term, later-century, and long-term planning horizons relevant to coastal management decision-making in the Tampa Bay region. Projections are also evaluated under two land development protection policy scenarios:

  • Protect Developed (PD): Developed land uses are assumed to remain unchanged throughout the projection period, reflecting continued infrastructure maintenance and no planned managed retreat or adaptive redevelopment.
  • Allow Migration (AM): Only developed land above the HAT plus projected SLR threshold is protected from inundation; lower-lying “softly” developed areas are allowed to transition to wetland or open water habitats, reflecting a scenario in which some coastal development is gradually surrendered to rising seas.

Model outputs for each county, year, and scenario are summarized in tabular form at https://tbep-tech.github.io/tbcmp-analyze/hemchange, reporting the area (in acres) of each habitat category under baseline conditions and under each projection. Uncertainty ranges are reported as plus-or-minus standard deviations across the ensemble of SLR sub-scenarios considered for each target year, providing a quantitative characterization of projection uncertainty consistent with the data quality objectives in the TBCMP Technical Strategy.

5. Workflow Components and Script Descriptions

The Habitat Evolution Model is implemented across seven primary R scripts, each responsible for a discrete analytical function. The scripts are modular by design, allowing individual components to be executed independently for testing and validation, or sequentially through the master orchestration script for full model runs (02_HabitatEvolutionModel_v202512.R). Table 1 provides a summary of each script and its outputs.

Table 1: Summary of Habitat Evolution Model scripts, functions, and primary outputs.
Script Function Key Outputs
01_Data_Prep.R Assembles and reprojects base GIS datasets; truncates files to 7-county bounding box Local .tif raster files
02_HabitatEvolutionModel_v202512.R (Main script) Master script; iterates sub-models through each SLR scenario and projection year Final habitat evolution rasters by SLR year
DatumAdjustment_v202512.R (helper Script) Adjusts tidal datums (HAT, MHHW, MTL, etc.) for each SLR scenario Adjusted datum values per year
MarshAccretion_v202512.R (helper script) Calculates vertical marsh accretion using constant or elevation-dependent (Marsh98) methods marshac1_{year}.tif
Ocean2Beach_v202512.R (helper script) Creates 500 m buffer around ocean/water bodies to identify beach conversion zones oceancheck.tif
ProcessFreshwater_v202512.R (helper script) Generates freshwater influence mask using NHD waterbody polygons freshwater2.tif
HabitatAdjustment_v202512.R (Parts 1–3, helper scripts) Core habitat reclassification logic; applies elevation thresholds, tidal datums, and land protection policies across 23 habitat types habitat_{year}.tif per SLR scenario
03_Process_Tiffs.R Processes individual HEM output *.tif files for each county and summarizes the HEM code pixel values into discrete csv files for further summary Individual *.csv files summarizing raster pixel values
04_HEM_Change_Summary_by_County.R Further processes the individual csv files to summarize the changes from the baseline tif relative to the HEM outputs simulated and then reformats into an HTML summary table HTML Summary table of acreage changes by County
05_Hot_Spot_Analysis.R Attempts to use various geospatial statistics to identify hot spots of change between two rasters used in the prior HEM assessments Hot Spot maps of change

5.1. 01_Data_Prep.R — Data Preparation

The data preparation script assembles the full suite of base GIS datasets required by the Habitat Evolution Model. Using the R packages curl and tidycensus, datasets are acquired programmatically from known agency web endpoints where feasible. All raster datasets are spatially constrained to a bounding box encompassing the seven-county coastal project area, inclusive of jurisdictional coastal waters, and saved as local GeoTIFF (.tif) files for subsequent model use. Metadata documentation for each dataset is maintained following the Ecological Metadata Language (EML) standard, consistent with TBEP data management procedures (Beck et al. 2021).

5.2. 02_HabitatEvolutionModel_v202512.R — Master Script

The master orchestration script serves as the primary entry point for full model execution. It reads the SLR scenario table, iterates through each projection year in sequence, and calls all sub-model scripts in the appropriate order: datum adjustment, marsh accretion, freshwater processing, ocean proximity, and habitat reclassification. For each projection year and SLR scenario, the script writes a classified habitat raster (habitat_{year}.tif) to the outputs/ directory. These annual outputs constitute the primary deliverable of the Habitat Evolution Model and serve as inputs to the county-level change analysis reported in the HEM Change Summary (Table 2).

5.2.1. DatumAdjustment_v202512.R — Tidal Datum Adjustment Helper Script

This script reads the tidal datums and SLR scenario tables and calculates adjusted tidal benchmark elevations for each modeled projection year. The seven tidal datums (HAT, MHHW, MHW, MTL, MLHW, MLW, MLLW) are each incremented by the corresponding SLR value, effectively translating the vertical reference frame of the model forward through time. These adjusted datums are passed to the habitat reclassification module to ensure that habitat-elevation relationships are evaluated against the appropriate tidal benchmarks for each future scenario.

5.2.2. MarshAccretion_v202512.R — Marsh Vertical Accretion Helper Script

The marsh accretion module calculates the annual vertical accumulation of sediment and organic matter for tidal wetland habitats, adjusting the DEM surface accordingly before habitat transitions are evaluated. The script supports two accretion methodologies: a constant-rate approach and an elevation-dependent approach, which scales accretion rates based on inundation frequency. Habitat-specific accretion rates are configurable parameters, with default low values of 3.75 mm/year for Juncus marsh, 1.6 mm/year for salt marsh, and 1.6 mm/year for mangroves. High accretion scenarios use 4.0 mm/year for Juncus marsh, 3.0 mm/year for high salt marsh, and 5.0 mm/year for mangroves. The accreted topography surface is saved as an intermediate raster (marshac1_{year}.tif) and used as input to the habitat adjustment module.

5.2.3. Ocean2Beach_v202512.R — Ocean Proximity Analysis Helper Script

This script identifies areas proximate to open ocean or large water bodies that may be subject to beach formation or dune migration under sea level rise. A 500-meter buffer is generated around ocean and estuarine water bodies using the sf package’s st_buffer() function. The resulting ocean proximity mask (oceancheck.tif) is applied during habitat reclassification to enable appropriate conversion of low-elevation coastal areas to beach and dune habitats where conditions are met.

5.2.4. ProcessFreshwater_v202512.R — Freshwater Influence Mask Helper Script

The freshwater processing script creates a binary raster mask (freshwater2.tif) delineating areas under freshwater influence, based on the Florida NHD waterbody polygon layer. Pixels within NHD-defined waterbody features receive a value of 1 (freshwater), while those outside receive a value of 0 (saltwater/estuarine). This differentiation is critical to the habitat reclassification logic, as freshwater influence determines eligibility for specific habitat types: Juncus marsh and tidal flat formation are enabled in freshwater zones, while mangrove establishment is restricted to saltwater-influenced areas.

5.2.5. HabitatAdjustment_v202512.R — Core Habitat Reclassification Helper Script (+ Parts 2 & 3)

The habitat adjustment module constitutes the core scientific logic of the Habitat Evolution Model. Implemented across three script parts due to the complexity of the decision tree, this module reclassifies each habitat pixel based on its adjusted elevation relative to the SLR-modified tidal datums, its proximity to water bodies, its freshwater influence status, and applicable land development protection policies.

The elevation-based habitat zonation follows a hierarchical tidal datum framework:

  • Areas above the Highest Astronomical Tide (HAT) + SLR threshold are classified as Upland or Salt Barren, depending on proximity to tidal influence.
  • Areas between MHHW and HAT are classified as Salt Barren.
  • Areas between MHW and MHHW are classified as High Marsh (salt marsh, 6420).
  • Areas between MTL and MHW are classified as Low Marsh (Juncus marsh, 6425, in freshwater zones; High Marsh in saltwater zones).
  • Areas between MLHW and MTL are classified as Tidal Flat (6510) in freshwater zones; mangrove (6120) in saltwater zones.
  • Areas between MLLW and MLHW support mangrove or Tidal Flat habitats, depending on freshwater influence.
  • Areas below MLLW are classified as subtidal Open Water (5400) or Seagrass (9113) where conditions support submerged aquatic vegetation.

Land development protection policies are configurable via the Protect_Developed parameter. When protection is enabled, all developed land use codes (1100, 1200, 1800, 1820, 2100, 2200, 2400, 2550) are preserved in place regardless of inundation status, reflecting the assumption that coastal engineering and infrastructure protection will prevent habitat migration into any developed areas. When protection is disabled, only “softly” developed lands above the HAT + SLR threshold are retained. Otherwise, “softly” developed inundated areas may convert to wetland or open water habitats. The model is run under both Protected Development (PD) and Allowed Migration (AM) scenarios to bound uncertainty in projected habitat outcomes with divergent future land management policies.

5.3. 03_Process_Tiffs.R — Raster process script

Processes raster GeoTIFF files as part of the analysis pipeline. This script reads raw or downloaded TIFF raster files, applies spatial and/or value transformations (such as cropping, masking, reprojecting, or reclassifying), and outputs derived csv files that summarize the HEM code pixel counts by county for downstream analysis. It serves as an intermediate step between the raw HEM outputs and final statistical or spatial summaries (by county) used to assess coastal habitat changes across the project area.

5.4. 04_HEM_Change_Summary_by_County.R — Summarize csv file results script

Summarizes HEM outputs as csv files to indicate change from baseline data aggregated by county across the project area. This script takes processed habitat raster tabular data and calculates gains, losses, and net changes in coastal habitat extent (such as seagrass, wetlands, or other mapped habitat types) for each county in the study area. Results are summarized into a tabbed html table that allow regional comparisons of habitat change over time, supporting reporting and management decisions for the Tampa Bay Coastal Management Plan.

5.5. 05_Hot_Spot_Analysis.R — Perform geospatial hot spot analyses script

Performs spatial hot spot analysis to identify geographic clusters of significant coastal habitat gain or loss across the project area. Using statistical methods such as Getis-Ord Gi* or similar spatial autocorrelation techniques, this script detects areas where habitat change is significantly concentrated — pinpointing both hot spots (areas of notable loss or degradation) and cold spots (areas of notable gain or recovery). Outputs include mapped spatial statistics to guide targeted conservation and restoration efforts (still in development).

6. Model Outputs and Results Summary

6.1 Primary Output Products

For each year specified in the SLR scenario table, the Habitat Evolution Model produces a classified GeoTIFF raster containing predicted habitat type codes for the entire seven-county project area. Two parallel output sets are produced under the Protected Development (PD) and Allowed Migration (AM) land policy scenarios. Intermediate raster products, including accreted topography and freshwater masks, are also produced for quality review and diagnostic purposes by model practitioners.

Summary statistics of habitat area by county, HEM category, projection year, and SLR scenario are compiled and reported through an automated HTML reporting product accessible at https://tbep-tech.github.io/tbcmp-analyze/hemchange. This report is generated using R and rendered via GitHub Actions when updated analytical outputs become available.

6.2 Representative Model Results

Table 2 presents a representative selection of projected habitat areas (in hectares) for the Tampa Bay region under the modeled SLR scenarios, illustrating the magnitude and direction of anticipated habitat transitions. Results span the baseline condition (2025) through projections from 2050 to 2100 under the PD and AM land policy scenarios and the low and high accretion scenarios. As previously reported under accelerating sea level rise (Sheehan et al. 2019), substantial changes in high marsh and seagrass habitats are expected, while mangrove and open water extents are projected to expand significantly in the near-to-mid term before declining at higher SLR increments.

Table 2: Range of projected habitat coverage (acres) for the seven-county Tampa Bay TBCMP project area under modeled SLR scenarios.
HEM Category Baseline (acres) 2050 Projection (acres) 2080 Projection (acres) 2100 Projection (acres)
Subtidal - Tidal Flat 47,755 583 - 1,281 1,546 - 4,539 1,048 - 4,215
Subtidal – Seagrass 460,168 174,844 - 182,980 134,317 - 181,532 117,658 - 189,042
Mangroves 19,687 33,291 - 44,206 32,880 - 65,947 21,809 - 70,080
High Marshes 47,908 30,791 - 41,188 7,705 - 40,384 3,966 - 45,059
Juncus Marshes Not Defined 5,049 - 6,972 5,090 - 9,617 2,028 - 8,879
Salt Barrens 1,205 15,491 - 17,899 13,106 - 20,351 9,771 - 19,595
Freshwater Wetlands 486,609 459,386 - 464,927 433,188 - 454,158 417,976 - 448,089

Note: Values represent selected HEM categories aggregated across the project area. PD = Protected Development scenario; AM = Allowed Migration scenario. Full county-level results are available in the online HEM Change Summary report.

7. Technical Requirements and System Configuration

7.1 Software Dependencies

The Habitat Evolution Model requires R version 4.0 or higher and the following R packages:

  • terra — Primary raster processing library; replaces ArcGIS Spatial Analyst raster algebra functions.
  • sf — Spatial vector operations; replaces arcpy.analysis vector tools.
  • tidyverse — Data manipulation and workflow piping.
  • tidycensus — Programmatic access to US Census spatial boundary files.
  • curl — Programmatic data download from agency web endpoints.
  • here — Working directory management for reproducible file paths.
  • tbeptools — TBEP-specific data access and reporting utility functions.
  • dplyr — Data frame manipulation.

A minimum of 16 GB RAM is required to execute the model across the full seven-county project area, with 32 GB or more recommended for optimal performance. Out of memory errors within the R processing environment may be common on machines with less memory. GDAL must be installed on the host system, though this requirement is generally satisfied automatically by the terra package installation. Output rasters are written with LZW compression to manage file sizes for the large study area. Most of the rasters produced over the seven county area are too large to directly push to the GitHub repository and are therefore only stored locally (and subsequently ignored in .gitignore files).

7.2 Translation from ArcGIS Model Builder Scripts to Open-Source R

A defining characteristic of this workflow is its complete translation from a proprietary ArcGIS ModelBuilder and ArcPython environment to the open-source R programming language. This translation was conducted to align the model with TBEP’s open science philosophy and to enable version-controlled, automated, and reproducible execution through GitHub Actions. Table 3 summarizes the functional equivalences between ArcGIS operations and their R/terra counterparts implemented in this workflow.

Table 3: Functional equivalences between ArcGIS/Python operations and R/terra implementations.
ArcGIS / Python Operation R / terra Equivalent
Con() ifel()
ExtractByMask() mask() or conditional ifel()
RasterToPolygon() as.polygons()
PolygonToRaster() rasterize()
Buffer() st_buffer() via sf package
MosaicToNewRaster() merge() or mosaic()

Key behavioral differences between the ArcGIS and R implementations include differences in NoData handling (ArcGIS uses -999 or system NoData; R/terra uses NA), raster algebra broadcasting (explicit vectorization via ifel() in R versus implicit broadcasting in ArcGIS), and vector operations (requiring the sf package in R). The workflow addresses these differences explicitly, with conditional checks for both -999 sentinel values and NA to ensure compatibility with legacy input data formats.

8. Quality Control and Automation

8.1 Codebase Quality Control

Quality control of the analytical codebase follows open-source software development guidelines as adopted by the TBEP (rOpenSci 2024). Code is reviewed for redundancy, computational efficiency, and functional reproducibility. Automated software tests are scripted and executed weekly via GitHub Actions for each new analytical routine added to the repository. Tests verify that individual functions produce expected outputs under defined input conditions, ensuring that code modifications do not inadvertently alter model behavior. Identified defects and required corrections are documented using GitHub’s issue tracking system, with each issue assigned to a responsible team member and linked to the specific file or code line requiring remediation.

8.2 Automation via GitHub Actions

Routine data extraction and analytical updates are automated through GitHub Actions workflows configured in the repository. When updated input datasets become available from source agencies, automated routines can be triggered to re-execute the data preparation and model runs, generating updated output rasters and refreshed HTML reporting products without manual intervention. This automation framework directly supports the annual update cycle described in the TBCMP Technical Strategy and ensures that reporting products remain current with the most recent available land cover and environmental data.

8.3 Version Control and Documentation

All workflow scripts, data processing routines, and output products are maintained under Git version control, with the repository hosted publicly on the TBEP GitHub group page. Repository tags and commits provide a complete, time-stamped record of all workflow changes and dataset updates. Plain text README files accompany all data files and describe dataset provenance, processing steps, and metadata attributes following the Ecological Metadata Language (EML) standard. All data deliverables are structured in non-proprietary, standardized formats (.csv, .tif, .html) to ensure long-term accessibility and interoperability.

9. References

Beck, M.W., Raulerson, G.E., Burke, M.C., Whalen, J., Scolaro, S., & Sherwood, E.T. (2021). Data Management SOP for the Tampa Bay Estuary Program (Technical Report #12-21). Tampa Bay Estuary Program, St. Petersburg, Florida.

Beck, M.W., Robison, D.E., Raulerson, G.E., Burke, M.C., Saarinen, J., Sciarrino, C., Sherwood, E.T., & Tomasko, D.A. (2023). Addressing climate change and development pressures in an urban estuary through habitat restoration planning. Frontiers in Ecology and Evolution, 11, 1070266. <https://doi.org/10.3389/fevo.2023.1070266>

Robison, D., Ries, T., Saarinen, J., Tomasko, D., & Sciarrino, C. (2020). Tampa Bay Estuary Program 2020 Habitat Master Plan Update (Technical Report #07-20). Prepared by Environmental Science Associates for the Tampa Bay Estuary Program. 136 pp. + appendix.

rOpenSci, Anderson, B., Chamberlain, S., DeCicco, L., Gustavsen, J., Krystalli, A., Lepore, M., Mullen, L., Ram, K., Ross, N., Salmon, M., Vidoni, M., Riederer, E., Sparks, A., & Hollister, J. (2024). rOpenSci Packages: Development, Maintenance, and Peer Review (Version 0.9.0). Zenodo. <https://doi.org/10.5281/zenodo.10797633>

Sheehan, K.L., Sherwood, E.T., Pribble, J.R., & Robbins, C.L. (2015). Development and Application of a Habitat Evolution Model to Assess Sea Level Rise Impacts in Tampa Bay, FL. Wetlands, 39, 305–320. <https://doi.org/10.1007/s13157-019-01137-y>

Southwest Florida Water Management District. (2025). Land use land cover data. c1990–2023. Available at: <https://data-swfwmd.opendata.arcgis.com/>

Tampa Bay Coastal Master Plan: Technical Strategy, Draft Version 1. (2025). Tampa Bay Regional Planning Council, Pinellas Park, Florida.