model
Retrieves tide model parameters for named tide models and from model definition files
General Attributes and Methods
- class pyTMD.io.model(directory: str | pathlib.Path | None = None, **kwargs)[source]
Retrieves tide model parameters for named models or from a model definition file for use in the pyTMD tide prediction programs
- Attributes
- atl03: str
HDF5 dataset string for output ATL03 tide heights
- atl06: str
HDF5 dataset string for output ATL06 tide heights
- atl07: str
HDF5 dataset string for output ATL07 tide heights
- atl10: str
HDF5 dataset string for output ATL10 tide heights
- atl11: str
HDF5 dataset string for output ATL11 tide heights
- atl12: str
HDF5 dataset string for output ATL12 tide heights
- compressed: bool
Model files are gzip compressed
- constituents: list
Model constituents for
FES
models- description: str
HDF5
description
attribute string for output tide heights- directory: str, pathlib.Path or None, default None
Working data directory for tide models
- flexure: bool
Flexure adjustment field for tide heights is available
- format: str
Model format
OTIS
ATLAS
TMD3
netcdf
GOT
FES
- gla12: str
HDF5 dataset string for output GLA12 tide heights
- grid_file: pathlib.Path
Model grid file for
OTIS
,ATLAS
andTMD3
models- gzip: bool
Suffix if model is compressed
- long_name: str
HDF5
long_name
attribute string for output tide heights- model_directory: pathlib.Path
Full path to model directory
- model_file: pathlib.Path or list
Model constituent file or list of files
- name: str
Model name
- projection: str
Model projection for
OTIS
,ATLAS
andTMD3
models- scale: float
Model scaling factor for converting to output units
- suffix: str
Suffix if ATLAS model is
'netcdf'
format- type: str
Model type
z
u
v
- verify: bool
Verify that all model files exist
- version: str
Tide model version
- elevation(m: str)[source]
Create a model object from known tidal elevation models
- Parameters
- m: str
model name
- current(m: str)[source]
Create a model object from known tidal current models
- Parameters
- m: str
model name
- property gzip: str
Returns suffix for gzip compression
- property suffix: str
Returns format suffix for netCDF4 ATLAS files
- property atl03: str
Returns ICESat-2 ATL03 attribute string for a given variable
- property atl06: str
Returns ICESat-2 ATL06 attribute string for a given variable
- property atl07: str
Returns ICESat-2 ATL07 attribute string for a given variable
- property atl10: str
Returns ICESat-2 ATL07 attribute string for a given variable
- property atl11: str
Returns ICESat-2 ATL11 attribute string for a given variable
- property atl12: str
Returns ICESat-2 ATL12 attribute string for a given variable
- property gla12: str
Returns ICESat GLA12 attribute string for a given variable
- property long_name: str
Returns
long_name
attribute string for a given variable
- property description: str
Returns
description
attribute string for a given variable
- pathfinder(model_file: str | pathlib.Path | list)[source]
Completes file paths and appends file and gzip suffixes
- Parameters
- model_file: str, pathlib.Path or list
model file(s) to complete
- from_file(definition_file: str | pathlib.Path | io.IOBase)[source]
Create a model object from an input definition file
- Parameters
- definition_file: str, pathlib.Path or io.IOBase
model definition file for creating model object
- static parse_file(model_file: str | pathlib.Path, raise_error: bool = False)[source]
Parses a model file for a tidal constituent name
- Parameters
- model_file: str or pathlib.Path
Tide model file to parse
- raise_error: bool, default False
Raise exception if constituent is not found in file name
- Returns
- constituent: str or list
constituent name