-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal mean pole and finals EOP files (#31)
add automatic update of leap second, delta time and EOP files normalize source and destination paths in copy add more servers for mean-pole and iers coordinates add test for calculating EOP differentials
- Loading branch information
1 parent
eb28370
commit 9c41a2c
Showing
26 changed files
with
21,052 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This workflow will install Python dependencies and update the time and EOP files | ||
|
||
name: Auto-Update Files | ||
|
||
on: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '0 0 1 * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libproj-dev proj-data proj-bin libgeos-dev octave | ||
sudo apt-get install libhdf5-dev libnetcdf-dev | ||
pip install --upgrade pip | ||
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Update required files | ||
run: | | ||
pip install --no-deps . | ||
pytest test/test_leap_seconds.py | ||
- name: Test with pytest | ||
run: | | ||
pytest test/test_leap_seconds.py test/test_time.py test/test_eop.py | ||
--username=${{ secrets.EARTHDATA_USERNAME }} \ | ||
--password=${{ secrets.EARTHDATA_PASSWORD }} | ||
- name: Check for changes | ||
id: changes | ||
run: | | ||
if [ -n "$(git status --porcelain)" ] ; then | ||
echo "::set-output name=detected::true"; | ||
echo "::debug::Changes detected"; | ||
else | ||
echo "::set-output name=detected::false"; | ||
echo "::debug::No changes detected"; | ||
fi | ||
- name: Create pull request | ||
if: steps.changes.outputs.detected == 'true' | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
assignees: ${{ github.actor }} | ||
title: "Automatic time updates" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
====== | ||
eop.py | ||
====== | ||
|
||
Utilities for maintaining Earth Orientation Parameter (EOP) files | ||
|
||
- Syncs mean pole files with IERS servers | ||
- Can calculate update mean pole files using data from IERS servers | ||
- Syncs finals orientation files with IERS servers | ||
|
||
`Source code`__ | ||
|
||
.. __: https://github.com/tsutterley/pyTMD/blob/main/pyTMD/eop.py | ||
|
||
|
||
General Methods | ||
=============== | ||
|
||
|
||
.. method:: pyTMD.eop.update_mean_pole(verbose=False, mode=0o775) | ||
|
||
Connects to servers to download mean-pole.tab files from `IERS servers`__ | ||
|
||
.. __: ftp://hpiers.obspm.fr/iers/eop/eopc01/mean-pole.tab | ||
|
||
Keyword arguments: | ||
|
||
`verbose`: print file information about output file | ||
|
||
`mode`: permissions mode of output file | ||
|
||
|
||
.. method:: pyTMD.eop.calculate_mean_pole(verbose=False, mode=0o775) | ||
|
||
Calculates the mean pole coordinates x and y are obtained by a Gaussian-weighted average of the `IERS pole coordinates`__ | ||
|
||
Follows ftp://hpiers.obspm.fr/iers/eop/eopc01/mean-pole.readme | ||
|
||
.. __: ftp://ftp.iers.org/products/eop/long-term/c01/eopc01.1900-now.dat | ||
|
||
Keyword arguments: | ||
|
||
`verbose`: print file information about output file | ||
|
||
`mode`: permissions mode of output file | ||
|
||
Returns: | ||
|
||
`T`: date [decimal-years] | ||
|
||
`xm`: mean pole coordinate x [arcsec] | ||
|
||
`ym`: mean pole coordinate y [arcsec] | ||
|
||
|
||
.. method:: pyTMD.eop.update_finals_file(username=None, password=None, verbose=False, mode=0o775) | ||
|
||
Connects to `servers`__ and downloads finals EOP files | ||
|
||
.. __: ftp://cddis.nasa.gov/products/iers/ | ||
|
||
Keyword arguments: | ||
|
||
`username`: NASA Earthdata username | ||
|
||
`password`: NASA Earthdata password | ||
|
||
`verbose`: print file information about output file | ||
|
||
`mode`: permissions mode of output file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.