Documentation ¶
Index ¶
- Variables
- func GetForcingData(fd *ForcingData, fs filestore.FileStore, flowFilePath string, c chan error, ...)
- func GetGeospatialData(gd *GeoData, fs filestore.FileStore, geomFilePath string, sourceCRS string, ...) error
- func ReadFirstLine(fs filestore.FileStore, fn string) (string, error)
- type BoundaryCondition
- type Connection
- type ControlFiles
- type DateTime
- type Features
- type FlowFileContents
- type ForcingData
- type ForcingFiles
- type GeoData
- type GeomFileContents
- type GeometryFiles
- type Hydrograph
- type InputFiles
- type Model
- type ModelFiles
- type OutputFiles
- type PlanFileContents
- type PrjFileContents
- type Profile
- type ProjectMetadata
- type RSFlow
- type RasModel
- type RatingCurve
- type SteadyData
- type StoAreaElevation
- type StorageArea
- type SupplementalFiles
- type TwoDArea
- type UnsteadyBoundaryConditions
- type UnsteadyData
- type VectorFeature
Constants ¶
This section is empty.
Variables ¶
var RasRE fileExtMatchers = fileExtMatchers{ Geom: regexp.MustCompile(".g[0-9][0-9]"), Plan: regexp.MustCompile(".p[0-9][0-9]"), Steady: regexp.MustCompile(".f[0-9][0-9]"), Unsteady: regexp.MustCompile(".u[0-9][0-9]"), QuasiSteady: regexp.MustCompile(".q[0-9][0-9]"), AllFlow: regexp.MustCompile(".[fqu][0-9][0-9]"), Output: regexp.MustCompile(".O[0-9][0-9]"), SteadyRun: regexp.MustCompile(".r[0-9][0-9]"), UnsteadyRun: regexp.MustCompile(".x[0-9][0-9]"), AllFlowRun: regexp.MustCompile(".[rx][0-9][0-9]"), Projection: regexp.MustCompile(".pr[oj]"), }
Functions ¶
func GetForcingData ¶
func GetForcingData(fd *ForcingData, fs filestore.FileStore, flowFilePath string, c chan error, mu *sync.Mutex)
Get Forcing Data from steady, unsteady or quasi-steady flow file.
Types ¶
type BoundaryCondition ¶
type BoundaryCondition struct { RS string `json:",omitempty"` // only exists for unsteady rivers BCLine string `json:"bc_line,omitempty"` // only exists for unsteady storage and 2D areas Description string `json:"description,omitempty"` // only exists for Rules, not implemented yet Type string `json:"type"` Data interface{} `json:"data"` }
Boundary Condition.
type Connection ¶
type Connection struct { Description string `json:"Description"` UpSA string `json:"Up Area"` DnSA string `json:"Dn Area"` WeirWidth float64 `json:"Weir Width"` WeirElev maxMinPairs `json:"Weir Elevations"` NumGates int `json:"Num Gates"` Gates []gates NumConduits int `json:"Num Culvert Conduits"` Conduits []conduits `json:"Culvert Conduits"` }
Store HEC-RAS SA/2D Area Connections
type ControlFiles ¶
ControlFiles ...
type Features ¶
type Features struct { Rivers []VectorFeature XS []VectorFeature Banks []VectorFeature StorageAreas []VectorFeature TwoDAreas []VectorFeature Mesh []VectorFeature HydraulicStructures []VectorFeature Connections []VectorFeature BCLines []VectorFeature BreakLines []VectorFeature }
Features ...
type FlowFileContents ¶
type FlowFileContents struct { Path string Hash string FileExt string //`json:"File Extension"` FlowTitle string //`json:"Flow Title"` ProgramVersion string //`json:"Program Version"` NProfiles string //`json:"Number of Profiles"` ProfileNames string //`json:"Profile Names"` UpdatedProfileNames string //`json:"Updated Profile Names"` Notes string //`json:"Notes"` }
FlowFileContents keywords and data container for ras flow file search
type ForcingData ¶
type ForcingData struct { Steady map[string]SteadyData `json:"Steady,omitempty"` QuasiUnsteady map[string]interface{} `json:"QuasiUnsteady,omitempty"` // to be implemented Unsteady map[string]UnsteadyData `json:"Unsteady,omitempty"` }
Main struct for focing data.
type ForcingFiles ¶
ForcingFiles ...
type GeomFileContents ¶
type GeomFileContents struct { Path string Hash string FileExt string `json:"File Extension"` GeomTitle string `json:"Geom Title"` ProgramVersion string `json:"Program Version"` Description string `json:"Description"` Structures []hydraulicStructures `json:"Hydraulic Structures"` StorageAreas map[string]StorageArea `json:"Storage Areas"` TwoDAreas map[string]TwoDArea `json:"2D Areas"` Connections map[string]Connection `json:"Connections"` Notes string }
GeomFileContents keywords and data container for ras flow file search
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 Hydrograph ¶
type Hydrograph struct { TimeInterval string `json:"time_interval,omitempty"` EndRS string `json:"flow_distribution_last_RS,omitempty"` // flow will be distributed from RS to EndRS. Valid for Reaches with Uniform Lateral Inflow or Groundwater Interflow Values interface{} `json:"values,omitempty"` UseDSS bool `json:"use_dss"` DSSFile string `json:"dss_file,omitempty"` DSSPath string `json:"dss_path,omitempty"` UseFixedStart bool `json:"fixed_start"` FixedStartDateTime *DateTime `json:"fixed_start_date_time,omitempty"` // pointer to have zero value, so that omitempty can work }
Hydrograph Data. Can be Flow, Stage, Precipitation, Uniform Lateral Inflow, Lateral Inflow, Ground Water Interflow, or Gate Opening Hydrograph.
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 PlanFileContents ¶
type PlanFileContents struct { Path string Hash string FileExt string //`json:"File Extension"` PlanTitle string //`json:"Plan Title"` ShortIdentifier string //`json:"Short Identifier"` ProgramVersion string //`json:"Program Version"` GeomFile string //`json:"Geom File"` FlowFile string //`json:"Flow File"` // unsteady or steady both flow files are stored as FlowFile in HEC RAS plan file, replicating the same here FlowRegime string //`json:"FlowRegime"` Description string //`json:"Description"` Notes string }
PlanFileContents keywords and data container for ras plan file search
type PrjFileContents ¶
type PrjFileContents struct { Hash string ProjTitle string //`json:"Proj Title"` PlanFile []string //`json:"Plan File"` FlowFile []string //`json:"Flow File"` QuasiSteadyFile []string //`json:"QuasiSteady File"` UnsteadyFile []string //`json:"Unsteady File"` GeomFile []string //`json:"Geom File"` Units string //`json:"Units"` CurrentPlan string //`json:"Current Plan"` Description string //`json:"Description"` } //
PrjFileContents keywords and data container for ras project file search
type Profile ¶
type Profile struct { Name string BoundaryConditions map[string]*map[string]BoundaryCondition Flows map[string][]RSFlow StorageAreaElevations []StoAreaElevation }
Steady Flow Profile.
type ProjectMetadata ¶
type ProjectMetadata struct { ProjFilePath string ProjFileContents PrjFileContents //`json:"Project Data"` PlanFiles []PlanFileContents //`json:"Plan Data"` FlowFiles []FlowFileContents //`json:"Flow Data"` GeomFiles []GeomFileContents //`json:"Geometry Data"` Projection string //`json:"Projection"` Notes string //`json:"Notes"` }
ProjectMetadata contains information scraped from all files listed in the .prj file
type RasModel ¶
type RasModel struct { Type string Version string FileStore filestore.FileStore ModelDirectory string FileList []string Metadata ProjectMetadata }
RasModel ...
func NewRasModel ¶
NewRasModel ...
func (*RasModel) GeospatialData ¶
GeospatialData ...
func (*RasModel) IsGeospatial ¶
Checks if a model is geospatial or not. Versions less than 4.0 are not considered geospatial
type RatingCurve ¶
type RatingCurve struct { Values [][2]float64 `json:"values,omitempty"` UseDSS bool `json:"use_dss"` DSSFile string `json:"dss_file,omitempty"` DSSPath string `json:"dss_path,omitempty"` }
Rating Curve
type SteadyData ¶
Steady Data.
type StoAreaElevation ¶
type StoAreaElevation struct { StorageArea string `json:"storage_area"` Elevation float64 `json:"elevation"` }
Storage Area Elevation Data Pair.
type StorageArea ¶
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
type UnsteadyBoundaryConditions ¶
type UnsteadyBoundaryConditions struct { // There can be many boundary conditions for the same element Reaches map[string][]BoundaryCondition Areas map[string][]BoundaryCondition Connections map[string][]BoundaryCondition // Only one boundary condition for each element in pumps PumpStations map[string]BoundaryCondition }
Unsteady Boundary Conditions
type UnsteadyData ¶
type UnsteadyData struct { FlowTitle string ProgramVersion string InitialConditions interface{} // to be implemented BoundaryConditions UnsteadyBoundaryConditions MeterologicalData interface{} // to be implemented ObservedData interface{} // to be implemented // added in version 6.2 }
Unsteady Data
type VectorFeature ¶
type VectorFeature struct { FeatureName string `json:"feature_name"` Fields map[string]interface{} `json:"fields"` Geometry []uint8 `json:"geometry"` }
VectorFeature ...