2.8.3. vacumm.tide.marigraph – Traitements marégraphiques

Provides a class to perform basic operations on marigraphic sea level data

class Marigraph(data, tide_filter='demerliac', outside_std=3.5, bad_values=None, verbose=False, mean=None, **kwargs)[source]

Bases: object

A marigraph class that support statistics and plots.

You give as input a 1D cdms sea level variable with a suitable time, or a tide.StationInfo() object, or simply a 5-letter shom ID. The class will design an object with high and low tides, and pure tidal and without tidal signal. You can optionnally specify a time axis on wich the input signal is to be interpolated before any processing. You can also restrict the time range and perfom a running average.

Parameters:

All parameters are passed to set()

  • data : It can be either

    • A cdms2 1D array with a time axis.
    • A StationInfo instance.
    • The name of a station that can be search for using StationInfo.
  • select: time range for data selection (like (‘1999’,‘2000-01-01’,’co’)). If None, time range is reset [default: None],

  • global_anomaly: First remove the anomaly of the whole signal before any processing [default: False]

  • anomaly: Remove the anomaly of the restricted sample before any processing [default: False]

  • shom_anomaly: Same but removed mean is get from observation at correspondind shom station [default: False]

%s

Example:
>>> # Get data
>>> from vacumm.tide import Marigraph
>>> brest = Marigraph('BREST',range=('2006-03','2006-08'),hourly=True)
>>> # Plot
>>> brest.plot_sea_level()
>>> brest.plot_low_high()
>>> brest.plot_cotes()
>>> # Change time range
>>> brest.set_time_range(('2006-07','2006-08','co'))
>>> # Change tide filter
>>> brest.set_tide_filter('godin')
>>> # Save
>>> f = cdms.open('mytide.nc')
>>> f.write(brest.cotes())
>>> f.write(brest.high())
>>> f.write(brest.low())
>>> f.write(brest.zeros())
>>> f.close()
anomaly()[source]

Sea level anomaly

clean()[source]

Clean out the marigraph object

cotes(anom=True, **kwargs)[source]

Return the sea level without the tide signal (surcotes and decotes). You must specify the filter before using this method.

%(ref)s

highs(ref='mean', **kwargs)[source]

High tides

%(ref)s

latitude(val=None)[source]

Set or return the station latitude

longitude(val=None)[source]

Set or return the station longitude

lows(ref='mean', **kwargs)[source]

Low tides

%(ref)s

mean()[source]

Mean sea level

name(name=None)[source]

Set or return the station name

plot(var=None, orig=True, tide=True, cotes=True, highs=True, lows=True, zeros=True, legend=True, title=None, savefig=None, savefigs=None, show=True, marker='o', **kwargs)[source]
sea_level()[source]

Sea level

set_tide_filter(tide_filter)[source]

Set the tide filter

Parameters:%(tide_filter)s
tide(anom=True, **kwargs)[source]
Return the tide signal: this signal is obtained by filtering the original sea level signal
using a demerliac or a godin filer.

%(ref)s

zeros(ref='mean', **kwargs)[source]

Zeros of sea level anomaly

%(ref)s