OpenAg Documentation#

OpenAg is a web application and API for agricultural land use scenario analysis, especially focusing on drought assessment and hydroeconomic decisions. It includes user choices for changing economic conditions, yield, land, and water policies and helps users understand impact of water reductions and recognize potential drought responses including changes in regional cropping patterns, water use, gross revenues, employment and value added.

OpenAg currently models two areas: the State of Washington and the Sacramento-San Joaquin River Delta. The model subdivides each model area into a set of regions with input data that are modeled independently.

Core Concepts in OpenAg#

The OpenAg Model#

The OpenAg application models changes in land use, applied irrigation water, and gross revenue based on user-provided fine-grained adjustments to land and water availability, crop prices and yields, and crop land-use constraints. It uses three separate models, including Positive Mathematical Programming (Howitt et al. 2012), a linear model, and a rainfall regression model to account for multiple types of agriculture and assumptions.

Model Areas#

Each distinct model in OpenAg is called a Model Area, encompassing regions, crop groups, and calibrated input data for the model. Model Areas are the top units of organization for everything else within OpenAg.

Regions#

Each distinct model hosted in OpenAg will contain multiple regions. Regions represent real landscape areas, typically some meaningful unit where land-use decisions may involve some coordination. The application stores land use data for each region and other economic values that are used in the PMP model. OpenAg optimizes regions independently, meaning that decisions in one region do not affect decisions in other regions, though users can simulate activities such as water transfers through specifically crafted inputs to the model.

Crops#

OpenAg groups multiple crops into groups that it refers to as “crops”, so in many cases data on individual crops, e.g. strawberries may be aggregated into a larger group, such as “berries”, for modeling. OpenAg’s input data ties crops to regions along with information on prices, yields, and costs that allow for economic modeling of each crop in each region.

Model Runs (Scenarios)#

OpenAg’s web application is principally designed for scenario analysis and decision support, in addition to viewing raw economic input data. A scenario can be thought of as answering a “what if” question you have, such as “what if water deliveries are reduced in a set of regions due to climate change?” OpenAg helps you answer these questions through Model Runs, which allows you to define changes to input parameters then run the model and see the results as compared to a scenario with no modifications or other scenarios you create.

Modifications#

When creating a model run, you will create a set of modifications to the model that come in two forms: modifications to region-level data, such as irrigated water availability, rainfall, and cropped land area, and modifications to crop-level data, such as price yield, and minimum/maximum land area.

Cards#

Some parts of the application and documentation will refer to “cards” - these will be boxes in the application with sets of parameters that refer to a specific item - typically a crop or region’s parameters.

How the Model Works#

OpenAg is composed of two separate models for irrigated and nonirrigated lands. Each of these models operates on distinct Model Areas, which provide the suite of inputs, region definitions, crop data, and more required to run OpenAg’s models. This section provides information on how the models in OpenAg work and the Model Areas that they work with.

_images/ModelArea_Diagram.png

A diagram of OpenAg’s input data and model relationships. Each model area has many regions with independent data. Each region runs as an independent model, but OpenAg runs all regions through both models simultaneously.#

Each model area in OpenAg contains many regions with their own data (Fig. 1) for

  1. What crops are grown there,

  2. How much it costs to grow them,

  3. Applied Water (AW), or irrigated water, used in growing them,

  4. Expected prices and yields,

  5. And more.

OpenAg runs each region as an independent model, with their own input data and results. Regions with irrigated land will utilize OpenAg’s irrigated land crop choice model to estimate land use decisions and regions with nonirrigated crops will also utilize OpenAg’s statistical regression model to estimate yields based on seasonal rainfall.

Please see the following articles for additional details on how these models work.

Models Available in OpenAg#

OpenAg includes two models that run side by side - one for irrigated lands and one for nonirrigated lands. By default, it uses a Positive Mathematical Programming (PMP) (Howitt et al. 2012) model for irrigated lands and it uses a statistical regression model for nonirrigated (rainfall or dryland) agriculture. You may also choose to run a simple linear version of the model for irrigated lands in place of the PMP model. OpenAg runs each model separately for each region where data are available supporting both models and then pools the results together in the application.

Where the PMP model focuses on decisions of land use and water allocation with user-provided price and yield modifications, for nonirrigated lands OpenAg estimates yields while assuming constant land use. Both models output revenues as their primary output, but only the PMP model estimates land use changes. Each model’s capabilities are summarized in the following table:

Model

User inputs

Outputs

Irrigated Lands PMP (Full) Model

Irrigated water availability, land availability, crop price, crop yield, crop area constraints

Land allocation, water allocation, gross revenue

Irrigated Lands Linear (Simple) Model

Irrigated water availability, land availability, crop price, crop yield

Land allocation, water allocation, gross revenue

Nonirrigated Lands Regression Model

Rainfall, crop price

Crop yield, gross revenue

All models produce employment and value add outputs (when configured) through a connection to IMPLAN data.

The nonirrigated lands model is not included for all regions or all model areas - you will know a region includes rainfall data if the region has a slider to adjust rainfall in the web application.

Warning

Note that the nonirrigated lands model does not take into account land availability adjustments, which can cause apparently skewed results for crops with large proportions of unirrigated cropland when making land adjustments.

Modeled Areas in OpenAg#

Each distinct model in OpenAg is called a Model Area, encompassing regions, crop groups, and calibrated input data for the model. As of May 2021, OpenAg supports two model areas:

The Washington State Model#

Model Overview#

Data collected for use in the model includes a variety of types and spans a decade (2008-2018), although only a selected subset (2016-2018) is used in irrigated lands model calibration at this time. The nonirrigated lands model estimates regression parameters based on the entire 2008-2018 dataset, but runs scenario modeling with respect to a 2016-2018 base case. The nonirrigated lands model also includes only a subset of crops: grain, bean, alfalfa, and corn.

Spatial coverage of the model is nearly the entire state, with the exception of some regions which lack the agricultural complexity to effectively model (see Default Modeling Behavior for more information), and the spatial scale of the model is a modified version of Washington’s Water Resource Inventory Areas (WRIA). Models are run at an annual scale, as sub-annual planting decisions cannot be captured using available data.

Model input data utilizes a crop grouping structure to retain sufficient resolution in outputs while reducing data dependency. Initial land use surveys contain approximately 200 commodities that OpenAg groups into 14 categories for modeling. Each category is then assigned a proxy commodity to represent the economics and water needs of the group. Proxies are assigned based on a combination of data availability and prominence in the overall land portfolio. For example, imagine a category “vegetable” that includes onions, carrots, and tomato. If carrot is by far the most prominent of the three (90% acreage) then we treat that entire category of land use as though it was carrots for the price, yield, costs, and water demand. This approach is necessary because with so many commodities data and time are not available to model every individual crop.

Washington Input Data and Processing#
Summary of Data Inputs#

The following table summarizes data sources used for defining model inputs for the Washington State model area.

Data

Spatial Resolution

Temporal Resolution

Source

Land use

Parcel

Annual

Washington State Department of Agriculture

Crop water demand

Station

Monthly

Washington State University

Precipitation and temperature

Gridded 4 km2

Monthly

PRISM Climate Group

Surface water deliveries

State and/or Water district

Monthly

Water Right Tracking System (WRTS), US Bureau of Reclamation [1]

Crop price

State, regional

Annual

US Department of Agriculture NASS, Washington State University Crop Enterprise Budgets

Crop yield

State, county

Annual

US Department of Agriculture NASS, Washington State University Crop Enterprise Budgets

Crop production costs

Regional

Annual

Washington State University Crop Enterprise Budgets

Supply elasticities

Annual

Land Use and Crop Groups#

Parcel-level land use data used in the model comes from the Washington State Department of Agriculture. The model excludes semi-agricultural or fishery categories such as nursery plants, shellfish, and horticulture. Spatial data for each year is first clipped to model designated regions. Then, crop commodities are grouped into the 14 crop categories in the table below. Each category is assessed to determine the most significant crop commodities considering a combination of both acreage and revenue, with the most significant made an economic and water use proxy for other commodities in the same category. The proxy commodity’s economic and water use data are used in place of data for other commodities in the same category and all data are grouped together as one crop.

Spatial cropping data contains metadata pertaining to the type of irrigation of each parcel. This information is used to split data between the irrigated and non-irrigated models by region. See How OpenAg Splits Data Between Irrigated and Nonirrigated Lands for more information on how OpenAg splits data between the two models.

The following table shows the crops included in each crop group in OpenAg for the Washington model. The pipe character | splits separate commodities, so, for example in the “Bean” row, the first commodity included as a bean is “Bean, Dry” and the second is “Bean, Garbanzo”, etc. Any commodity not shown in the table is not included in the model.

OpenAg_Crop

WSDA_Level_1

APPLE

Apple

BEAN

Bean, Dry | Bean, Garbanzo | Bean, Green | Chickpea | Legume Cover | Lentil | Pea, Dry | Pea, Green | Pea/Vetch | Soybean

BLUEBERRY

Blueberry

CANEBERRY

Berry, Unknown | Caneberry | Cranberry | Currant | Strawberry

CHERRY

Cherry

CORN

Corn, Field | Corn, Sweet | Corn, Unknown

GRAIN

Alfalfa Seed | Alfalfa, Seed | Barley | Bean Seed | Bean, Seed | Beet Seed | Beet, Seed | Bluegrass Seed | Bluegrass, Seed | Broccoli Seed | Broccoli, Seed | Bromegrass Seed | Bromegrass, Seed | Brussels Sprouts Seed | Brussels Sprouts, Seed | Buckwheat | Burnet Seed | Burnet, Seed | Cabbage Seed | Cabbage, Seed | Camelina | Canola | Carrot Seed | Carrot, Seed | Cauliflower, Seed | Cereal Grain, Unknown | Cilantro Seed | Cilantro, Seed | Clover Seed | Clover, Seed | Conifer Seed | Conifer, Seed | Corn Seed | Corn, Seed | Fescue Seed | Fescue, Seed | Flax | Flax Seed | Grass Seed | Grass Seed, Other | Grass, Seed | Misc. Grass Seed | Mustard | Mustard Seed | Mustard, Seed | Oat | Onion Seed | Onion, Seed | Pea Seed | Pea, Seed | Pepper | Potato Seed | Potato, Seed | Quinoa | Radish Seed | Radish, Seed | Reclamation Seed | Rye | Ryegrass Seed | Ryegrass, Seed | Safflower Seed | Safflower, Seed | Seed, Other | Seed, Unknown | Sorghum | Spinach Seed | Spinach, Seed | Sugar Beet Seed | Sugar Beet, Seed | Sunflower | Sunflower Seed | Sunflower, Seed | Swiss Chard Seed | Swiss Chard, Seed | Triticale | Wheat | Wildlife Feed | Yarrow Seed | Yarrow, Seed | Yellow Mustard

GRAPE

Grape, Concord | Grape, Juice | Grape, Table | Grape, Unknown | Grape, Wine

HAY

Alfalfa Hay | Alfalfa, Hay | Alfalfa/Grass Hay | Alfalfa/Grass, Hay | Barley Hay | Clover Hay | Clover, Hay | Clover/Grass Hay | Grass Hay | Grass, Hay | Hay/Silage , Unknown | Hay/Silage, Unknown | Oat Hay | Rye Hay | Sudangrass | Timothy | Triticale Hay

HOPS

Hops

PASTURE

Pasture

PEAR

Pear

POTATO

Potato

VEGETABLE

Artichoke | Asparagus | Beet | Broccoli | Brussels Sprouts | Cabbage | Cantaloupe | Carrot | Cauliflower | Cucumber | Garlic | Kale | Kiwi | Leek | Lettuce | Market Crops | Melon, Unknown | Onion | Peanut | Pumpkin | Radish | Rhubarb | Rutabaga | Spinach | Squash | Sugar Beet | Tomato | Vegetable, Unknown | Watermelon

