tools

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GeometryFeatureTypes []string = []string{"Subbasin", "Reach", "Junction", "Source", "Sink", "Reservoir", "Diversion"}

GeometryFeatureTypes ...

Functions

func BuildFilePath

func BuildFilePath(modelDirectory, fileName string) string

BuildFilePath ... build the file path given its name and the file path of the definition file...

Types

type ControlFiles

type ControlFiles struct {
	Paths []string
	Data  map[string]interface{} // placeholder
}

ControlFiles ...

type FileExt

type FileExt struct {
	Definition string
	Control    string
	Forcing    string
	Geometry   string
	Grid       string
}

FileExt ...

type ForcingFiles

type ForcingFiles struct {
	Paths []string
	Data  map[string]interface{} // placeholder
}

ForcingFiles ...

type GeometryFiles

type GeometryFiles struct {
	Paths              []string
	FeaturesProperties map[string]interface{} // placeholder
	Georeference       interface{}            // placeholder
}

GeometryFiles is a general type that should contain all data pulled from the models spatial files

type HmsControlData

type HmsControlData struct {
	Title        string
	Hash         string
	Description  string
	StartDate    string `json:"Start Date"`
	StartTime    string `json:"Start Time"`
	EndDate      string `json:"End Date"`
	EndTime      string `json:"End Time"`
	TimeInterval string `json:"Time Interval"`
	Notes        string
}

HmsControlData ...

type HmsForcingData

type HmsForcingData struct {
	Title            string
	Hash             string
	Description      string
	Units            string `json:"Unit System"`
	MissingToDefault string `json:"Set Missing Data to Default"`
	Precip           string `json:"Precipitation"`
	SWave            string `json:"Short-Wave Radiation"`
	LWave            string `json:"Long-Wave Radiation"`
	Snowmelt         string
	ET               string   `json:"Evapotranspiration"`
	BasinModel       []string `json:"Use Basin Model"`
	Subbasin         []string
	Notes            string
}

HmsForcingData ...

type HmsGeometryData

type HmsGeometryData struct {
	Title          string
	Hash           string
	Description    string
	Units          string `json:"Unit System"`
	MissingtoZero  string `json:"Missing Flow To Zero"`
	FlowRatio      string `json:"Enable Flow Ratio"`
	LocalFlow      string `json:"Local Flow At Junctions"`
	SedRouting     string `json:"Sediment Routing"`
	QualityRouting string `json:"Quality Routing"`
	Features       map[string][]string
	GeoRefFiles    []string `json:"Geospatial Reference Files"`
	CRS            string   `json:"Coordinate System"`
	LossRate       string   `json:"LossRate"`
	Transform      string   `json:"Transform"`
	Notes          string
}

HmsGeometryData ...

type HmsInputFiles

type HmsInputFiles struct {
	ControlFiles  []string
	ForcingFiles  []string
	GeometryFiles []string
}

HmsInputFiles ...

func (HmsInputFiles) Paths

func (i HmsInputFiles) Paths() []string

Paths ...

type HmsModel

type HmsModel struct {
	Type               string
	Title              string
	Version            string
	Description        string
	FileStore          filestore.FileStore
	ModelDirectory     string
	DefinitionFile     string
	DefinitionFileHash string
	Files              HmsModelFiles
	Metadata           HmsModelMetadata
}

HmsModel ...

func NewHmsModel

func NewHmsModel(key string, fs filestore.FileStore) (*HmsModel, error)

NewHmsModel ...

func (*HmsModel) GeospatialData

func (hm *HmsModel) GeospatialData() interface{}

GeospatialData ...

func (*HmsModel) Index

func (hm *HmsModel) Index() Model

Index ...

func (*HmsModel) IsAModel

func (hm *HmsModel) IsAModel() bool

IsAModel ...

func (*HmsModel) IsGeospatial

func (hm *HmsModel) IsGeospatial() bool

IsGeospatial ...

func (*HmsModel) ModelType

func (hm *HmsModel) ModelType() string

ModelType ...

func (*HmsModel) ModelVersion

func (hm *HmsModel) ModelVersion() string

ModelVersion ...

type HmsModelFiles

type HmsModelFiles struct {
	InputFiles        HmsInputFiles
	OutputFiles       HmsOutputFiles
	SupplementalFiles HmsSupplementalFiles
}

HmsModelFiles ...

func (HmsModelFiles) Paths

func (mf HmsModelFiles) Paths() []string

Paths will pull all paths from the HmsInputFiles, HmsOutputFiles, and HmsSupplementalFiles members of the model type

type HmsModelMetadata

type HmsModelMetadata struct {
	ControlMetadata  map[string]HmsControlData
	ForcingMetadata  map[string]HmsForcingData
	GeometryMetadata map[string]HmsGeometryData
}

HmsModelMetadata ...

type HmsOutputFiles

type HmsOutputFiles struct {
	PredictionFiles []string
	RunFiles        []string
	RunLogs         []string
}

HmsOutputFiles ...

func (HmsOutputFiles) Paths

func (o HmsOutputFiles) Paths() []string

Paths ...

type HmsSupplementalFiles

type HmsSupplementalFiles struct {
	GridFiles          []string
	VisualizationFiles []string
	ObservationFiles   []string
}

HmsSupplementalFiles ...

func (HmsSupplementalFiles) Paths

func (s HmsSupplementalFiles) Paths() []string

Paths ...

type InputFiles

type InputFiles struct {
	ControlFiles        ControlFiles
	ForcingFiles        ForcingFiles
	GeometryFiles       GeometryFiles
	SimulationVariables interface{} // placeholder
	LocalVariables      interface{} // placeholder
}

InputFiles is a general type that should contain all data pulled from the models input files

type Model

type Model struct {
	Type               string
	Version            string
	DefinitionFile     string
	DefinitionFileHash string
	Files              ModelFiles
}

Model is a general type should contain all necessary data for a model of any type.

type ModelFiles

type ModelFiles struct {
	InputFiles        InputFiles
	OutputFiles       OutputFiles
	SupplementalFiles SupplementalFiles
}

ModelFiles ...

type OutputFiles

type OutputFiles struct {
	Paths           []string
	ModelPrediction interface{} // placeholder
	RunFiles        []string
	RunLogs         []string
}

OutputFiles is a general type that should contain all data pulled from the models output files

type SupplementalFiles

type SupplementalFiles struct {
	Paths             []string
	Visulizations     interface{} // placeholder
	ObservationalData interface{} // placeholder
}

SupplementalFiles is a general type that should contain all data pulled from the models supplemental files

Jump to

Keyboard shortcuts

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