From aef12693c2ec946c5c88070f6707480df7eb26ec Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Wed, 18 Apr 2012 19:57:07 +0200 Subject: Add a computation of zonal tide effects on UT1 (from IERS conventions). Plus a Test2 class which tests this on the TAI-UTC difference. --- org/madore/ephem/Test2.java | 33 +++++++ org/madore/ephem/ZonalTides.java | 57 ++++++++++++ org/madore/ephem/zonal-tides.dat | 186 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 276 insertions(+) create mode 100644 org/madore/ephem/Test2.java create mode 100644 org/madore/ephem/ZonalTides.java create mode 100644 org/madore/ephem/zonal-tides.dat (limited to 'org/madore/ephem') diff --git a/org/madore/ephem/Test2.java b/org/madore/ephem/Test2.java new file mode 100644 index 0000000..e578719 --- /dev/null +++ b/org/madore/ephem/Test2.java @@ -0,0 +1,33 @@ +package org.madore.ephem; + +import java.io.FileInputStream; +import java.io.InputStreamReader; +import java.io.BufferedReader; + +public final class Test2 { + + public static void main(String[] args) { + Comput.SumPoisson2Terms corr = ZonalTides.getFunc(ZonalTides.Variable.DUT1); + try { + // http://data.iers.org/products/214/14443/orig/eopc04_08_IAU2000.62-now + FileInputStream str = new FileInputStream("/tmp/eopc04_08_IAU2000.62-now"); + BufferedReader in = new BufferedReader(new InputStreamReader(str, "utf-8")); + String s; + while ( ( s = in.readLine() ) != null ) { + String[] fields = s.split("\\s+"); + if ( fields.length<1 || ! fields[0].matches("\\d{4}") ) + continue; + int mjd = Integer.parseInt(fields[3]); + double utcOffset = Time.utcOffset(mjd, 0); + double t = Ephem.fromJd((utcOffset+32.184)/86400. + mjd + 2400000.5); + double v = corr.v(t) * 1.e-4; + double ut1Offset = Double.parseDouble(fields[6]); + double off = ut1Offset - utcOffset; + System.out.format("%d\t%.7f\t%.7f\t%.7f\n", mjd, off, v, off-v); + } + } catch ( Exception e ) { + throw new RuntimeException(e); + } + } + +} diff --git a/org/madore/ephem/ZonalTides.java b/org/madore/ephem/ZonalTides.java new file mode 100644 index 0000000..166abcc --- /dev/null +++ b/org/madore/ephem/ZonalTides.java @@ -0,0 +1,57 @@ +package org.madore.ephem; + +import java.util.List; +import java.util.ArrayList; +import java.util.EnumMap; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.BufferedReader; + +public final class ZonalTides { + + public static enum Variable { + DUT1("dut1"), DLOD("dlod"), DOMEGA("domega"); + final String name; + Variable(String name) { this.name = name; } + } + + // The argument is in Julian centuries (value is in radians). + public static Comput.Polynomial[] lambdas = new Comput.Polynomial[] { + new Comput.Polynomial(134.96340251*Comput.degree, 1717915923.2178*Comput.arcsecond, 31.8792*Comput.arcsecond +0.051635*Comput.arcsecond, -0.00024470*Comput.arcsecond), // Delaunay l + new Comput.Polynomial(357.52910918*Comput.degree, 129596581.0481*Comput.arcsecond, -0.5532*Comput.arcsecond +0.000136*Comput.arcsecond, -0.00001149*Comput.arcsecond), // Delaunay l′ + new Comput.Polynomial(93.27209062*Comput.degree, 1739527262.8478*Comput.arcsecond, -12.7512*Comput.arcsecond -0.001037*Comput.arcsecond, 0.00000417*Comput.arcsecond), // Delaunay F + new Comput.Polynomial(297.85019547*Comput.degree, 1602961601.2090*Comput.arcsecond, -6.3706*Comput.arcsecond +0.006593*Comput.arcsecond, -0.00003169*Comput.arcsecond), // Delaunay D + new Comput.Polynomial(125.04455501*Comput.degree, -6962890.5431*Comput.arcsecond, 7.4722*Comput.arcsecond +0.007702*Comput.arcsecond, -0.00005939*Comput.arcsecond) // Delaunay Ω + }; + + private static EnumMap data = new EnumMap(Variable.class); + + public static Comput.SumPoisson2Terms getFunc(Variable v) { + if ( ! data.containsKey(v) ) { + List series = new ArrayList(); + try { + InputStream str = ZonalTides.class.getResourceAsStream("zonal-tides.dat"); + BufferedReader in = new BufferedReader(new InputStreamReader(str, "utf-8")); + String s; + while ( ( s = in.readLine() ) != null ) { + String[] fields = s.split("\t"); + if ( ! fields[1].equals(v.name) ) + continue; + int deg = Integer.parseInt(fields[2]); + String[] subfields = fields[3].split(","); + double[] om = new double[5]; + for ( int j=0 ; j<5 ; j++ ) + om[j] = Double.parseDouble(subfields[j]); + double b = Double.parseDouble(fields[4]); + double a = Double.parseDouble(fields[5]); + series.add(Comput.Poisson2Term.ab(deg, a, b, om, lambdas)); + } + } catch ( Exception e ) { + throw new RuntimeException(e); + } + data.put(v, new Comput.SumPoisson2Terms(series)); + } + return data.get(v); + } + +} diff --git a/org/madore/ephem/zonal-tides.dat b/org/madore/ephem/zonal-tides.dat new file mode 100644 index 0000000..0f88093 --- /dev/null +++ b/org/madore/ephem/zonal-tides.dat @@ -0,0 +1,186 @@ +zonal-tides dut1 0 1,0,2,2,2 -0.0235 0.0000 +zonal-tides dut1 0 2,0,2,0,1 -0.0404 0.0000 +zonal-tides dut1 0 2,0,2,0,2 -0.0987 0.0000 +zonal-tides dut1 0 0,0,2,2,1 -0.0508 0.0000 +zonal-tides dut1 0 0,0,2,2,2 -0.1231 0.0000 +zonal-tides dut1 0 1,0,2,0,0 -0.0385 0.0000 +zonal-tides dut1 0 1,0,2,0,1 -0.4108 0.0000 +zonal-tides dut1 0 1,0,2,0,2 -0.9926 0.0000 +zonal-tides dut1 0 3,0,0,0,0 -0.0179 0.0000 +zonal-tides dut1 0 -1,0,2,2,1 -0.0818 0.0000 +zonal-tides dut1 0 -1,0,2,2,2 -0.1974 0.0000 +zonal-tides dut1 0 1,0,0,2,0 -0.0761 0.0000 +zonal-tides dut1 0 2,0,2,-2,2 0.0216 0.0000 +zonal-tides dut1 0 0,1,2,0,2 0.0254 0.0000 +zonal-tides dut1 0 0,0,2,0,0 -0.2989 0.0000 +zonal-tides dut1 0 0,0,2,0,1 -3.1873 0.2010 +zonal-tides dut1 0 0,0,2,0,2 -7.8468 0.5320 +zonal-tides dut1 0 2,0,0,0,-1 0.0216 0.0000 +zonal-tides dut1 0 2,0,0,0,0 -0.3384 0.0000 +zonal-tides dut1 0 2,0,0,0,1 0.0179 0.0000 +zonal-tides dut1 0 0,-1,2,0,2 -0.0244 0.0000 +zonal-tides dut1 0 0,0,0,2,-1 0.0470 0.0000 +zonal-tides dut1 0 0,0,0,2,0 -0.7341 0.0000 +zonal-tides dut1 0 0,0,0,2,1 -0.0526 0.0000 +zonal-tides dut1 0 0,-1,0,2,0 -0.0508 0.0000 +zonal-tides dut1 0 1,0,2,-2,1 0.0498 0.0000 +zonal-tides dut1 0 1,0,2,-2,2 0.1006 0.0000 +zonal-tides dut1 0 1,1,0,0,0 0.0395 0.0000 +zonal-tides dut1 0 -1,0,2,0,0 0.0470 0.0000 +zonal-tides dut1 0 -1,0,2,0,1 0.1767 0.0000 +zonal-tides dut1 0 -1,0,2,0,2 0.4352 0.0000 +zonal-tides dut1 0 1,0,0,0,-1 0.5339 0.0000 +zonal-tides dut1 0 1,0,0,0,0 -8.4046 0.2500 +zonal-tides dut1 0 1,0,0,0,1 0.5443 0.0000 +zonal-tides dut1 0 0,0,0,1,0 0.0470 0.0000 +zonal-tides dut1 0 1,-1,0,0,0 -0.0555 0.0000 +zonal-tides dut1 0 -1,0,0,2,-1 0.1175 0.0000 +zonal-tides dut1 0 -1,0,0,2,0 -1.8236 0.0000 +zonal-tides dut1 0 -1,0,0,2,1 0.1316 0.0000 +zonal-tides dut1 0 1,0,-2,2,-1 0.0179 0.0000 +zonal-tides dut1 0 -1,-1,0,2,0 -0.0855 0.0000 +zonal-tides dut1 0 0,2,2,-2,2 -0.0573 0.0000 +zonal-tides dut1 0 0,1,2,-2,1 0.0329 0.0000 +zonal-tides dut1 0 0,1,2,-2,2 -1.8847 0.0000 +zonal-tides dut1 0 0,0,2,-2,0 0.2510 0.0000 +zonal-tides dut1 0 0,0,2,-2,1 1.1703 0.0000 +zonal-tides dut1 0 0,0,2,-2,2 -49.7174 0.4330 +zonal-tides dut1 0 0,2,0,0,0 -0.1936 0.0000 +zonal-tides dut1 0 2,0,0,-2,-1 0.0489 0.0000 +zonal-tides dut1 0 2,0,0,-2,0 -0.5471 0.0000 +zonal-tides dut1 0 2,0,0,-2,1 0.0367 0.0000 +zonal-tides dut1 0 0,-1,2,-2,1 -0.0451 0.0000 +zonal-tides dut1 0 0,1,0,0,-1 0.0921 0.0000 +zonal-tides dut1 0 0,-1,2,-2,2 0.8281 0.0000 +zonal-tides dut1 0 0,1,0,0,0 -15.8887 0.1530 +zonal-tides dut1 0 0,1,0,0,1 -0.1382 0.0000 +zonal-tides dut1 0 1,0,0,-1,0 0.0348 0.0000 +zonal-tides dut1 0 2,0,-2,0,0 -0.1372 0.0000 +zonal-tides dut1 0 -2,0,2,0,1 0.4211 0.0000 +zonal-tides dut1 0 -1,1,0,1,0 -0.0404 0.0000 +zonal-tides dut1 0 0,0,0,0,2 7.8998 0.0000 +zonal-tides dut1 0 0,0,0,0,1 -1617.2681 0.0000 +zonal-tides dlod 0 1,0,2,2,2 0.0000 0.2617 +zonal-tides dlod 0 2,0,2,0,1 0.0000 0.3706 +zonal-tides dlod 0 2,0,2,0,2 0.0000 0.9041 +zonal-tides dlod 0 0,0,2,2,1 0.0000 0.4499 +zonal-tides dlod 0 0,0,2,2,2 0.0000 1.0904 +zonal-tides dlod 0 1,0,2,0,0 0.0000 0.2659 +zonal-tides dlod 0 1,0,2,0,1 0.0000 2.8298 +zonal-tides dlod 0 1,0,2,0,2 0.0000 6.8291 +zonal-tides dlod 0 3,0,0,0,0 0.0000 0.1222 +zonal-tides dlod 0 -1,0,2,2,1 0.0000 0.5384 +zonal-tides dlod 0 -1,0,2,2,2 0.0000 1.2978 +zonal-tides dlod 0 1,0,0,2,0 0.0000 0.4976 +zonal-tides dlod 0 2,0,2,-2,2 0.0000 -0.1060 +zonal-tides dlod 0 0,1,2,0,2 0.0000 -0.1211 +zonal-tides dlod 0 0,0,2,0,0 0.0000 1.3804 +zonal-tides dlod 0 0,0,2,0,1 0.9266 14.6890 +zonal-tides dlod 0 0,0,2,0,2 2.4469 36.0910 +zonal-tides dlod 0 2,0,0,0,-1 0.0000 -0.0988 +zonal-tides dlod 0 2,0,0,0,0 0.0000 1.5433 +zonal-tides dlod 0 2,0,0,0,1 0.0000 -0.0813 +zonal-tides dlod 0 0,-1,2,0,2 0.0000 0.1082 +zonal-tides dlod 0 0,0,0,2,-1 0.0000 -0.2004 +zonal-tides dlod 0 0,0,0,2,0 0.0000 3.1240 +zonal-tides dlod 0 0,0,0,2,1 0.0000 0.2235 +zonal-tides dlod 0 0,-1,0,2,0 0.0000 0.2073 +zonal-tides dlod 0 1,0,2,-2,1 0.0000 -0.1312 +zonal-tides dlod 0 1,0,2,-2,2 0.0000 -0.2640 +zonal-tides dlod 0 1,1,0,0,0 0.0000 -0.0968 +zonal-tides dlod 0 -1,0,2,0,0 0.0000 -0.1099 +zonal-tides dlod 0 -1,0,2,0,1 0.0000 -0.4115 +zonal-tides dlod 0 -1,0,2,0,2 0.0000 -1.0093 +zonal-tides dlod 0 1,0,0,0,-1 0.0000 -1.2224 +zonal-tides dlod 0 1,0,0,0,0 0.5701 19.1647 +zonal-tides dlod 0 1,0,0,0,1 0.0000 -1.2360 +zonal-tides dlod 0 0,0,0,1,0 0.0000 -0.1000 +zonal-tides dlod 0 1,-1,0,0,0 0.0000 0.1169 +zonal-tides dlod 0 -1,0,0,2,-1 0.0000 -0.2332 +zonal-tides dlod 0 -1,0,0,2,0 0.0000 3.6018 +zonal-tides dlod 0 -1,0,0,2,1 0.0000 -0.2587 +zonal-tides dlod 0 1,0,-2,2,-1 0.0000 -0.0344 +zonal-tides dlod 0 -1,-1,0,2,0 0.0000 0.1542 +zonal-tides dlod 0 0,2,2,-2,2 0.0000 0.0395 +zonal-tides dlod 0 0,1,2,-2,1 0.0000 -0.0173 +zonal-tides dlod 0 0,1,2,-2,2 0.0000 0.9726 +zonal-tides dlod 0 0,0,2,-2,0 0.0000 -0.0910 +zonal-tides dlod 0 0,0,2,-2,1 0.0000 -0.4135 +zonal-tides dlod 0 0,0,2,-2,2 0.1490 17.1056 +zonal-tides dlod 0 0,2,0,0,0 0.0000 0.0666 +zonal-tides dlod 0 2,0,0,-2,-1 0.0000 -0.0154 +zonal-tides dlod 0 2,0,0,-2,0 0.0000 0.1670 +zonal-tides dlod 0 2,0,0,-2,1 0.0000 -0.0108 +zonal-tides dlod 0 0,-1,2,-2,1 0.0000 0.0082 +zonal-tides dlod 0 0,1,0,0,-1 0.0000 -0.0167 +zonal-tides dlod 0 0,-1,2,-2,2 0.0000 -0.1425 +zonal-tides dlod 0 0,1,0,0,0 0.0267 2.7332 +zonal-tides dlod 0 0,1,0,0,1 0.0000 0.0225 +zonal-tides dlod 0 1,0,0,-1,0 0.0000 -0.0053 +zonal-tides dlod 0 2,0,-2,0,0 0.0000 -0.0079 +zonal-tides dlod 0 -2,0,2,0,1 0.0000 -0.0203 +zonal-tides dlod 0 -1,1,0,1,0 0.0000 0.0008 +zonal-tides dlod 0 0,0,0,0,2 0.0000 0.1460 +zonal-tides dlod 0 0,0,0,0,1 0.0000 -14.9471 +zonal-tides domega 0 1,0,2,2,2 0.0000 -0.2209 +zonal-tides domega 0 2,0,2,0,1 0.0000 -0.3128 +zonal-tides domega 0 2,0,2,0,2 0.0000 -0.7630 +zonal-tides domega 0 0,0,2,2,1 0.0000 -0.3797 +zonal-tides domega 0 0,0,2,2,2 0.0000 -0.9203 +zonal-tides domega 0 1,0,2,0,0 0.0000 -0.2244 +zonal-tides domega 0 1,0,2,0,1 0.0000 -2.3884 +zonal-tides domega 0 1,0,2,0,2 0.0000 -5.7637 +zonal-tides domega 0 3,0,0,0,0 0.0000 -0.1031 +zonal-tides domega 0 -1,0,2,2,1 0.0000 -0.4544 +zonal-tides domega 0 -1,0,2,2,2 0.0000 -1.0953 +zonal-tides domega 0 1,0,0,2,0 0.0000 -0.4200 +zonal-tides domega 0 2,0,2,-2,2 0.0000 0.0895 +zonal-tides domega 0 0,1,2,0,2 0.0000 0.1022 +zonal-tides domega 0 0,0,2,0,0 0.0000 -1.1650 +zonal-tides domega 0 0,0,2,0,1 -0.7820 -12.3974 +zonal-tides domega 0 0,0,2,0,2 -2.0652 -30.4606 +zonal-tides domega 0 2,0,0,0,-1 0.0000 0.0834 +zonal-tides domega 0 2,0,0,0,0 0.0000 -1.3025 +zonal-tides domega 0 2,0,0,0,1 0.0000 0.0686 +zonal-tides domega 0 0,-1,2,0,2 0.0000 -0.0913 +zonal-tides domega 0 0,0,0,2,-1 0.0000 0.1692 +zonal-tides domega 0 0,0,0,2,0 0.0000 -2.6367 +zonal-tides domega 0 0,0,0,2,1 0.0000 -0.1886 +zonal-tides domega 0 0,-1,0,2,0 0.0000 -0.1749 +zonal-tides domega 0 1,0,2,-2,1 0.0000 0.1107 +zonal-tides domega 0 1,0,2,-2,2 0.0000 0.2228 +zonal-tides domega 0 1,1,0,0,0 0.0000 0.0817 +zonal-tides domega 0 -1,0,2,0,0 0.0000 0.0927 +zonal-tides domega 0 -1,0,2,0,1 0.0000 0.3473 +zonal-tides domega 0 -1,0,2,0,2 0.0000 0.8519 +zonal-tides domega 0 1,0,0,0,-1 0.0000 1.0317 +zonal-tides domega 0 1,0,0,0,0 -0.4811 -16.1749 +zonal-tides domega 0 1,0,0,0,1 0.0000 1.0432 +zonal-tides domega 0 0,0,0,1,0 0.0000 0.0844 +zonal-tides domega 0 1,-1,0,0,0 0.0000 -0.0987 +zonal-tides domega 0 -1,0,0,2,-1 0.0000 0.1968 +zonal-tides domega 0 -1,0,0,2,0 0.0000 -3.0399 +zonal-tides domega 0 -1,0,0,2,1 0.0000 0.2183 +zonal-tides domega 0 1,0,-2,2,-1 0.0000 0.0290 +zonal-tides domega 0 -1,-1,0,2,0 0.0000 -0.1302 +zonal-tides domega 0 0,2,2,-2,2 0.0000 -0.0333 +zonal-tides domega 0 0,1,2,-2,1 0.0000 0.0146 +zonal-tides domega 0 0,1,2,-2,2 0.0000 -0.8209 +zonal-tides domega 0 0,0,2,-2,0 0.0000 0.0768 +zonal-tides domega 0 0,0,2,-2,1 0.0000 0.3490 +zonal-tides domega 0 0,0,2,-2,2 -0.1257 -14.4370 +zonal-tides domega 0 0,2,0,0,0 0.0000 -0.0562 +zonal-tides domega 0 2,0,0,-2,-1 0.0000 0.0130 +zonal-tides domega 0 2,0,0,-2,0 0.0000 -0.1409 +zonal-tides domega 0 2,0,0,-2,1 0.0000 0.0092 +zonal-tides domega 0 0,-1,2,-2,1 0.0000 -0.0069 +zonal-tides domega 0 0,1,0,0,-1 0.0000 0.0141 +zonal-tides domega 0 0,-1,2,-2,2 0.0000 0.1202 +zonal-tides domega 0 0,1,0,0,0 -0.0222 -2.3068 +zonal-tides domega 0 0,1,0,0,1 0.0000 -0.0190 +zonal-tides domega 0 1,0,0,-1,0 0.0000 0.0045 +zonal-tides domega 0 2,0,-2,0,0 0.0000 0.0066 +zonal-tides domega 0 -2,0,2,0,1 0.0000 0.0171 +zonal-tides domega 0 -1,1,0,1,0 0.0000 -0.0007 +zonal-tides domega 0 0,0,0,0,2 0.0000 -0.1232 +zonal-tides domega 0 0,0,0,0,1 0.0000 12.6153 -- cgit v1.2.3