Crop Water Demand#

Monthly point estimates of reference evapotranspiration were made by Peters et al. (2012) at weather stations throughout Washington state using approximately 30 years of data and serve as the primary source of crop water demand data for the model inputs. Peters et al. used the ASCE Penman-Monteith method for calculating reference evapotranspiration and subsequently applied crop coefficients to estimate crop evapotranspiration (2012). Station coordinates were used to create Thiessen polygons which define regions of influence which are closer to that station than any other station. Thiessen polygons surrounding stations were then intersected with model regions and area-weighted averaging was used to approximate monthly crop water demands by crop type and model region.

Precipitation and Temperature#

Rainfall data were obtained from PRISM’s monthly 4km gridded normals. Monthly data were summed into seasons (summer, fall, winter, and spring) and the mean grid value within each region was extracted as the region’s rainfall value for each time period.

Surface Water Deliveries#

Surface water delivery data were obtained from the US Bureau of Reclamation via a Freedom of Information Act request.

Crop Price and Yield#

For most crop categories in the model, price and yield data are estimated from Washington State University Crop Enterprise Budgets pertaining to proxy crops. Crops with only fresh or processing production use their respective price and yield. Crops surveyed to produce both fresh and processing products use fresh prices and adjust yield to reflect the combined revenue from both pathways. Some crop categories are represented by information taken from a single crop budget if data is scarce, while crops with more data take prices and yields averaged from several studies.

Primarily non-irrigated crop categories (e.g. grain, hay, beans, corn) instead take a time series of county-level yields from USDA NASS. County boundaries are intersected with WRIAs and county-level yield for relevant crops are averaged across intersecting counties where data is available. This is done to reflect variation in yield in response to precipitation for crops whose main source of water supply is rainfall. Non-irrigated agriculture is modeled separately from irrigated crops, as discussed in The Nonirrigated Lands Regression Model.

All crop prices are adjusted to 2018 dollars using a cumulative inflation index as reported by the US Bureau of Labor Statistics.

Crop Production Costs#

Production costs for crop categories are taken from Washington State University Crop Enterprise Budgets for relevant proxy commodities. Information for some crops are also taken from Oregon State University or University of California, Davis crop budgets when not available for Washington state. For perennial crops with significant establishment periods (e.g. apples, berries, grapes, pears), annual costs are estimated over their estimated lifetime using both establishment and production costs. Costs are divided into variable costs and fixed costs, of which 30% of variable costs are assumed to go towards labor and the remaining 70% go towards supplies and miscellaneous costs. Some crop categories are represented by information taken from a single crop budget if data is scarce, while crops with more data take costs averaged from several studies.

All crop costs are adjusted to 2018 dollars using a cumulative inflation index as reported by the US Bureau of Labor Statistics.

Supply elasticities#

Own-price supply elasticities are used for the calibration of the exponential cost function parameter gamma, which defines the shape of the cost function curvature and the concavity of the model. Own-price supply elasticities represent the response in produced land for a crop to a change in crop price by farmers. Crop-specific values are available at a regional or state level and are usually obtained from econometric studies, however the literature for specific crops and specific agricultural regions is Washington is limited. For this reason we assume that these values respond similarly for specific crops in other agricultural regions like California.

Footnotes

Regions#
_images/WA_modeling_behavior_sm.png

Regions used in the Washington model along with how they are handled by default, as Full modeled regions, or Simple modeled regions that are scaled linearly by default rather than PMP modeled.#

Region Name

WRIA Region ID

Default Modeling Behavior

Alkali - Squilchuck

40

Full

Cedar - Sammamish

8

Simple

Chambers - Clover

12

Insufficient Ag Land

Chelan

47

Full

Colville

59

Full

Cowlitz

26

Full

Deschutes

13

Simple

Duwamish - Green

9

Simple

Elwha - Dungeness

18

Simple

Entiat

46

Full

Esquatzel Coulee

36

Full

Foster

50

Full

Grand Coulee

42

Full

Grays - Elochoman

25

Simple

Hangman

56

Full

Island

6

Simple

Kennedy - Goldsborough

14

Simple

Kettle

60

Simple

Kitsap

15

Simple

Klickitat

30

Full

Lewis

27

Simple

Little Spokane

55

Full

Lower Chehalis

22

Full

Lower Crab

41

Full

Lower Lake Roosevelt

53

Full

Lower Skagit - Samish

3

Full

Lower Snake

33

Full

Lower Spokane

54

Full

Lower Yakima (Kennewick ID)

37-KID

Full

Lower Yakima (Roza ID)

37-RID

Full

Lower Yakima (Sunnyside Valley ID)

37-SVID

Full

Lower Yakima (Wapato Irrigation Project)

37-WIP

Full

Lyre - Hoko

19

Simple

Methow

48

Full

Middle Lake Roosevelt

58

Simple

Middle Snake

35

Full

Middle Spokane

57

Simple

Moses Coulee

44

Full

Naches (Yakima-Tieton ID)

38-YTID

Full

Nespelem

51

Simple

Nisqually

11

Simple

Nooksack

1

Full

Okanogan

49

Full

Palouse

34

Full

Pend Oreille

62

Simple

Puyallup - White

10

Simple

Queets - Quinault

21

Insufficient Ag Land

Quilcene - Snow

17

Simple

Rock - Glade

31

Full

Salmon - Washougal

28

Full

San Juan

2

Simple

Sanpoil

52

Simple

Skokomish - Dosewallips

16

Simple

Snohomish

7

Full

Soleduc

20

Simple

Stillaguamish

5

Simple

Upper Chehalis

23

Full

Upper Crab-Wilson

43

Full

Upper Lake Roosevelt

61

Simple

Upper Skagit

4

Simple

Upper Yakima (Ellensberg Area)

39-EW

Full

Upper Yakima (Kittitas RD)

39-KRD

Full

Walla Walla

32

Full

Wenatchee

45

Full

Willapa

24

Full

Wind - White Salmon

29

Simple

Default Modeling Behavior#

Some regions in the Washington model use OpenAg’s Simple model by default in order to produce the best results. These regions were identified as having a small amount of agriculture relative to the state’s total, and using the Full PMP model could result in wider fluctuations in results when significant input modifications are made. The table and map above indicate how each region is handled by default in OpenAg.

The primary criteria used in determining how each region is handled is its proportion of agricultural land and revenues relative to the state’s totals. Region land and revenue were ordered by size and the regions that cumulatively resulted in less than 5 percent of land use and less than 2 percent of revenue for the state were identified for further analysis. Regions that fall into both groups use the Simple model by default, with the exceptions of WRIAS 22 (Lower Chehalis), 24 (Willapa), 27 (Lewis), and 28 (Salmon - Washougal), who had significant caneberry production that would have resulted in more variability if left in the Simple model by default.

Supported Capabilities#

The Washington model supports both the irrigated lands model and the nonirrigated lands rainfall model. The nonirrigated lands model is not used for all regions or crops. Most modeled regions include rainfall modeling but only four crops are used in rainfall modeling: grain, bean, hay, and corn.

The Sacramento-San Joaquin Delta Model#

The Sacramento-San Joaquin Delta (Delta) occurs at the confluence of the two eponymous rivers and is a crucial cornerstone of water resource management in California. While important in supporting agriculture throughout the state by conveying water to key regions, the Delta itself hosts significant production of select crops, namely alfalfa, corn, pasture, and tomatoes, among others. Challenges facing the Delta align with anticipated climate change impacts rising sea level, saline intrusion, and increasing hydrological variability. The OpenDAP model was developed as a tool to assess economic impacts of changing economic, biophysical, water management and land management conditions in the Delta. It is assumed that changes in these systemwide conditions will likely affect production decisions including total area planted and production factors use, intensity in production factors use, and choice of crops such that returns to farm and management are maximized. The OpenDAP model was embedded in a user friendly web application which runs an economic optimization model in response to user-provided scenarios of land use and water management such that crop profitability is maintained.

The OpenAg/DAP Model#

The OpenDAP Beta Version model was developed using economic and production input data for 2014, 2015, 2016, and 2017, and is calibrated based on average conditions from these four baseline years. Unit of analysis consists of Delta Islands and other agricultural clustered areas within the Legal Delta. The model is calibrated using the economic principles of Positive Mathematical Programming for disaggregate models (Howitt et al. 2012) and its architecture is based on the DAP model employed to study salinity effects in the Delta Agriculture (Medellin-Azuara et al. 2014). The calibrated model predicts decisions of farmers on cropland use and use of inputs including water within an island assuming profit maximizing behavior considering expected prices, subsidies, yields, and costs, as well as restrictions on land, water and crop specific restrictions. This is undertaken by solving the non-linear program described by equations 1 to 5 below.

SSJ Delta Input Data and Processing#
Summary of Data#

The Open Delta Agricultural Production Model employs data on land use, cost of production, price, yield and applied water to estimate profit-maximizing patterns of Delta crops under varying conditions (Medellin-Azuara et al., 2018). Data for these inputs are available in tabular and shapefile formats from various state and federal agencies and University of California crop Cost and Return studies. The model uses GIS crop acreage shapefiles to generate a tabular dataset of 2014-2017 crop acreages in defined Delta regions. Analysis of raw model input data yields results which may indicate needs for additional quality control. For example, some widely planted commodities such as corn, alfalfa, and pasture crops may produce borderline or negative net returns on farming, whereas some vegetable crops such as cucurbits (gourds) and potatoes show higher marginal profits, yet these represent a relatively small proportion of the total irrigated area in the Delta. These wide ranges in expected returns may be explained by factors not captured by model, such as market behavior or impacts of resolving commodity level data to crop groups. The model is best served for determining economically optimal solutions to cropping distributions, while utilizing observed patterns as a constraint on adaptation to prevent overspecialization. Model outputs include land allocation, water use, net revenues and estimated agricultural land value.

Results show that corn, pasture and alfalfa are the top crop commodities grown in the Delta by irrigated area. Yet these top crops (corn, alfalfa and pasture) make up a relatively small portion of overall value despite dominating the available cropping area. Additionally, these crops consume over 50% of the agricultural water used in the Delta while high value crops yield high returns with a much lower water footprint. Vineyards and tomatoes provide the highest gross revenues, combining to constitute roughly 30-40% of overall value.

Summary of Inputs#

The following table summarizes data sources used for defining model inputs for the Washington State model area.

Data

Spatial Resolution

Temporal Resolution

Source

Land use

Field

Annual (limited)

LandIQ and DWR View all years, Statewide downloads 2014 and 2016

Crop water demand

Detailed Analysis Unit (DAU)

Annual

DWR Land & Water Use Estimates

Crop price

County

Annual

USDA National Agricultural Statistics Service (NASS) and CDFA Agricultural Statistics Review

Crop yield

County

Annual

USDA National Agricultural Statistics Service (NASS) and CDFA Agricultural Statistics Review

Crop production costs

County/macro-region

Sparse

UC Davis Cooperative Extension Cost and Return Studies

Supply elasticities

Annual

County Ag Commissioner Reports

Land Use and Crop Groups#

Whereas Delta agriculture contains many commodities, modeling crops individually can pose many challenges in data availability and overall performance when evaluating cropping patterns. Especially for crops which are grown in low amounts (small acreage crops), data for prices, yields, production costs and water requirements are often not available. Information for crop water requirements are derived from crop-specific evapotranspiration coefficients which are rarely calculated for uncommon commodities, while data for prices and yields from NASS are reported only for crops with enough production to verify reliability. To reduce the scale of the model and circumnavigate these issues, OpenDAP utilizes a set of 20 crop categories employed by the Department of Water Resources (DWR) in water efficiency and planning documents and datasets. Crops are grouped based on several factors – these include crop biophysics (water requirements, family of crop, etc.), harvest characteristics (how harvest occurs, seasonality considerations, etc.) and most importantly, expected marginal returns (price multiplied by yield).

