This program is Copyright © 2004 by Jean-Marc Baillard and is used here by permission.
This program is supplied without representation or warranty of any kind. Jean-Marc Baillard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.
- The 2 following programs calculate the water level in a port with
the 37 harmonic constituents given by the NOAA
at the URL
http://co-ops.nos.noaa.gov/data_retrieve.shtml?input_code=100201001har
- Nodal corrections are
also taken into account.
- "WL37" is a relatively
huge program ( 1138 bytes / SIZE 082 ) which works for
any port.
- Practically, many terms
are negligible and an example of simplification is listed
for Seattle ( "WLS" with only 462 bytes / SIZE 007 )
Water Level ( 37 waves )
-The water level is computed by the harmonic method:
wl(t) = Z0 + A1 cos ( V1
- G1 ) + ............ + Ai cos (
Vi - Gi ) + ..........
where Z0
= the mean sea level ; Ai and Gi
= the harmonic constants of the port. ( A = amplitudes ; G
= epochs )
The Vi are linear combinations of
astronomical arguments, namely:
-Actually, the main constituents have "nodal corrections" and each term may be written:
A ( cos ( V - G ) + a cos ( V - N' - G ) + b cos ( V + N' - G ) ) where a and b are constantsData Registers:
R00 thru R06: temp ( R04 = 0.052954d
and when the program stops, R02 = 720 d )
• R07 thru R81 = the harmonic constants
of the port. These 75 registers are
to be initialized before executing "WL37"
Flags: /
Subroutine:
none if you have a Time-Module
"J0" otherwise ( cf "Phases of the Moon for the
HP-41" )
-The different amplitudes and epochs are to be stored in the order given by the NOAA:
R07 = mean sea level
Constituents Amplitudes Epochs | Constituents Amplitudes Epochs | Constituents Amplitudes Epochs M2
R08
R09
MU2
R32
R33
RHO1 R56
R57
S2
R10
R11
2N2
R34 R35
Q1
R58
R59
N2
R12
R13
OO1
R36
R37
T2
R60
R61
K1
R14
R15
LAMDA2
R38
R39
R2
R62
R63
M4
R16 R17
S1
R40
R41
2Q1 R64
R65
O1
R18
R19
M1
R42
R43
P1
R66
R67
M6
R20 R21
J1
R44
R45
2SM2
R68 R69
MK3
R22
R23
MM
R46
R47
M3
R70 R71
S4
R24
R25
SSA
R48
R49
L2
R72
R73
MN4
R26
R27
SA
R50
R51
2MK3 R74
R75
NU2
R28 R29
MSF
R52
R53
K2 R76
R77
S6
R30
R31
MF
R54
R55
M8
R78
R79
MS4
R80
R81
-All phases are to be expressed in degrees.
001 LBL "WL37"
002 HR
003 24
004 /
005 X<>Y
006 1.012
007 DDAYS
If you don't have a Time Module, replace the 3 lines
06-07-08 by the 2 lines: XEQ "J0"
+
008 -
009 STO 00
010 DEG
011 .985647
----------------- SA wave ---------------------
012 *
013 STO 01
014 10
015 +
016 RCL 51
017 -
018 SIN
019 RCL 50
020 *
021 RCL 00
----------------- S1 wave ---------------------
022 360
023 *
024 STO 02
025 RCL 41
026 -
027 COS
028 RCL 40
029 *
030 -
031 RCL 02
----------------- P1 wave ---------------------
032 RCL 01
033 -
034 STO 03
035 RCL 00
036 .052954
037 *
038 STO 04
039 -
040 65
041 -
042 RCL 67
043 -
044 COS
045 89
046 /
047 RCL 03
048 10
049 -
050 RCL 67
051 -
052 COS
053 +
054 RCL 66
055 *
056 +
057 RCL 02
----------------- T2 wave ---------------------
058 RCL 03
059 +
060 3
061 +
062 RCL 61
063 -
064 COS
065 RCL 60
066 *
067 +
068 RCL 01
----------------- K1 wave ---------------------
069 ST+ 01
070 RCL 02
071 +
072 STO 03
073 10
074 +
075 RCL 15
076 -
077 COS
078 RCL 03
079 RCL 04
080 -
081 45
082 -
083 RCL 15
084 -
085 COS
086 50
087 /
088 +
089 RCL 03
090 RCL 04
091 +
092 65
093 +
094 RCL 15
095 -
096 COS
097 7.4
098 /
099 -
100 RCL 14
101 *
102 +
103 RCL 02
----------------- R2 wave ---------------------
104 ST+ 02
105 RCL 03
106 +
107 3
108 -
109 RCL 63
110 -
111 COS
112 RCL 62
113 *
114 -
115 RCL 00
----------------- MM wave ---------------------
116 13.064993
117 *
118 STO 05
119 52
120 -
121 RCL 47
122 -
123 COS
124 RCL 05
125 RCL 04
126 -
127 73
128 +
129 RCL 47
130 -
131 COS
132 15
133 /
134 -
135 RCL 04
136 RCL 05
137 +
138 3
139 +
140 RCL 47
141 -
142 COS
143 15
144 /
145 +
146 RCL 46
147 *
148 -
149 RCL 03
----------------- J1 wave ---------------------
150 RCL 05
151 +
152 STO 06
153 42
154 -
155 RCL 45
156 -
157 COS
158 RCL 06
159 RCL 04
160 -
161 7
162 -
163 RCL 45
164 -
165 SIN
166 34
167 /
168 +
169 RCL 04
170 RCL 06
171 +
172 13
173 +
174 RCL 45
175 -
176 COS
177 5
178 /
179 -
180 RCL 44
181 *
182 -
183 RCL 03
----------------- M1 wave ---------------------
184 RCL 05
185 -
186 STO 06
187 62
188 +
189 RCL 43
190 -
191 COS
192 RCL 06
193 RCL 04
194 -
195 7
196 +
197 RCL 43
198 -
199 COS
200 34
201 /
202 +
203 RCL 04
204 RCL 06
205 +
206 63
207 -
208 RCL 43
209 -
210 COS
211 5
212 /
213 +
214 RCL 42
215 *
216 -
217 RCL 00
----------------- MF wave ---------------------
218 26.352793
219 *
220 STO 06
221 63
222 +
223 RCL 55
224 -
225 COS
226 RCL 04
227 RCL 06
228 +
229 62
230 -
231 RCL 55
232 -
233 COS
234 2.4
235 /
236 +
237 RCL 54
238 *
239 +
240 RCL 03
----------------- MK3 wave -------------------
241 3
242 *
243 RCL 06
244 -
245 STO 00
246 34
247 -
248 RCL 23
249 -
250 COS
251 RCL 00
252 RCL 04
253 -
254 1
255 +
256 RCL 23
257 -
258 SIN
259 18
260 /
261 +
262 RCL 00
263 RCL 04
264 +
265 21
266 +
267 RCL 23
268 -
269 COS
270 7.4
271 /
272 -
273 RCL 22
274 *
275 -
276 RCL 03
----------------- OO1 wave --------------------
277 RCL 06
278 ST- 03
279 +
280 STO 00
281 73
282 +
283 RCL 37
284 -
285 COS
286 RCL 00
287 RCL 04
288 +
289 52
290 -
291 RCL 37
292 -
293 COS
294 .64
295 *
296 +
297 RCL 00
298 RCL 04
299 ST+ X
300 +
301 3
302 +
303 RCL 37
304 -
305 COS
306 7.5
307 /
308 -
309 RCL 36
310 *
311 +
312 RCL 03
----------------- O1 wave ---------------------
313 53.5
314 -
315 RCL 19
316 -
317 COS
318 RCL 03
319 RCL 04
320 -
321 72
322 +
323 RCL 19
324 -
325 COS
326 5.3
327 /
328 +
329 RCL 18
330 *
331 -
332 RCL 03
----------------- Q1 wave ---------------------
333 RCL 05
334 -
335 STO 00
336 2
337 -
338 RCL 59
339 -
340 COS
341 RCL 00
342 RCL 04
343 -
344 57
345 -
346 RCL 59
347 -
348 COS
349 5.3
350 /
351 -
352 RCL 58
353 *
354 +
355 RCL 00
----------------- 2Q1 wave --------------------
356 RCL 05
357 -
358 STO 00
359 50
360 +
361 RCL 65
362 -
363 COS
364 RCL 00
365 RCL 04
366 -
367 5
368 -
369 RCL 65
370 -
371 COS
372 5.3
373 /
374 -
375 RCL 64
376 *
377 -
378 RCL 01
----------------- SSA wave -------------------
379 20
380 +
381 RCL 49
382 -
383 COS
384 RCL 48
385 *
386 -
387 RCL 02
----------------- S2 wave ---------------------
388 RCL 11
389 -
390 COS
391 RCL 02
392 RCL 04
393 -
394 55
395 -
396 RCL 11
397 -
398 COS
399 500
400 /
401 -
402 RCL 10
403 *
404 +
405 RCL 02
----------------- S4 wave ---------------------
406 ST+ X
407 RCL 25
408 -
409 COS
410 RCL 24
411 *
412 +
413 RCL 02
----------------- S6 wave ---------------------
414 3
415 *
416 RCL 31
417 -
418 COS
419 RCL 30
420 *
421 +
422 RCL 02
------------- LAMBDA2 wave ----------------
423 RCL 05
424 -
425 STO 00
426 52
427 +
428 RCL 39
429 -
430 COS
431 RCL 00
432 RCL 04
433 -
434 3
435 -
436 RCL 39
437 -
438 COS
439 22
440 /
441 +
442 RCL 38
443 *
444 +
445 RCL 01
----------------- K2 wave ---------------------
446 ST- 06
447 RCL 02
448 +
449 STO 00
450 20
451 +
452 RCL 77
453 -
454 COS
455 RCL 00
456 RCL 04
457 -
458 35
459 -
460 RCL 77
461 -
462 COS
463 78
464 /
465 +
466 RCL 00
467 RCL 04
468 +
469 75
470 +
471 RCL 77
472 -
473 COS
474 .3
475 *
476 -
477 RCL 00
478 RCL 04
479 ST+ X
480 +
481 50
482 -
483 RCL 77
484 -
485 COS
486 31
487 /
488 -
489 RCL 76
490 *
491 -
492 RCL 06
-----------------MSF wave -------------------
493 44
494 +
495 RCL 53
496 -
497 COS
498 RCL 06
499 RCL 04
500 -
501 11
502 -
503 RCL 53
504 -
505 COS
506 14
507 /
508 -
509 RCL 04
510 RCL 06
511 +
512 8
513 +
514 RCL 53
515 -
516 SIN
517 16
518 /
519 -
520 RCL 52
521 *
522 -
523 RCL 03
--------------- RHO1 wave -------------------
524 RCL 05
525 +
526 RCL 06
527 -
528 STO 03
529 31
530 +
531 RCL 57
532 -
533 COS
534 RCL 03
535 RCL 04
536 -
537 24
538 -
539 RCL 57
540 -
541 COS
542 5.3
543 /
544 -
545 RCL 56
546 *
547 +
548 RCL 02
---------------- 2MK3 wave --------------------
549 RCL 03
550 +
551 RCL 05
552 -
553 STO 03
554 7
555 -
556 RCL 75
557 -
558 SIN
559 RCL 03
560 RCL 04
561 -
562 28
563 +
564 RCL 75
565 -
566 COS
567 16
568 /
569 +
570 RCL 03
571 RCL 04
572 +
573 42
574 -
575 RCL 75
576 -
577 COS
578 50
579 /
580 +
581 RCL 74
582 *
583 +
584 RCL 02
----------------- M2 wave ---------------------
585 RCL 06
586 -
587 STO 03
588 43.5
589 -
590 RCL 09
591 -
592 COS
593 RCL 03
594 RCL 04
595 -
596 8
597 -
598 RCL 09
599 -
600 SIN
601 27
602 /
603 +
604 RCL 08
605 *
606 -
607 RCL 02
---------------- 2SM2 wave --------------------
608 RCL 06
609 +
610 STO 00
611 44
612 +
613 RCL 69
614 -
615 COS
616 RCL 00
617 RCL 04
618 +
619 8
620 +
621 RCL 69
622 -
623 SIN
624 27
625 /
626 -
627 RCL 68
628 *
629 -
630 RCL 03
----------------- M6 wave ---------------------
631 3
632 *
633 STO 00
634 49
635 +
636 RCL 21
637 -
638 COS
639 RCL 00
640 RCL 04
641 -
642 6
643 -
644 RCL 21
645 -
646 COS
647 9
648 /
649 +
650 RCL 20
651 *
652 +
653 RCL 00
----------------- M3 wave ---------------------
654 2
655 /
656 STO 00
657 25
658 +
659 RCL 71
660 -
661 COS
662 RCL 00
663 RCL 04
664 -
665 30
666 -
667 RCL 71
668 -
669 COS
670 18
671 /
672 +
673 RCL 70
674 *
675 +
676 RCL 03
----------------- L2 wave ---------------------
677 RCL 05
678 +
679 STO 00
680 5
681 -
682 RCL 73
683 -
684 SIN
685 RCL 00
686 RCL 04
687 -
688 30
689 +
690 RCL 73
691 -
692 COS
693 27
694 /
695 -
696 RCL 72
697 *
698 -
699 RCL 03
----------------- N2 wave ---------------------
700 RCL 05
701 -
702 STO 00
703 8
704 +
705 RCL 13
706 -
707 COS
708 RCL 00
709 RCL 04
710 -
711 47
712 -
713 RCL 13
714 -
715 COS
716 27
717 /
718 +
719 RCL 12
720 *
721 +
722 RCL 00
----------------- 2N2 wave --------------------
723 RCL 05
724 -
725 STO 00
726 60
727 +
728 RCL 35
729 -
730 COS
731 RCL 00
732 RCL 04
733 -
734 5
735 +
736 RCL 35
737 -
738 COS
739 27
740 /
741 +
742 RCL 34
743 *
744 -
745 RCL 03
----------------- MU2 wave --------------------
746 RCL 06
747 -
748 STO 03
749 3
750 +
751 RCL 33
752 -
753 SIN
754 RCL 03
755 RCL 04
756 -
757 38
758 +
759 RCL 33
760 -
761 COS
762 27
763 /
764 -
765 RCL 32
766 *
767 +
768 RCL 03
----------------- NU2 wave --------------------
769 RCL 05
770 +
771 STO 00
772 41
773 +
774 RCL 29
775 -
776 COS
777 RCL 00
778 RCL 04
779 -
780 14
781 -
782 RCL 29
783 -
784 COS
785 27
786 /
787 +
788 RCL 28
789 *
790 +
791 RCL 02
----------------- M4 wave ---------------------
792 RCL 03
793 +
794 STO 03
795 3
796 +
797 RCL 17
798 -
799 SIN
800 RCL 03
801 RCL 04
802 -
803 38
804 +
805 RCL 17
806 -
807 COS
808 13
809 /
810 -
811 RCL 16
812 *
813 +
814 RCL 03
----------------- MN4 wave --------------------
815 RCL 05
816 -
817 STO 00
818 35
819 -
820 RCL 27
821 -
822 COS
823 RCL 00
824 RCL 04
825 -
826 RCL 27
827 -
828 SIN
829 13
830 /
831 +
832 RCL 26
833 *
834 -
835 RCL 03
----------------- M8 wave ---------------------
836 ST+ X
837 STO 00
838 6
839 +
840 RCL 79
841 -
842 COS
843 RCL 00
844 RCL 04
845 -
846 49
847 -
848 RCL 79
849 -
850 COS
851 6.7
852 /
853 +
854 RCL 78
855 *
856 -
857 RCL 03
----------------- MS4 wave --------------------
858 RCL 06
859 +
860 STO 03
861 44
862 -
863 RCL 81
864 -
865 COS
866 RCL 03
867 RCL 04
868 -
869 8
870 -
871 RCL 81
872 -
873 SIN
874 27
875 /
876 +
877 RCL 80
878 *
879 -
880 RCL 07
----- and finally, we add the mean sea-level -----
881 +
882 END
( 1138 bytes / SIZE 082 )
STACK | INPUTS | OUTPUTS |
Y | date | / |
X | time ( hh.mnss ) | water level |
L | / | mean sea-level |
Atmospheric
pressure |
963hPa |
973hPa |
983hPa |
993hPa |
1003hPa |
1013hPa |
1023hPa |
1033hPa |
1043hPa |
corrections |
+50cm |
+40cm |
+30cm |
+20cm |
+10cm |
0 |
-10cm |
-20cm |
-30cm |
Time(UT) |
13h |
14h |
15h |
16h |
17h |
water level(m) |
2.9829 |
3.6349 |
3.9518 |
3.9221 |
3.5820 |
Water Level in Seattle
STACK | INPUTS | OUTPUTS |
Y | date | / |
X | time ( hh.mnss ) | water level |
L | / | mean sea-level |
Time(UT) |
13h |
14h |
15h |
16h |
17h |
water level(m) |
2.9895 |
3.6420 |
3.9604 |
3.9322 |
3.5898 |
Go back to the HP-41 software library
Go back to the general software library
Go
back to the main exhibit hall