Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
319ff1f
add realisation input block
lispandfound Jan 7, 2025
4c997e2
swap input stages to using registry
lispandfound Jan 9, 2025
9f72c02
remove hardcoded container inputs, and extra docker files
lispandfound Jan 9, 2025
f3b0d65
move runner into top level directory
lispandfound Jan 9, 2025
4ece50d
Merge branch 'pegasus' into registry
lispandfound Jan 14, 2025
e4b2455
Merge branch 'pegasus' into registry
lispandfound Jan 16, 2025
c62b0fd
fix nshm2022-to-realisation imports
lispandfound Jan 17, 2025
f6f32b7
add docstring to to_dict method
lispandfound Jan 17, 2025
5bc0403
Consistently use realisation inputs code
lispandfound Jan 17, 2025
5ef1846
simplify nshmdb logic for nshm2022-to-realisation
lispandfound Jan 17, 2025
958024f
ruff + write velocity model path in the right place
lispandfound Jan 17, 2025
3156543
update check-srf to use new top_depth column
lispandfound Jan 17, 2025
2bc01ef
check-srf: velocity model paths are options
lispandfound Jan 17, 2025
bc1f0f8
update default station file location
lispandfound Jan 17, 2025
c7d3479
fix input loading for station file
lispandfound Jan 17, 2025
9430d1c
fix(hf-sim): hf-sim needs filepath for station vs30
lispandfound Jan 17, 2025
0a342ad
fix(hf-sim): remove broken reference to .model
lispandfound Jan 17, 2025
18b6aa1
Update station files to read from the registry
lispandfound Jan 17, 2025
dc41bf7
really really convert station x,y to int this time
lispandfound Jan 17, 2025
d66f261
use index name for station x y
lispandfound Jan 17, 2025
6f57c20
use the .name accessor for indices
lispandfound Jan 17, 2025
b767d72
fix(generate-station-coordinates): consistently access stations
lispandfound Jan 17, 2025
bcc761d
bind in the cache directory
lispandfound Jan 17, 2025
92895d2
update copy input script to create folders if they don't exist
lispandfound Jan 17, 2025
c4b9979
update source modelling URL
lispandfound Jan 20, 2025
5954822
remove .git again from source modelling URL
lispandfound Jan 20, 2025
c771f49
Merge branch 'pegasus' into registry
lispandfound Jan 28, 2025
0ce4713
Merge branch 'pegasus' into registry
lispandfound Jan 28, 2025
3961cf7
fix(workflow): make registry paths more clear
lispandfound Jan 28, 2025
59d685f
Merge branch 'registry' of github.com:ucgmsim/workflow into registry
lispandfound Jan 28, 2025
b4caf97
ci(ruff): fix ruff import sorting
lispandfound Jan 28, 2025
f4d57db
Merge branch 'pegasus' into registry
lispandfound Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions cylc/flow.cylc

This file was deleted.

75 changes: 0 additions & 75 deletions cylc/workflow-setup

This file was deleted.

Empty file removed docker/config/condor_config.local
Empty file.
Empty file removed docker/config/supervisord.conf
Empty file.
48 changes: 0 additions & 48 deletions docker/pegasus/Dockerfile

This file was deleted.

60 changes: 0 additions & 60 deletions docker/runner/Dockerfile

This file was deleted.

49 changes: 0 additions & 49 deletions docker/testing/Dockerfile

This file was deleted.

35 changes: 0 additions & 35 deletions docker/testing/genslip_velocity_model.vmod

This file was deleted.

6 changes: 0 additions & 6 deletions docker/runner/runner.def → runner/runner.def
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ From: ubuntu:latest
sqlite3 \
wget