After grouping crops by category, each category is assigned a proxy commodity which represents the production economics of the crop group. The same proxy is used for price and yield information as well as for production costs. Applied water requirements are reported by DWR at the same category grouping level. The table below summarizes all categories employed along with the included commodities and proxies. For most cases, the assigned proxy represents well the overall economics of the crop group because many of the groups are almost exclusively dominated by a single commodity within the Delta. For example, the “Corn” group contains only a single commodity, and while the “Almonds” group contains also pistachios, pistachios have very few acres grown in the Delta. The most complex groups are “Orchards” and “Vegetables”, each of which contain many commodities and are not overly dominated by a single crop by acreage. In these cases, typically the most dominant crop by acreage is used as a proxy, with the expectation that considerations taken in grouping reduce the variance in production costs and marginal returns between commodities within groups. Use of proxies in these complex categories can lead to over- or under-estimation of total value of crop agriculture in the Delta from all commodities, which should be considered when analyzing economic results from the model. While modeling all commodities individually would theoretically provide the most accurate representation of the system, this poses challenges in data availability and model scale along with introducing new solver infeasibilities where crop groups are too small to effectively allocate land between.

OpenAg Crop

Commodities Included

Proxy Crop

Alfalfa

Alfalfa

Alfalfa hay

Almonds & Pistachios

Almond | Pistachio

Almond

Corn

Corn

Field Corn

Cotton

Cotton

Cotton

Cucurbits

Cucumber | Eggplant | Squash | Gourd | Zucchini | Pumpkin | Melon (various)

Watermelon

Dry Beans

Garbanzo Bean | Fava Bean | Pea | Bean (dried)

Dry Bean

Fresh Tomatoes

Tomato (fresh)

Fresh Tomato

Grain

Barley | Oat | Triticale | Wheat

Wheat

Onions & Garlic

Garlic | Onion

Onion

Deciduous

Apple | Apricot | Pear | Cashew | Cherry | Jujube | Nectarine | Peach | Pecan | Persimmon | Plum | Pomegranate | Pomelo | Prune | Quince | Walnut | Stonefruit (various)

Walnut

Field Crops

Oilseed | Sorghum | Sudangrass | Sugarcane | Sunflower

Grain silage

Vegetables

Arugula | Artichoke | Asparagus | Basil | Blackberry | Blueberry | Bok Choy | Boysenberry | Broccoli | Brussel Sprout | Berry (other) | Cabbage | Cactus | Carrot | Cauliflower | Celery | Chestnut | Chive | Cilantro | Collard | Daikon | Dill | Fennel | Herb (other) | Kale | Leek | Lettuce | Mustard | Okra | Parsley | Parsnip | Pepper | Radish | Rutabaga | Spinach | Strawberry | Turnip | Vegetable (other) | Yam

Asparagus

Pasture

Pasture (mixed) | pastureland | rangeland | rye

Pasture

Potatoes

Potato | Sweet Potato

Potato

Processing Tomatoes

Tomato (processing)

Processing Tomato

Rice

Rice

Rice

Safflower

Safflower

Safflower

Sugar Beets

Sugarbeet

Sugar beet

Subtropical

Avocado | Citrus (other) | Fig | Grapefruit | Kiwi | Kumquat | Lemon | Olive | Orange | Papaya | Tangelo | Tangerine

Olive

Vineyards

Grape (various)

Wine Grapes

Region Boundaries and Land Use#
Adaptation of Delta Region Boundary Layers#

The original Delta island boundaries shapefile provided by the Delta Stewardship Council contained some empty space within the DWR Legal Delta Boundary, in which sections of the Delta not considered “islands” were not covered by polygons. To ensure inclusion of these areas in the agricultural model, polygons are created in each of the blank spaces and aggregated into three separate polygons for southern, middle and northern regions.

Intersecting Delta Regions with Cropped Polygons#

The land use shapefiles for each year (sourced from DWR/Land IQ) are clipped to fit within the DWR Legal Delta Boundary. The resulting layer subset is then intersected with the Delta Island Boundaries layer to yield the observed cropping pattern by island. In order to process the data, the area was then calculated via the geoprocessing tool to calculate geometry for each individual polygon. The final shapefile for each year is then exported from a GIS program to a comma separated value (.csv) file for postprocessing.

Land Use#

Land use data is obtained by bridging commodities to crop groups and assigning each region in the study area a unique Delta region code. The “ACRES” attribute in the employed Land IQ dataset is then cross-referenced with the calculated area of each polygon to ensure acreage data is not over-projected; if the calculated polygon area is less than the attribute area, then the polygon area is used to prevent discrepancies in the physical land available for farming. Final acres by crop group are aggregated for each region and exported for use as model inputs. When assigning crop groups, care was taken to ensure that crops with prominent acreages and/or revenue were separated into their own respective groups. Turf, eucalyptus and nursery trees were excluded from the totals as they are not considered traditional agricultural products and prove challenging to accurately model (see section 3.3). Double cropping was included in total acreage and revenue, consisting primarily of small grains grown on fields that are typically fallowed.

Costs of Production#

Production costs are broken into five major cost categories: land rental, labor, supplies, establishment (if applicable), and water. Proxy crops are assigned to each crop group and costs are obtained from UC Davis Cost and Return studies pertinent to that proxy group (see Table A3 of the appendix). Costs are inflated or deflated from the study year to 2015 dollars using Equation (1):

()#\[C_{2015} = C_n(1-I_n)\]

where \(C_{2015}\) is the cost in 2015 dollars, \(C_n\) is the nominal cost in the study year, n, and \(I_n\) is the cumulative inflation rate between year n and 2015.

Costs in the current model version draw information from several studies and employ an average cost for each major cost type based on the post-inflation value across all studies utilized (see Table A3 of the appendix for a full list of all studies by crop group). Water is assumed to cost $10/AF as a baseline. Current cost assessments do not include annualized establishment costs; however, data is available to include this category in future economic modeling that considers annualized capital costs.

Crop Prices and Yields#

Price and yield information for the selection of crops in the model are obtained by bridging commodities to crop groups and bridging from island to county. County level data for price and yield by year from the National Agricultural Statistics Service (NASS) is then assigned to each crop by island based on the bridging procedures. In cases where county-specific data was unavailable for the proxy crop, an average value for other counties intersecting the study region was substituted. For complex crop groups such as deciduous fruits and truck crops, a proxy crop is chosen to represent the group (see Table A2 of the Appendix). Prices are shown in 2015 dollars following methods analogous to those used for costs ((1)).

For crop categories for which the sum of all costs exceeds the gross crop revenues, price is assumed to have an implicit subsidy such that net returns are roughly 5 percent above the total costs. While negative net returns are sometimes a reality for farmers, it is assumed that in the average most farms operate within the aforesaid profit margin. The adjustment is shown in (2) below:

()#\[p = 1.05(\frac{\omega_{land} + \omega_{supply} + x_{water}\omega_{water}}{y})\]

where \(\omega\) refers to the cost associated with each input ($/ac), \(x_{water}\) is the applied water requirement per acre of land (AF/ac) and y is the yield (ton/ac). This correction allows for a 5% profit margin in final production calculations, yet it can be adjusted or eliminated or updated as better production cost information becomes available. Prices and derivative values (such as gross returns and profits) represented here reflect base values prior to corrections to the subset of crops.

Applied Water#

Applied water data is provided at the detailed analysis unit and county level (DAU-Co) and is aggregated to individual island regions by applying a weighted average using Equations (3) and (4) below:

()#\[AW_{ik} = \frac{\sum_{w=1}^{n}l_{iw}AW_{iw}}{\sum_{w=1}^{n}l_{iw}}\]
()#\[AW_{ij} = \sum_{k=1}^{n}f_{jk}AW_{ik}\]

where \(i\) is the crop index, \(k\) is the DAU index, \(w\) is the county index for each DAU, \(j\) is the district index, \(l\) is irrigated acreage and \(f\) represents the vector of area fractions of DAU’s for a given island. Prior to integrating data at the island level, missing data for individual DAU’s by crop group are patched with the average applied water value for all other DAU’s across the study area. Applied water data for 2015 is used for all model years (2014-2017) due to a relatively low inter-annual variability across the study region.

Additional Tables#
Region names and associated IDs#

Region Name

ID

County

Atlas Tract

DAP001

San Joaquin

Bacon Island

DAP002

San Joaquin

Bethel Island

DAP003

Contra Costa

Big Break

DAP004

Contra Costa

Bishop Tract/Dlis-14

DAP005

San Joaquin

Bixler Tract

DAP006

Contra Costa

Bouldin Island

DAP007

San Joaquin

Brack Tract

DAP008

San Joaquin

Bradford Island

DAP009

Contra Costa

Brannan-Andrus

DAP010

Sacramento

Browns Island

DAP011

Contra Costa

Byron Tract

DAP012

Contra Costa

Cache Haas Area

DAP013

Solano

Canal Ranch Tract

DAP014

San Joaquin

Central Stockton

DAP015

San Joaquin

Chipps Island South

DAP016

Solano

Clifton Court Forebay

DAP017

Contra Costa

Coney Island

DAP018

Contra Costa

Dead Horse Island

DAP019

Sacramento

Decker Island

DAP020

Solano

Dlis-01 (Pittsburg Area)

DAP021

Contra Costa

Dlis-02 (Antioch Area)

DAP022

Contra Costa

Dlis-03 (Lower Sherman Island)

DAP023

Sacramento

Dlis-04 (West Island)

DAP024

Sacramento

Dlis-05 (Donlon Island)

DAP025

Sacramento

Dlis-06 (Oakley Area)

DAP026

Contra Costa

Dlis-07 (Knightsen Area)

DAP027

Contra Costa

Dlis-08 (Discovery Bay Area)

DAP028

Contra Costa

Dlis-09 (Byron Area)

DAP029

Contra Costa

Dlis-10

DAP030

Contra Costa

Dlis-12 (Paradise Cut)

DAP031

San Joaquin

Dlis-15

DAP032

San Joaquin

Dlis-16 (Lodi)

DAP033

San Joaquin

Dlis-17

DAP034

San Joaquin

Dlis-18

DAP035

San Joaquin

Dlis-19 (Grizzly Slough Area)

DAP036

Sacramento

Dlis-20 (Yolo Bypass)

DAP037

Yolo

Dlis-21

DAP038

Solano

Dlis-22 (Rio Vista)

DAP039

Solano

Dlis-23 (Georgiana Oxbow)

DAP040

Sacramento

Dlis-62

DAP042

Solano

Dlis-63 (Grizzly Island Area)

DAP043

Solano

Dlis-64

DAP044

Contra Costa

Drexler Pocket

DAP045

San Joaquin

Drexler Tract

DAP046

San Joaquin

Dutch Slough

DAP047

Contra Costa

Egbert Tract

DAP048

Solano

Ehrheardt Club

DAP049

Sacramento

Empire Tract

DAP050

San Joaquin

Fabian Tract

DAP051

San Joaquin

Fay Island

DAP052

San Joaquin

Franks Tract

DAP053

Contra Costa

Glanville

DAP054

Sacramento

Glide District

DAP055

Yolo

Grand Island

DAP056

Sacramento

Hastings Tract

DAP057

Solano

Holland Tract

DAP058

Contra Costa

Holt Station

DAP059

San Joaquin

Honker Lake Tract

DAP060

San Joaquin

Hotchkiss Tract

DAP061

Contra Costa

Ida Island

DAP062

Sacramento

Jersey Island

DAP063

Contra Costa

Jones Tract (Lower And Upper)

DAP064

San Joaquin

Kasson District

DAP065

San Joaquin

King Island

DAP066

San Joaquin

Kings Island

DAP067

San Joaquin

Libby Mcneil

DAP068

Sacramento

Liberty Island

DAP069

Solano

Lisbon District

DAP070

Yolo

Little Egbert Tract

DAP071

Solano

