wavespectra 4.0.0__tar.gz → 4.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wavespectra-4.0.0/wavespectra.egg-info → wavespectra-4.0.2}/PKG-INFO +3 -3
- {wavespectra-4.0.0 → wavespectra-4.0.2}/README.rst +2 -2
- {wavespectra-4.0.0 → wavespectra-4.0.2}/pyproject.toml +1 -1
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/__init__.py +1 -1
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/partition/specpart/specpartc.c +51 -37
- wavespectra-4.0.2/wavespectra/partition/specpart/specpartc.h +5 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2/wavespectra.egg-info}/PKG-INFO +3 -3
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra.egg-info/SOURCES.txt +1 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/AUTHORS.rst +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/LICENSE.txt +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/setup.cfg +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/setup.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/tests/test_cli.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/tests/test_cookiecutter_template.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/tests/test_partition.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/tests/test_specarray.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/cli.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/construct/__init__.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/construct/direction.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/construct/frequency.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/__init__.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/attributes.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/attributes.yml +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/fitting.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/npstats.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/select.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/swan.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/utils.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/core/xrstats.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/__init__.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/dataset.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/era5.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/funwave.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/json.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/ncswan.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/ndbc.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/ndbc_ascii.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/netcdf.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/obscape.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/octopus.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/spotter.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/swan.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/triaxys.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/wavespectra.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/ww3.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/ww3_station.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/wwm.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/input/xwaves.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/__init__.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/funwave.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/json.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/netcdf.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/octopus.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/orcaflex.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/swan.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/ww3.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/output/ww3.yml +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/partition/__init__.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/partition/hanson_and_phillips_2001.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/partition/partition.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/partition/specpart/specpartc_wrap.c +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/partition/tracking.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/plot.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/specarray.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra/specdataset.py +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra.egg-info/dependency_links.txt +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra.egg-info/entry_points.txt +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra.egg-info/requires.txt +0 -0
- {wavespectra-4.0.0 → wavespectra-4.0.2}/wavespectra.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wavespectra
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.2
|
|
4
4
|
Summary: Library for ocean wave spectra
|
|
5
5
|
Author-email: Wavespectra Developers <r.guedes@oceanum.science>
|
|
6
6
|
Maintainer-email: Rafael Guedes <r.guedes@oceanum.science>, Tom Durrant <t.durrant@oceanum.science>
|
|
@@ -86,8 +86,8 @@ Python library for ocean wave spectra.
|
|
|
86
86
|
.. image:: https://img.shields.io/github/actions/workflow/status/wavespectra/wavespectra/python-publish.yml
|
|
87
87
|
:target: https://github.com/wavespectra/wavespectra/actions
|
|
88
88
|
:alt: GitHub Workflow Status (with event)
|
|
89
|
-
.. image:: https://coveralls.io/repos/github/wavespectra/wavespectra/badge.svg
|
|
90
|
-
:target: https://coveralls.io/github/wavespectra/wavespectra
|
|
89
|
+
.. image:: https://coveralls.io/repos/github/wavespectra/wavespectra/badge.svg?branch=master
|
|
90
|
+
:target: https://coveralls.io/github/wavespectra/wavespectra?branch=master
|
|
91
91
|
.. image:: https://readthedocs.org/projects/wavespectra/badge/?version=latest
|
|
92
92
|
:target: https://wavespectra.readthedocs.io/en/latest/
|
|
93
93
|
.. image:: https://img.shields.io/pypi/v/wavespectra.svg
|
|
@@ -7,8 +7,8 @@ Python library for ocean wave spectra.
|
|
|
7
7
|
.. image:: https://img.shields.io/github/actions/workflow/status/wavespectra/wavespectra/python-publish.yml
|
|
8
8
|
:target: https://github.com/wavespectra/wavespectra/actions
|
|
9
9
|
:alt: GitHub Workflow Status (with event)
|
|
10
|
-
.. image:: https://coveralls.io/repos/github/wavespectra/wavespectra/badge.svg
|
|
11
|
-
:target: https://coveralls.io/github/wavespectra/wavespectra
|
|
10
|
+
.. image:: https://coveralls.io/repos/github/wavespectra/wavespectra/badge.svg?branch=master
|
|
11
|
+
:target: https://coveralls.io/github/wavespectra/wavespectra?branch=master
|
|
12
12
|
.. image:: https://readthedocs.org/projects/wavespectra/badge/?version=latest
|
|
13
13
|
:target: https://wavespectra.readthedocs.io/en/latest/
|
|
14
14
|
.. image:: https://img.shields.io/pypi/v/wavespectra.svg
|
|
@@ -97,7 +97,7 @@ docs = [
|
|
|
97
97
|
[tool.setuptools.package-data]
|
|
98
98
|
"wavespectra.core" = ["*.yml"]
|
|
99
99
|
"wavespectra.output" = ["*.yml"]
|
|
100
|
-
"wavespectra.
|
|
100
|
+
"wavespectra.partition.specpart" = ["specpartc.c", "specpartc.h", "specpartc_wrap.c"]
|
|
101
101
|
|
|
102
102
|
[tool.setuptools.dynamic]
|
|
103
103
|
version = {attr = "wavespectra.__version__"}
|
|
@@ -121,7 +121,10 @@ void partition(float * spec,
|
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
void ptsort(int iihmax, int nnspec) {
|
|
124
|
-
int i, in, iv
|
|
124
|
+
int i, in, iv;
|
|
125
|
+
int * numv = malloc(iihmax*sizeof(int));
|
|
126
|
+
int * iaddr = malloc(iihmax*sizeof(int));
|
|
127
|
+
int * iorder = malloc(nnspec*sizeof(int));
|
|
125
128
|
/*--------------------------------
|
|
126
129
|
* 1. counting occurences per height bins
|
|
127
130
|
*-------------------------------*/
|
|
@@ -155,7 +158,10 @@ void ptsort(int iihmax, int nnspec) {
|
|
|
155
158
|
*----------------------------------*/
|
|
156
159
|
for (i = 0; i < nnspec; i++) {
|
|
157
160
|
ind[iorder[i]] = i;
|
|
158
|
-
}
|
|
161
|
+
}
|
|
162
|
+
free(numv);
|
|
163
|
+
free(iaddr);
|
|
164
|
+
free(iorder);
|
|
159
165
|
}
|
|
160
166
|
|
|
161
167
|
void ptnghb() {
|
|
@@ -272,39 +278,45 @@ int int_minval(int * data, int size) {
|
|
|
272
278
|
}
|
|
273
279
|
|
|
274
280
|
|
|
281
|
+
int fifo_add(int * iq,
|
|
282
|
+
int iq_end,
|
|
283
|
+
int iv) {
|
|
284
|
+
*(iq + iq_end) = iv;
|
|
285
|
+
if ( iq_end > nspec-2 )
|
|
286
|
+
return 0;
|
|
287
|
+
return iq_end+1;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
int fifo_empty(int iq_start,
|
|
291
|
+
int iq_end) {
|
|
292
|
+
if (iq_start != iq_end)
|
|
293
|
+
return 0;
|
|
294
|
+
return 1;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
int fifo_first(int * iq,
|
|
298
|
+
int * iq_start) {
|
|
299
|
+
int iv = *(iq+*iq_start);
|
|
300
|
+
*iq_start = *iq_start+1;
|
|
301
|
+
if ( *iq_start > nspec -1 )
|
|
302
|
+
*iq_start = 0;
|
|
303
|
+
return iv;
|
|
304
|
+
}
|
|
305
|
+
|
|
275
306
|
void pt_fld(int *imi,
|
|
276
307
|
int *ind,
|
|
277
308
|
int *imo,
|
|
278
309
|
float *zp,
|
|
279
310
|
int ihmax) {
|
|
280
311
|
|
|
281
|
-
int mask, init, iwshed
|
|
312
|
+
int mask, init, iwshed;
|
|
282
313
|
int ic_label, ifict_pixel, m, ih, msave;
|
|
283
314
|
int ip, i, ipp, ic_dist, iempty, ippp;
|
|
284
315
|
int jl, jn, ipt, j;
|
|
285
|
-
int
|
|
316
|
+
int iq_start, iq_end;
|
|
286
317
|
float zpmax, ep1, diff;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
iq[iq_end] = iv;
|
|
290
|
-
iq_end++;
|
|
291
|
-
if ( iq_end > nspec-1 )
|
|
292
|
-
iq_end = 0;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
int fifo_empty() {
|
|
296
|
-
if (iq_start != iq_end)
|
|
297
|
-
return 0;
|
|
298
|
-
return 1;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
int fifo_first() {
|
|
302
|
-
int iv = iq[iq_start];
|
|
303
|
-
iq_start++;
|
|
304
|
-
if ( iq_start > nspec -1 )
|
|
305
|
-
iq_start = 0;
|
|
306
|
-
return iv;
|
|
307
|
-
}
|
|
318
|
+
int * iq = malloc(nspec*sizeof(int));
|
|
319
|
+
int * imd = malloc(nspec*sizeof(int));
|
|
308
320
|
|
|
309
321
|
// 0. initializations
|
|
310
322
|
mask = -2;
|
|
@@ -349,7 +361,7 @@ void pt_fld(int *imi,
|
|
|
349
361
|
ipp = neigh[i+9*ip];
|
|
350
362
|
if ( imo[ipp] > 0 || imo[ipp] == iwshed ) {
|
|
351
363
|
imd[ip] = 1;
|
|
352
|
-
fifo_add (ip); // l305
|
|
364
|
+
iq_end = fifo_add (iq, iq_end, ip); // l305
|
|
353
365
|
break;
|
|
354
366
|
}
|
|
355
367
|
}
|
|
@@ -366,17 +378,17 @@ void pt_fld(int *imi,
|
|
|
366
378
|
// 1.b process the queue
|
|
367
379
|
ic_dist = 1;
|
|
368
380
|
// Mark end of fifo
|
|
369
|
-
fifo_add(ifict_pixel);
|
|
381
|
+
iq_end = fifo_add(iq, iq_end, ifict_pixel);
|
|
370
382
|
for (;;) {
|
|
371
|
-
ip = fifo_first();
|
|
383
|
+
ip = fifo_first(iq, &iq_start);
|
|
372
384
|
// Check for end of processing
|
|
373
385
|
if ( ip == ifict_pixel ) {
|
|
374
|
-
if (fifo_empty())
|
|
386
|
+
if (fifo_empty(iq_start, iq_end))
|
|
375
387
|
break;
|
|
376
388
|
else {
|
|
377
|
-
fifo_add(ifict_pixel);
|
|
389
|
+
iq_end = fifo_add(iq, iq_end, ifict_pixel);
|
|
378
390
|
ic_dist++;
|
|
379
|
-
ip = fifo_first();
|
|
391
|
+
ip = fifo_first(iq, &iq_start);
|
|
380
392
|
}
|
|
381
393
|
}
|
|
382
394
|
// Process queue
|
|
@@ -395,7 +407,7 @@ void pt_fld(int *imi,
|
|
|
395
407
|
}
|
|
396
408
|
else if ( ( imo[ipp] == mask ) && (imd[ipp] == 0) ) {
|
|
397
409
|
imd[ipp] = ic_dist +1;
|
|
398
|
-
fifo_add(ipp);
|
|
410
|
+
iq_end = fifo_add(iq, iq_end, ipp);
|
|
399
411
|
}
|
|
400
412
|
|
|
401
413
|
}
|
|
@@ -413,18 +425,18 @@ void pt_fld(int *imi,
|
|
|
413
425
|
if ( imo[ip] == mask ) {
|
|
414
426
|
// ... New label for pixel
|
|
415
427
|
ic_label++;
|
|
416
|
-
fifo_add(ip);
|
|
428
|
+
iq_end = fifo_add(iq, iq_end, ip);
|
|
417
429
|
imo[ip] = ic_label;
|
|
418
430
|
// ... and all connected to it ...
|
|
419
431
|
for (;;) {
|
|
420
|
-
if ( fifo_empty() )
|
|
432
|
+
if ( fifo_empty(iq_start, iq_end) )
|
|
421
433
|
break;
|
|
422
|
-
ipp = fifo_first();
|
|
434
|
+
ipp = fifo_first(iq, &iq_start);
|
|
423
435
|
|
|
424
436
|
for ( i = 0; i < neigh[8+9*ipp]; i++ ) {
|
|
425
437
|
ippp = neigh[i+9*ipp];
|
|
426
438
|
if ( imo[ippp] == mask ) {
|
|
427
|
-
fifo_add(ippp);
|
|
439
|
+
iq_end = fifo_add(iq, iq_end, ippp);
|
|
428
440
|
imo[ippp] = ic_label;
|
|
429
441
|
}
|
|
430
442
|
}
|
|
@@ -471,5 +483,7 @@ void pt_fld(int *imi,
|
|
|
471
483
|
}
|
|
472
484
|
}
|
|
473
485
|
|
|
474
|
-
npart = ic_label;
|
|
486
|
+
npart = ic_label;
|
|
487
|
+
free(iq);
|
|
488
|
+
free(imd);
|
|
475
489
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wavespectra
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.2
|
|
4
4
|
Summary: Library for ocean wave spectra
|
|
5
5
|
Author-email: Wavespectra Developers <r.guedes@oceanum.science>
|
|
6
6
|
Maintainer-email: Rafael Guedes <r.guedes@oceanum.science>, Tom Durrant <t.durrant@oceanum.science>
|
|
@@ -86,8 +86,8 @@ Python library for ocean wave spectra.
|
|
|
86
86
|
.. image:: https://img.shields.io/github/actions/workflow/status/wavespectra/wavespectra/python-publish.yml
|
|
87
87
|
:target: https://github.com/wavespectra/wavespectra/actions
|
|
88
88
|
:alt: GitHub Workflow Status (with event)
|
|
89
|
-
.. image:: https://coveralls.io/repos/github/wavespectra/wavespectra/badge.svg
|
|
90
|
-
:target: https://coveralls.io/github/wavespectra/wavespectra
|
|
89
|
+
.. image:: https://coveralls.io/repos/github/wavespectra/wavespectra/badge.svg?branch=master
|
|
90
|
+
:target: https://coveralls.io/github/wavespectra/wavespectra?branch=master
|
|
91
91
|
.. image:: https://readthedocs.org/projects/wavespectra/badge/?version=latest
|
|
92
92
|
:target: https://wavespectra.readthedocs.io/en/latest/
|
|
93
93
|
.. image:: https://img.shields.io/pypi/v/wavespectra.svg
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|