From 52b10c3f75016937b74615e2b7ef2565ec6376d3 Mon Sep 17 00:00:00 2001 From: Chunxiao Li Date: Sun, 16 Jul 2023 23:01:54 +0800 Subject: [PATCH] Added downloading of Leap Second file from IERS and loading of external(non-buildin) EOP file --- pyatmos/utils/data_prepare.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pyatmos/utils/data_prepare.py diff --git a/pyatmos/utils/data_prepare.py b/pyatmos/utils/data_prepare.py new file mode 100644 index 0000000..371c621 --- /dev/null +++ b/pyatmos/utils/data_prepare.py @@ -0,0 +1,12 @@ +from astropy.utils import iers as iers_astropy + +from .data_download import download_iers + +def iers_load(): + + # load the EOP file + dir_iers,eop_file,leapsecond_file = download_iers() + iers_astropy.conf.auto_download = False + iers_a = iers_astropy.IERS_A.open(eop_file) + leapsecond = iers_astropy.LeapSeconds.from_iers_leap_seconds(leapsecond_file) + eop_table = iers_astropy.earth_orientation_table.set(iers_a) \ No newline at end of file