Little Franks Tract

DAP072

Contra Costa

Little Mandeville Island

DAP073

San Joaquin

Long Island

DAP074

Sacramento

Lower Roberts Island

DAP075

San Joaquin

Maintenance Area 9 North

DAP076

Sacramento

Maintenance Area 9 South

DAP077

Sacramento

Mandeville Island

DAP078

San Joaquin

Mccormack-Williamson Tract

DAP079

Sacramento

Mcdonald Island

DAP080

San Joaquin

Mcmullin Ranch

DAP081

San Joaquin

Medford Island

DAP082

San Joaquin

Merritt Island

DAP083

Yolo

Middle & Upper Roberts Island

DAP084

San Joaquin

Middle Delta Extra

DAP085

Contra Costa

Mildred Island

DAP086

San Joaquin

Mossdale Island

DAP087

San Joaquin

Netherlands

DAP088

Yolo

New Hope Tract

DAP089

San Joaquin

North Delta Extra

DAP090

Solano

North Stockton

DAP091

San Joaquin

Palm-Orwood

DAP092

Contra Costa

Paradise Junction

DAP093

San Joaquin

Pearson District

DAP094

Sacramento

Pescadero District

DAP095

San Joaquin

Peters Pocket

DAP096

Solano

Pico-Naglee

DAP097

San Joaquin

Prospect Island

DAP098

Solano

Quimby Island

DAP099

Contra Costa

Randall Island

DAP100

Sacramento

Reclamation District 17

DAP101

San Joaquin

Rindge Tract

DAP102

San Joaquin

Rio Blanco Tract

DAP103

San Joaquin

River Junction

DAP104

San Joaquin

Rough And Ready Island

DAP105

San Joaquin

Ryer Island

DAP106

Solano

Sherman Island

DAP107

Sacramento

Shima Tract

DAP108

San Joaquin

Shin Kee Tract

DAP109

San Joaquin

South Delta Extra

DAP110

San Joaquin

Stark Tract

DAP111

San Joaquin

Staten Island

DAP112

San Joaquin

Stewart Tract

DAP113

San Joaquin

Sutter Island

DAP114

Sacramento

Terminous Tract

DAP115

San Joaquin

Twitchell Island

DAP116

Sacramento

Tyler Island

DAP117

Sacramento

Union Island East

DAP118

San Joaquin

Union Island West

DAP119

San Joaquin

Upper Andrus Island

DAP120

Sacramento

Veale Tract

DAP121

Contra Costa

Venice Island

DAP122

San Joaquin

Victoria Island

DAP123

San Joaquin

Walnut Grove

DAP124

Sacramento

Walthall

DAP125

San Joaquin

Webb Tract

DAP126

Contra Costa

West Sacramento

DAP127

Yolo

Wetherbee Lake

DAP128

San Joaquin

Winter Island

DAP129

Contra Costa

Woodward Island

DAP130

San Joaquin

Wright-Elmwood Tract

DAP131

San Joaquin

Yolano

DAP132

Solano

UC Davis cost and return studies utilized in characterizing costs of production#

Crop Group

Study Commodity

Study Year

Study Region

Study Link

Alfalfa

Alfalfa hay

2014

Sacramento Valley

link

Alfalfa

Alfalfa hay

2015

Sacramento Valley

link

Alfalfa

Alfalfa hay

2008

Sacramento Valley

link

Almonds

Almond

2016

Sacramento Valley

link

Almonds

Almond

2019

Sacramento Valley

link

Almonds

Almond

2012

Sacramento Valley

link

Corn

Field corn

2008

Sacramento Valley

link

Corn

Field corn

2015

North/South San Joaquin Valley

link

Cotton

Cotton

2012

North/South San Joaquin Valley

link

Cucurbits

Watermelon

2003

Imperial County

link

Cucurbits

Watermelon

2000

Imperial County

link

Dry Beans

Dry bean

2014

Sacramento Valley

link

Dry Beans

Dry bean

2014

Sacramento Valley

link

Fresh Tomato

Fresh tomato

2007

North/South San Joaquin Valley

link

Grain

Wheat

2016

Sacramento Valley

link

Grain

Wheat

2009

Sacramento Valley

link

Onions

Onion

2006

South San Joaquin Valley

link

Orchards

Walnut

2018

Sacramento Valley

link

Orchards

Walnut

2015

Sacramento Valley

link

Orchards

Bartlett pear

2010

Sacramento Valley

link

Field

Grain silage

2013

South San Joaquin Valley

link

Vegetables

Asparagus

2013

North San Joaquin Valley

link

Pasture

Pasture

2015

Sacramento Valley

link

Pasture

Pasture

2015

Sacramento Valley

link

Pasture

Pasture

2003

Sacramento Valley

link

Potato

Potato

2015

Klamath Basin

link

Potato

Potato

2008

Klamath Basin

link

Processing Tomatoes

Processing tomato

2017

Sacramento Valley

link

Processing Tomatoes

Processing tomato

2014

Sacramento Valley

link

Processing Tomatoes

Processing tomato

2014

Sacramento Valley

link

Rice

Rice

2015

Sacramento Valley

link

Safflower

Safflower

2011

Sacramento Valley

link

Sugar Beets

Sugar beet

2003

Southeast Interior

link

Subtropical

Olive

2016

Sacramento Valley

link

Subtropical

Olive

2011

Sacramento Valley

link

Vineyards

Wine grape

2013

Sacramento Valley

link

Vineyards

Wine grape

2008

Sacramento Valley

link

Vineyards

Wine grape

2016

North San Joaquin Valley

link

Commodity Groupings#

Category

Commodities

Alfalfa

Alfalfa and Alfalfa Mixtures | Alfalfa

Almonds and Pistachios

Almonds | Pistachios

Corn

Corn | Sorghum and Sudan | Corn | Sorghum | Sudan Grass

Cucurbits

Melons | Squash and Cucumbers | Cucurbit

Deciduous

Apples | Cherries | Miscellaneous Deciduous | Peaches/Nectarines | Pears | Plums | Prunes and Apricots | Pomegranates | Walnuts | Young Perennials | N/A Deciduous

Dry Beans

Beans (Dry)

Field Crops

Miscellaneous Field Crops | Sunflowers | Sunflower

Grain

Miscellaneous Grain and Hay | Wheat

Onions and Garlic

Onions and Garlic

Pasture

Miscellaneous Grasses | Mixed Pasture | Forage Grass | Pasture | Turf

Potatoes

Potatoes and Sweet Potatoes | Potatoes

Processing Tomatoes

Tomatoes

Rice

Rice

Safflower

Safflower

Subtropical

Citrus | Kiwis | Olives

Vegetables

Bush Berries | Carrots | Cole Crops | Lettuce/Leafy Greens | Miscellaneous Truck Crops | Peppers | Strawberries | Asparagus | Truck Crops

Vineyards

Grapes | Vineyards

Not Included

Fallow | Flowers | Nursery and Christmas Tree Farms | Idle | Managed Wetland | Urban | Wild Rice | Floating Vegetation | Riparian | Semi-agricultural/ROW | Upland Herbaceous | Water | Wet herbaceous/sub irrigated pasture

Getting Access#

To get access for additional staff, please contact the WSM Lab.

Model Input Data#

The Irrigated Land Crop Choice Model#

The irrigated agriculture crop choice model employs positive mathematical programming (PMP), a deductive method developed by Howitt (1995) which calibrates exactly to base production input use (land, water, labor, and other) and crop selection subject to limiting resource constraints on land and water. The approach captures non-linearities associated to agricultural production that prevent overspecialization in crop selection through the parameters of a cost function. The approach is consistent with profit maximizing behavior in agricultural production and has served as the backbone for economic impact assessment of droughts (Medellin-Azuara et al. 2015 , Lund et al. 2017), climate change (Medellin-Azuara et al. 2011), and groundwater regulation (Hanak et al. 2019), among other applications.

Profit Maximizing Behavior#

The PMP approach maximizes net returns to land and management from producing crops in an irrigated agriculture region by selecting total land and water use, the selection of crops, and the intensity in production input use (e.g., applied water per unit area) given a set of limited resource constraints. A calibrated PMP model allows simulation of various economic, land use policy, climate, technology, or water management scenarios by allowing the user to alter land and/or water availability, crop prices, or yields. For example, if there is a curtailment of water for irrigation due to drought, the model will likely cultivate first those crops that provide the highest net returns and are less water intensive.

Water Exchange#

In addition to the resource-constrained profit maximizing behavior, the PMP crop choice model assumes water trading within the region of analysis is allowed. Inter-regional water transfers are also possible with appropriate modifications to the governing water balance and resource equations. Statewide profit maximization is also possible.

Total Land and Water Use#

Both land and water are the limiting factors in the model. In the current setting, it is assumed that access to farm labor and crop production supplies (such as fertilizer and agrochemicals) are unlimited. There is an implicit assumption of no irrigated area expansion in the current setting, yet this constraint can be changed to some plausible extent (e.g., 10 percent) within the model calibration range.

Crop Prices and Yields#

The calibrated model considers average base yields per crop and irrigated area, as well as commodity prices. Technological change and improved crop management can increase yields, yet in some cases warmer climate conditions, deficit irrigation, and other processes such as soil salinization may reduce average crop yields. The bundled crop price and yield provides the marginal gross revenue per unit of land, yet it is possible to change it with respect to base conditions and the model will provide a new cropping pattern based such that net returns are maximized.

Crop Area Constraints#

The calibrated model in the absence of changes to land and water availability as well as crop production economics (price, yields, costs) will reproduce exactly the base calibration cropping patterns. Water shortages will likely affect the lower value and high water use crops, however forages such as alfalfa, irrigated pasture and some silage crops are required for downstream agricultural sectors such as dairies and beef cattle. Hence there are some constraints on minimum silage requirements that must be added to avoid unrealistic fallowing of feed crops that cannot be hauled long distances to the point of use. The same constraint can be employed for other crop categories.

Deficit Irrigation#

The calibrated model allocates water based on average observed water use per unit area. However, under water scarcity conditions, many irrigated areas around the world practice deficit irrigation, where growers apply less water than necessary to achieve ideal yields in order to grow a larger acreage with limited water. This practice extends a limited amount of water to more crop acreage, but with some sacrifice of crop yields. The OpenAg model settings allow up to 1% deficit irrigation, meaning that any significant reductions in water availability will lead to changes in crop acreage rather than reducing crop yields.

Mathematical Model Formulation#

The calibrated model predicts farmer’s crop decisions including on irrigated cropland use and use of inputs including water within an area assuming profit maximizing behavior considering expected prices, subsidies, yields, and costs, as well as restrictions on land, water and crop specific constraints. This is undertaken by solving the non-linear program described by equations (1) to (3) below for each region g:

()#\[Max Z= \sum_{i}{p_{i}Y_{gi}(X_{gij})} - \sum_{i}{\delta_{gi}X_{gi,land}} - \sum_{i}{}\sum_{j}{\omega_{gij}X_{gij}}\]
()#\[\sum_{i}{X_{i,land} \le B_{g,land}}\]
()#\[\sum_{i}{X_{i,water} \le B_{g,water}}\]

Individual regions g are assumed to freely trade water. Details on the full program are described in Howitt et al. (2012).

References#

The Nonirrigated Lands Regression Model#

The nonirrigated land model operates in two phases. In its first phase a regression model estimates coefficients per-region crop yield response based on winter, spring, and summer temperatures and precipitation using region-level monthly input data for a recent period of record depending on the application at hand.

Regression coefficients obtained in the first phase are employed in modeling scenarios runs. Model outputs provide estimated levels of crop production and gross revenues resulting from temperature and changes in precipitation. This phase is run twice: first without precipitation adjustments and then run again with them. The yield change is calculated as the difference between these to remove artifacts introduced by the regression itself.

