Repository navigation
Publish a SCHISM Docker image to run rompy-schism workspaces - #25
Open
rafa-guedes wants to merge 4 commits into
Open
rafa-guedes wants to merge 4 commits into
rafa-guedes wants to merge 4 commits into
Conversation
docker/Dockerfile builds a SCHISM release with MPI and NetCDF, as schism (hydrodynamics) and schism_wwm (with WWM), plus combine_hotstart7 to merge the per-process hotstart files. It reuses the compiler settings of docker/schism. docker/test_image.py runs 2D, 3D, WWM and hotstart workspaces generated by rompy-schism in the image, checking SCHISM's log since SCHISM exits with 0 when it aborts. The docker workflow builds each release in docker/releases.txt, tests it, and publishes it to ghcr.io/rom-py/schism; pull requests only build and test.
Scribes mostly wait for output, so runs often start more processes than the machine has cores: 6 on a 4-core laptop for 4 compute processes and 2 scribes. mpirun refuses that by default, and rompy's DockerConfig has no way to pass --oversubscribe, so the image sets OMPI_MCA_rmaps_base_oversubscribe=1.
WWM interpolates WAVEWATCH III boundary spectra to each wave boundary node from the two nearest spectra, weighted by 1/distance. A node exactly on a spectra point gets an infinite weight and no waves, which is common: meshes often have boundary nodes on round coordinates, as do spectra from a regular grid. The patch makes such a node take that point's spectrum. The same code is in SCHISM master.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Docker image to run SCHISM on rompy-schism workspaces, published as
ghcr.io/rom-py/schism. It follows the SWAN and XBeach images (ghcr.io/rom-py/swan,ghcr.io/rom-py/xbeach), so users can run a generated model without compiling SCHISM.The image
docker/Dockerfilebuilds SCHISM v5.13.0 from its release tarball, verified against the checksum indocker/releases.txt. It uses Ubuntu 24.04, Open MPI and NetCDF, and the compiler settings indocker/schism. The image contains:schismout2d_*.nc)schism_wwmcombine_hotstart7The image is 390 MB. Running it looks like this:
It differs from the
docker/schismbuild that the tests use in these ways:-staticflags. They fail against Ubuntu's shared MPI and NetCDF.make. Its Fortran module dependencies are not ordered for-j.src/Core/schism_version_user.txt(schism -vprintsv5.13.0). Before, it printeddevelop.OMPI_MCA_rmaps_base_oversubscribe=1). Scribes mostly wait for output, socpu=6on a 4-core machine is normal;mpirunrefuses it by default, and rompy'sDockerConfigcannot pass--oversubscribe.docker/schismis unchanged.Testing and publishing
docker/test_image.pygenerates four workspaces from the test data and runs them in the image:vgrid.in;combine_hotstart7then merges.mirror.outreports a completed run,fatal.erroris empty andout2d_1.ncis NetCDF.nhot = 1directly inparam.nml, because theSchoutcheck ofnhotfails onmain. Write the vertical and vegetation parameters to &OPT, where SCHISM reads them #19 fixes that check..github/workflows/docker.ymlbuilds each release indocker/releases.txt, runs the test, and publishes toghcr.io/rom-py/schism, withlateston the last release. Pull requests only build and test. It is the rompy-swan workflow with SCHISM names.After merging, the
ghcr.io/rom-py/schismpackage has to be made public in the organisation's package settings.WWM patch
The build applies
docker/schism/patches/wwm-boundary-spectra-on-node.patchto the SCHISM source. WWM interpolates WAVEWATCH III boundary spectra to each wave boundary node from the two nearest spectra, weighted by1/distance. A node exactly on a spectra point gets an infinite weight and no waves. That is common, because meshes often have boundary nodes on round coordinates, as do spectra from a regular grid. With the patch, such a node takes that point's spectrum. The same code is in SCHISM master, so this should also be reported upstream.