prod_curve
is an R function for calculating monthly production curves for individual oil wells using data that is typically reported by the oil industry.
prod_curve
accepts the following vectors of production data
well_id
: numbered ID's for individual wellsprod_first_6
: cumulative production during the well's first 6 monthsprod_first_12
: cumulative production during the well's first 12 monthsprod_first_24
: cumulative production during the well's first 24 monthsprod_first_60
: cumulative production during the well's first 60 monthsprod_last_year
: total production during the well's last recorded yearprod_daily_last_year
: average daily production during the well's last recorded yearprod_cumulative
: total cumulative productionprod_peak_daily
: peak daily productiondate_start
: start date of the well's records. Must be in decimal form: 2012-03-01 = 2012.16date_end
: end date of the well's records. Must be in decimal form: 2012-03-01 = 2012.16 date_endpeak_month
: month number of peak production. Example: if well peaked 20 months after the start of production,peak_month=20
decline_3
: the percentage decline in production 3 months after peak productiondecline_12
: the percentage decline in production 3 months after peak productiondecline_24
: the percentage decline in production 3 months after peak productiondecline_60
: the percentage decline in production 3 months after peak productionstep_threshold
: a fractional threshold to test for a step function in the production curve. If any change in cumulative production between time steps is greater thanstep_threshold*prod_cumulative
, we estimate the production curve solely from cumulative production data.
For an example of this type of production data, see this github repo: https://github.com/magerton/drillinginfo-data-import
prod_curve
returns a list with estimated monthly production data for each well.
well_id
: a vector of well IDSproduction_month
: a vector of production months for each wellcumulative_production
a vector of cumulative production for each well
To use prod_curve
, install the following R packages:
Put the source code (prod_curv.cpp
) in the directory of your R script. Then source it with the command sourceCpp('prod_curv.cpp')
.