OpenAg calculates gross revenues based on the new yield estimates in a similar manner to the PMP model’s revenue calculation: crop area (acres) * estimated yield (tons/acre) * adjusted price ($/ton)

Warning

When calculating revenue and area, nonirrigated lands model does not currently take into account crop area adjustment parameters. Those will only affect irrigated lands models.

The regression model uses a more limited dataset than the PMP model, depending on how much agriculture is irrigated or nonirrigated. In order to reduce effects from small samples, it is limited to crops with large amounts of nonirrigated area, and it is only used in regions where nonirrigated agriculture accounts for more than 5% of total agriculture.

Considerations#

The regression model can occasionally show higher yields in response to less rainfall if the data for the calibration period had that response. In the Washington model area, this is rare, but has been noted as occurring.

Simple Modeling and Linear Scaling#

OpenAg includes a simplified modeling mode for regions where

  1. Sufficient data to support PMP modeling are unavailable

  2. Data are available, but the region contains a small acreage of agriculture

  3. The region supports only one or two crop commodity groups

  4. You wish to run a version of the model that makes a more limited set of assumptions

  5. For running “worst case scenario” modeling

Where the Full model assumes that within regions resources can be freely traded, allowing multiple independent farmers to find optimal economic outcomes as resource availability changes, the simplified version assumes that changes to resource availability apply evenly to all farmers, and they are unable to adapt and take steps to further improve their outcomes as their resource availability changes. We sometimes think of this as a “worst case scenario” outcome in that, when using the model to reduce resource availability, the Simple model gives us a reasonable lower bound on gross revenues and can be used with the Full PMP-modeled version of the same data to estimate a range of outcomes.

In the first three cases above, OpenAg may be unable to adequately run the Full PMP model, so it will default to using the Simple model - this behavior will show up when adding crop cards, but will also apply to the affected regions whether or not a card is explicitly added for the region.

Simple Model Formulation#

For each crop in the region, revenue is calculated using the following equations. The adjustments provided in the web interface are noted as adj with a subscript and are used as proportions relative to the original value.

\[land scaling factor = Min(adj_{land}, adj_{irrigatedwater})\]
\[gross revenue = price * adj_{price} * yield * adj_{yield} * acreage * land scaling factor\]

The Simple model makes an assumption similar to the Full PMP model that deficit irrigation is not allowed. Thus, a proportional reduction in water can be thought of as proportional reduction in land because, without deficit irrigation, water will not be available to farm additional land as water is reduced. However, land and water reductions do not stack, and instead the Simple model uses the smallest of the two adjustments as the limiting factor that determines how much land is in production.

Model Outputs#

Direct outputs from the irrigated land crop choice PMP models are irrigated areas, water use and gross revenues by crop group and region. Direct output of the rainfall model is changes in the crop production and gross revenues by nonirrigated crop and region.

These model results can be viewed and downloaded as csv files in the web application.

Calculated Outputs#

Gross revenue = price ($/ton) * yield (ton/acre) * land (acre)

Includes price and yield adjustments. The land quantity requires that enough water is available to support the grown crop.

Model Limitations#

As with every model, the drought assessment tool team considers the following limitations are present and may benefit from further development in future releases of the tool.

  • Nonirrigated land soil moisture (or precedent soil conditions) are not accounted for. The workaround at this point is to change price of the commodity to emulate gross revenue reductions in the crop. In the future, precedent soil conditions yield impact to be explicitly in a single or composite yield impact slider.

  • Limited lifespan of calibration data is an area of improvement yet will remain appropriate for another 5 years. While current calibration represents the most recent land use available and costs of production, future upload of datasets and recalibration needs further development.

  • Irrigated land model does not show maintenance costs of perennial crops if they are not grown for production in a dry year, but are kept alive using reduced irrigation for the following year. There is also an associated lingering effect of deficit irrigation in most perennials that is not factored in dynamically.

  • Irrigated land model does not scale back yields when water availability is reduced (i.e. stress irrigation). Instead, it assumes that if a crop’s water needs cannot be met, it cannot grow that crop and removes enough acreage from production for that crop or another crop in order to balance water needs for in-production crops.

  • Input data has a significant influence in model results. Curating the input data to better represent baseline production conditions benefits from documentation of sources and model assumptions.

  • Baseline conditions calibration point. The more an scenario moves from the calibration point (baseline scenario), the less reliable become the results

  • For the non-irrigated model: although we obtain regression coefficients using seasonal temp and precip for the same year (winter, spring and summer), we run the scenarios with precip adjustments that result in equal changes in precipitation across seasons, which might not be realistic (different seasons might have different amount of precipitation and different results in final yield)

  • To simplify the scenario development, the modeler only uses the same year seasonal precipitation and temperature (winter, spring and summer), yet there might be significant impacts on yields from antecedent conditions (previous year precipitation and temperature) that the model is not considering

  • Increases in production costs from increases in groundwater pumping or water trading costs are not factored in.

Explanation and Limitations of Net Revenue Estimates#

OpenAg is an optimization model that maximizes net returns to land and management using Positive Mathematical Programming (Howitt et al. 2012), a self calibrating method that assumes non-linearities exist in agricultural crop production costs, and that the observed input land use satisfies that marginal revenues equal marginal costs. Usually, baseline conditions give net returns close to the difference between gross revenues and average production costs. However, as scenarios created in OpenAg depart from the baseline conditions through the addition of user modifications, the net returns on individual crops or regions resulting from the model objective function, which is comprised of all gross revenues and all production costs (average and non-linear), may also depart from the baseline net returns, and the net revenues may be reflective of assumptions on production outcomes and farmer behavior which are hard to fully capture.

In the optimization process, OpenAg considers crop profitability, and under scarcity less profitable crops are usually allocated less land area and irrigation water in comparison with more profitable crops. OpenAg can be set to avoid unprofitability by scaling down production costs in response to lower yields or crop prices, as farmers usually manage production to avoid net losses. In addition, the objective function maximizes total net returns to land and management from all crops or total producer surplus using input allocation (land, water, labor and other) by crop and region. Given non-linearities in the objective function, the total net returns might not coincide with those under baseline conditions, which assume average costs are in place despite user modifications to land, water, price, or yield.

It is possible to create scenarios that diverge from the baseline, even though scenario optimized results may suggest negative net returns for individual crops since the aggregate of all crops is maximized. The disparity in net returns explained above is solved by postprocessing land use allocation from the optimized model, using gross revenues and average costs to obtain net returns by crop for each modeled scenario. OpenAg assumes the resulting cropping patterns will maintain crop profitability by using the average costs. Growers typically take action to prevent losses by, for instance, cutting back on variable costs for the year, such as supplies and labor. OpenAg may adjust costs in net revenue estimates to account for such potential cost downscaling by scaling variable costs such as supplies and labor by the price and yield modifications input by users when creating model runs.

Though the adjusted costs in OpenAg’s postprocessing should provide a more accurate estimate of net revenues than if average costs were assumed, postprocessed net revenue values should be used with caution and only when comparing gross revenues to the base case or to other scenarios/model runs cannot provide an appropriate metric of the economic impacts of land and water use scarcity, changes in commodity prices, yield response to salinity, water stress, or climate or higher production costs.

Net Revenue Calculation#

\[area_{crop} * ((yield * adjustment_{yield} * price * adjustment_{price}) - (cost_{water} * water use) - cost_{land} - (adjustment_{yield} * adjustment_{price} * (cost_{labor} + cost_{supplies})))\]

How OpenAg Splits Data Between Irrigated and Nonirrigated Lands#

By default, OpenAg uses the input data for each region to determine what data goes into the irrigated land model and what data goes into the nonirrigated land model. The input data contain values for the irrigated acreage and the nonirrigated acreage for each crop within each region.

If either irrigated or nonirrigated acreage is small for a crop in a region, then the model changes its behavior in order to avoid the effects of optimizing small values, which could produce incorrect results. Before splitting data between the irrigated and nonirrigated models, the application checks the irrigated and nonirrigated acreages for each crop to make sure that they are more than 5% of the total value for the crop. If the nonirrigated acreage is less than 5% of the total within the region, it will merge the acreage for the nonirrigated acreage with the irrigated acreage and run it through the PMP model. Similarly, if the irrigated acreage is less than 5% of the total acreage for the crop in the region, it will merge the irrigated acreage into the nonirrigaged acreage and run it through the regression model.

For example if we had the following crops and acreages in a region, we would send the outputs as shown in the table

Example Crop Acreage in a Single Region#

Crop

Irrigated Acreage

Nonirrigated Acreage

Acreage sent to PMP model

Acreage sent to Regression model

Corn

80 acres

20 acres

80 acres

20 acres

Grain

4 acres

96 acres

0 acres

100 acres

Beans

97.5 acres

2.5 acres

100 acres

0 acres

So, a crop like corn, which has a split of acres at 80% irrigated and 20% nonirrigated is sent to the models exactly as the inputs provide, with 80 acres used in the PMP model and 20 acres used in the regression model. But the other two crops in the region are modified slightly. Grain, with 96 nonirrigated acres and 4 irrigated acres has all 100 acres sent to the nonirrigated regression model. Beans see the reverse, with 97.5 acres of irrigated land and 2.5 acres of nonirrigated land, it sees all 100 acres of its cropped area sent to the irrigated PMP model. These numbers add up to 100 for ease of percentages, but in reality, the area for each crop within a region would not match between crops.

These calculations are conducted for each crop and each region, so even though all grain acreage is sent to the regression model for this example region, in other regions it may still use the PMP model or a combination of the PMP and regression models, based on the acreages for each specific region.

Viewing and Working with Model Runs#

An Overview of Working with Model Runs#

On this page:

Model Run Page Sections#

When viewing a model run, the page will have the following options and sections. Nested items indicate tabs or buttons available within another item.

  1. Delete

  2. Downloads
    • Results

    • Inputs

  3. Description

  4. Status

  5. Other Metadata

  6. Inputs
    • Region Modifications
      • Table

      • Scatterplot

    • Crop Modifications
      • Table

      • Scatterplot

  7. Issues and Infeasibilities (not always shown)

  8. Results
    • Charts

    • Map

    • Summary

    • Table

Deleting a Model Run#

To delete a model run while viewing it, click the Delete this model run button with the trash can icon near the top of the page. It will then change to say Click to confirm deletion for five seconds. If you click it again, the model run will be permanently and irreversibly deleted. If you do not click it again, it will change back to its original state and will remain available for viewing. Model runs may also be deleted from the model run listing page.

Downloading Inputs or Results#

Model run parameter inputs and results may each be downloaded as Comma Separated Values (CSV) files from the Downloads menu at the top of the page. From that menu, the following items are available as CSVs:

Changing the Model Run Name or Description#

_images/edit_title.png

Editing the title of a model run by clicking the edit icon next to the title#

Model run names and descriptions may be edited by clicking the pencil edit icon next to the model run name or the Description header, or by clicking directly on the text itself. When editing, the background of the text will be white and it will have a darker border around the edge. Change the title or description to the desired value, then click or tab away from the field to change focus and save the changes. If the change is successful, a notification bar will pop up at the top of the page alerting you it saved the changes successfully. If it is unsuccessful, then the title or description will be reverted to their old values.

Model Run Status Messages and Metadata#

_images/status_and_metadata.png

The model run status card with the model version used for the model run and the metadata card showing the name of the user that created the model run and the date and time it was created.#

When viewing a model run, you may see three main status messages and one modified status message:

  • Waiting

    The model run has not yet started. You may encounter this if you have queued up many runs, or if others are working at the same time and the server lacks capacity to run your model immediately

  • Running

    The model run is currently running. Model runs typically take between 10 seconds and a few minutes. If your model run has been in the running state for longer than 10 minutes, it may have stalled or is being repeatedly restarted and you should reach out to the |project_name| team.

  • Results Available (Complete)

    The model run has completed running and results are loaded and available for viewing. When this status is shown, the application will show results by default instead of the inputs.

  • Results Available - Contains Issues or Infeasibilities

    The same as Complete, but warning that some regions had infeasible results. For more information on infeasibilities, see Issues and Infeasibilities. You may wish to create a new version of this model run to address the infeasibilities as the total results may be invalid.

