Earth orientation data
The motion of the polar axis causes a slight correction to the absolute gravity
value, see functions
polar_motion_correction() and
dg_polar(). Its calculation requires knowledge
of the Earth orientation parameters (EOP) at the time of measurement. This data
is published at
https://www.iers.org/IERS/EN/DataProducts/EarthOrientationData/eop.html.
gravitools needs this data to propery work (polar motion correction). You can either download the data manually and store it at the recommended path or use a post-install script.
Recommended
run download_eop_data in a shell after first package installation to download the data to this standard location
For manual download: get the CSV data file
(https://datacenter.iers.org/data/csv/finals2000A.all.csv) and save it under
<userspace>/.config/gravitools/finals2000A.all.csv (defined by
EOP_PATH), so it can be found automatically.
If you use this default location, the function
update_eop_data() facilitates
updating it. If the file is older than 12 hours (by default), it will download
a new copy and replace the old file. This is useful for cronjobs, for instance.
You can now call read_eop_data() to
read and parse this data file.
from gravitools.corrections import read_eop_data
eop = read_eop_data()
print(eop.loc["2024":].head())
x y type
utc
2024-01-01 00:00:00+00:00 0.136911 0.202214 final
2024-01-02 00:00:00+00:00 0.134904 0.202515 final
2024-01-03 00:00:00+00:00 0.133129 0.203146 final
2024-01-04 00:00:00+00:00 0.131589 0.203979 final
2024-01-05 00:00:00+00:00 0.130043 0.205166 final
You can also supply an alternative path, if the file is not at the default location.
eop = read_eop_data("path/to/finals2000A.all.csv")
Since this data will likely be used multiple times, it is automatically cached
by read_eop_data() as a global variable
eop_data of the gravitools.corrections
module. You can also write this variable directly, if you wish to load the data
from an alternative source.
The function get_eop_data() provides a
wrapper for accessing this global variable. If eop_data has been set, it will
return the cached data. Otherwise, it will call read_eop_data()
first to read it from the default location.
dg_polar() calculates the polar motion correction at a given location
coordinate and list of time indices. If you do not explicitly supply EOP data
to it, it will acquire this data using get_eop_data().
The published EOP data contains final results for past dates and predictions
for future dates, as indicated by the "type" column. Predictions are generally
accurate enough for the purpose of absolute gravimetry. Nonetheless,
dg_polar() will throw a warning message, if you use them.
In summary, if you supply the EOP data file at the default location, you can
simply call dg_polar() and it will automatically acquire the EOP data. If it
is located at a different location, call
read_eop_data('your/path/finals2000A.all.csv') first. If you use a different
source, either provide the eop argument to dg_polar(), or set
corrections.eop_data first. If you run an automated processing, consider
including a call to update_eop_data().