fileio

package
v1.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AverageStationResults added in v1.3.12

func AverageStationResults(stationData map[string][]StationResults, AvgStart, AvgEnd int) (map[string][]StationResults, error)

func LoadTextFiles

func LoadTextFiles(filePath string, logger *logging.TheLogger) (map[string][]StationResults, error)

LoadTextFiles loads CropSim text files from a location and returns a map of the results to use in further processing. This should include all the files and results for each station and each year. The map key is the station id that is also stored in the StationResults struct as Station

Types

type MonthlyValues added in v1.0.4

type MonthlyValues struct {
	Et         float64
	Eff_precip float64
	Nir        float64
	Dp         float64
	Ro         float64
	Precip     float64
}

type StationResults

type StationResults struct {
	Station     string
	Soil        int
	MonthlyData []MonthlyValues
	Yr          int
	Crop        int
	Tillage     int
	Irrigation  int
}

func (StationResults) AverageAnnual added in v1.3.12

func (sr StationResults) AverageAnnual() MonthlyValues

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL