API Reference

Classes

pvlib-python provides a collection of classes for users that prefer object-oriented programming. These classes can help users keep track of data in a more organized way, and can help to simplify the modeling process. The classes do not add any functionality beyond the procedural code. Most of the object methods are simple wrappers around the corresponding procedural code.

cu.CONSUMPTIVE_USE(sp, cp) docstring for CONSUMPTIVE_USE
crop.CROP(shrtname, longname, crop_type, …) docstring for CROP
site.SITE(sws) docstring for SITE
weather.WEATHER(fname, wsname[, units]) docstring for WEATHER
excel.Excel(filename[, vis, create])

cu.CONSUMPTIVE_USE

CONSUMPTIVE_USE Class definitions.

cu.CONSUMPTIVE_USE.__init__(sp, cp)
cu.CONSUMPTIVE_USE.calc_adj(cuirr, pccrop, …)
cu.CONSUMPTIVE_USE.calc_cu()
cu.CONSUMPTIVE_USE.calc_dates()
cu.CONSUMPTIVE_USE.calc_effprecip(precip)
cu.CONSUMPTIVE_USE.calc_fao(yr[, repeat])
cu.CONSUMPTIVE_USE.calc_faokc(frac, lfrac, kc)
cu.CONSUMPTIVE_USE.calc_kc()
cu.CONSUMPTIVE_USE.calc_midpts() Find midpoints of seasons
cu.CONSUMPTIVE_USE.calc_pclite(lat)
cu.CONSUMPTIVE_USE.calc_temp()
cu.CONSUMPTIVE_USE.clndr(doy) Convert day of year in month and day.
cu.CONSUMPTIVE_USE.fall(atemp, mean) Find end of growing season day of year.
cu.CONSUMPTIVE_USE.fao_cu(p, tavg)
cu.CONSUMPTIVE_USE.fiveyr_avg(yr, fivc, …)
cu.CONSUMPTIVE_USE.get_dates(temps) Find the start and end of the
cu.CONSUMPTIVE_USE.interp_kc(mid, temp, day)
cu.CONSUMPTIVE_USE.jln(m, d)
cu.CONSUMPTIVE_USE.kc_ann()
cu.CONSUMPTIVE_USE.kc_per()
cu.CONSUMPTIVE_USE.midday(nmo, midpt, day2, …)
cu.CONSUMPTIVE_USE.midtemp(nmo, midpt, k, …) Calculates mean monthly temperature
cu.CONSUMPTIVE_USE.mmtemp(nmo, midpt, day2, num) Caclulates Spring part month mean temperature
cu.CONSUMPTIVE_USE.set_dates()
cu.CONSUMPTIVE_USE.spring(atemp, mean) Find beginning of growing season day of year.

crop.CROP

CROP Class definitions.

crop.CROP.__init__(shrtname, longname, …)
crop.CROP.get_ckc() Reads in crop coefficients.
crop.CROP.get_nckc() Reads in crop coefficients.
crop.CROP.read_cropdev()
crop.CROP.read_kc()
crop.CROP.read_stages()

weather.WEATHER

WEATHER Class definitions.

weather.WEATHER.__init__(fname, wsname[, units])
weather.WEATHER.mnmnthly(df)
weather.WEATHER.read_data([vis])

excel.Excel

SITE Class definitions.

excel.Excel.__init__(filename[, vis, create])
excel.Excel.close_workbook([save_state])
excel.Excel.createSheet(workbook, name)
excel.Excel.create_workbook([state])
excel.Excel.open()
excel.Excel.open_workbook([state])
excel.Excel.setVis(boolean)

Main

main

main

main.import_data(vis) Reads the site input file and initilizes a SITE object, including crop and weather information.
main.main()
main.run() Runs the CONS2 program.
main.write_crp_output(directory, name, …) Writes output data for each crop.
main.write_excel_monthly(wb, name, etmethod, …)
main.write_excel_yearly(wb, name, etmethod, …)
main.write_output(directory, name, years, data) Writes summary data for consumptive use, effective precipitation, and irrigrated consumptive for the whole site.

Read Infile

read_infile