{"id":18336781,"url":"https://github.com/seissol/sampler","last_synced_at":"2026-03-19T03:58:37.002Z","repository":{"id":40466875,"uuid":"321720648","full_name":"SeisSol/SAMPLER","owner":"SeisSol","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-25T07:37:50.000Z","size":202,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-12T14:53:52.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SeisSol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-15T16:12:03.000Z","updated_at":"2024-12-26T10:19:00.000Z","dependencies_parsed_at":"2024-07-25T09:02:46.614Z","dependency_job_id":null,"html_url":"https://github.com/SeisSol/SAMPLER","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SeisSol/SAMPLER","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeisSol%2FSAMPLER","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeisSol%2FSAMPLER/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeisSol%2FSAMPLER/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeisSol%2FSAMPLER/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeisSol","download_url":"https://codeload.github.com/SeisSol/SAMPLER/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeisSol%2FSAMPLER/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29503809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T08:14:25.707Z","status":"ssl_error","status_checked_at":"2026-02-16T08:14:25.334Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T20:08:55.341Z","updated_at":"2026-02-16T08:32:09.535Z","avatar_url":"https://github.com/SeisSol.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SAMPLER\n**S**eismic **A**ctivity **M**apping \u0026 **P**rojection for **L**ethal maritime **E**vent **R**econstruction (working title)\n\nSAMPLER is a program for rasterizing unstructured meshes output by [SeisSol][1] into a format compatible with [sam(oa)²][2].\n\nAdditionally, it offers postprocessing options, namely depth filtering via [Kajiura's filter][3] and converting horizontal displacements to vertical ones using [Tanioka's method][7].\n\n## Installation\nFirst, set up Julia (**v1.6 or greater**) on your machine.\nThe recommended ways are:\n\n* On SuperMUC-NG: [Julia on SuperMUC-NG and HPC Systems, Getting Started][8]\n* On Linux and Windows, locally: [Julia Downloads][4]\n\nAfterwards, clone the SAMPLER repository to your machine (if you read this on the machine, you have already completed this step!):\n\n```bash\ngit clone https://github.com/SeisSol/SAMPLER\n```\n\n_Note: In the following it is assumed that `path/to/sampler` is the installation path (the sampler folder contains this README.md file)._\n\nThen, in `path/to/sampler`, run:\n\n```bash\npath/to/sampler\u003e export JULIA_NUM_THREADS=3 # or higher\npath/to/sampler\u003e julia\njulia\u003e ]\n(@v1.x) pkg\u003e activate .\n(SAMPLER) pkg\u003e instantiate\n(SAMPLER) pkg\u003e test\n```\n\nWhen all tests pass, SAMPLER is installed correctly.\n\n## Usage\nOnce you have installed SAMPLER and you have the SeisSol outputs in XDMF format you can run the script:\n\n```bash\ncd path/to/sampler/\nexport JULIA_NUM_THREADS=\u003cnum_threads\u003e\njulia --project src/main.jl \u003coptions\u003e\n```\n\n_Note: In Windows (PowerShell), replace `export ...` with:_\n\n```powershell\n$env:JULIA_NUM_THREADS = \u003cnum_threads\u003e\n```\n_Note: For an explanation of the available command line options, type:_\n\n```bash\njulia --project src/main.jl --help\n```\n\nYou can also have a look at the `run_sampler.sh` and `run_kajiura.sh` scripts to see how SAMPLER can be executed on the LRZ compute clusters.\nMore help for running on the cluster can be found [here][5].\n\nOnce you have rasterized the SeisSol output files, you can optionally use Kajiura's filter on the outputs:\n\n```bash\njulia --project scripts/kajiura.jl \u003cin_file.nc\u003e \u003cout_file.nc\u003e \u003ctimestep_end\u003e\n```\n\n_Note: Kajiura's Filter needs to process all timesteps prior to `timestep_end`._\n\n## Examples\n### Basic example: Rasterize 2D grids (seafloor and sea surface data is available)\n\n```bash\njulia --project src/main.jl -m 8G --water-height=2000 -o ~/sampler-output.nc ~/seissol-outputs/out-surface.xdmf\n```\n\nOnly rasterizes the 2D surface outputs (seafloor and sea surface elevation).\n\n### Rasterize only seafloor (and optionally apply Kajiura's Filter)\n\n```bash\njulia --project src/main.jl -m 8G --water-height=2000 -o ~/sampler-output.nc --seafloor-only ~/seissol-outputs/out-surface.xdmf\n```\n\nOnly rasterizes the 2D _seafloor_ elevation over time. Optionally thereafter:\n\n```bash    \njulia --project src/main.jl ~/sampler-output.nc ~/kajiura-output.nc 300\n```\n\nApplies Kajiura's Filter for 300 timesteps.\n\n_Note: You can also rasterize the SeisSol outputs fully (without `--seafloor-only`) and then apply Kajiura's Filter to them. But that usually does not make much sense._\n\n### Rasterize seafloor using Tanioka's method\n\n```bash\njulia --project src/main.jl -m 8G --water-height=2000 -o ~/sampler-output.nc --seafloor-only --tanioka ~/seissol-outputs/out-surface.xdmf\n```\n\nApplies Tanioka's method while rasterizing the seafloor. Needed if bathymetry is not flat.\n\n_Note: You can also use Tanioka's method when rasterizing more than just the seafloor outputs. It will only affect the seafloor uplift._\n\n### Rasterize fully (with 3D velocity grid)\n\n```bash\njulia --project src/main.jl -m 8G --water-height=2000 -o ~/sampler-output.nc -s 300 ~/seissol-outputs/out-surface.xdmf\n```\n\nRasterizes all grids and variables needed for tsunami simulation, including the 3D velocity grid.\nOnly rasterizes timestep 300 (for example).\n\n## Using the outputs with sam(oa)²\nYou need the [max-bachelor][6] branch of sam(oa)² in order to seamlessly use the output files of SAMPLER.\nThe other versions of sam(oa)² cannot handle multiple variables in one input file yet.\nRefer to its README.md for mor information.\n\n## Output format\nSAMPLER will always produce a regular grid in NetCDF format, with point data according to the command line parameters given.\nYou can control which input variables get mapped to which outputs via the `--seafloor-vars`, `--surface-vars`, and `--volumetric-vars` arguments.\nThe standard mapping is:\n\n| Mesh region | Mappings    |\n|-------------|-------------|\n| Seafloor    | `u3 =\u003e d`   |\n|             | `b =\u003e b`*   |\n| Surface     | `u3 =\u003e eta` |\n| Volumetric  | `v1 =\u003e v1`  |\n|             | `v2 =\u003e v2`  |\n\n\\* `b` is not a variable in SeisSol outputs but is understood by SAMPLER as being the geometry of the 2D mesh. Thus, you can use the `b =\u003e ...` mapping to output mesh geometry.\n\nAdditionally, `x`, `y` and `time` will always be output as dimensions and variables and cannot be renamed.\n\nExample mapping:\n\n```bash\n--seafloor-vars \"W,b=\u003ebathy\"\n```\n\nOutput `u3` with the same name, remap mesh geometry height to `bathy`.\n\n## Known Issues\n* The `--memory-limit` or `-m` argument imposes a soft limit on the memory used. Thus, choose about half of the memory available on your machine / cluster node.\n\n## Vizualizing the rasterized grid with Paraview\n\nThe NetCDF Reader of ParaView does not show all arrays of the rasterized file (typically only the b variable).\nTo vizualize the other variables (e.g. d or eta), we can extract the variable to be vizualized into a new NetCDF with `ncks`, e.g. :\n\n```bash\nncks -v x,y,time,eta ~/sampler-output.nc ~/sampler-output-eta.nc\n```\n\n[1]: http://www.seissol.org/\n[2]: https://gitlab.lrz.de/samoa/samoa\n[3]: https://cir.nii.ac.jp/crid/1572824499540286592\n[4]: https://julialang.org/downloads/\n[5]: https://doku.lrz.de/display/PUBLIC/Running+serial+jobs+on+the+Linux-Cluster#RunningserialjobsontheLinuxCluster-Script-drivenSLURMjobs\n[6]: https://gitlab.lrz.de/samoa/samoa/-/tree/max-bachelor\n[7]: https://dx.doi.org/10.1029/96GL00736\n[8]: https://doku.lrz.de/display/PUBLIC/FAQ%3A+Julia+on+SuperMUC-NG+and+HPC+Systems#FAQ:JuliaonSuperMUCNGandHPCSystems-Gettingstarted\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseissol%2Fsampler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseissol%2Fsampler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseissol%2Fsampler/lists"}