Model runs that are either Waiting or Running check for updates every 10 seconds and the page will update automatically without refreshing. While in the Waiting or Running states, OpenAg shows the model run’s inputs. If the model run completes, the page will change from showing the model run inputs to showing the results, though the inputs tab is still available to access.

Metadata#

Additional metadata available includes the model version used to run the model, the name of the user that created the model, and the date and time the model run was created. The version of the model is provided in case it is needed for additional reporting. It may change between model runs as the application is updated.

Multiple Results Sets#
_images/multiple_results_sets.png

The dropdown menu allowing selection of the results set to visualize on the page#

In some cases, a model run may have multiple sets of results. This situation typically occurs when the OpenAg model is updated in a way that impacts model results. In that instance, all existing model runs are re-run, and will gain an additional set of results that will display by default. Typically, only the most recent set of results that is shown by default is valid. But all previous sets of results are kept so that you can change to viewing them and understand what impact the update to the model has on any interpretations you may have had of the previous results.

If multiple sets of results are available, a dropdown menu will appear below the status text on the page and will allow you to select the date each set of results became available to display that set of results. Information shown on the rest of the page will immediately update based on the selected results set. If the dropdown is not visible, then the model run only has a single set of results.

Inputs#

See Viewing Model Run Inputs for complete documentation on viewing inputs.

Results#

See Viewing Model Run Results and Raw Model Input Data for complete documentation on model run results

Issues and Infeasibilities#

In some cases, the provided inputs can result in an “infeasible” model run - one where the conditions provided could not create a viable set of results. For example, if a region has two crops and the inputs specify to reduce land by 50%, but also specify a minimum crop area restriction for each crop of 70%, then the model can’t reduce either crop’s land enough to satisfy the new land requirement, resulting in an infeasible model run.

In most cases, you will need to create a new model run that resolves infeasibilities in order to interpret results. An infeasible model’s results are typically not comparable to other models. However, since OpenAg runs independent models by region, infeasible results are by region as well - that is, if you exclude the regions with infeasible results, then the remaining results are valid.

When a model has infeasible results, as shown in the status message, it will also have a tab next to the Results and Inputs tabs for Infeasibilities that shows you which regions had infeasible results. When recreating the model run, pay special attention to the settings for those regions. If it lists regions that you did not create explicit region modifications for, then pay attention to the settings on the All Regions card and also to any crop area restrictions you may have set.

In other cases, the model run may be feasible, but may fail to identify the optimal solution for specific regions. In that case the Issues and Infeasibilites tab will contain a record indicating which region had the issue and that the result was non-optimal.

Finding Model Runs You’ve Created#

Overview#

When running the OpenAg model, your inputs and results are saved as a Model Run in the application that you can access at any point in the future. By default, all model runs from users in the same organization are visible to other users in the organization, allowing for cross-collaboration and sharing of model runs to support decision-making.

Opening Model Runs#

Model runs can be accessed via the “View Existing Model Runs” button on the home page, or in the navigation bar by clicking “Model Runs”. The page to view model runs includes multiple features to help find a specific model run. The main Model Runs page, separated into two tabs for listing or plotting, has several features to help identify and compare completed model runs.

_images/model_run_listing_w_numbers.png
  1. By default the application shows you a table of model runs along with some basic metadata. The “Model Runs Plotted By Modifications” tab near the top of the page opens a scatterplot view that shows model runs based on the overall impact of their inputs

  2. To open a model run, click on any model run in the table, which will bring up the model run’s inputs and results.

  3. Model runs may also be permanently deleted using this page by using the checkboxes to the left of model runs. If model runs are checked, then a delete button will appear on the toolbar above the table

  4. The table includes basic metadata about the model, including the name, description, how many modifications have been made to the model, the username of the person who created the model (not shown in screenshot), when the model run was created, and what its status is.

  5. The table is sortable on each of the fields in item 4 - click on the headers to change sorts. Click currently sorted items to change their direction or remove them. Multiple-field sort is possible by clicking the field sorts in order.

  6. Above the table is a box controlling which model runs you would like to see by model run author or model type. By default all model runs are shown, but you may remove model runs created by others, model runs you created, or system model runs (such as the base run) from the table in order to find a model run. For example, if your table has many runs, but you are looking for one you created, you could remove the “Runs created by others in my organization” option from the list in order to see only runs you created and system runs. These settings reset when you leave the page, but to only see your own model runs by default, use the application settings to change the default behavior of the model run list.

  7. OpenAg only checks for new model runs from others in your organization and changes to model status when you load the application. To prompt it to update the list of model runs and their statuses, click the Update button at the top of the page, which will immediately update the list.

  8. The page also includes a shortcut to create a new model run.

Filtering Model Runs#

Settings that apply here Existing model runs can be filtered using the ?Filter model runs? list in the header of the ?Model Runs? window (see area 6 above). Currently, users can filter to find ?Base runs?, ?Runs I have created?, ?Runs created by others in my organization?, and ?Prepopulated runs?.

Find Model Runs on a Scatterplot of Model Run Inputs#

Viewing Model Run Inputs#

Viewing Model Run Results and Raw Model Input Data#

Base Case#

Filters#

_images/data_viewer_filters.png

When viewing model data, either as model input data or in the results section of a model run page, the application includes many filters and options for how the data are displayed. In order to keep the most relevant information readily available, the application shows only one row of filters and tools at a time and you may show or hide additional filters using the menu at the left. When all filters fit on one row, the menu on the left will not show and all filters are displayed automatically.

General Features#
Crop Filtering#
Region Filtering#
Irrigated and Nonirrigated Land Filtering#

Charts#

Chart Controls and Options#
Comparison Model Runs#
Baseline (Normalization)#
Include or Exclude Regions#
Chart Options#
Tabular Display of Chart/Per-Crop Data#

Map View#

Summary View#

Table View#

Creating Model Runs#

By default, running the OpenAg model with no modifications will produce the output that most closely aligns with observed conditions, called the “Base Case”. The OpenAg application is designed to allow you to create your own model runs, or scenarios, where you specify deviations or changes in conditions compared with the base case. You provide these in the form of two separate types of modifications to the model inputs and constraints: region modifications and crop modifications.

An Overview of Model Run Creation#

On this page:

_images/RegionModifications.png

Within the application, creating a model run has three steps:

  1. Add Region Modifications:

    Add adjustments to region-wide parameters either across the model or for specific regions in the model area. Modifications for regions will always include irrigated water availability and total cropped land availability and may include rainfall, depending on the model area and available data. Information on how to create region modifications is below and details on parameters, options, and interactions are on the Region Modifications Details page.

  2. Add Crop Modifications:

    Add adjustments to crop-specific parameters, such as prices, yields, and crop area constraints. The crop parameters will apply to the crop in all region it is grown in, by default, though it is possible to tie crop parameters to a specific region. Information on how to create crop modifications is below and details on parameters, options, and interactions are on the Crop Modifications Details page.

  3. Add Metadata and Review:

    The final step of creating a model run allows you to add a name, descriptive text, and to review a summary of inputs.

See also

The Model Input Hierarchy: Prioritizing Overlapping Inputs for more information on how OpenAg determines which values to use when inputs overlap.

Overview of Modifications#

When creating a new model run, most inputs are expressed as modifications relative to the base case. You can express these modifications for all regions or all crops or provide modifications for specific regions or specific crops.

By default, OpenAg preserves the base case, so a model run with no modifications will produce identical results to the base case model run for the model area. All modification options default to 100%, meaning the application will keep the value exactly as in the base case. Adjusting the value then means making an adjustment relative to that item’s normal value, rather than inputting an absolute value for the parameter. If you wish to input a specific quantity of a resource (e.g., irrigation water availability), then you need to first convert it to a percentage by comparing it to the amount available in the base case for the same unit of analysis, such as the individual region it applies to or all regions.

As a consequence of using relative values, for some scenarios, you will need to carefully consider your inputs. For example, if you want to simulate a water transfer between two regions, it would be incorrect to increase one region by 10% and decrease the other by 10% unless they both have the same amount of total available irrigation water. Instead, you would need to determine how much water is available in each region, using either the Input Data Viewer or viewing the base case, and then determine what percentage values for each region would indicate the same amount of water.

All Regions and All Crops#
_images/all_regions.png

The All Regions card with model parameters showing for all regions in the model#

The most straightforward inputs in OpenAg are displayed by default in the form of the “All Regions” and “All Crops” cards. The controls on these cards adjust the associated parameter for every region in the model area. Conceptually, the All Regions and All Crops can be thought of as making an adjustment across the entire model domain. Adjusting “irrigation availability” to 90% would produce a 10% cutback of irrigation water in every region within the model.

When you adjust values on the All Regions or All Crops cards, the model behaves as if an individual card was set up for each region or crop. In other words, optimization always happens per region and the values are set explicitly for each region and crop combination, so changing water availability in the All Regions card, for example, will not produce water transfers between regions. When setting values via the All Regions or All Crops cards, resources are not pooled between regions or crops and there is no implicit trading between regions, though you can replicate that scenario.

Adding Cards#

For more granular adjustments, OpenAg allows you to create modification cards for each region or crop in the model area. Modification cards provide the same parameters as are on the All Regions or All Crops card, but they are specific to the region or crop selected when creating the card.

_images/adding_region_cards.png

Cards can be added either by searching the Add Modifications dropdown or clicking on the map (regions only)#

You may create cards in two ways:

  1. From the dropdown menu under the Add Region Modifications or Add Crop Modifications heading. You may select one or deselect one or more regions from the list shown in alphabetical order. You may also type in the dropdown to search or filter the regions to one whose name you know.

  2. For region modifications you may also click on the map to create a region modification card for the corresponding region. Since crop modification cards apply to the crop in all regions, there is no map to add crop modification cards.

Overview of Region Modifications#
_images/region_modifications_overview.png

Region modifications are the first step in creating an OpenAg model run and allow for adjustment of region-specific parameters, such as irrigation, land area used for agricultural production, and rainfall (if configured for the model area).

