Repository navigation
Commit cf2ea99
Rewrite bb-sim on dask and switch to the site-calculation models
Two changes to the same function body, which is why they are one commit.
**Larger than memory.** `bb-sim` read both waveform files entirely into
memory and looped over the three components in Python. Now LF and HF are
opened lazily, the common stations are selected on the *backend* arrays
before chunking -- selecting after chunking makes station reordering an
all-to-all dask shuffle, which materialises the whole array -- and the
recombination runs per chunk under `map_blocks`. Chunking is over
stations only, so each chunk holds complete traces for resampling,
alignment and filtering.
`resample_signal` and `align_datasets` replace the old pad-and-align:
the two legs no longer have to share a timestep, so an SW4 LF run at one
dt can be combined with HF at another. `relabel_hf_components` maps HF's
090/000/ver onto LF's x/y/z once, up front.
**Site amplification.** Replaces `qcore.siteamp_models.cb_amp_multi`
with the `site-calculation` models, selected by `bb.site_amp_version`:
CB2014 as before, or BA2018. The amplification is now constrained to an
explicit [fmin, fmax] band with logarithmic tapers at both ends, which
is what the two new `fhightop` and `fmax` parameters are for -- the old
code had a lowpass taper only.
`site_amp_version` becomes an enum rather than a free string. It was
previously declared, defaulted to "2014", and read by nothing at all.
The shared broadband parameters move from each defaults version into
root; the versions now carry only `flo`, which is the one value that
genuinely differs between them.
Station-dimension coordinates -- `supergrid_depth` among them -- ride
through `map_blocks` untouched, which is why the supergrid penetration
is carried as a coordinate rather than a data variable.
This changes broadband results: different site amplification model, and
a highpass taper where there was none.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent a092176 commit cf2ea99
11 files changed
Lines changed: 408 additions & 122 deletions
File tree
- tests
- workflow
- default_parameters
- root
- v24_2_2_1
- v24_2_2_2
- v24_2_2_4
- v26_7_1Hz
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
608 | 613 | | |
609 | 614 | | |
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
613 | 618 | | |
614 | 619 | | |
615 | | - | |
616 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
617 | 624 | | |
618 | 625 | | |
619 | 626 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1366 | 1366 | | |
1367 | 1367 | | |
1368 | 1368 | | |
1369 | | - | |
| 1369 | + | |
1370 | 1370 | | |
1371 | | - | |
1372 | | - | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1373 | 1378 | | |
1374 | 1379 | | |
1375 | 1380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
1168 | 1175 | | |
1169 | 1176 | | |
1170 | 1177 | | |
1171 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
1172 | 1185 | | |
1173 | 1186 | | |
1174 | 1187 | | |
| |||
0 commit comments