SPB Git

Repository Public

fetch_iers_finals2000A.sh 3.1 KB 71 lines shellscript

1#!/bin/sh2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : ORIX Cosmos8# File             : DataPipeline/time/fetch_iers_finals2000A.sh9# Module           : DataPipeline10# Repository       : https://git.spboucher.ai/orix-cosmos11# Project Website  : https://www.orixlab.dev12# Created          : 2026-11-2413# Last Modified    : 2026-11-2414#15# Author           : Simon-Pierre Boucher16# Position         : Professor of Finance17# Institution      : Université du Québec en Outaouais (UQO)18# Organization     : SP Boucher19# Website          : https://spboucher.ai20# Git              : https://git.spboucher.ai21#22# Preferred Contact: support@spboucher.ai23# Technical Contact: dev@spboucher.ai24# Security/Admin   : admin@spboucher.ai25#26# Copyright (c) 202627# Simon-Pierre Boucher28# All rights reserved where applicable. This file is governed by the29# applicable project license, copyright notices and relevant law.30# Existing third-party rights and notices remain unaffected.31#32# License          : None specified (no license file in this repository)33#34# Do not embed credentials, private keys, access tokens,35# certificates or confidential personal information.36#37# =============================================================================38# END OF SP BOUCHER SOURCE HEADER39# =============================================================================4041# ORIX Cosmos42# File: DataPipeline/time/fetch_iers_finals2000A.sh43# Description: Downloads the IERS/USNO Earth-orientation file finals2000A.all (daily UT1-UTC since 1973 plus about one year of predictions) to a chosen location and prints its SHA-256.44#45# Author: Simon-Pierre Boucher46# Contact: contact@spboucher.ai47#48# Usage: DataPipeline/time/fetch_iers_finals2000A.sh <output-file>49# The file is OPTIONAL data: CosmosTime works without it (long-term Delta T model, flagged as estimated).50# It is not committed to the repository. To ship it inside the module, write it to51# Packages/CosmosTime/Sources/Resources/finals2000A.all (EarthOrientationTable.bundledIfPresent then loads it)52# after the redistribution terms have been confirmed and recorded in DATA_SOURCES.md.53# The file is refreshed weekly by the IERS Rapid Service/Prediction Center (U.S. Naval Observatory).54# Format description: https://maia.usno.navy.mil/ser7/readme.finals2000A55set -eu56[ $# -eq 1 ] || { echo "usage: $0 <output-file>" >&2; exit 2; }57OUT="$1"58TMP="$(mktemp)"59for URL in "https://datacenter.iers.org/data/9/finals2000A.all" "https://maia.usno.navy.mil/ser7/finals2000A.all"; do60    if curl --fail --silent --show-error --location --max-time 120 -o "$TMP" "$URL" && [ "$(wc -c < "$TMP")" -gt 1000000 ]; then61        mv "$TMP" "$OUT"62        echo "source : $URL"63        echo "date   : $(date -u +%Y-%m-%d)"64        echo "sha256 : $(shasum -a 256 "$OUT" | cut -d' ' -f1)"65        exit 066    fi67done68rm -f "$TMP"69echo "could not download finals2000A.all" >&270exit 171
Files main
Menu

Theme