API Docs for: 0.0.1
Show:

Station Class

Extends Range
Defined in: lib/station.js:35
Module: niviz

A Snow Station.

Constructor

Station

()

Defined in lib/station.js:35

Methods

avgstep

(
  • profile
)
Number

Inherited from Range: lib/range.js:336

Calculate the average timestep of the range.

Parameters:

Returns:

Number:

The average timestep in minutes

duration

(
  • The
)
Number

Inherited from Range: lib/range.js:352

Calculate the duration of the range.

Parameters:

  • The Unit

    moment unit to use (default: hours)

Returns:

Number:

The duration in the unit specified

extract

(
  • parameter
  • height
  • top
  • func
)
Meteo

Defined in lib/station.js:113

Extract a time series for a certain parameter from the profiles

Parameters:

  • parameter String

    Parameter name

  • height Number

    Distance from top or 0 (default)

  • top Boolean

    If true height will be interpreted as depth from layers' top

  • func String

    Which function to use (only 'mean' implemented)

Returns:

index

(
  • date
)

Inherited from Range: lib/range.js:221

Get the closest index for the given date.

Parameters:

  • date Moment

Returns:

Number

insert

(
  • profile
)
chainable

Inherited from Range: lib/range.js:286

Inserts a profile to the range and updates the range's height. NOTE: In case there is already a profile present with the same date, the profile to be inserted is ignored.

Parameters:

matches

(
  • from
  • [to]
)
Boolean

Inherited from Range: lib/range.js:365

Whether or not the range matches the passed-in interval exactly.

Parameters:

  • from Array, Moment
  • [to] Moment optional

    to

Returns:

max

(
  • prop
)
Number

Inherited from Range: lib/range.js:384

Get maximal value for a certain property present in the profiles.

Parameters:

Returns:

merge

(
  • range
)
chainable

Inherited from Range: lib/range.js:318

Merge two range objects by adding the profiles of the object passed.

Parameters:

push

(
  • profile
)
chainable

Inherited from Range: lib/range.js:272

Adds a profile to the range and updates the range's height.

Parameters:

range

(
  • from
  • to
)

Inherited from Range: lib/range.js:185

Get a sub range of profiles by index or by dates.

Note: The new range object will share profile references with the current range!

Parameters:

  • from Number, Moment

    index or date

  • to Number, Moment

    index or date

Returns:

Range

showsoil

(
  • enable
)
chainable

Inherited from Range: lib/range.js:167

Toggle whether to expose all layers of all profiles present or just the ones above the ground, i. e. with a top value > 0.

Parameters:

  • enable Boolean

    true = expose all layers, false = hide soil layers

updateFeatures

() chainable

Inherited from Range: lib/range.js:147

If the station profiles receive an update, this function needs to be called in order to update the features array

Properties

bottom

Number

Inherited from Range: lib/range.js:71

The height at the bottom of the lowest layer of all the profile, measured from the ground.

creationdate

Moment

Defined in lib/station.js:63

emitter

EventEmitter

Defined in lib/station.js:75

empty

Boolean

Inherited from Range: lib/range.js:127

features

Array

Inherited from Range: lib/range.js:135

from

Moment

Inherited from Range: lib/range.js:99

height

Number

Inherited from Range: lib/range.js:86

The maximal distance from top to bottom, i. e. maximal height of all profiles.

id

String

Defined in lib/station.js:51

lastedited

Moment

Defined in lib/station.js:69

length

Number

Inherited from Range: lib/range.js:119

meta

Object

Defined in lib/station.js:85

Collected metadata in one object.

name

String

Defined in lib/station.js:45

position

Position

Defined in lib/station.js:57

profiles

Array

Inherited from Range: lib/range.js:40

to

Moment

Inherited from Range: lib/range.js:109

top

Number

Inherited from Range: lib/range.js:56

The height at the top of the topmost layer of all profiles, measured from the ground.