wget "https://www.dropbox.com/scl/fi/50kww45wpsnmtf3pn2okz/nshmdb.db?rlkey=4mjuomuevl1963fjwfximgldm&st=keryhkwb&dl=0" -O /nshmdb.db
wget "https://www.dropbox.com/scl/fi/b4m9g32x1j70ti69zyybq/genslip_velocity_model.vmod?rlkey=yxurhrdn8uvqh33hsb0inhsq0&st=o77aaccp&dl=0" -O /genslip_velocity_model.vmod
wget "https://www.dropbox.com/scl/fi/qakchhg6qu23aclcb02ye/Cant1D_v2-midQ_leer.1d?rlkey=wn1a6nnol2eaf5n6qsy5t1nym&st=8yahw7id&dl=0" -O /Cant1D_v2-midQ_leer.1d
wget "https://www.dropbox.com/scl/fi/pl7mw6022faskwtfsh67w/non_uniform_whole_nz_with_real_stations-hh400_v20p3_land.vs30?rlkey=0lfk9af25nrg6r5wl5j0z9t6a&st=vgwt4sv3&dl=0" -O /stations.vs30
wget "https://www.dropbox.com/scl/fi/qifr4l9gmlzeqci5to1s4/non_uniform_whole_nz_with_real_stations-hh400_v20p3_land.ll?rlkey=al2afz1uh0swfekvmc56u9r89&st=p6veto2x&dl=0" -O /stations.ll

cd /EMOD3D && \
git checkout cylc && \
mkdir build && \
Expand Down
36 changes: 22 additions & 14 deletions tests/test_bb.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,34 @@
from workflow.scripts import bb_sim


@pytest.mark.parametrize('realisation,vs3dfile_url', [('2013p552776','https://www.dropbox.com/scl/fi/r41dwth8wo2r5mgxdw05r/vs3dfile.s?rlkey=s36skaejia56ug119pppyc2rb&st=fdm9v6ns&dl=0')])
@pytest.mark.parametrize(
"realisation,vs3dfile_url",
[
(
"2013p552776",
"https://www.dropbox.com/scl/fi/r41dwth8wo2r5mgxdw05r/vs3dfile.s?rlkey=s36skaejia56ug119pppyc2rb&st=fdm9v6ns&dl=0",
)
],
)
def test_bb_sim_2013p552776(tmp_path: Path, realisation: str, vs3dfile_url: str):
bb_test_data_path = Path('tests') / 'bb' / realisation
expected_bb_path = bb_test_data_path / 'BB_expected.bin'
output_bb_path = tmp_path / 'BB.bin'
work_directory = tmp_path / 'work'
bb_test_data_path = Path("tests") / "bb" / realisation
expected_bb_path = bb_test_data_path / "BB_expected.bin"
output_bb_path = tmp_path / "BB.bin"
work_directory = tmp_path / "work"
work_directory.mkdir()
vm_path = tmp_path / 'VM'
vm_path = tmp_path / "VM"
vm_path.mkdir(exist_ok=True)
subprocess.check_call(['wget', vs3dfile_url, '-O', str(vm_path / 'vs3dfile.s')])
subprocess.check_call(["wget", vs3dfile_url, "-O", str(vm_path / "vs3dfile.s")])
bb_sim.combine_hf_and_lf(
bb_test_data_path / 'realisation.json',
bb_test_data_path / 'stations.ll',
bb_test_data_path / 'stations.vs30',
bb_test_data_path / "realisation.json",
bb_test_data_path / "stations.ll",
bb_test_data_path / "stations.vs30",
# NOTE: Even though it feels like you can remove the OutBin
# directory, this *will* cause the tests to fail...
bb_test_data_path / 'LF' / 'OutBin',
bb_test_data_path / 'HF.bin',
bb_test_data_path / "LF" / "OutBin",
bb_test_data_path / "HF.bin",
vm_path,
output_bb_path,
work_directory=work_directory
work_directory=work_directory,
)
assert filecmp.cmp(tmp_path / 'BB.bin', expected_bb_path, shallow=False)
assert filecmp.cmp(tmp_path / "BB.bin", expected_bb_path, shallow=False)
Loading