compute_LPET_elevation.py

  • Calculates long-period equilibrium tides for an input file

  • Uses the summation of fifteen tidal spectral lines from [Cartwright1971] [Cartwright1973]

  • Can read and write ascii, netCDF4, HDF5, (cloud optimized) geotiff and (geo)parquet formats

Source code

Calling Sequence

usage: compute_LPET_elevations.py [-h]
                                  [--format {csv,netCDF4,HDF5,GTiff,cog,parquet}]
                                  [--variables VARIABLES [VARIABLES ...]]
                                  [--header HEADER] [--delimiter DELIMITER]
                                  [--type {drift,grid,time series}]
                                  [--epoch EPOCH]
                                  [--deltatime DELTATIME [DELTATIME ...]]
                                  [--standard {UTC,GPS,TAI,LORAN,datetime}]
                                  [--projection PROJECTION]
                                  [--fill-value FILL_VALUE] [--verbose]
                                  [--mode MODE]
                                  [infile] [outfile]

Positional Arguments

infile

Input file to run

outfile

Computed output file

Named Arguments

--format, -F

Possible choices: csv, netCDF4, HDF5, GTiff, cog, parquet

Input and output data format

  • 'csv': ascii with comma-separated values

  • 'netCDF4': Network Common Data Format version 4

  • 'HDF5': Hierarchical Data Format version 5

  • 'GTiff': GeoTiff georeferenced raster imagery

  • 'cog': Cloud Optimized GeoTIFF

  • 'parquet': Apache (geo)parquet

--variables, -v

Variable names of data in input file

--header, -H

Number of header lines for csv files

--delimiter

Delimiter for csv or ascii files

--type, -t

Possible choices: drift, grid, time series

Input data type

  • 'drift': drift buoys or satellite/airborne altimetry (time per data point)

  • 'grid': spatial grids or images (single time for all data points)

  • 'time series': station locations with multiple time values

--epoch, -e

Reference epoch of input time

  • 'days since 1858-11-17T00:00:00' (default Modified Julian Days)

--deltatime, -d

Input delta time for files without date variables

  • can be set to 0 to use exact calendar date from epoch

--standard, -s

Possible choices: UTC, GPS, TAI, LORAN, datetime

Input time standard for delta times

  • 'UTC': Coordinate Universal Time

  • 'GPS': GPS Time

  • 'LORAN': Long Range Navigator Time

  • 'TAI': International Atomic Time

  • 'datetime': formatted datetime string in UTC

--projection, -P

Spatial projection as EPSG code or PROJ4 string

--fill-value, -f

Invalid value for spatial fields

--verbose, -V

Verbose output of processing run

--mode, -M

Permission mode of output file

References

[Cartwright1971]

D. E. Cartwright and R. J. Tayler, “New Computations of the Tide-generating Potential,” Geophysical Journal of the Royal Astronomical Society, 23(1), 45–73. (1971). doi: 10.1111/j.1365-246X.1971.tb01803.x

[Cartwright1973]

D. E. Cartwright and A. C. Edden, “Corrected Tables of Tidal Harmonics,” Geophysical Journal of the Royal Astronomical Society, 33(3), 253–264, (1973). doi: 10.1111/j.1365-246X.1973.tb03420.x