Skip to content

Commit

Permalink
feat: add tide program for ATL10 freeboard files (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutterley authored Dec 11, 2021
1 parent 144a1f6 commit 9fc5bfb
Show file tree
Hide file tree
Showing 13 changed files with 1,173 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pyTMD
|codecov|
|Binder|
|Pangeo|
|zenodo|

.. |Language| image:: https://img.shields.io/pypi/pyversions/pyTMD?color=green
:target: https://www.python.org/
Expand All @@ -35,6 +36,8 @@ pyTMD
.. |Pangeo| image:: https://binder.pangeo.io/badge.svg
:target: https://binder.pangeo.io/v2/gh/tsutterley/pyTMD/main

.. |zenodo| image:: https://zenodo.org/badge/107997403.svg
:target: https://zenodo.org/badge/latestdoi/107997403

Python-based tidal prediction software that reads OTIS, GOT and FES formatted tidal solutions for calculating ocean and load tides

Expand Down
1 change: 1 addition & 0 deletions doc/source/getting_started/Getting-Started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ There are specific programs for correcting some publicly available elevation dat
- `ICESat-2 ATL03 geolocated photon data <https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL03.py>`_
- `ICESat-2 ATL06 land ice height data <https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL06.py>`_
- `ICESat-2 ATL07 sea ice height data <https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL07.py>`_
- `ICESat-2 ATL10 sea ice freeboard data <https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL10.py>`_
- `ICESat-2 ATL11 annual land ice height data <https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL11.py>`_
- `ICESat-2 ATL12 ocean surface height data <https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL12.py>`_

Expand Down
2 changes: 2 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ conventions for calculating radial pole tide displacements.
user_guide/compute_LPET_ICESat2_ATL03.md
user_guide/compute_LPET_ICESat2_ATL06.md
user_guide/compute_LPET_ICESat2_ATL07.md
user_guide/compute_LPET_ICESat2_ATL10.md
user_guide/compute_LPET_ICESat2_ATL11.md
user_guide/compute_LPET_ICESat2_ATL12.md
user_guide/compute_LPT_displacements.md
Expand All @@ -88,5 +89,6 @@ conventions for calculating radial pole tide displacements.
user_guide/compute_tides_ICESat2_ATL03.md
user_guide/compute_tides_ICESat2_ATL06.md
user_guide/compute_tides_ICESat2_ATL07.md
user_guide/compute_tides_ICESat2_ATL10.md
user_guide/compute_tides_ICESat2_ATL11.md
user_guide/compute_tides_ICESat2_ATL12.md
18 changes: 18 additions & 0 deletions doc/source/user_guide/compute_LPET_ICESat2_ATL10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
compute_LPET_ICESat2_ATL10.py
=============================

- Calculates long-period equilibrium tidal elevations for correcting ICESat-2 sea ice freeboard data
- Will calculate the long-period tides for all ATL10 segments and not just ocean segments defined by the ocean tide mask

#### Calling Sequence
```bash
python compute_LPET_ICESat2_ATL10.py input_file
```
[Source code](https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_LPET_ICESat2_ATL10.py)

#### Inputs
1. `input_file`: input ICESat-2 ATL10 file

#### Command Line Options
- `-M X`, `--mode X`: Permission mode of output file
- `-V`, `--verbose`: Output information about each created file
57 changes: 57 additions & 0 deletions doc/source/user_guide/compute_tides_ICESat2_ATL10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
compute_tides_ICESat2_ATL10.py
==============================

- Calculates tidal elevations for correcting ICESat-2 sea ice freeboard data
- Can use OTIS format tidal solutions provided by Ohio State University and ESR
- Can use Global Tide Model (GOT) solutions provided by Richard Ray at GSFC
- Can use Finite Element Solution (FES) models provided by AVISO

#### Calling Sequence
```bash
python compute_tides_ICESat2_ATL10.py --directory <path_to_directory> --tide <model> input_file
```
[Source code](https://github.com/tsutterley/pyTMD/blob/main/scripts/compute_tides_ICESat2_ATL10.py)

#### Inputs
1. `input_file`: input ICESat-2 ATL10 file

#### Command Line Options
- `-D X`, `--directory X`: Working data directory
- `-T X`, `--tide X`: Tide model to use in correction
* `'CATS0201'`
* `'CATS2008'`
* `'CATS2008_load'`
* `'TPXO9-atlas'`
* `'TPXO9-atlas-v2'`
* `'TPXO9-atlas-v3'`
* `'TPXO9-atlas-v4'`
* `'TPXO9-atlas-v5'`
* `'TPXO9.1'`
* `'TPXO8-atlas'`
* `'TPXO7.2'`
* `'TPXO7.2_load'`
* `'AODTM-5'`
* `'AOTIM-5'`
* `'AOTIM-5-2018'`
* `'Gr1km-v2'`
* `'GOT4.7'`
* `'GOT4.7_load'`
* `'GOT4.8'`
* `'GOT4.8_load'`
* `'GOT4.10'`
* `'GOT4.10_load'`
* `'FES2014'`
* `'FES2014_load'`
- `--atlas-format X`: ATLAS tide model format (`'OTIS'`, `'netcdf'`)
- `--gzip`, `-G`: Tide model files are gzip compressed
- `--definition-file X`: Model definition file for use as correction
- `-I X`, `--interpolate X`: Interpolation method
* `'spline'`
* `'linear'`
* `'nearest'`
* `'bilinear'`
- `-E`, `--extrapolate`: Extrapolate with nearest-neighbors
- `-c X`, `--cutoff X`: Extrapolation cutoff in kilometers
* set to `'inf'` to extrapolate for all points
- `-M X`, `--mode X`: Permission mode of output file
- `-V`, `--verbose`: Output information about each created file
4 changes: 4 additions & 0 deletions doc/source/user_guide/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ General Attributes and Methods

HDF5 dataset string for output ATL07 tide heights

.. attribute:: model.atl10

HDF5 dataset string for output ATL10 tide heights

.. attribute:: model.atl11

HDF5 dataset string for output ATL11 tide heights
Expand Down
26 changes: 26 additions & 0 deletions pyTMD/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
UPDATE HISTORY:
Updated 12/2021: added TPXO9-atlas-v5 to list of available tide models
added atl10 attributes for tidal elevation files
Written 09/2021
"""
import os
Expand All @@ -28,6 +29,7 @@ def __init__(self, directory=os.getcwd(), **kwargs):
self.atl03 = None
self.atl06 = None
self.atl07 = None
self.atl10 = None
self.atl11 = None
self.atl12 = None
self.compressed = copy.copy(kwargs['compressed'])
Expand Down Expand Up @@ -150,6 +152,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -170,6 +173,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -191,6 +195,7 @@ def elevation(self,m):
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl10 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
Expand All @@ -217,6 +222,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -243,6 +249,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand Down Expand Up @@ -270,6 +277,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand Down Expand Up @@ -297,6 +305,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand Down Expand Up @@ -325,6 +334,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -346,6 +356,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -367,6 +378,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -388,6 +400,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -409,6 +422,7 @@ def elevation(self,m):
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl10 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
Expand All @@ -429,6 +443,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -450,6 +465,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -472,6 +488,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -492,6 +509,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -516,6 +534,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -542,6 +561,7 @@ def elevation(self,m):
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl10 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
Expand All @@ -565,6 +585,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -591,6 +612,7 @@ def elevation(self,m):
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl10 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
Expand All @@ -614,6 +636,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand All @@ -640,6 +663,7 @@ def elevation(self,m):
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl10 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
Expand Down Expand Up @@ -672,6 +696,7 @@ def elevation(self,m):
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl10 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
Expand Down Expand Up @@ -705,6 +730,7 @@ def elevation(self,m):
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl10 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
Expand Down
2 changes: 1 addition & 1 deletion scripts/compute_LPET_ICESat2_ATL06.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def HDF5_ATL06_tide_write(IS2_atl06_tide, IS2_atl06_attrs, INPUT=None,
fileID.attrs['featureType'] = 'trajectory'
fileID.attrs['title'] = 'ATLAS/ICESat-2 L3A Land Ice Height'
fileID.attrs['summary'] = ('Estimates of the ice-sheet tidal parameters '
'needed to interpret and assess the quality of land height estimates.')
'needed to interpret and assess the quality of the height estimates.')
fileID.attrs['description'] = ('Land ice parameters for each beam. All '
'parameters are calculated for the same along-track increments for '
'each beam and repeat.')
Expand Down
2 changes: 1 addition & 1 deletion scripts/compute_LPET_ICESat2_ATL07.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def HDF5_ATL07_tide_write(IS2_atl07_tide, IS2_atl07_attrs, INPUT=None,
fileID.attrs['featureType'] = 'trajectory'
fileID.attrs['title'] = 'ATLAS/ICESat-2 L3A Sea Ice Height'
fileID.attrs['summary'] = ('Estimates of the sea ice tidal parameters '
'needed to interpret and assess the quality of sea height estimates.')
'needed to interpret and assess the quality of the height estimates.')
fileID.attrs['description'] = ('The data set (ATL07) contains along-track '
'heights for sea ice and open water leads (at varying length scales) '
'relative to the WGS84 ellipsoid (ITRF2014 reference frame) after '
Expand Down
Loading

0 comments on commit 9fc5bfb

Please sign in to comment.