Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

time_testing_2.sh 806 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. #!/usr/bin/env bash
  2. #
  3. #
  4. # This script runs some simple test to verify the that new time scheme
  5. # has been implemented successfully
  6. # Test 2:
  7. # Generate relative time values from 0-4 and use the --TIME_* options to
  8. # convert to absolute calendar time for ASCII output.
  9. #
  10. # First we use J2000 which uses days. Hence the output should cover the
  11. # first 5 days in year 2000, starting at noon:
  12. cat << EOF > tt2.answer
  13. 2000-01-01T12:00:00 0
  14. 2000-01-02T00:00:00 0.125
  15. 2000-01-02T12:00:00 0.25
  16. 2000-01-03T00:00:00 0.375
  17. 2000-01-03T12:00:00 0.5
  18. 2000-01-04T00:00:00 0.625
  19. 2000-01-04T12:00:00 0.75
  20. 2000-01-05T00:00:00 0.875
  21. 2000-01-05T12:00:00 1
  22. EOF
  23. gmt sample1d -I0.5 << EOF > tt2.d
  24. 0 0
  25. 4 1
  26. EOF
  27. gmt convert tt2.d -fi0t -fo0T --TIME_SYSTEM=j2000 > tt2.result
  28. diff tt2.result tt2.answer --strip-trailing-cr > fail
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...