Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
2845 lines (2760 loc) · 199 KB
/
Copy pathindex.html
File metadata and controls
2845 lines (2760 loc) · 199 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- What the page may load. A new data source, camera or image host must be
added here too, or the browser silently blocks it (it then shows up as
src_fail in analytics). Camera players also get sandbox: no pop-ups and no
leading the whole tab away. -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self';
script-src 'self' 'unsafe-inline' https://*.googletagmanager.com;
style-src 'self' 'unsafe-inline';
img-src 'self' data: https://imgproxy.windy.com https://tile.openstreetmap.org https://*.google-analytics.com https://*.googletagmanager.com https://*.g.doubleclick.net https://*.google.com;
connect-src 'self' https://*.open-meteo.com https://api.met.no https://pae-paha.pacioos.hawaii.edu https://wttr.in https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://*.g.doubleclick.net https://*.google.com;
frame-src https://rtsp.me https://g3.ipcamlive.com;
object-src 'none'; base-uri 'none'; form-action 'none'">
<!-- Google tag. Events wait in dataLayer; the library itself is fetched by
loadGA(), which the page calls once the forecast is on screen. -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// a local test run is not a visit
if(/^(localhost|127\.0\.0\.1)$/.test(location.hostname)) window['ga-disable-G-72CS4WJ571']=true;
gtag('js', new Date());
// who is looking: interface language, theme, and whether the site is installed as an app
var up={ui_lang:'en',ui_theme:'light',app_mode:'browser'};
// no stored choice yet: the browser's language, if the page speaks it (same rule as LANG below)
try{ up.ui_lang=localStorage.getItem('lang')||(navigator.languages||[navigator.language||'']).map(function(l){return String(l).slice(0,2).toLowerCase()}).filter(function(l){return /^(en|ru|th)$/.test(l)})[0]||'en'; }catch(e){}
try{ up.ui_theme=localStorage.getItem('theme')||'light'; }catch(e){}
try{ if(matchMedia('(display-mode: standalone)').matches||navigator.standalone) up.app_mode='app'; }catch(e){}
gtag('set','user_properties',up);
gtag('config', 'G-72CS4WJ571');
function loadGA(){
if(window.GA_ON||window['ga-disable-G-72CS4WJ571']) return; window.GA_ON=true;
var s=document.createElement('script'); s.async=true;
s.src='https://www.googletagmanager.com/gtag/js?id=G-72CS4WJ571'; document.head.appendChild(s);
}
</script>
<link rel="preconnect" href="https://marine-api.open-meteo.com" crossorigin>
<link rel="preconnect" href="https://api.open-meteo.com" crossorigin>
<link rel="preconnect" href="https://api.met.no" crossorigin>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#f4f6f9">
<title>Phuket surf forecast today: waves, live cams, sunset · Surf</title>
<link rel="icon" type="image/png" href="./favicon.png">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Surf">
<meta name="description" content="Is it worth surfing in Phuket right now? Wave height, period, wind and tide for Kata, Karon, Patong, Nai Harn and 9 more beaches, scored 0 to 10, with live cams, a 10-day outlook and a sunset score.">
<link rel="canonical" href="https://surf.voidstudio.top/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Surf">
<meta property="og:url" content="https://surf.voidstudio.top/">
<meta property="og:title" content="Phuket surf forecast today: waves, live cams, sunset">
<meta property="og:description" content="Waves, wind and tide for 13 beaches scored 0 to 10, live cams, a 10-day outlook and a sunset score.">
<meta property="og:image" content="https://surf.voidstudio.top/og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebApplication","name":"Surf","url":"https://surf.voidstudio.top/","description":"Surf forecast for Phuket and Khao Lak: wave height, period, wind and tide by beach scored 0 to 10, live cams, a 10-day outlook and a sunset score.","applicationCategory":"WeatherApplication","operatingSystem":"Any","inLanguage":["en","ru","th"],"isAccessibleForFree":true,"offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"areaServed":{"@type":"Place","name":"Phuket, Thailand"},"publisher":{"@type":"Organization","name":"voidstudio","url":"https://voidstudio.top/"}}</script>
<style>
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
/* Light is the base theme; dark is toggled and stored. */
:root{
--bg:#f2f5f9; --card:#fff; --card2:#f7f9fc; --line:#e3e9f0;
--tx:#0f1b2d; --dim:#4a5a6e; --dim2:#697a8e;
--go:#00a5a5; --ok:#3d9b2f; --fair:#9d7c05; --mid:#e07a12; --bad:#d43a26; --no:#9aa8b8;
--acc:#0b7fc7; --shadow:0 1px 2px rgba(15,27,45,.05),0 2px 10px rgba(15,27,45,.05);
}
:root[data-theme="dark"]{
--bg:#0a0e14; --card:#121822; --card2:#0e141d; --line:#1e2836;
--tx:#e8eef6; --dim:#94a3b8; --dim2:#8494a8;
--go:#2fd8d8; --ok:#7ede4a; --fair:#f2d43a; --mid:#f79b3c; --bad:#f0604a; --no:#4a5568;
--acc:#38b6ff; --shadow:none;
}
html,body{margin:0;padding:0;background:var(--bg);color:var(--tx)}
/* Thai glyphs render taller than Latin at the same size */
html[lang="th"] body{font-size:14px}
html[lang="th"] .vbig{font-size:19px}
html[lang="th"] .q i,html[lang="th"] .glab div,html[lang="th"] .met span,
html[lang="th"] .trow>span,html[lang="th"] .stab th{font-size:9px;letter-spacing:0}
html[lang="th"] .wx{font-size:11px}
body{font:15px/1.45 -apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,system-ui,sans-serif;
padding:0 0 50px;-webkit-font-smoothing:antialiased}
.wrap{max-width:560px;margin:0 auto;padding:0 12px}
header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 92%,transparent);
backdrop-filter:blur(12px);border-bottom:1px solid var(--line);padding:7px 0 0}
.hrow{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 12px 2px;
max-width:560px;margin:0 auto}
.logo{font-size:15px;font-weight:750;letter-spacing:-.3px;white-space:nowrap;flex:0 0 auto;
display:flex;align-items:baseline;gap:6px}
.logo{position:relative}
.logo .reg{font:inherit;font-size:11px;font-weight:650;color:var(--acc);letter-spacing:0;background:none;border:0;
padding:4px 2px;cursor:pointer}
.regmenu{position:absolute;top:100%;left:40px;z-index:60;background:var(--card);border:1px solid var(--line);
border-radius:10px;box-shadow:0 6px 24px rgba(15,27,45,.14);padding:4px;min-width:130px}
.regmenu a{display:block;padding:9px 12px;border-radius:7px;font-size:13px;font-weight:600;color:var(--tx);text-decoration:none}
.regmenu a.on{background:color-mix(in srgb,var(--acc) 12%,transparent);color:var(--acc)}
.hr2{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.upd{font-size:10px;color:var(--dim2);font-variant-numeric:tabular-nums;white-space:nowrap;
display:flex;align-items:center;gap:3px}
.lang{display:inline-flex;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:var(--card)}
.lang button{font:inherit;font-size:11px;font-weight:700;letter-spacing:.2px;padding:8px 9px;
border:0;background:none;color:var(--dim);cursor:pointer;line-height:1}
.lang button+button{border-left:1px solid var(--line)}
.lang button.on{background:var(--acc);color:#fff}
.tgl{background:none;border:1px solid var(--line);color:var(--dim);border-radius:8px;
width:34px;height:34px;font-size:14px;cursor:pointer;line-height:1;padding:0}
/* Top bar. */
.wxbar{padding:3px 12px 1px;font-variant-numeric:tabular-nums;max-width:560px;margin:0 auto;
display:grid;grid-template-columns:1fr auto 1fr;gap:1px 10px;align-items:baseline}
.wxbar>:nth-child(3n+1){justify-self:start}
.wxbar>:nth-child(3n+2){justify-self:start}
.wxbar>:nth-child(3n){justify-self:end}
.wx{display:inline-flex;align-items:baseline;gap:4px;font-size:11.5px;color:var(--dim);
white-space:nowrap;text-align:center}
.wx b{color:var(--tx);font-weight:650}
.wx .mut{color:var(--dim2);font-size:10.5px}
.wx .ico{font-size:12.5px;font-style:normal;line-height:1}
@media (max-width:359px){.wx{font-size:10.5px;padding:0 5px}}
.tabs{display:flex;margin-top:5px;padding:0 12px;max-width:560px;margin-left:auto;margin-right:auto}
.tab{flex:1;padding:7px 4px;text-align:center;font-size:13px;font-weight:600;color:var(--dim);
background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;font-family:inherit}
.tab.on{color:var(--tx);border-bottom-color:var(--acc)}
/* Summary block. */
.sum{margin:11px 0 4px;border-radius:14px;background:var(--card);border:1px solid var(--line);
overflow:hidden;box-shadow:var(--shadow)}
.sumtop{padding:11px 13px;border-bottom:1px solid var(--line)}
.vhead{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.vscore{flex:0 0 auto;min-width:30px;height:30px;border-radius:9px;display:inline-flex;
align-items:center;justify-content:center;font-weight:800;font-size:15px}
.gsub{font-size:12.5px;color:var(--tx);line-height:1.3;margin:5px 0 2px}
.gwhen{font-size:10.5px;color:var(--dim2);margin-left:auto;white-space:nowrap}
.danger{margin:0;padding:9px 13px;font-size:12.5px;font-weight:600;
background:color-mix(in srgb,var(--bad) 12%,var(--card));color:var(--bad);
border-top:1px solid color-mix(in srgb,var(--bad) 30%,transparent)}
.vbig{font-size:19px;font-weight:800;letter-spacing:-.4px;line-height:1.1;white-space:nowrap}
@media (max-width:360px){.vbig{font-size:17px}}
.vtx{font-size:12px;color:var(--dim);line-height:1.4}
.vtx b{color:var(--tx);font-weight:650}
.srow{display:flex;align-items:center;gap:8px;padding:7px 13px;border-bottom:1px solid var(--line);
cursor:pointer;font-variant-numeric:tabular-nums}
.srow.nolink{cursor:default}
.rowx{border-bottom:1px solid var(--line)}
.rowx:last-child{border-bottom:0}
.rowx summary{list-style:none}
.rowx summary::-webkit-details-marker{display:none}
.rowx .srow{border-bottom:0}
.rowx[open] .srow{background:var(--card2)}
.rowx[open] .chev{transform:rotate(90deg)}
.rowx .chev{transition:transform .2s;font-size:13px;color:var(--dim2);flex:0 0 auto;margin-left:2px}
.rowbody{border-top:1px solid var(--line);background:var(--card2)}
.exact{margin:0;padding:8px 12px 0;font-size:12.5px;color:var(--dim)}
.rowbody .beach{margin:0;padding:8px 12px 0;font-size:12.5px;color:var(--dim)}
.rowbody .beach b{color:var(--tx)}
.rowbody .grid,.rowbody .tim,.rowbody .why,.rowbody .srcbox,.rowbody .nocam{background:var(--card)}
.rowmap{display:none}
.srow .map{margin-left:4px}
/* На узком экране цифры важнее времени пика: пик прячем, чтобы
волна/период/ветер помещались рядом с пином. */
@media (max-width:430px){
.srow .speak{display:none}
.sname{flex:0 0 66px;font-size:13px}
.sdat{font-size:11.5px}
}
.srow:last-child{border-bottom:0}
.sbadge{flex:0 0 30px;height:30px;border-radius:9px;display:flex;align-items:center;
justify-content:center;font-weight:800;font-size:14px}
.sname{flex:0 0 72px;font-size:13.5px;font-weight:650;letter-spacing:-.2px}
.sdat{flex:1;font-size:12px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.speak{flex:0 0 auto;font-size:10px;color:var(--dim2);text-align:right;
display:flex;align-items:baseline;gap:4px;white-space:nowrap}
.speak b{color:var(--tx);font-size:12.5px;font-weight:700}
.card{margin:10px 0;border-radius:14px;background:var(--card);border:1px solid var(--line);
overflow:hidden;box-shadow:var(--shadow);scroll-margin-top:calc(var(--stickH,150px) + 6px)}
.chead{display:flex;align-items:center;gap:10px;padding:10px 13px;cursor:pointer}
.chead .map{align-self:center}
.score{flex:0 0 38px;height:38px;border-radius:10px;display:flex;align-items:center;
justify-content:center;font-weight:800;line-height:1}
.score b{font-size:17px;letter-spacing:-.5px}
.score i{display:none}
.cname{flex:1;min-width:0}
.cname h3{margin:0;font-size:15px;font-weight:700;letter-spacing:-.2px;line-height:1.2}
.map{position:relative;display:inline-flex;align-items:center;justify-content:center;
width:22px;height:22px;border-radius:6px;border:1px solid var(--line);background:var(--card2);
text-decoration:none;line-height:1;flex:0 0 auto}
.map::after{content:'';position:absolute;inset:-11px}
.map:hover{border-color:var(--acc)}
.map svg{display:block}
.cname p{margin:3px 0 0;font-size:12px;color:var(--dim);line-height:1.25;
display:grid;grid-template-columns:auto auto;justify-content:start;gap:2px 18px}
.cname p b{color:var(--tx);font-weight:650}
.q{display:flex;align-items:baseline;gap:4px;min-width:0;white-space:nowrap}
.q i{font-style:normal;font-size:9.5px;color:var(--dim2);text-transform:uppercase;
letter-spacing:.3px;flex:0 0 auto}
.q b{font-variant-numeric:tabular-nums}
.chev{color:var(--dim2);font-size:13px;transition:transform .2s}
.card.open .chev{transform:rotate(90deg)}
.cbody{display:none;border-top:1px solid var(--line)}
.card.open .cbody,.card.pin .cbody{display:block}
.cam{position:relative;background:#000;aspect-ratio:16/9;width:100%}
.cam iframe{width:100%;height:100%;border:0;display:block}
.cam img{width:100%;height:100%;object-fit:cover;display:block}
a.cam{display:block;color:#fff;text-decoration:none}
.camplay{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.62);backdrop-filter:blur(4px);
font-size:12px;font-weight:650;padding:6px 11px;border-radius:16px;z-index:2}
.camtag{position:absolute;left:8px;top:8px;background:rgba(0,0,0,.62);backdrop-filter:blur(4px);
font-size:10px;padding:3px 7px;border-radius:6px;color:#fff;display:flex;align-items:center;
gap:5px;pointer-events:none;z-index:2}
.dot{width:6px;height:6px;border-radius:50%;background:#ff4444;animation:pulse 1.8s infinite}
@keyframes pulse{50%{opacity:.25}}
.nocam{display:flex;align-items:center;gap:7px;background:var(--card2);color:var(--dim2);
font-size:11.5px;padding:8px 13px;border-bottom:1px solid var(--line)}
.nocam b{color:var(--dim);font-size:12px;font-weight:650}
.mets{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line)}
.met{background:var(--card);padding:8px 4px;text-align:center}
.met span{display:block;font-size:9px;color:var(--dim2);text-transform:uppercase;letter-spacing:.5px}
.met b{display:block;font-size:15px;font-weight:750;margin-top:2px;font-variant-numeric:tabular-nums}
.met i{font-style:normal;font-size:10px;color:var(--dim);font-weight:400}
.tim{border-top:1px solid var(--line);padding:8px 13px 9px}
.trow{display:flex;align-items:baseline;gap:9px;font-size:12.5px;padding:2.5px 0}
.trow>span{flex:0 0 46px;font-size:10px;color:var(--dim2);text-transform:uppercase;letter-spacing:.6px}
.trow>div{flex:1;color:var(--dim);font-variant-numeric:tabular-nums}
.trow b{color:var(--tx);font-weight:700}
.trow i{font-style:normal;font-size:10px;color:var(--dim2);margin-left:6px}
.tides{display:flex;gap:14px;flex-wrap:wrap}
.td{display:inline-flex;flex-direction:column;line-height:1.15}
.td em{font-style:normal;font-size:9.5px;color:var(--dim2);text-transform:uppercase;letter-spacing:.3px}
.td b{font-size:12.5px}
.why{padding:9px 13px;font-size:12.5px;color:var(--dim);line-height:1.5;border-top:1px solid var(--line)}
.why b{color:var(--tx);font-weight:650}
.conf{display:inline-flex;align-items:center;gap:5px;font-size:11px;padding:2px 7px;border-radius:5px;
background:var(--card2);border:1px solid var(--line);margin-top:6px}
/* Per-source table. */
.srcbox{border-top:1px solid var(--line);font-size:12px}
.srcbox summary{padding:9px 13px;color:var(--acc);cursor:pointer;font-size:12px;
font-weight:600;list-style:none}
.srcbox summary::-webkit-details-marker{display:none}
.srcbox summary::before{content:'▸ ';display:inline-block;transition:transform .2s}
.srcbox[open] summary::before{content:'▾ '}
.stab{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;margin-bottom:2px}
.stab th{font-size:9.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--dim2);
font-weight:600;text-align:right;padding:5px 13px 4px}
.stab th:first-child{text-align:left}
.stab td{padding:4px 13px;text-align:right;color:var(--dim);border-top:1px solid var(--line)}
.stab td:first-child{text-align:left;color:var(--tx);font-size:11.5px}
.stab .avgrow td{font-weight:700;color:var(--tx);background:var(--card2)}
.snote{padding:7px 13px 10px;font-size:11.5px;color:var(--dim);line-height:1.5}
.snote b{color:var(--dim)}
.stab .rngrow td{color:var(--dim2);font-size:11px;border-top:0;padding-top:0}
.stab .xrow td{color:var(--dim);border-top:1px dashed var(--line)}
.spl{display:block;white-space:nowrap;line-height:1.5}
.stab .xrow td:first-child{color:var(--tx)}
.stat{border-top:1px solid var(--line);padding:8px 13px 10px}
.stline{display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--dim);padding:2.5px 0}
.stline b{margin-left:auto;font-weight:600;font-size:11px}
.sdot{width:7px;height:7px;border-radius:50%;flex:0 0 auto}
.pill{display:inline-block;font-size:9.5px;font-weight:700;padding:2px 6px;border-radius:5px;
letter-spacing:.2px;vertical-align:middle;margin-right:4px}
.pill.ok{background:color-mix(in srgb,var(--go) 15%,transparent);color:var(--go)}
.pill.bad{background:color-mix(in srgb,var(--bad) 15%,transparent);color:var(--bad)}
/* Hourly grid: fixed row labels, scrollable data. */
.grid{display:flex;border-top:1px solid var(--line);padding:9px 0 4px}
.glab{flex:0 0 52px;padding-left:13px;background:var(--card);z-index:2}
.glab div{font-size:9.5px;color:var(--dim2);text-transform:uppercase;letter-spacing:.4px;
height:20px;display:flex;align-items:center;white-space:nowrap}
.glab div:nth-child(2){height:36px}
.gscroll{flex:1;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.gscroll::-webkit-scrollbar{display:none}
.grow{display:flex}
.hc{flex:0 0 38px;height:20px;display:flex;align-items:center;justify-content:center;
font-size:11px;color:var(--dim);font-variant-numeric:tabular-nums;position:relative}
.gbar .hc{height:36px;align-items:flex-end;padding-bottom:2px}
.gbar .hc i{display:block;width:17px;border-radius:3px 3px 0 0;font-style:normal}
.hc.gh{font-size:10.5px;color:var(--dim2)}
.hc.best.gh{color:var(--go);font-weight:800}
.hc.gv{color:var(--tx);font-weight:600}
.hc.gw{color:var(--dim);font-weight:400}
.hc.grain{color:var(--acc);font-weight:600;font-size:10px}
.hc.now{background:color-mix(in srgb,var(--acc) 13%,transparent)}
.hc.now.gh{color:var(--acc);font-weight:700}
.glegend{padding:2px 13px 10px;font-size:11.5px;color:var(--dim);line-height:1.45}
/* Details disclosure. */
.more{border-top:1px solid var(--line)}
/* direct child only: a folded list may hold rows that are details themselves */
.more > summary{padding:9px 13px;color:var(--acc);cursor:pointer;font-size:12.5px;
font-weight:600;list-style:none}
.more > summary::-webkit-details-marker{display:none}
.more > summary::before{content:'▸ '}
.more[open] > summary::before{content:'▾ '}
.more .srcbox,.more .why,.more .grid{border-top:1px solid var(--line)}
.days{border-top:1px solid var(--line)}
.day{display:flex;align-items:center;gap:9px;padding:8px 13px;border-bottom:1px solid var(--line);font-size:12.5px}
.day:last-child{border-bottom:0}
.dayx summary{list-style:none;cursor:pointer}
.dayx summary::-webkit-details-marker{display:none}
.dayx[open] summary{background:var(--card2)}
.daybody{border-bottom:1px solid var(--line);background:var(--card2)}
.daybody .grid,.daybody .tim,.daybody .why,.daybody .srcbox{background:var(--card)}
.day .dn{flex:0 0 54px;color:var(--dim);font-size:11.5px}
.day .dn b{display:block;color:var(--tx);font-size:12.5px;font-weight:650;text-transform:capitalize}
.dbar{flex:1;height:22px;border-radius:6px;position:relative;overflow:hidden}
.dbar i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;font-style:normal;opacity:.42}
/* Полоса залита светлым оттенком своего цвета по всей длине, заполнение
поверх приглушено. Текст поэтому везде лежит на светлом и читается
без обводки, где бы ни кончалась цветная часть. */
.dbar em{position:absolute;left:8px;top:0;bottom:0;display:flex;align-items:center;font-style:normal;
font-size:11px;font-weight:650;color:var(--tx);font-variant-numeric:tabular-nums}
.dsc{flex:0 0 26px;text-align:right;font-weight:800;font-size:14px;font-variant-numeric:tabular-nums}
.ihead{padding:11px 13px 8px;font-size:11px;font-weight:700;color:var(--dim2);
text-transform:uppercase;letter-spacing:1px;border-bottom:1px solid var(--line)}
.ev{display:flex;align-items:center;gap:9px;padding:8px 13px;border-bottom:1px solid var(--line)}
.evd{flex:0 0 78px;font-size:12.5px;font-weight:650;text-transform:capitalize}
.evb{flex:1;height:16px;border-radius:5px;background:var(--card2);overflow:hidden}
.evb i{display:block;height:100%;border-radius:5px}
.evv{flex:0 0 auto;text-align:right;font-variant-numeric:tabular-nums}
.evv b{font-size:13px}
.evv span{display:block;font-size:10px;color:var(--dim2)}
.ocn{display:flex;gap:10px;padding:9px 13px;border-bottom:1px solid var(--line)}
.ocname{flex:0 0 96px;font-size:12px;font-weight:650;line-height:1.25}
.ocname i{display:block;font-style:normal;font-size:10px;color:var(--dim2);font-weight:400}
.ocbody{flex:1;font-size:12px;color:var(--dim);line-height:1.45;font-variant-numeric:tabular-nums}
.ocbody b{color:var(--tx);font-weight:650}
.ocsub{font-size:11.5px;color:var(--dim2)}
.inote{padding:11px 13px;font-size:12.5px;color:var(--dim);line-height:1.55}
.inote2{padding:8px 13px 11px;font-size:11.5px;color:var(--dim);line-height:1.5}
.sect{margin:18px 0 7px;font-size:11px;font-weight:700;color:var(--dim2);
text-transform:uppercase;letter-spacing:1.2px;padding:0 2px}
.src{margin:20px 0 0;padding:12px 13px;border-radius:12px;background:var(--card2);
border:1px solid var(--line);font-size:11.5px;color:var(--dim);line-height:1.6}
.src b{color:var(--dim)}
.src a{color:var(--dim);text-decoration:underline}
[data-guide-lang="ru"]{display:none}
html[lang="ru"] [data-guide-lang="en"]{display:none}
html[lang="ru"] [data-guide-lang="ru"]{display:block}
.guide-shortcuts{margin:10px 0 14px;font-size:12px}
.guide-shortcuts .guide-links{display:flex;gap:6px}
.guide-links a,.guide-all{color:var(--acc);text-decoration:none}
.guide-shortcuts .guide-links a{flex:1 1 auto;min-width:0;padding:7px 8px;border:1px solid var(--line);border-radius:20px;background:var(--card);font-weight:650;
text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guide-all{display:inline-block;margin-top:9px;font-size:12px;font-weight:650}
.guide-panel{margin:22px 0 12px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--card)}
.guide-panel h2{font-size:17px;line-height:1.3;margin:0 0 12px;letter-spacing:-.2px}
.guide-panel .guide-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.guide-panel .guide-links a{font-size:13px;line-height:1.4;font-weight:650}
.guide-panel .guide-links span{display:block;color:var(--dim);font-size:12px;font-weight:400;margin-top:4px}
.guide-links a:hover,.guide-all:hover{text-decoration:underline}
.guide-links a:focus-visible,.guide-all:focus-visible{outline:2px solid var(--acc);outline-offset:3px}
@media(max-width:400px){.guide-panel .guide-links{grid-template-columns:1fr}}
.made{text-align:center;padding:16px 0 2px;font-size:12px;color:var(--dim2)}
.made a{color:var(--acc);text-decoration:none;font-weight:650}
.made a:hover{text-decoration:underline}
.stale{margin:10px 0 0;padding:9px 12px;border-radius:11px;font-size:12.5px;line-height:1.45;
background:color-mix(in srgb,var(--bad) 10%,var(--card));
border:1px solid color-mix(in srgb,var(--bad) 35%,transparent);color:var(--bad)}
.err{background:color-mix(in srgb,var(--bad) 12%,var(--card));border:1px solid var(--bad);
color:var(--bad);padding:11px 13px;border-radius:11px;font-size:12.5px;margin:10px 0}
.reserve{margin:10px 0 0;padding:9px 12px;border-radius:11px;font-size:12.5px;line-height:1.45;background:color-mix(in srgb,var(--acc) 10%,var(--card));color:var(--tx)}
.outage{margin:14px 0;padding:16px;border-radius:14px;background:var(--card);border:1px solid var(--line);text-align:center}
.outage b{font-size:16px}.outage p{margin:6px 0;font-size:13.5px;color:var(--dim)}.outage .dim{font-size:12.5px;color:var(--dim2)}
.retry{margin-top:8px;font:inherit;font-size:13px;font-weight:650;border:0;border-radius:9px;padding:8px 14px;background:var(--acc);color:#fff;cursor:pointer}
.slow{text-align:center;font-size:12.5px;color:var(--dim2);margin:0 0 6px}
.loader{display:flex;align-items:center;justify-content:center;gap:10px;padding:18px 0 8px;
color:var(--dim);font-size:13px}
/* Loader: wave-pencil.svg, a ready-made looping drawing of a wave (40 frames,
5 s, CSS animation inside the file). The file is used as a stencil over the
accent colour, so the lines are the site's blue in both themes and the file
stays as it was made: it is generated, must not be edited by hand, run
through an SVG optimiser or pasted into the page. */
.loader.pen{flex-direction:column;gap:0;padding:6px 0 4px}
.wavepen{display:block;width:min(300px,80%);aspect-ratio:960/420;background:var(--acc);
-webkit-mask:url(wave-pencil.svg?v=1) center/contain no-repeat;mask:url(wave-pencil.svg?v=1) center/contain no-repeat}
.dots{display:inline-flex;gap:5px}
.dots i{width:7px;height:7px;border-radius:50%;background:var(--acc);animation:dot 1s ease-in-out infinite}
.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,80%,100%{transform:translateY(0);opacity:.35}40%{transform:translateY(-5px);opacity:1}}
.skel{height:70px;border-radius:14px;background:linear-gradient(90deg,var(--card),color-mix(in srgb,var(--acc) 9%,var(--card)),var(--card));
background-size:200% 100%;animation:sh 1.3s infinite;margin:10px 0}
@keyframes sh{0%{background-position:200% 0}100%{background-position:-200% 0}}
/* Weather and sunset tabs. */
.tab{white-space:nowrap}
@media (max-width:400px){.tab{font-size:12px;padding:7px 2px}}
.wxi{flex:0 0 24px;font-size:18px;text-align:center;line-height:1}
.wxm{flex:1;min-width:0;line-height:1.25}
.wxm b{display:block;font-size:13px;font-weight:650;color:var(--tx)}
.wxm span{display:block;font-size:11.5px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wxt{flex:0 0 auto;text-align:right;font-variant-numeric:tabular-nums;line-height:1.2}
.wxt b{display:block;font-size:13px}
.wxt span{font-size:11px;color:var(--dim2)}
.wxw{flex:0 0 26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;
font-weight:800;font-size:13px}
.wxcap{padding:9px 13px 0;font-size:11.5px;color:var(--dim);background:var(--card)}
.wxcap b{color:var(--tx);font-weight:650}
.wxhours{display:grid;grid-template-columns:repeat(12,1fr);gap:2px;padding:6px 13px 8px;background:var(--card)}
.wxh{text-align:center;font-size:10px;color:var(--dim2);font-variant-numeric:tabular-nums}
.wxh em{display:block;font-style:normal;font-size:9.5px;color:var(--acc);font-weight:600;height:13px}
.wxh i{display:block;height:24px;position:relative;border-bottom:1px solid var(--line)}
.wxh i b{position:absolute;bottom:0;left:18%;right:18%;background:var(--acc);border-radius:2px 2px 0 0}
.stab.c6 td,.stab.c6 th{padding-left:4px;padding-right:4px}
.stab.c6 td:first-child,.stab.c6 th:first-child{padding-left:13px}
.stab.c6 td:last-child,.stab.c6 th:last-child{padding-right:13px}
.sunline{margin-top:6px;font-size:12px;color:var(--dim);line-height:1.45}
.sunline b{color:var(--tx);font-weight:650}
.plname{flex:0 1 auto;min-width:0;font-size:13.5px;font-weight:650;letter-spacing:-.2px;
white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plst{flex:1 0 auto;text-align:right;font-size:11.5px;white-space:nowrap}
.wxm b i{font-style:normal;font-weight:400;color:var(--dim)}
.outbest{display:flex;align-items:center;gap:10px;padding:10px 13px;border-bottom:1px solid var(--line)}
.outbest b{display:block;font-size:14px;font-weight:700;letter-spacing:-.2px}
.outbest small{display:block;font-size:12px;color:var(--dim)}
.wxhd{padding-top:7px;padding-bottom:5px;font-size:9.5px;color:var(--dim2);text-transform:uppercase;letter-spacing:.4px}
.wxwh{flex:0 0 26px;display:flex;justify-content:flex-end;white-space:nowrap}
.plpt{padding:8px 13px 4px;border-top:1px solid var(--line);background:var(--card)}
.plpt:first-child{border-top:0}
.plh{font-size:12px;color:var(--dim);line-height:1.4}
.plh b{color:var(--tx);font-weight:650}
.plfoot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 13px;
border-top:1px solid var(--line);font-size:11.5px;color:var(--dim2)}
.plmap{position:relative;height:210px;overflow:hidden;background:var(--card2)}
.plmap img{position:absolute;max-width:none}
:root[data-theme="dark"] .plmap img{filter:brightness(.78) saturate(.85)}
.plmap svg{position:absolute;inset:0;width:100%;height:100%}
.plmap .ray{stroke:#f08a1c;stroke-width:3.5;stroke-linecap:round;fill:none}
.plmap .ray.bg{stroke:#fff;stroke-width:7;opacity:.75}
.plmap .ray.off{stroke-dasharray:1 8;opacity:.8}
.plmap .sun{fill:#f79b3c;stroke:#fff;stroke-width:2.5}
.plmap .sun.off{opacity:.5}
.plmap .stop{fill:#fff;stroke:#d43a26;stroke-width:2.5}
.plmap .me{fill:#0b7fc7;stroke:#fff;stroke-width:3}
.plmap .zoom{position:absolute;right:8px;top:8px;display:flex;flex-direction:column;gap:1px;border-radius:8px;
overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.3)}
.plmap .zoom button{width:32px;height:32px;border:0;background:#fff;color:#1c2733;font:700 18px/1 inherit;cursor:pointer;padding:0}
.plmap .osm{position:absolute;right:0;bottom:0;background:rgba(255,255,255,.82);color:#333;font-size:9.5px;
padding:1px 5px;text-decoration:none}
.pano{display:block;width:100%;height:auto;margin-top:4px}
.pano .sea{fill:color-mix(in srgb,var(--acc) 24%,transparent)}
.pano .land{fill:color-mix(in srgb,var(--dim2) 55%,transparent)}
.pano text{font-size:8px;fill:var(--dim2);text-anchor:middle;font-family:inherit}
.pano .disc{fill:var(--mid)}
.daybody .stab{background:var(--card)}
</style>
</head>
<body>
<header>
<div class="hrow">
<div class="logo" id="logo"></div>
<div class="hr2">
<div class="upd" id="upd">…</div>
<div class="lang" id="lang">
<button data-l="en">EN</button><button data-l="ru">RU</button><button data-l="th">TH</button>
</div>
<button class="tgl" id="tgl">☾</button>
</div>
</div>
<div class="wxbar" id="wxbar"></div>
<div class="tabs">
<button class="tab on" data-t="now"></button>
<button class="tab" data-t="d7"></button>
<button class="tab" data-t="island"></button>
<button class="tab" data-t="sun"></button>
</div>
</header>
<div class="wrap">
<div id="stale"></div>
<div id="summary"></div>
<!-- articles:shortcuts:begin -->
<nav class="guide-shortcuts" data-guide-lang="ru" lang="ru" aria-label="Перед поездкой">
<div class="guide-links"><a href="/ru/veb-kamery-phuketa/">Камеры онлайн</a><a href="/ru/volny-po-mesyacam/">Сезон волн</a><a href="/ru/zakat-vremya-i-mesta/">Где закат</a></div>
<a class="guide-all" href="/ru/">Все статьи →</a>
</nav>
<nav class="guide-shortcuts" data-guide-lang="en" lang="en" aria-label="Before you go">
<div class="guide-links"><a href="/en/phuket-webcams/">Live cams</a><a href="/en/phuket-waves-by-month/">Wave season</a><a href="/en/phuket-sunset-times-and-spots/">Sunset spots</a></div>
<a class="guide-all" href="/en/">All guides →</a>
</nav>
<!-- articles:shortcuts:end -->
<!-- Read by crawlers that do not run scripts; the page itself never shows it. -->
<noscript>
<h1>Phuket surf forecast today</h1>
<p>Surf answers one question: is it worth going surfing in Phuket right now, and where. Each beach gets a score from 0 to 10 from wave height, wave period, wind and swell direction, with the tide and the next peak of the day. The forecast is free, updates through the day and is available in English, Russian and Thai.</p>
<p>Beaches: Kata, Karon, Patong, Nai Harn, Bang Tao, Nai Yang, Kamala, Kata Noi, Layan, Nai Thon, Surin, Kalim, and Khao Lak north of the island. Live cams: Kata, Karon and Patong.</p>
<p>Also on the page: a 10-day outlook with the best wave and the weather for each day, swell on its way across the Andaman Sea, a sunset score from 0 to 10 with places to watch from, the moon and planets tonight, meteor showers and eclipses ahead.</p>
<p>Прогноз волн для серфинга на Пхукете: высота и период волны, ветер, прилив и оценка от 0 до 10 по каждому пляжу, живые камеры Каты, Карона и Патонга, расклад на 10 дней и оценка заката.</p>
<p>พยากรณ์คลื่นสำหรับเล่นเซิร์ฟที่ภูเก็ต: ความสูงและคาบคลื่น ลม น้ำขึ้นน้ำลง คะแนน 0 ถึง 10 ของแต่ละหาด กล้องสดที่กะตะ กะรน และป่าตอง แนวโน้ม 10 วัน และคะแนนพระอาทิตย์ตก</p>
<p>Data: Open-Meteo, MET Norway, NOAA WaveWatch III, Copernicus. <a href="how.html">How the score works</a> · <a href="history.html">History of forecasts</a></p>
<p>Guides: <a href="en/phuket-waves-by-month/">Phuket waves by month</a> · <a href="en/phuket-surf-season-and-beaches/">Surfing in Phuket: season and beaches</a> · <a href="en/phuket-sunset-times-and-spots/">Phuket sunset: time and where to watch</a> · <a href="en/phuket-webcams/">Phuket webcams live</a> · <a href="en/phuket-red-flags/">Red flags on Phuket beaches</a> · <a href="en/is-it-safe-to-swim-in-phuket/">Is it safe to swim in Phuket</a> · <a href="en/surf-glossary/">Surf glossary</a></p>
<p>Статьи: <a href="ru/volny-po-mesyacam/">Волны на Пхукете по месяцам</a> · <a href="ru/serfing-sezon-i-plyazhi/">Серфинг на Пхукете: сезон и пляжи</a> · <a href="ru/zakat-vremya-i-mesta/">Закат на Пхукете: во сколько и откуда смотреть</a> · <a href="ru/veb-kamery-phuketa/">Веб-камеры Пхукета онлайн</a> · <a href="ru/krasnye-flagi-i-kupanie/">Красные флаги на Пхукете</a> · <a href="ru/kupanie-meduzy-skaty/">Безопасно ли купаться на Пхукете</a> · <a href="ru/slovar-serfera/">Словарь серфера</a></p>
</noscript>
<div id="main"><div class="skel"></div><div class="skel"></div><div class="skel"></div></div>
<div class="sect" id="restlbl"></div>
<div id="rest"></div>
<!-- articles:guides:begin -->
<nav class="guide-panel" data-guide-lang="ru" lang="ru" aria-label="Перед поездкой">
<h2>Пляжи и море на Пхукете</h2>
<div class="guide-links"><a href="/ru/volny-po-mesyacam/">Волны на Пхукете по месяцам<span>Высота волн на Пхукете в каждом месяце по данным за 4 года: когда море спокойное, когда штормит и когда приходят волны для серфинга.</span></a><a href="/ru/serfing-sezon-i-plyazhi/">Серфинг на Пхукете: сезон и пляжи<span>Когда на Пхукете сезон серфинга, на каких пляжах кататься, куда идти новичку и как понять, есть ли волна сегодня.</span></a><a href="/ru/zakat-vremya-i-mesta/">Закат на Пхукете: во сколько и откуда смотреть<span>Время заката на Пхукете по месяцам, куда садится солнце, лучшие места для заката и как заранее понять, будет ли он красивым.</span></a><a href="/ru/veb-kamery-phuketa/">Веб-камеры Пхукета онлайн: Ката, Карон, Патонг<span>Живые веб-камеры пляжей Пхукета: Ката, Карон и Патонг в реальном времени. Как по картинке понять волны, погоду и можно ли купаться.</span></a><a href="/ru/krasnye-flagi-i-kupanie/">Красные флаги на Пхукете: когда нельзя купаться<span>Что значат красные, жёлтые и красно-жёлтые флаги на пляжах Пхукета, в какие месяцы море опасно и что делать, если уносит течением.</span></a><a href="/ru/kupanie-meduzy-skaty/">Безопасно ли купаться на Пхукете: медузы, скаты, течения<span>Что опасно в море на Пхукете и как этого избежать: отбойные течения, медузы и португальские кораблики, скаты, морские ежи, солнце. Первая помощь.</span></a><a href="/ru/slovar-serfera/">Словарь серфера: что значат лайнап, лиш, сет и другие слова<span>Короткий словарь серф-сленга: волна и океан, доска и снаряжение, катание и правила в воде. Что такое лайнап, сет, лиш, офшор, дроп-ин и вайпаут.</span></a></div>
<a class="guide-all" href="/ru/">Все статьи →</a>
</nav>
<nav class="guide-panel" data-guide-lang="en" lang="en" aria-label="Before you go">
<h2>Phuket beach and sea guides</h2>
<div class="guide-links"><a href="/en/phuket-waves-by-month/">Phuket waves by month<span>Wave height in Phuket for every month, from 4 years of data: when the sea is calm, when it is rough and when the surf arrives.</span></a><a href="/en/phuket-surf-season-and-beaches/">Surfing in Phuket: season and beaches<span>When the surf season in Phuket is, which beaches work, where a beginner should go and how to tell whether there are waves today.</span></a><a href="/en/phuket-sunset-times-and-spots/">Phuket sunset: time and where to watch<span>Sunset time in Phuket by month, where the sun goes down, the best sunset viewpoints and how to tell in advance whether it will be a good one.</span></a><a href="/en/phuket-webcams/">Phuket webcams live: Kata, Karon, Patong<span>Live beach webcams in Phuket: Kata, Karon and Patong right now. How to read the picture for waves, weather and whether you can swim.</span></a><a href="/en/phuket-red-flags/">Red flags on Phuket beaches: when not to swim<span>What red, yellow and red-and-yellow flags mean on Phuket beaches, which months are dangerous and what to do if a current pulls you out.</span></a><a href="/en/is-it-safe-to-swim-in-phuket/">Is it safe to swim in Phuket: jellyfish, stingrays, currents<span>What is dangerous in the sea in Phuket and how to avoid it: rip currents, jellyfish and bluebottles, stingrays, sea urchins, the sun. First aid.</span></a><a href="/en/surf-glossary/">Surf glossary: what line-up, leash, set and other terms mean<span>A short surf glossary: waves and the ocean, boards and gear, riding and the rules in the water. What a line-up, set, leash, offshore, drop-in and wipeout are.</span></a></div>
<a class="guide-all" href="/en/">All guides →</a>
</nav>
<!-- articles:guides:end -->
<div class="src" id="src"></div>
<div class="made"><a id="howlink" href="how.html">How the score works</a> · <a id="histlink" href="history.html">History</a> · <a id="artlink" href="en/">Guides</a></div>
<div class="made">made by <a href="https://voidstudio.top" target="_blank" rel="noopener">voidstudio.top</a></div>
</div>
<!-- inline:begin -->
<script>
/* core.js and grid.js, copied in by tools/inline.mjs so that the first forecast
does not wait for two more files. DO NOT EDIT HERE: edit core.js, or run
tools/grid.mjs, then run node tools/inline.mjs */
/* ---- core.js ---- */
/* Shared by the site (index.html, history.html) and the daily recorder
(tools/record.mjs), so the page and the history always score the same way.
Plain script with globals, loads in a browser and in Node's vm.
AFTER ANY CHANGE HERE RUN: node tools/inline.mjs
index.html carries a copy of this file, so the first forecast does not wait
for one more download. The tool refreshes that copy. */
/* Location-dependent settings. The page picks one from the URL hash, /#phuket. */
const REGIONS={
phuket:{ name:{en:'Phuket',ru:'Пхукет',th:'ภูเก็ต'}, tz:'Asia/Bangkok',
dayFrom:6, dayTo:18, wxLat:7.89, wxLon:98.30,
// NOAA WaveWatch III node west of the island (0.5° grid); k scales open-sea
// height to what the near-shore Open-Meteo points show (checked 19 Sep 2026)
ww3:{lat:7.5, lon:98.0, k:0.75} },
khaolak:{ name:{en:'Khao Lak',ru:'Као Лак',th:'เขาหลัก'}, tz:'Asia/Bangkok',
dayFrom:6, dayTo:18, wxLat:8.70, wxLon:98.24,
ww3:{lat:8.5, lon:98.0, k:0.75} }
};
/* facing : direction the beach faces, degrees
swellMin/Max : working swell range, metres
shelter : how much headlands block the swell, 0..1
tide : tide state the break prefers */
const ALL_SPOTS=[
{id:'naiharn',nm:{en:'Nai Harn',ru:'Най Харн',th:'หาดในหาน'},lat:7.7756,lon:98.3035,facing:250,swellMin:1.05,swellMax:3.64,
shelter:.4,tide:'mid',pin:1,cam:null},
{id:'kata',nm:{en:'Kata',ru:'Ката',th:'หาดกะตะ'},lat:7.8206,lon:98.2967,facing:270,swellMin:0.6,swellMax:3.08,
shelter:.2,tide:'mid',pin:1,cam:{type:'rtsp',id:'2F8DfBS5',by:'SSS Dive & Surf'}},
{id:'patong',nm:{en:'Patong',ru:'Патонг',th:'หาดป่าตอง'},lat:7.8950,lon:98.2830,facing:265,swellMin:0.9,swellMax:2.8,
// Patong stream is CSP-locked to phuket101.net,
// so a self-refreshing frame is used instead
shelter:.4,tide:'mid',pin:1,cam:{type:'img',id:'1613136596',by:'Patong Tower, 15F'}},
{id:'karon',nm:{en:'Karon',ru:'Карон',th:'หาดกะรน'},lat:7.8480,lon:98.2930,facing:270,swellMin:0.75,swellMax:3.36,
shelter:.15,tide:'high',pin:1,cam:{type:'ipcam',id:'69241c73d3f52',by:'Marina Phuket Resort'}},
{id:'katanoi',nm:{en:'Kata Noi',ru:'Ката Ной',th:'หาดกะตะน้อย'},lat:7.8080,lon:98.2960,facing:270,swellMin:0.9,swellMax:2.8,
shelter:.3,tide:'high',cam:null},
{id:'kalim',nm:{en:'Kalim',ru:'Калим',th:'หาดกะหลิม'},lat:7.9130,lon:98.2790,facing:270,swellMin:1.95,swellMax:4.9,
shelter:.1,tide:'mid',cam:null},
{id:'kamala',nm:{en:'Kamala',ru:'Камала',th:'หาดกมลา'},lat:7.9540,lon:98.2790,facing:272,swellMin:0.9,swellMax:3.08,
shelter:.25,tide:'any',cam:null},
{id:'surin',nm:{en:'Surin',ru:'Сурин',th:'หาดสุรินทร์'},lat:7.9770,lon:98.2780,facing:270,swellMin:1.2,swellMax:3.64,
shelter:.1,tide:'mid',cam:null},
{id:'bangtao',nm:{en:'Bang Tao',ru:'Банг Тао',th:'หาดบางเทา'},lat:8.0000,lon:98.2930,facing:275,swellMin:0.75,swellMax:3.08,
shelter:.2,tide:'any',cam:null},
{id:'layan',nm:{en:'Layan',ru:'Лайан',th:'หาดลายัน'},lat:8.0330,lon:98.2890,facing:272,swellMin:0.75,swellMax:2.52,
shelter:.35,tide:'any',cam:null},
{id:'naithon',nm:{en:'Nai Thon',ru:'Найтон',th:'หาดในทอน'},lat:8.0800,lon:98.2600,facing:270,swellMin:0.75,swellMax:2.8,
shelter:.3,tide:'mid',cam:null},
{id:'naiyang',nm:{en:'Nai Yang',ru:'Най Янг',th:'หาดในยาง'},lat:8.0930,lon:98.2960,facing:270,swellMin:0.6,swellMax:2.1,
shelter:.55,tide:'high',cam:null},
/* One Khao Lak break listed on the Phuket page for reference: Khuk Khak by
Memories Beach Bar and Pakarang Surf Shop, next to the Sunova board
factory. It is 80 km north, so it never takes part in the top. */
{id:'kl_khukkhak',noTop:1,nm:{en:'Khao Lak',ru:'Као Лак',th:'เขาหลัก'},beach:{en:'Khuk Khak',ru:'Кук Как',th:'หาดคึกคัก'},lat:8.7135,lon:98.2363,facing:265,swellMin:0.6,swellMax:2.8,
shelter:.15,tide:'mid',cam:null},
/* Khao Lak. Coordinates from OpenStreetMap. Profiles are first estimates
from local surf guides: long, gently sloping sand beaches for learners,
reef breaks around Cape Pakarang that need more size. */
{id:'khukkhak',region:'khaolak',nm:{en:'Khuk Khak',ru:'Кук Как',th:'หาดคึกคัก'},lat:8.7135,lon:98.2363,facing:265,swellMin:0.6,swellMax:2.8,
shelter:.15,tide:'mid',pin:1,cam:null},
{id:'pakarang',region:'khaolak',nm:{en:'Cape Pakarang',ru:'Мыс Пакаранг',th:'แหลมปะการัง'},lat:8.7290,lon:98.2223,facing:250,swellMin:1.0,swellMax:3.2,
shelter:.1,tide:'mid',pin:1,cam:null},
{id:'bangniang',region:'khaolak',nm:{en:'Bang Niang',ru:'Банг Ньянг',th:'หาดบางเนียง'},lat:8.6668,lon:98.2435,facing:265,swellMin:0.6,swellMax:2.8,
shelter:.15,tide:'any',pin:1,cam:null},
{id:'nangthong',region:'khaolak',nm:{en:'Nang Thong',ru:'Нанг Тонг',th:'หาดนางทอง'},lat:8.6490,lon:98.2463,facing:262,swellMin:0.7,swellMax:2.5,
shelter:.3,tide:'mid',cam:null},
{id:'pakweep',region:'khaolak',nm:{en:'Pak Weep',ru:'Пак Вип',th:'หาดปากวีป'},lat:8.7384,lon:98.2422,facing:268,swellMin:0.7,swellMax:2.8,
shelter:.2,tide:'any',cam:null},
{id:'bangsak',region:'khaolak',nm:{en:'Bang Sak',ru:'Банг Сак',th:'หาดบางสัก'},lat:8.7688,lon:98.2623,facing:272,swellMin:0.7,swellMax:2.8,
shelter:.15,tide:'any',cam:null}
];
const spotsOf=r=>ALL_SPOTS.filter(x=>(x.region||'phuket')===r);
const WAVE_MODELS=['gwam','meteofrance_wave','ncep_gfswave016','ecmwf_wam025'];
/* Three wind models are enough for the median and the spread; more models from
the same provider add no reliability, they fail together. MET Norway joins
the wind median as an independent provider, NOAA WaveWatch III the waves. */
const WIND_MODELS=['ecmwf_ifs025','gfs_seamless','icon_seamless'];
const avg=a=>{a=a.filter(x=>x!=null&&!isNaN(x));return a.length?a.reduce((s,x)=>s+x,0)/a.length:null};
/* Median, not mean: one outlier model must not drag the result. */
const median=a=>{a=a.filter(x=>x!=null&&!isNaN(x)).sort((x,y)=>x-y);
if(!a.length) return null;
const m=a.length>>1; return a.length%2?a[m]:(a[m-1]+a[m])/2};
const range=a=>{a=a.filter(x=>x!=null&&!isNaN(x));
return a.length?{lo:Math.min(...a),hi:Math.max(...a)}:null};
/* Directions are circular: 350° and 10° average to 0°, not 180°. */
const circMean=arr=>{
const a=arr.filter(x=>x!=null&&!isNaN(x));
if(!a.length) return null;
let s=0,c=0; a.forEach(d=>{const r=d*Math.PI/180; s+=Math.sin(r); c+=Math.cos(r)});
return (Math.atan2(s/a.length,c/a.length)*180/Math.PI+360)%360;
};
const spread=a=>{a=a.filter(x=>x!=null&&!isNaN(x));if(a.length<2)return 0;
const m=avg(a);return m>0?(Math.max(...a)-Math.min(...a))/m:0};
const clamp=(v,a,b)=>Math.max(a,Math.min(b,v));
const angDiff=(a,b)=>{let d=Math.abs(a-b)%360;return d>180?360-d:d};
const fmt=(v,d=1,dash='–')=>v==null||isNaN(v)?dash:v.toFixed(d);
/* ===== TUNE: everything that decides "good waves" lives here. =====
Change numbers in this block only; the rest of the code reads them.
grades : colour and word by the score AS DISPLAYED (whole number),
so a "6" is always the same colour whatever the decimals.
weights : share of each factor in the score, should add up to 1.
size : below swellMin the size factor is 0..belowMax, at the
optimum (opt, 0..1 inside the spot range) it is 10.
swellPeriod: long swell breaks bigger and wraps headlands better, so the
height is scaled by (period/ref)^power, never below floor.
power 0 switches it off. 0.7 m at 5 s and at 13 s are
different waves (8 vs 14 Sep 2026 at Nai Harn).
cap : without waves the score cannot go above this.
danger : red banner, separate from the score. */
const TUNE={
grades:[
{min:8, key:'gEpic', color:'var(--go)'},
{min:6, key:'gGood', color:'var(--ok)'},
{min:5, key:'gFair', color:'var(--fair)'},
{min:3, key:'gWeak', color:'var(--mid)'},
{min:2, key:'gPoor', color:'var(--bad)'},
{min:-1,key:'gFlat', color:'var(--no)'}
],
weights:{size:0.34, wind:0.30, period:0.20, dir:0.16},
size:{opt:0.45, belowMax:2, atMin:2, overMax:4, overFade:1.2},
period:{from:3.5, span:8},
swellPeriod:{ref:7, power:1, floor:0.6},
cap:{base:0.4, slope:5},
shelterLoss:0.55,
danger:{gust:14}
};
const GRADES=TUNE.grades;
/* Scores are rounded DOWN everywhere: 7.9 shows as 7. Better to under-promise
and let the beach be a nice surprise. Number and colour use the same value. */
const shown=v=>Math.floor((v??0)+1e-9);
const gradeOf=v=>GRADES.find(g=>shown(v)>=g.min)||GRADES[GRADES.length-1];
/* Опасность считается отдельно от качества: слишком большая волна
для спота или штормовые порывы. Это не низкий балл, а отдельный флаг. */
function dangerOf(sp,r){
if(!r) return null;
const eff=r.swell==null?null:r.swell*(1-sp.shelter*TUNE.shelterLoss);
if(eff!=null && eff>sp.swellMax) return {key:'dBig', v:fmt(eff,1)};
if(r.gust!=null && r.gust>=TUNE.danger.gust) return {key:'dWind', v:fmt(r.gust,0)};
return null;
}
/* Score 0..10. */
function scoreHour(sp,h){
const {swell:sw,period:per,sdir,wind:wsp,wdir,tide}=h;
if(sw==null) return null;
const SP=TUNE.swellPeriod;
const boost=per==null?1:Math.max(SP.floor,Math.pow(per/SP.ref,SP.power));
const eff=sw*boost*(1-sp.shelter*TUNE.shelterLoss); // how much gets past the headlands
const Z=TUNE.size, W=TUNE.weights;
/* Размер. Прежняя версия давала 7+ уже на нижней границе диапазона,
из-за чего еле живая волна выглядела приличной. Теперь у минимума
это двойка, десятка только около оптимума. */
let size;
if(eff<sp.swellMin) size=clamp(eff/sp.swellMin,0,1)*Z.belowMax;
else if(eff>sp.swellMax) size=clamp(1-(eff-sp.swellMax)/Z.overFade,0,1)*Z.overMax;
else{
const rel=(eff-sp.swellMin)/(sp.swellMax-sp.swellMin);
size = rel<=Z.opt ? Z.atMin+(10-Z.atMin)*(rel/Z.opt) : 10-(10-Z.overMax)*((rel-Z.opt)/(1-Z.opt));
}
const period=per==null?5:clamp((per-TUNE.period.from)/TUNE.period.span,0,1)*10;
const dirS=clamp(1-(sdir==null?45:angDiff(sdir,sp.facing))/95,0,1)*10;
const wOff=angDiff(wdir==null?sp.facing:wdir,(sp.facing+180)%360);
let wind;
// unknown wind is neutral; only a real calm earns the calm bonus
if(wsp==null) wind=5;
else if(wsp<1.2) wind=8.5;
else if(wOff<55) wind=clamp(10-(wsp-3)*0.35,5,10);
else if(wOff<115) wind=clamp(7.5-wsp*0.55,1.5,7.5);
else wind=clamp(7-wsp*1.15,0,7);
let tideAdj=0;
if(tide!=null){
if(sp.tide==='high') tideAdj=(tide-0.55)*1.7;
else if(sp.tide==='low') tideAdj=(0.55-tide)*1.7;
else if(sp.tide==='mid') tideAdj=(0.5-Math.abs(tide-0.55))*1.6;
}
const raw=size*W.size+period*W.period+dirS*W.dir+wind*W.wind+tideAdj;
/* Размер работает и как потолок. Без волны хороший ветер и удачное
направление не должны давать четвёрку: кататься всё равно не на чем. */
const cap = eff>=sp.swellMin ? 10 : clamp(eff/sp.swellMin,0,1)*TUNE.cap.slope+TUNE.cap.base;
return clamp(Math.min(raw,cap),0,10);
}
/* One request covers all spots; spots sharing a grid point share a column. */
function pointsOf(spots, span){
const pts=[...new Set(spots.map(s=>s.lat.toFixed(2)+','+s.lon.toFixed(2)))];
return {pts, base:'latitude='+pts.map(p=>p.split(',')[0]).join(',')+
'&longitude='+pts.map(p=>p.split(',')[1]).join(',')+'&timezone=Asia%2FBangkok'+span};
}
/* MET Norway timeseries indexed by local hour. */
function metIndex(mn){
const MET={};
if(mn) for(const p of mn.properties.timeseries){
const k=new Date(p.time).toLocaleString('sv-SE',{timeZone:'Asia/Bangkok'}).slice(0,13).replace(' ','T');
const d=p.data.instant.details;
MET[k]={s:d.wind_speed, d:d.wind_from_direction};
}
return MET;
}
/* Model medians per spot and hour, then the score. core = {m,w,tSea} as
returned by Open-Meteo for the points in pts. */
function buildSpots(spots, pts, core, MET, ww3, waveModels){
const WM=waveModels||WAVE_MODELS;
const {m,w,tSea}=core;
// wind or sea may be missing when a source is down; waves are required
const M=[].concat(m), W=w?[].concat(w):[], T=tSea?[].concat(tSea):null;
MET=MET||{};
const idx={}; pts.forEach((p,i)=>idx[p]=i);
const out={};
for(const sp of spots){
const i=idx[sp.lat.toFixed(2)+','+sp.lon.toFixed(2)];
if(i==null||!M[i]||!M[i].hourly) continue; // no data for this spot: leave it out
const mh=M[i].hourly, wh=W[i]?.hourly||{}, th=T&&T[i]?T[i].hourly:{}, rows=[];
for(let k=0;k<mh.time.length;k++){
const time=mh.time[k], hourKey=time.slice(0,13);
const met=MET[hourKey]||null;
const sRaw=WM.map(md=>({m:md,
h:mh['wave_height_'+md]?.[k], p:mh['wave_period_'+md]?.[k],
d:mh['wave_direction_'+md]?.[k],
sw:mh['swell_wave_height_'+md]?.[k], swp:mh['swell_wave_period_'+md]?.[k]}));
const sH=sRaw.map(x=>x.h);
const wRaw=WIND_MODELS.map(md=>({m:md,
s:wh['wind_speed_10m_'+md]?.[k], d:wh['wind_direction_10m_'+md]?.[k],
g:wh['wind_gusts_10m_'+md]?.[k]}));
if(met) wRaw.push({m:'metno', s:met.s, d:met.d, g:null});
const wS=wRaw.map(x=>x.s);
const w3=ww3?ww3[hourKey]:null;
rows.push({t:time,
swell:median(sH), period:median(sRaw.map(x=>x.p)),
sdir:circMean(sRaw.map(x=>x.d)),
swellOnly:median(sRaw.map(x=>x.sw)),
swellRange:range(sH), windRange:range(wS),
sst:th.sea_surface_temperature?.[k],
tideRaw:th.sea_level_height_msl?.[k],
windWave:median(WM.map(md=>mh['wind_wave_height_'+md]?.[k])),
rain:median(WIND_MODELS.map(md=>wh['precipitation_'+md]?.[k])),
wind:median(wS), wdir:circMean(wRaw.map(x=>x.d)),
gust:median(wRaw.map(x=>x.g)),
// raw per-model values
ww3:w3,
raw:{wave:sRaw, wind:wRaw}});
}
const tv=rows.map(r=>r.tideRaw).filter(x=>x!=null);
const tmin=tv.length?Math.min(...tv):0, tmax=tv.length?Math.max(...tv):0;
rows.forEach(r=>{r.tide=r.tideRaw==null?null:(tmax>tmin?(r.tideRaw-tmin)/(tmax-tmin):0.5);
r.score=scoreHour(sp,r)});
out[sp.id]=rows;
}
return out;
}
/* ---- grid.js ---- */
/* Generated by tools/grid.mjs on 2026-10-07. Do not edit by hand.
Per source: request point -> the point that stands for its model grid cell.
Points not listed stand for themselves. */
const GRID={
"gwam":{"7.82,98.30":"7.78,98.30","7.85,98.29":"7.78,98.30","7.81,98.30":"7.78,98.30","7.91,98.28":"7.89,98.28","7.95,98.28":"7.89,98.28","7.98,98.28":"7.89,98.28","8.00,98.29":"7.89,98.28","8.03,98.29":"7.89,98.28","8.08,98.26":"7.89,98.28","8.09,98.30":"7.89,98.28","8.73,98.22":"8.71,98.24","8.67,98.24":"8.71,98.24","8.65,98.25":"8.71,98.24","8.74,98.24":"8.71,98.24"},
"meteofrance_wave":{"7.82,98.30":"7.78,98.30","7.85,98.29":"7.89,98.28","7.81,98.30":"7.78,98.30","7.91,98.28":"7.89,98.28","7.98,98.28":"7.95,98.28","8.03,98.29":"8.00,98.29","8.08,98.26":"8.00,98.29","8.73,98.22":"8.71,98.24","8.67,98.24":"8.71,98.24","8.74,98.24":"8.71,98.24"},
"ncep_gfswave016":{"7.89,98.28":"7.82,98.30","7.85,98.29":"7.82,98.30","7.81,98.30":"7.82,98.30","7.91,98.28":"7.82,98.30","7.98,98.28":"7.95,98.28","8.00,98.29":"7.95,98.28","8.03,98.29":"7.95,98.28","8.08,98.26":"7.95,98.28","8.73,98.22":"8.71,98.24","8.67,98.24":"8.71,98.24","8.65,98.25":"8.71,98.24","8.74,98.24":"8.71,98.24"},
"ecmwf_wam025":{"7.82,98.30":"7.78,98.30","7.85,98.29":"7.78,98.30","7.81,98.30":"7.78,98.30","7.91,98.28":"7.89,98.28","7.95,98.28":"7.89,98.28","7.98,98.28":"7.89,98.28","8.00,98.29":"7.89,98.28","8.03,98.29":"7.89,98.28","8.08,98.26":"7.89,98.28","8.09,98.30":"7.89,98.28","8.73,98.22":"8.71,98.24","8.67,98.24":"8.71,98.24","8.65,98.25":"8.71,98.24","8.74,98.24":"8.71,98.24","8.77,98.26":"8.71,98.24"},
"wind":{"7.82,98.30":"7.78,98.30","7.85,98.29":"7.78,98.30","7.81,98.30":"7.78,98.30","7.91,98.28":"7.89,98.28","8.00,98.29":"7.98,98.28","8.03,98.29":"7.98,98.28","8.09,98.30":"8.08,98.26","8.73,98.22":"8.71,98.24","8.74,98.24":"8.71,98.24","8.77,98.26":"8.71,98.24"},
"sea":{"7.82,98.30":"7.78,98.30","7.85,98.29":"7.89,98.28","7.81,98.30":"7.78,98.30","7.91,98.28":"7.89,98.28","7.98,98.28":"7.95,98.28","8.03,98.29":"8.00,98.29","8.08,98.26":"8.00,98.29","8.73,98.22":"8.71,98.24","8.67,98.24":"8.71,98.24","8.74,98.24":"8.71,98.24"}};
</script>
<!-- inline:end -->
<script>
let REGION='phuket';
{
const h=(location.hash||'').replace('#','').toLowerCase();
if(REGIONS[h]) REGION=h;
}
const REG=()=>REGIONS[REGION];
const regName=()=>REG().name[LANG]||REG().name.en;
let SPOTS=spotsOf(REGION);
/* Ocean watchpoints. pass/lag measured by comparing the forecast
behind the Nicobars with the forecast at the shore. */
const OCEAN=[
{id:'nicobar', lat:7.0, lon:92.0, dist:700, pass:0.41, lag:11},
{id:'bengal', lat:12.0, lon:92.0, dist:900, pass:0.30, lag:16},
{id:'open', lat:5.0, lon:88.0, dist:1300, pass:0.30, lag:24}
];
let TAB='now', PICK=null, DATA=null, WEATHER=null, OCEANDATA=null, LAST_OK=null, STALE=false, STALE_REASON='noConnection';
/* localStorage throws in private mode, so degrade to no persistence. */
const LS={
get(k){ try{ return localStorage.getItem(k) }catch{ return null } },
set(k,v){ try{ localStorage.setItem(k,v) }catch{} },
del(k){ try{ localStorage.removeItem(k) }catch{} }
};
/* English by default; choice is kept in localStorage. */
const I18N={
en:{
title:'Surf', docTitle:'{0} surf forecast today: waves, live cams, sunset · Surf', now:'Now', island:'Phuket', d7:'10 days',
go:'GO', ok:'WORTH IT', weak:'WEAK', no:'SKIP',
darkNow:'dark now. ', bestIs:'best is {0}', windowAt:'window {0} {1}',
loading:'Loading forecast', howLink:'How the score works', histLink:'History', exact:'Exact score', today:'today', tomorrow:'tomorrow', peak:'peak', beach:'Beach', outOf:'of 10',
wave:'wave', period:'period', wind:'wind', water:'water',
noCam:'no camera', camNone:'no public camera', camPhoto:'photo', camVideo:'live video',
tPeak:'peak', tTide:'tide', tNow:'now',
tideHigh:'max', tideLow:'min',
rising:'conditions improving', falling:'conditions worsening', atPeak:'best right now', flat:'holding steady',
darkUntil:'dark. next window {0}', dark:'dark',
noPeak:'flat all day, no peak',
more:'details', showSources:'every source separately',
hHour:'hour', hScore:'score', hWave:'wave', hWind:'wind',
legend:'Bar height and colour: how good that hour is. Wave in metres, wind in m/s. Grey hours are night.',
restBeaches:'Other beaches',
colSwell:'height m', colPeriod:'period s', colDir:'dir', colSpeed:'m/s', colGust:'gust',
median:'median', spread:'spread', sumWave:'these models publish only total wave height. Shown for comparison, left out of the median',
srcNote:'We take the median, so one bad model cannot drag the result. Directions are added as vectors.<br>⧉ independent of Open-Meteo. ECMWF WAM only gives total height, hence the dashes.',
srcCount:'sources {0}', srcSome:'sources {0}/{1}', updAt:'{0}',
noData:'no data. ', timeout:'timeout',
wxUnavailable:'weather did not load',
feels:'feels', uv:'UV', gustShort:'↗{0} m/s',
swellShort:'not enough swell: <b>{0} m</b> against {1} needed',
swellOver:'too big: <b>{0} m</b>, it will close out',
swellOk:'swell is workable: <b>{0} m</b>',
perShort:'period <b>{0} s</b>, choppy', perMid:'period <b>{0} s</b>',
perLong:'period <b>{0} s</b>, clean lines',
windOff:'wind off the beach, <b>{0} {1} m/s</b>, holds the face',
windSide:'cross wind, <b>{0} {1} m/s</b>',
windOn:'wind straight in, <b>{0} {1} m/s</b>, tears the wave apart',
agreeBad:'sources disagree by {0}×. Do not trust the forecast here, check the camera',
agreeMid:'sources disagree by {0}×', agreeOk:'sources agree',
bySource:'by source: wave {0}–{1} m, wind {2}–{3} m/s',
bestWindow:'best window {0} {1}, {2}/10',
dirs:['N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW'],
wmo:{0:'clear',1:'mostly clear',2:'partly cloudy',3:'overcast',45:'fog',48:'fog',
51:'drizzle',53:'drizzle',55:'drizzle',61:'rain',63:'rain',65:'heavy rain',66:'rain',67:'heavy rain',
80:'showers',81:'showers',82:'heavy showers',95:'thunderstorm',96:'thunderstorm',99:'thunderstorm'},
uM:'m', uMs:'m/s', uS:'s', uMm:'mm',
hRain:'rain', chop:'of that <b>{0} m</b> is local wind chop',
srcOcean:'Ocean watchpoints · Open-Meteo', srcOceanWind:'Ocean wind · Open-Meteo',
uKm:'km',
iEvents:'Bigger-than-usual days', iOcean:'What is out in the ocean',
iSeason:'Season', iTyphoon:'Typhoons', iSky:'Meteor showers and eclipses ahead', iEclipses:'Eclipses',
noEvents:'The next 10 days are flat, swell holds around {0} m.',
iEventsNote:'A day lands here if its peak is at least a quarter above the 10 day median ({0} m). The bar shows by how much.',
oc_nicobar:'West of the Nicobars', oc_bengal:'Bay of Bengal', oc_open:'Open ocean',
ocPeak:'peak {0}, {1}', ocArrive:'reaches the coast at about {0} by {1}',
ocWind:'strongest wind {0}', ocStorm:'storm-force',
iOceanNote:'About 41% of ocean swell gets past the Andaman and Nicobar islands, and the period drops from 10 to 5–6 seconds. The arrival figure accounts for that, the ratio was measured.',
iSeasonText:'The season on the west coast runs May to October, driven by the southwest monsoon. Most days the waves are built by local wind, so wind matters a lot. Long swell from distant storms comes less often and gives the best days. November to April is flat.',
iTyphoonText:'This coast sits outside the typhoon belt. Cyclones form in the Bay of Bengal and the western Pacific. A cyclone in the bay can still push extra swell here, and that shows up in the ocean points above as a jump in wind and wave. There is no cyclone feed here: the open sources GDACS and JTWC block browsers, and inventing a warning is worse than showing none.',
licence:"Data: Open-Meteo and MET Norway (<a href='https://creativecommons.org/licenses/by/4.0/' target='_blank' rel='noopener'>CC BY 4.0</a>), NOAA WaveWatch III via PacIOOS, wttr.in with World Weather Online, Copernicus Atmosphere Monitoring Service. Sunset places and coastline: © OpenStreetMap contributors. Elevation: SRTM (NASA), Mapzen terrain tiles.",
camsLine:'Cameras belong to their owners: {0}.', licTail:'Visits are counted with Google Analytics. Forecasts can be wrong, do not rely on this alone.',
noConnection:'No connection, data did not load.',
keptOld:'Open-Meteo is not answering right now. Below is the forecast from {0}; it will refresh by itself.',
outTitle:'Sorry, the waves flooded the forecast server',
outText:'The forecast did not come through. We are pumping it out and will try again by ourselves in a minute.',
outCams:'Meanwhile, the live cameras:',
retry:'Try again',
slowLoad:'The forecast server is slower than usual, still waiting…',
srcDown:'Not responding: {0}.',
noWind:'Scores are counted without wind.',
noSea:'No tide or water temperature.',
spareHead:'Open-Meteo, the main forecast source, is down right now, so the reserve sources are in use:',
spareWave:'waves from NOAA WaveWatch III, one reading for the whole coast',
spareWind:'wind from MET Norway',
waveWW3:'Waves come from NOAA WaveWatch III instead: one open-sea point for the whole coast, so less precise.',
fewSpots:'No data for: {0}.',
staleData:'No connection. Data below is from {0} and may be out of date.',
offline:'offline',
rateLimit:'Request limit reached, try again in a couple of minutes.',
staleLimit:'Request limit reached. Data below is from {0}.',
limited:'limit',
totalWave:'total wave',
swellPart:'swell part', swellNote:'Models disagree on what counts as swell: NOAA calls only a 12 s groundswell a swell, DWD counts a 5 s wave as one. Those numbers are not comparable, so the median above uses total wave height, where the models agree within 22%.',
gFlat:'FLAT',
gPoor:'VERY POOR',
gWeak:'POOR',
gFair:'FAIR',
gGood:'GOOD',
gEpic:'EPIC',
gFlatSub:'nothing to catch',
gPoorSub:'you can paddle, you will not ride',
gWeakSub:'rare rideable waves, you have to hunt',
gFairSub:'most waves are rideable',
gGoodSub:'what you come here for',
gEpicSub:'best it gets here',
dBig:'too big for this break, {0} m',
dWind:'storm gusts, {0} m/s',
danger:'careful',
scoreNow:'right now', scoreFor:'for {0}',
srcWave:'Waves · Open-Meteo (4 models)', srcWind:'Wind · Open-Meteo (3 models)',
srcSea:'Tide and water · Open-Meteo', srcWx:'Weather · Open-Meteo',
srcMet:'Wind · MET Norway (independent)', srcWW3:'Waves · NOAA WaveWatch III (independent)',
// weather and sunset tabs
sun:'Sunset',
stOM:'Open-Meteo (6 models)', stWest:'{0} · cloud out west', stAir:'Open-Meteo · haze',
skySpareWx:'Open-Meteo is not answering right now. The weather here comes from the other providers, MET Norway and wttr.in, so there are fewer sources per day.',
skySpareSun:'Open-Meteo is not answering right now. Cloud for the sunset comes from MET Norway alone, so there is no spread between sources to judge by.',
wxLoading:'Loading weather from several models', wxNone:'The weather did not load. Try again in a minute.',
skSrc:'Sources', outHead:'10-day outlook', outBest:'Best day: {0}', outCols:'best wave and where · weather', outBeaches:'By beach', plRest:'Behind land today: {0}',
skLowAlt:'low in the {0}', skMidAlt:'in the {0}', skHighAlt:'high in the {0}',
kSun:'sunny', kPart:'sun and clouds', kCloud:'cloudy, dry', kShower:'short showers', kRain:'rainy', kStorm:'heavy rain',
wxDryDay:'dry', wxRainDay:'{0} mm in {1} h', wxRainMm:'{0} mm',
wxVoteDry:'A dry day for {0} of {1} sources',
wxHours:'Rain by the hour, mm',
wxGust:'gusts {0} m/s',
colSrc:'source', colT:'°C', colRain:'rain mm', colRainH:'wet h',
ssToday:'Sunset today', ssTomorrow:'Sunset tomorrow', ssNext:'Next days', ssPlaces:'Where to watch', ssSky:'Sky tonight', ssWhy:'What makes a sunset',
ssLoading:'Loading the cloud forecast',
ssBright:'BRIGHT', ssFair:'ORDINARY', ssDull:'DULL',
ssGo:'Worth the trip, even a long one.', ssNear:'Worth it if you are nearby.', ssStay:'Not worth a special trip.',
ssFire:'There is cloud to light up from below and the west is open.',
ssGap:'There is cloud to catch the light, and the west is only partly open. It may catch fire, it may stay grey.',
ssSheet:'A solid sheet of high cloud. With the west open the whole sky can turn red, or it stays a grey veil.',
ssClear:'Almost no cloud. A clean sun going down, few colours in the sky.',
ssShut:'A cloud bank out west near the horizon. The sun goes into it early and the light does not get through.',
ssLid:'Low cloud over the coast hides the sky.',
ssRain:'Rain around sunset.',
ssHaze:'Haze in the air mutes the colours.',
ssFireS:'cloud lit from below', ssGapS:'west partly open', ssSheetS:'solid high cloud', ssClearS:'clear, plain',
ssShutS:'cloud bank out west', ssLidS:'low cloud', ssRainS:'rain', ssHazeS:'haze', ssLotS:'a lottery, {0} to {1}',
ssTimes:'Golden hour from <b>{0}</b> · colour until <b>{1}</b>',
ssOne:'one source, nothing to compare it with', ssAgree:'sources agree', ssSplit:'sources differ, {0} to {1}', ssLottery:'a lottery, {0} to {1}. Look at the sky at {2}',
ssCloudAt:'cloud at sunset', ssColLow:'low %', ssColMid:'mid %', ssColHigh:'high %', ssColScore:'score',
ssWest:'Out west, 180 to 420 km along the line to the sun: low cloud <b>{0}%</b>, mid <b>{1}%</b>.',
ssNoWest:'Cloud out west did not load, so the score looks only at the sky over the coast.',
ssAod:'Haze, aerosol depth: <b>{0}</b>. Clean air is under 0.3.',
ssNone:'The cloud forecast did not load. Places and sky events below are computed and do not need it.',
ssSunAt:'the sun sets at {0}° ({1})',
plSea:'into the sea', plLow:'behind low land, {0} min early', plLand:'behind land, {0} min early',
plAll:'into the sea all year', plNever:'never into the sea', plMonths:'into the sea {0}', plLowOnly:'low land in the way all year',
plS:'South end', plM:'Middle', plN:'North end', plHere:'From here', plHeight:'about {0} m above the sea',
plBest:'from the {0}', plEnds:'south end', plEndm:'middle', plEndn:'north end',
skMoon:'Moon', skRise:'rises {0}', skSet:'sets {0}',
phNew:'new moon', phWaxC:'waxing crescent', phFirst:'first quarter', phWaxG:'waxing gibbous', phFull:'full moon',
phWanG:'waning gibbous', phLast:'last quarter', phWanC:'waning crescent',
skFull:'Full moon. It rises in the east at {0}, opposite the sunset.',
skEve:'After sunset', skMorn:'Before sunrise', skNoPlanet:'no bright planets',
skPlanet:'<b>{0}</b>: {1}, {2}', skSets:', until {0}', skAllNight:', all night',
skVery:'very bright', skBright:'bright', skSeen:'visible',
pl_mercury:'Mercury', pl_venus:'Venus', pl_mars:'Mars', pl_jupiter:'Jupiter', pl_saturn:'Saturn',
skShowers:'Meteors', skShower:'<b>{0}</b>: peak {1}, up to {2} an hour, {3}–{4}',
skShowerLow:'<b>{0}</b>: peak {1}, hardly seen from here',
skMoonBad:', the Moon is in the way',
skEclipse:'Eclipse', ec_sp:'partial solar eclipse', ec_lp:'partial lunar eclipse', ec_lt:'total lunar eclipse',
skEcLine:'<b>{1}</b>, {2}–{3}: {0}, {4}% covered.',
skEcSunset:' At sunset.', skEcLow:' Low on the horizon.',
ssWhyText:'<b>Cloud is the screen.</b> High and mid cloud catches red light from below once the sun is down. A sky half covered with it gives the best sunsets.<br><b>The west has to be open.</b> That light arrives almost flat from hundreds of kilometres away. A cloud bank on the western horizon shuts it off. So the score looks at cloud out at sea, along the line to the sun.<br><b>Low cloud is a lid.</b> Grey low cloud overhead or rain hides everything.<br><b>A clear sky is clean and plain.</b> The sun goes into the sea and the sky stays pale.<br><b>Haze mutes colour.</b> Smoke and dust turn the sun into a dim red ball before it reaches the horizon.',
},
ru:{
title:'Surf', docTitle:'{0}: прогноз волн для серфинга, камеры, закат · Surf', now:'Сейчас', island:'Пхукет', d7:'10 дней',
go:'ЕХАТЬ', ok:'МОЖНО', weak:'СЛАБО', no:'НЕ СТОИТ',
darkNow:'сейчас темно. ', bestIs:'лучше всего {0}', windowAt:'окно {0} {1}',
loading:'Загружаю прогноз', howLink:'Как считаются баллы', histLink:'История', exact:'Точный балл', today:'сегодня', tomorrow:'завтра', peak:'пик', beach:'Пляж', outOf:'из 10',
wave:'волна', period:'период', wind:'ветер', water:'вода',
noCam:'камеры нет', camNone:'публичных камер нет', camPhoto:'фото', camVideo:'видео',
tPeak:'пик', tTide:'прилив', tNow:'сейчас',
tideHigh:'макс', tideLow:'мин',
rising:'условия улучшаются', falling:'условия ухудшаются', atPeak:'сейчас лучший момент', flat:'без изменений',
darkUntil:'темно. ближайшее окно {0}', dark:'темно',
noPeak:'ровно весь день, пика нет',
more:'подробнее', showSources:'все источники по отдельности',
hHour:'час', hScore:'балл', hWave:'волна', hWind:'ветер',
legend:'Столбик: оценка часа. Выше и зеленее лучше. Волна в метрах, ветер в м/с. Серые часы ночные.',
restBeaches:'Остальные пляжи',
colSwell:'высота м', colPeriod:'период с', colDir:'напр.', colSpeed:'м/с', colGust:'порывы',