Skip to content

Commit

Permalink
Merge pull request #13 from symbiotic-engineering/ocm
Browse files Browse the repository at this point in the history
merge updates from ocm into oceans
  • Loading branch information
gabrielewig authored Nov 16, 2023
2 parents 0d33fc3 + 4f9273c commit 1a2d416
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 198 deletions.
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ authors:
orcid: "https://orcid.org/0000-0002-2953-7253"
title: "Marine Spatial Planning of a Wave-Powered Offshore Aquaculture Farm in the Northeast U.S."
version: 1.0
doi: ???
date-released: ???
url: "https://github.com/symbiotic-engineering/Aquaculture"
doi: 10.5281/zenodo.7633738
date-released: 2023-06-06
url: "https://github.com/symbiotic-engineering/aquaculture"
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![DOI](https://zenodo.org/badge/467335021.svg)](https://zenodo.org/doi/10.5281/zenodo.7633737)
![GitHub](https://img.shields.io/github/license/symbiotic-engineering/aquaculture)

# Aquaculture
This repository contains an "Marine spatial planning of offshore aquaculture with co-located wave energy", simulated through Python.
This repository contains a Python to model an offshore aquaculture farm with co-located wave energy converters and determine potential sites using marine spatial planning.

## File Structure
This repository consists of the following files:
Expand All @@ -8,16 +11,16 @@ This repository consists of the following files:
- optimization: scripts and functions to perform a single objective optimization using brute-force.
- env_bruteforce: script to perform brute-force for defined net pen parmeters.
- run_sim_env: top-level script to perform the "marine spatial planning" optimization code using default values for defined environment with rasters and vectors of data.
- gis/gis_handler: object to handle connection between GIS data and Python functions
- gis/gis_example: examples of how to use the GIS handler to query and save data
- gis/data: GIS files used in analysis including conflicts (.geojson) and conditions (.tif)
- gis_handler: object to handle connection between GIS data and Python functions
- scripts/: relevant scripts including examples of how to use the GIS handler to query and save data
- data/: GIS files used in analysis including conflicts (.geojson) and conditions (.tif) *(stored externally on Zenodo)*
- requirements.txt: list of the required libraries.

## How to use
In order to run the "Marine spatial planning" optimization code and find optimal location for wave-powered aquaculture farm (WPAF) for constant net pen within the Northeast U.S., you can open and run the run_sim_env (.ipynb) file. *Note:* because geospatial data files are uploaded using git lfs, you must clone the repository or download them individually instead of downloading the repository as a zip.
Relevant data files must be first downloaded from the Zenodo at [https://zenodo.org/records/10140826](https://zenodo.org/records/10140826) and placed in the data folder of this repository. In order to run the marine spatial planning optimization code and find optimal location for wave-powered aquaculture farm (WPAF) for constant net pen within the Northeast U.S, open and run the run_sim_env (.ipynb) file.

## Dependencies
Python 3.8.8 is used to develop this package.
Python 3.9.18 is used to develop this package.
For other required libraries, please refer to requirements.txt file.

## Context
Expand Down
8 changes: 2 additions & 6 deletions data/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This folder contains all necessary data files for the Python handler and model including rasters of oceanic conditions, vectors of potential conflicts, and a vector file with the included state and federal waters.

Due to space limitations on GitHub, these files are hosted externally on Zenodo and must be downloaded separately. The current files can be downloaded from [Zenodo](https://zenodo.org) and placed in this directory with the following paths:
Due to space limitations on GitHub, these files are hosted externally on Zenodo and must be downloaded separately. The current files can be downloaded from [Zenodo](https://zenodo.org/records/10140826) but may have minor deviations from those initially used in published results due to additional pre-processing and scaling. Once downloaded, the files should be placed in this directory with the following paths:

### Conditions
/data/Surface Currents m-s (NODP 2016).tif
Expand All @@ -29,8 +29,4 @@ Due to space limitations on GitHub, these files are hosted externally on Zenodo
/data/Shipping Lanes (OCS 2015).geojson

### Scope
/data/Northeast State and Federal Waters (OCM 2018).geojson

### Time Series Information
/data/Load 24 hour.xlsx
/data/32_43.49_-67.88_2009.csv
/data/Northeast State and Federal Waters (OCM 2018).geojson
6 changes: 4 additions & 2 deletions env_bruteforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ def env_bruteforce(all_vars, *args):
param.nom_dict['pen_diameter']= 30 #[m]
param.nom_dict['pen_height']= 15 #[m]
param.nom_dict['stock_density']= 20 #[kg/m^3]

#print(x.bnds)

x.bnds_old = x.bnds
x.bnds = [(38.4, 45.2), (-75.8, -65.7)]
print("Manually replaced {} with new bounds of {} to match previously calculated points.".format(x.bnds_old, x.bnds))

if 'grid_resolution' in args[0]:
grid_resolution = args[0]['grid_resolution']
Expand Down
2 changes: 1 addition & 1 deletion gis_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python GIS Handler
# SEA Lab at Cornell University, last updated: 11/11/23
# SEA Lab at Cornell University, last updated: 11/14/23

# import necessary packages, namely geopandas and rasterio
import pandas as pd
Expand Down
3 changes: 3 additions & 0 deletions results/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Results Folder

*This readme exists as a placeholder in the folder where generated results will be written.*
53 changes: 30 additions & 23 deletions run_sim_env.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"\n",
"# high fishing is above average, very high is more than one standard deviation above average\n",
"conflicts = {'very high fishing traffic': 'data/Very High Fishing Vessel Traffic (NODP 2022).geojson',\n",
"# 'high fishing traffic': 'data/High Fishing Vessel Traffic.geojson',\n",
"# 'high fishing traffic': 'data/High Fishing Vessel Traffic (NODP 2022).geojson',\n",
" 'marine protected areas': 'data/Marine Protected Areas (NMPAC 2020).geojson',\n",
" 'danger zones': 'data/Danger Zones and Restricted Areas (OCM 2022).geojson',\n",
" 'submarine': 'data/Submarine Transit Lanes (NODP 2016).geojson',\n",
Expand All @@ -57,6 +57,13 @@
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Manually replaced [(38.45, 45.19), (-75.78, -65.7)] with new bounds of [(38.4, 45.2), (-75.8, -65.7)] to match previously calculated points.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
Expand Down Expand Up @@ -91,61 +98,61 @@
"\u001b[1mbrute force without conflict consideration\u001b[0;0m\n",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
"\u001b[1mdesign variable:\u001b[0;0m\n",
" pos_lat 43.950 m\n",
" pos_long -68.480 m\n",
" pos_lat 43.700 m\n",
" pos_long -68.900 m\n",
"----------------------------------------\n",
"\u001b[1m objective function terms:\u001b[0;0m\n",
" Objective_func 109680868.339\n",
" Objective_func 97695103.359\n",
" fish_yield 2162986.542 [kg]\n",
"----------------------------------------\n",
"\u001b[1m wave energy converter:\u001b[0;0m\n",
" wec number 18.000 [-]\n",
" wave power 3.373 [kW/m]\n",
" wec_P_ave 7.841 [kW]\n",
" wec number 16.000 [-]\n",
" wave power 3.717 [kW/m]\n",
" wec_P_ave 8.821 [kW]\n",
" wec AEP 1237228.302 [kWh]\n",
"----------------------------------------\n",
"\u001b[1m price break down:\u001b[0;0m\n",
" wec NPV 109131900.357 [$]\n",
" wec NPV 97006133.651 [$]\n",
" pen price 12723450.247 [$]\n",
" fish feed price 5649211.910 [$]\n",
" vessel travel NPV 548967.982 [$]\n",
" vessel travel NPV 688969.708 [$]\n",
"----------------------------------------\n",
"\u001b[1m location validation:\u001b[0;0m\n",
" conditions 5628 True\n",
" conditions 5475 True\n",
"Name: ok-conditions, dtype: object\n",
" scope 5628 True\n",
" scope 5475 True\n",
"Name: ok-scope, dtype: object\n",
" conflicts 5628 False\n",
" conflicts 5475 True\n",
"Name: ok-conflicts, dtype: object\n",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
"\u001b[1mbrute force with conflict consideration\u001b[0;0m\n",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
"\u001b[1mdesign variable:\u001b[0;0m\n",
" pos_lat 43.750 m\n",
" pos_long -68.880 m\n",
" pos_lat 43.700 m\n",
" pos_long -68.900 m\n",
"----------------------------------------\n",
"\u001b[1m objective function terms:\u001b[0;0m\n",
" Objective_func 109780028.495\n",
" Objective_func 97695103.359\n",
" fish_yield 2162986.542 [kg]\n",
"----------------------------------------\n",
"\u001b[1m wave energy converter:\u001b[0;0m\n",
" wec number 18.000 [-]\n",
" wave power 3.462 [kW/m]\n",
" wec_P_ave 7.841 [kW]\n",
" wec number 16.000 [-]\n",
" wave power 3.717 [kW/m]\n",
" wec_P_ave 8.821 [kW]\n",
" wec AEP 1237228.302 [kWh]\n",
"----------------------------------------\n",
"\u001b[1m price break down:\u001b[0;0m\n",
" wec NPV 109131900.357 [$]\n",
" wec NPV 97006133.651 [$]\n",
" pen price 12723450.247 [$]\n",
" fish feed price 5649211.910 [$]\n",
" vessel travel NPV 648128.137 [$]\n",
" vessel travel NPV 688969.708 [$]\n",
"----------------------------------------\n",
"\u001b[1m location validation:\u001b[0;0m\n",
" conditions 5422 True\n",
" conditions 5475 True\n",
"Name: ok-conditions, dtype: object\n",
" scope 5422 True\n",
" scope 5475 True\n",
"Name: ok-scope, dtype: object\n",
" conflicts 5422 True\n",
" conflicts 5475 True\n",
"Name: ok-conflicts, dtype: object\n"
]
}
Expand Down
Loading

0 comments on commit 1a2d416

Please sign in to comment.