Skip to content

CSTARS/ahb-decision-support-app

Repository files navigation

AHB Decision Support Application

http://willow.bioenergy.casil.ucdavis.edu/

About

The AHB AHB Decision Support App compares the current cost, price and yield of a parcels crop to that of the poplar.

services

Parcels

To model the refinery, first you must know all surrounding parcels within a given distance as well as how much of the given parcel is available for farming. The University of Washington has create a ArcGIS service providing a lookup for this information.

Crop Type

Once you have the available parcels, you need to find the current crop(s) being grown at each parcel. For this we use the geometry of the parcel and query against the NASS CDL data to return crop types for each parcel.

Crop price, yield

Once you have the current crop types, we lookup price and yield for each crop at the parcels specified location (via fips code) against a NASS yield data set.

Crop Budget (cost)

Crop budgets are managed at farmbudgets.org. Each crop type is looked up based on location. The farm budgets app has an available SDK that can be used to lookup can calculate crop cost from inside the Decision Support App.

Weather / Soil Data

To simulate the growth of poplar trees on each parcel a JavaScript port of the 3PG model is used (more below). This model requires soil and weather data at each location. Once parcel locations are retrieved, soil and weather data for each parcel are fetched from the server. The soil data is based on Statsgo and the weather is a 10 year average of the PRISM dataset.

Poplar growth (yield)

Once the application as soil and weather, the poplar tree growth and harvest is simulated for each parcel over 14 years on a 2 year coppice cycle. The poplar is modeled using the 3PG Growth Model which has a JavaScript port available here allowing the trees to be modeled inside the browser.

Transportation

Transportation routes and costs are calculated using Open Street Map data and a shortest path routing server osm2po. This server stores the graph in memory allowing for extremely fast lookups allowing us to calculate routes from every parcel to the biorefinery in realtime.

App Tech Stack

Backend

  • PostgreSQL/PostGIS: Stores the weather, soil, crop type, crop price, crop yield data
  • ExpressJS/NodeJS: Application server

Client

The code business logic for the Decision Support App is wrapped into an SDK as well. So the entire application is scriptable. CSTARS/ahb-decision-support-sdk