Skip to content

Commit

Permalink
add tides package (GeoNet#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozym authored May 1, 2018
1 parent d75f4e0 commit d061ce1
Show file tree
Hide file tree
Showing 7 changed files with 2,737 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Golang module to load the meta data csv files.

Golang module to configure and describe instrument responses.

## tides

Golang module to configure and describe tsunami gauge tidal parameters.

## tools

Golang tools to manage and process the meta data.
Expand Down
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ error_handler () {
trap error_handler ERR

go test ./meta
go test ./tides
go test ./tests
go test ./tools/stationxml
go test ./tools/altus
Expand Down
113 changes: 113 additions & 0 deletions tides/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@


# tides
`import "github.com/GeoNet/delta/tides"`

* [Overview](#pkg-overview)
* [Index](#pkg-index)
* [Subdirectories](#pkg-subdirectories)

## <a name="pkg-overview">Overview</a>
Package tides provides an embeddable mechanism for providing tidal constituents for given gauge sites
that can be used for tide predication.




## <a name="pkg-index">Index</a>
* [type Constituent](#Constituent)
* [func (c Constituent) String() string](#Constituent.String)
* [type Tide](#Tide)
* [func Lookup(code string) *Tide](#Lookup)
* [func (t Tide) Zone() float64](#Tide.Zone)


#### <a name="pkg-files">Package files</a>
[auto.go](/src/github.com/GeoNet/delta/tides/auto.go) [tides.go](/src/github.com/GeoNet/delta/tides/tides.go)






## <a name="Constituent">type</a> [Constituent](/src/target/tides.go?s=451:534#L14)
``` go
type Constituent struct {
Name string
Amplitude float64
Lag float64
}
```
Constitutent stores the calculated amplotude and lag for a named tidal phase, the amplitude
and lag are given in units of meters and degrees respectively.










### <a name="Constituent.String">func</a> (Constituent) [String](/src/target/tides.go?s=607:643#L21)
``` go
func (c Constituent) String() string
```
String provides a standard representation of the tidal constituent.




## <a name="Tide">type</a> [Tide](/src/target/tides.go?s=1024:1202#L29)
``` go
type Tide struct {
Code string
Network string
Number string
TimeZone float64
Latitude float64
Longitude float64
Crex string

Constituents []Constituent
}
```
Tide provides the general parameters needed to predict tides at a given site and the
associated tidal consitituents. The TimeZone, Latitude, and Longitude are expected
to be the parameters used to generated the tidal prediction constituents and may
differ from the geographic values recorded elsewhere.







### <a name="Lookup">func</a> [Lookup](/src/target/tides.go?s=1508:1538#L49)
``` go
func Lookup(code string) *Tide
```
Lookup will return a Tide pointer for the requested site code.
A nil pointer will be returned if a code cannot be found.





### <a name="Tide.Zone">func</a> (Tide) [Zone](/src/target/tides.go?s=1311:1339#L43)
``` go
func (t Tide) Zone() float64
```
Zone provides a conversion of the time zone parameter for use with common tidal
prediction software.








- - -
Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)
Loading

0 comments on commit d061ce1

Please sign in to comment.