The region modifications portion of the New Model Run page includes many components and options:

  1. The All Regions Card:

    The all regions card provides the ability to adjust model parameters for all regions within the model area. The parameters provided here will be used for every region, except those added as separate cards (see item 3).

  2. The region selection box to add region modification cards:

    In order to provide more specific per-region parameters, add cards by clicking into this box and choosing the region name from the dropdown or typing into the box to search available regions. You can check the boxes next to multiple regions to add cards for many at once. Region cards may also be added by clicking on the map. Region modification cards will appear below this box as they are added.

  3. Region modification cards:

    Adjust parameters for specific regions here. Any region with a modification card will use the parameters on the region-specific card as opposed to those on the All Regions card.

  4. Advanced region modification options:

    Click on Advanced in order to show options that change how the region is modeled.

  5. The map view of the current configured modifications`

    The map view on the right side of the page changes color by region as input parameters are modified to give a sense for the impact of the current set of input parameters model-wide. Darker grey/black colors indicate lower percentage values and brighter greens indicate higher percentage values. The map only shows a single variable at a time and defaults to showing the irrigation water availability. Regions may be clicked on the map to add modification cards and hovered over to see their names.

  6. Controls to change the map view’s parameter:

    In the upper right of the map are buttons that change which region parameter is displaying on the map. To see the overall set of changes to another parameter, click the appropriate button here.

  7. The continue button:

    Clicking here will finish the region modifications step and move on to creating crop modifications. You may return to region modifications again by clicking on “Region Modifications” near the top of the page.

See also

For more details on working with region modifications, including information on specific choices and interactions, see Region Modifications Details.

Overview of Crop Modifications#
How to Adjust Modification Parameters#
_images/parameter_basic.png

Parameters on both region and crop modification cards can be adjusted in multiple ways. While each parameter allows adjustment of percentages relative to calibrated values in the model, OpenAg provides three ways to input parameter adjustments, depending on your preference:

  1. Each parameter provides a label indicating which parameter the control adjusts

  2. The parameter value can be input using a slider. Click and drag the circle on the slider to change the value. As you drag the slider, the value in the box on the right will change to indicate the current value

  3. You can input and type directly into the box. The value will update once you click or tab away from the box, and the slider will update to reflect the change in the box

  4. You can increment or decrement the value using the minus or plus signs on either side of the box, which will update the value in the box and adjust the slider value. These buttons allow you to drag the slider to get close to the value you want and then refine the value.

See Adjusting Crop Area Restrictions for usage of Crop Area Restrictions sliders, which have more capabilities.

Capabilities in the Application#

Though we have attempted to make the application as straightforward and user-friendly as possible, before creating a model run it is important to spend time considering how to translate your scenario of interest into adjustments that the model accepts (i.e., what can we actually change or control in the application).

  1. Water transfers within a region

  2. Water transfers between regions

  3. Climate change impacts

  4. Reduced production

  5. Salinity impacts

  6. Crop mix changes

Region Modifications Details#

On this page:

Overview#

_images/region_card.png

Region modifications are the first step in creating an OpenAg model run and allow for adjustment of region-specific parameters, such as irrigation, land area used for agricultural production, and rainfall (if configured for the model area).

In addition to the differing parameters region modification cards apply differently than crop modification cards in that crop cards apply to the same crop in all regions where it is grown, but parameters on region cards apply to all crops grown in one single region.

Note

The region card parameters for land area and irrigation water availability can be thought of as providing both inputs and outputs to the model. The region card allows you to specify the total amounts available for each parameter within the region, and then the model apportions each resource (land, irrigation water) amongst the crops, resulting in the per-crop outputs for land and irrigation water in the region.

Parameters#

Region cards provide up to three parameters. Each parameter provides the ability to adjust values relative to their calibrated inputs values and does not show absolute values in original units. All values are in percentages relative to calibrated value.

  1. Rainfall:

    The OpenAg nonirrigated lands model relates crop yields to amount of rainfall and temperature by season. The rainfall parameter allows you to adjust the amount of rainfall for all regions or specific regions between 10% and 200% of the mean value during the calibration period for the model area. This parameter only shows in model areas and regions that have nonirrigated lands. If the parameter is missing, either the model area doesn’t support the nonirrigated model, or the region does not have sufficient nonirrigated lands in the dataset. See How OpenAg Splits Data Between Irrigated and Nonirrigated Lands for more information on how OpenAg determines availability of nonirrigated lands.

  2. Irrigation Availability:

    The irrigation availability parameter adjusts total irrigation water available within each region as part of the irrigated lands PMP model. The model uses this parameter along with the land parameter below to adjust crop mix and water allocation based on new resource availability. The parameter allows for reductions of up to 50% and increases of up to 20%. It will show for all regions in model areas without nonirrigated land in the dataset and will show for most regions otherwise. In some cases, it may be unavailable if more than 95% of land in the region is nonirrigated. See How OpenAg Splits Data Between Irrigated and Nonirrigated Lands for more information on how OpenAg determines the availability of irrigated and nonirrigated land.

  3. Land Availability:

    The land availability parameter adjusts total available cropland within each region as part both the irrigated and nonirrigated models. The model uses this parameter along with the irrigation availability parameter to adjust crop mix and water allocation based on new resource availability. The parameter allows for reductions of up to 50% and increases of up to 20%.

Warning

In regions with both irrigated and nonirrigated land, the land availability slider impacts both types of cropland equally, which may not align with expectations. Nonirrigated land will be linearly scaled back according to the parameter while irrigated land will have a new upper bound constraint on the available land for all crops when reoptimizing the crop mix. In some areas, a more realistic scenario might be that more nonirrigated land goes out of production if irrigation availability remains constant but land availability is reduced. At this time, OpenAg does not support such a behavior.

Advanced Region Options#

When working with region cards, you have the option to change advanced settings by clicking on the “Advanced” expansion panel at the bottom of the card. The advanced settings give you three options that adjust how the region is modeled. Since each region is modeled independently, you can change these settings for any given region without affecting the output of another region.

_images/region_card_advanced.png
  1. Full:

    The default behavior for most regions and model areas. When the Full option is selected, the region will be run through the PMP model and, when applicable, through the nonirrigated agricultural yield model.

  2. Simple:

    In some cases, you may not want to make the assumptions that the full PMP model makes - in this case, the “simple” option prevents them from being modeled in the PMP formulation, and instead assumes a linear scaling of values based upon modifications in the input. Regions using the Simple model are unaffected by crop area constraints. See Simple Modeling and Linear Scaling for more information on how the region will be modeled when choosing this option. As of June 2021, using the Simple model will still run the nonirrigated model separately for crops and regions that have data available, but this behavior may change in the future.

  3. No Production:

    Use this if you want to model the region as if it produced nothing over the model time period. In the San Francisco Bay Delta, for example, this can be useful for scenarios where an island floods and produces no agricultural output. An alternative is to model the region normally, but filter results in the output to remove the region, in case you want to assess results both with and without the region.

Warning

Note that these are high priority settings in that they take first precedence. A region set to No Production will not be affected by the crop modification settings you choose. Regions using the Simple model will interpret most inputs differently and will be unaffected by crop area constraints that would have otherwise affected the crops in the region. The team is discussing at this time whether crop area constraints values can be used in place of the land slider for crops they apply to.

Default Advanced Region Options#

In some cases, when choosing a region, one of the advanced region options may show up as chosen by default for that region. This occurs because some regions may have default modeling behaviors other than the full PMP model, based primarily on data availability. Regions with very small acreages of agriculture are very sensitive to fluctuations in inputs and regions with only one or two crop groups cannot be modeled with a PMP. In these cases, the region may show up with the Simple modeling option chosen by default. You may change these values, but note that it may make the results less reliable or result in an infeasible model run.

Warning

It is important to note that these default behaviors apply to the regions even if you do not choose them for modifications. If a region has a default modeling behavior and you do not create a region modification card for it, then the default behavior will apply.

Additional Reading on Modifications#

Crop Modifications Details#

Overview#

Crop modifications are the second step in creating an OpenAg model run and allow for adjustment of crop-specific parameters. By default, crop modification cards apply to data for the crop within every region where the crop is present, though it is possible to specify crop parameters per-region (see Region-Linked Crops)

Parameters#

_images/crop_modification_example.png

A crop modification card, showing the three primary adjustments to crop data in OpenAg#

Crop Cards support three parameters:

  1. Price:

    OpenAg stores calibrated prices for each crop and region in dollars per ton ($/ton). You can use the controls on crop modification cards to increase or decrease the price of any or all crops by up to 20 percent relative to their calibrated values. For example, if we have crop A that sells for $1000/ton and crop B that sells for $5000/ton and you use the All Crops card to adjust prices up 20%, then crop A’s price will be set to $1200 and crop B’s price will be set to $6000.

  2. Yield:

    Yield values, representing tons per acre of a crop, behave similarly to price values - you may adjust them up or down by as much as 20% relative to each individual crop’s calibrated value for the model area. The yield slider does not apply to the nonirrigated lands model because yield is an output of that model rather than an input.

  3. Crop Area Restrictions:

    Crop area restrictions (or constraints) behave differently than the previous two items. Where the previous two are numerical inputs to the optimization model, crop area restrictions are hard constraints that must be satisfied for the model to successfully run. Crop area restrictions allow you to place limits on how much of any crop it takes out of production to exchange for another crop in any region. Additionally, you may place an upper limit on the potential growth of a crop or even force a reduction by setting an upper limit that is below 100%. Crop area restrictions are useful in scenarios where a low value crop and a high value crop are grown in the same region and the model run reduces resource availability. In most cases, the model will be willing to take significant amounts of the low value crop out of production in order to keep the high value crop in production. If you know that limited amounts of the low value crop will go out of production, or want to test the impact of a smaller reduction in the low value crop to free up resources for the higher value crop, then setting a low-end limit on that crop’s crop area restriction limits the model’s ability to remove it from production. Crop area restrictions are not used in the nonirrigated lands model.

Warning

Crop area restrictions should be used with care. Since they create a hard constraint in the model, misconfiguration of these constraints can lead to infeasible model runs. For example, setting all crops to a minimum crop area restriction of 100% while reducing resource availability such as water or land is likely to result in an infeasible model run since the model will not be able to take crops out of production to satisfy model conditions.

For a table showing which parameters apply in the irrigated and the nonirrigated models, please see Models Available in OpenAg.

Automatic Addition of Crop Modification Cards#

_images/automatically_added_crops.png

Some crop cards may be automatically added, as shown here with the blue banner that says “Automatically Added”#

While adjusting values for the All Crops card, OpenAg will sometimes automatically add cards for specific crops for you. It adds the cards because the settings on the All Crops card would make growing some crops economically infeasible - they would lose money growing the crops in at least one region in the model. You may intend for that as an input, but in some cases you may not, so in order to alert you to that condition and give you an explicit choice, the web application adds cards for crops before the settings change to push the crop into losing money. You may further adjust the crop-specific settings if you wish, however.

Once created automatically, cards will not be removed automatically, even if you change the All Crops card so that the crop-specific card is no longer needed. Instead, any time the All Crops setting would mean the crop loses money, the crop-specific card will be unremovable in the application. Where the X would be in the corner of the card it will show a help tooltip explaining that the card cannot be removed. If you remove the card from the crop-selection dropdown, it will be added back. If you adjust the All Crops card settings such that the card is no longer required, the card will again be removable.

Automatically added crops can be identified by their blue banner at the top that says “Automatically added” and has a help tooltip that is accessible by hovering over the icon to further explain what happened”. If you make adjustments to a card that was automatically added, the banner will disappear since you have now customized its settings, allowing you to at a glance see which cards have been added without adjustment and which cards you have changed.

Region-Linked Crops#

_images/region_linked_crop.png

Crop information can be specified per-region by “Region-linking” individual crop cards so that the parameters on the card apply only to the crop when grown in that region.#

Typically, adding crop modification cards for specific crops results in changes to the values for that crop in every region the crop is grown in. Crop cards can be limited so that the card’s parameters only apply in a single region through a process called “region linking”. In the “Advanced” section of a crop card, you may choose the region the crop card should apply to under the “Link to Region” selection item. After choosing a region, the card will include a blue banner on the left to signify that it is a region-linked card, and the title will change to include the crop name as well as the region name.

Once created, all parameters on the card will only apply in the specific region. If you wish to create separate settings for other regions for the same crop, add the original crop card again and specify another region on it. If you wish to specify separate settings for the crop in all other regions the crop is grown in after creating region-linked cards, simply add the main crop card again. Take care that the list of cards is sorted after every card is added, so when region-linking a card, double check that the crop card you change next is the one you intend to adjust.

For example, if you wish to provide separate settings for All Crops, Apples statewide, and Apples in region A and region B, you would add the Apples card, link it to region A and change the settings for that card. Then, add the Apples card again and link it to region B, then change the settings on that card to apply to region B. Finally, add the Apples card a third time and change the settings to apply to all regions in the model area that grow Apples except for regions A and B.

If you change your mind and wish to remove the region-link, simply remove the entire card. You may still add the main crop commodity’s card both before and after removal of a region-linked card.

Adjusting Crop Area Restrictions#

Crop area restrictions allow you to provide hard constraints (rules that must be followed by the model) on the amount of land area a crop can be grown on in the model run, relative to its calibrated value. By default, the model’s only area constraint is that total land area in the region cannot expand, but you may add crop-specific or region and crop-specific constraints on land area using the Crop Area Restrictions input parameter.

_images/crop_area_restrictions_parameter.png
  1. By default, there is no lower limit on the amount of area a crop can occupy - it can go to zero, though in the Full PMP-modeled formulation of the model, it is unlikely it will reduce acreage of any crop in a region to zero. To adjust the lower limit, modify the left side of the slider or the value in the box to its left, similar to other parameters

  2. If you wish to put an upper limit, either to restrict how much a crop may grow in area in response to other changing economic factors (such as if another water-intensive crop loses water), then click the Add Upper Limit option on the right side of the slider

  3. The slider will become double ended, with the option on the left side representing the minimum crop area and the option on the right side the maximum crop area - you can adjust each independently. When the upper limit is activated, the area in blue on the slider between the two dots represents the available range of land area for the crop.

  4. To remove the upper limit after adding it, click the trash icon to the right of the upper limit. It will then revert to having no upper limit.

Uses of crop area restrictions#

Crop area restrictions provide a safety net for the operator of the model. For example, imagine a region with a low value, but high acreage crop such as Hay and a high value crop such as Apples. In a scenario where you lower the available water, the model may reduce significant acreage of Hay in order to keep water available for apples. You may know that the amount of acreage reduced of Hay is unrealistic relative to the amount of water trading seen on the ground. Crop area restrictions let you limit the model’s ability to take water from Hay to support Apples in this scenario. Setting a lower limit on Hay (e.g. 80%) would mean that the model can only utilize 20% of the water that normally goes to Hay to support another crop. Alternatively, setting an upper limit on the Apples crop would prevent it from growing while allowing the model to reallocate water from lower value crops as needed. The choice to use upper or lower limits will depend on the total set of restrictions you are adding and what you are attempting to model.

Warning

Care should be exercised with crop area restrictions - in the example above with only two crops, if both crops had a minimum restriction of 90% set on them, but the water in the region was reduced to 80%, the model run will come back “infeasible” - that is, the model could not find a set of values that satisfies the requirements. Infeasible models should not be compared to other models and instead you should create a new model run to resolve the infeasibilities.

See also

See How to Adjust Modification Parameters for information on adjust prices and yield parameters.

Additional Reading on Modifications#

The Model Input Hierarchy: Prioritizing Overlapping Inputs#

OpenAg allows for inputs that can overlap each other, such as setting irrigation water availability for all regions and setting the same value for a specific region. In each case, only a single parameter will apply - no merging is done between overlapping parameters, and the model applies the most specific input parameters and discards less specific parameters.

Note

It is important to note that, while the web interface makes it appear as if one set of settings can apply across the whole model, OpenAg applies parameters individually to each crop and region combination present in a model area. The web interface simply provides a way to apply settings quickly across the whole model. A single value will always apply for each parameter for each region/crop combination, though they can have the same value.

Priority Orders#

For each list below, the items are ordered from highest to lowest priotrity.

Region Modification Hierarchy#
  1. No Production regions:

    Regions that are set to “No Production” override all other settings that would apply to that region, including settings from crop cards. OpenAg drops the data for No Productions regions before running the model and the data for a removed region is not included in the model run.

  2. Specific region settings:

    Input parameters on a specific region are the highest priority way to specific a single input, such as irrigation water availability. If the region is not set to No Production and a value is set on a specific region modification card, then that value will apply. Regions set to use Simple modeling will apply values differently than regions using the Full model.

  3. Region group settings (when available):

    If region groups are available, then parameters provided for a region group will apply for all regions within the region group unless a card is added to the model run for a region within the group, in which case the region-specific card’s settings would take precedence for that region, with the region group card applying to all remaining regions in the group.

  4. All Regions:

    The All Regions card is the fallback card - it applies when a more specific setting from the items above has not been provided.

Crop Modification Hierarchy#
  1. Region-linked crop value:

    Specific crop cards that have been linked to a single region take the highest priority for crop parameters and will be used when present.

  2. Specific crop value:

    Similar to region cards, a modification card for a single crop is used for crop parameters in each region the crop is present in, except in the case where a region-linked crop card is present for the same crop, in which case the region-linked crop card would supply the parameters for that single crop and region and the crop-specific card without a region-link would supply the parameters for the crop in all other regions it is present within.

  3. All Crops:

    The All Crops card is the fallback card - it applies when a more specific setting from the items above has not been provided.

Warning

Crop adjustments never apply to regions that are set to “No Production”. These regions are not modeled directly and so will not include crop modifications, regardless of region-linking.

Translating Common Scenarios Into the Model#

Viewing Model Input Data#

When working with the model input data portion of the application, viewing data in various charts and tables could be used to represent the data in a more coherent method. The application offers 3 different types of methods users can display their data: charts, map, and a table option. Tables (csv) are directly downloadable items.

_images/modelinputdatatype.png

Settings#

Troubleshooting#

Basic Troubleshooting#

In the event of an application-breaking bug, reload the page - it may have been a temporary bug. A second step (if needed) is a cleared-cache reload of the page (Ctrl+F5 in browsers on Windows. Shift+Cmd+R in Firefox/Chrome on Mac - see here for more options, including Safari). Clearing the cache and reloading helps particularly if a new version of the application has been deployed, but the browser is still holding onto part of the old version - the application attempts to clear out older versions, but occasionally there could be bugs.

If those do not work, try closing the tab and reopening the application from the home page, as opposed to the page the user was initially on. If a model run has some kind of bad data associated with it, for example, then loading that model run may fail even if the rest of the application works correctly.

Finally, if you encounter bugs or have other questions, please reach out on GitHub to file an issue. If you would like to ask a question about the application, you can start a discussion on GitHub as well. If you need to get in touch with the development team otherwise, please use this form.

Bug reports will help the development team to identify, fix, and avoid issues in the future. The development team maintains logging information in the application that should capture most errors, but the including the following information in issues filed on GitHub or via email will help in diagnosing the problem:

  1. The action taken in the application

  2. The expected result of the action

  3. The actual result

  4. The full page URL

  5. And if possible the approximate time the action was attempted (this will facilitate

    looking for any data in the logging system - it only logs errors inside the application and not anything else)

Diagnosing infeasible model runs#

Changelog#

Keep up to date on changes in the application here so you know what new features are available, where buttons have been moved, and if major changes or bugfixes are made to the model or applications.

Changelogs are structured by month, so you can click into any month to see details.

Visual Changelog - July 2022#

Changes to Visualizer Controls and Region Group Visualizaton#

_images/OpenAgNewFilterControls.gif

Building on the release of region groupings, the application now supports visualizing results with filters for region groups. Selecting a region group in the filter is the equivalent to filtering to all the individual regions within the group - those regions are also selected in the region filter so that they can be de-selected or expanded upon for fine-tuning.

The addition of region groupings to the existing set of filters necessitated a suite of changes to how filter controls are displayed. Now, tabs with many available filters will show a menu of available filter options on the left that can be toggled on or off. Filters will remain active even while not shown, but the controls for the filters can be shown/hidden in order to keep the interface more usable and to make it easier to find controls.

Visual Changelog - May 2022#

Region Groups#

_images/group_inputs.gif

OpenAg now supports groupings of regions during model run creation to speed input of complex sets of model parameters. Documentation will be forthcoming, but the feature is available now for the Sacramento-San Joaquin Delta model.

Groups work in-between the settings for All Regions and a single region by apply a setting to many regions at once that overrides the All Regions setting, but can still be overridden further by a card for a specific region.

Net Revenue#

Net revenue data have been added as a model output using a new formulation. Net revenue results should be used carefully and must be enabled for the model area by an administrator and must be enabled further by each user in their settings section.

New Basemaps Available in Data Viewer#

The default basemap OpenAg previously used was no longer available, so we found and added new basemaps you can select when viewing model data (not yet during modl run creation).

Visual Changelog - June 2021#

Added Username to Model Run Listing#

Now you can view the username of the person that created a model run in the listing. If you know who created a model run but not what it is named, it should now be easier to find!

Changed Behavior for Nonoptimal Results#

Previously non-optimal results would show up under the “Infeasibilities” tab, but were not true infeasibilities and instead should be considered a warning. Results for regions that were non-optimal were also dropped, making them not comparable with other model runs to see how different they were. Now, the warnings are clearer when the result is non-optimal vs. infeasible and give suggestions for how to respond. Additionally, the Infeasibilities tab has been renamed “Issues and Infeasibilities” to reflect that not all regional models listed there are infeasible.

Model Version Provided in Status Box#

_images/status_and_metadata.png

Model runs status cards now include the version of the model used so that it can be provided in any external reporting.#

Editing Titles and Descriptions of Model Runs#

You have been able to edit titles and descriptions for many months, but the application gave no indication that it was possible. Now there’s a helpful little edit icon to click in addition to clicking on the text itself, along with some additional cues that the text is editable once clicked.

Default Region Modeling Behavior and Change-able Behaviors#

_images/region_card_advanced.png

Regions can now use the Full PMP model, a Simple model that assumes no trading (new), or No Production. Regions can also have default behaviors, so some regions will default to the Simple model - when they do, you’ll see that choice made in the Advanced section of a crop card.#

Provide Region-Level Crop Commodity Details When Creating Models#

_images/region_linked_crop.png

You can now provide region-specific crop inputs from crop cards. See Region-Linked Crops for more details.#

Bugfix: Max Land Area Proportion shows as Zero in Input viewer#

The application included a bug where, when no upper limit was provided for a specific crop’s land area constraint, it was saved as an upper limit of 0. This is cosmetic and was ignored by the model. Some model runs may still show upper limits on land area of 0, but their results remain correct. New model runs will correctly indicate “no limit” in these instances.

Gross Revenue Sums Available in all Model Areas#

Previously, sums of gross revenue across an entire model run were only available when OpenAg included employment data for a model area. Now they are available on the Summary tab of the results viewer for all model areas. The sums take into account active filters, allowing you to see the value for groups of regions, crops, etc.

Visual Changelog - May 2021#

Display the Difference Between Model Runs as a Percent#

_images/chart_percent_change.gif

Now, when normalizing to another model run, you can choose to display the differences as a percentage rather than as the raw values.#

Settings Work Now + A New Setting To Increase Table Density#

_images/settings.png

We’ve had a settings section for a while, but it had a bug where you couldn’t actually change anything. That’s been fixed and you can now make use of the previously existing setting to change whether the list of model runs shows all model runs in your organization by default, or just yours. Additionally, we added a new setting that allows for denser table displays by removing some of the padding in each table cell.#

Better Communication of Disabled Region Adjustments#

_images/disabled_sliders.png

Previously, when a model area supported an adjustment, such as rainfall or irrigation, but the region didn’t support it, the slider would disappear from that region’s card, creating confusion. Now the card disables the slider and displays text overlaying the slider explaining why the slider is disabled.#

Removal of Regions with Disabled Sliders from Map#

_images/removed_polygon_map.png

When we disable a slider (such as for rainfall in the above example), the region will also be removed from the map on the page when viewing the cumulative input modifications. It does not currently remove a region that doesn’t support rainfall or irrigation until it has a card created for modifications. That is, if a region doesn’t support rainfall, it’ll still show on the map with the all crops changes until a card is added for the region.#

New Chart Options: Set Title and Model Run Name#

_images/chart_options.png

OpenAg includes a new section to define basic information for the chart, to allow for more useful exports of charts to use in reports. Options include a chart title and renaming the legend entry for the model run in the chart (default is “This model run”). The download button for the chart has been moved into this section to allow for setting chart options and exporting in one spot.#

Index#

Documentation Downloads and PDF#

Suggestions, Bugs, or Contributions to the Documentation#

Suggested Citation#

Nicholas Santos, Spencer Cole, Anna Rallings, Alex Guzman, José M. Rodríguez-Flores, Alvar Escriva-Bou, Joshua Viers, and Josué Medellín-Azuara. OpenAg Documentation. 2021. https:///openag-docs.readthedocs.io

_images/home_image.png