Station Class
A Snow Station.
Constructor
Station
()
Item Index
Methods
avgstep
-
profile
Calculate the average timestep of the range.
Parameters:
-
profileProfile
Returns:
The average timestep in minutes
duration
-
The
Calculate the duration of the range.
Parameters:
-
TheUnitmoment unit to use (default: hours)
Returns:
The duration in the unit specified
extract
-
parameter -
height -
top -
func
Extract a time series for a certain parameter from the profiles
Parameters:
Returns:
index
-
date
Get the closest index for the given date.
Parameters:
-
dateMoment
Returns:
Number
insert
-
profile
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:
-
profileProfile
matches
-
from -
[to]
Whether or not the range matches the passed-in interval exactly.
Parameters:
-
fromArray, Moment -
[to]Moment optionalto
Returns:
max
-
prop
Get maximal value for a certain property present in the profiles.
Parameters:
-
propStringProperty name
Returns:
merge
-
range
Merge two range objects by adding the profiles of the object passed.
Parameters:
-
rangeRange
push
-
profile
Adds a profile to the range and updates the range's height.
Parameters:
-
profileProfile
range
-
from -
to
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:
-
fromNumber, Momentindex or date
-
toNumber, Momentindex or date
Returns:
Range
showsoil
-
enable
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:
-
enableBooleantrue = expose all layers, false = hide soil layers
updateFeatures
()
chainable
If the station profiles receive an update, this function needs to be called in order to update the features array
Properties
bottom
Number
The height at the bottom of the lowest layer of all the profile, measured from the ground.
