../_images/calypso.png

toto.inputs.linz

Read LINZ netcdf file This import function works with NetCDF files created from tidal gauge from LINZ. It reads both sensors as welll as the README file which should be in the same directory. This class returns a Panda Dataframe with some extra attributes such as Latitude,Longitude,Units.

Parameters

filename(files,) str or list_like

A list of filename to process. This can be either a NetCDF file made by linz.downdload or a csv file directly downloaded from Linz website

Examples

>>> from toto.inputs.linz import LINZfile
>>> nc=LINZfile('filename.nc')._toDataFrame()
class toto.inputs.linz.LINZfile(filenames, datum_height=None)[source]

Bases: object

static defaultExtensions()[source]
toto.inputs.linz.correct_vertical_drifting(readme, ref_datum, ds, sensor=41)[source]

Corrects sensor vertical offset drifting using given datum height.

Args:

readme (str): Full path to information/readme txt file ref_datum (float): Datum height usually obtained at LINZ website (e.g. https://www.geodesy.linz.govt.nz/gdb/index.cgi?code=DD1N&nextform=histhgt) ds (pandas series): Elevation data time series sensor (int, optional): LINZ sensor code. Defaults to 41.

Returns:

pandas series: Elevation data corrected by sensor vertical drifting.

toto.inputs.linz.download_linz(station, start_date, end_date=None, fileout=None, sensors=[40, 41])[source]
toto.inputs.linz.get_latlon(readme)[source]
toto.inputs.linz.lat2msl(readme, ds, sensor=41)[source]
toto.inputs.linz.url_response(url)[source]