Repository navigation
Support 3D models with generated vertical grids - #22
Open
rafa-guedes wants to merge 1 commit into
Open
rafa-guedes wants to merge 1 commit into
rafa-guedes wants to merge 1 commit into
Conversation
SCHISMGrid only read vgrid.in files: with VGrid or VgridGenerator, is_3d was False and pylibs_vgrid failed, so 3D boundary files and hotstart were written as 2D. Generated grids are now read from a copy written once to a temporary directory, and is_3d and nvrt come from the vertical grid itself (a 2D vgrid.in file is no longer taken as 3D). LSC2 grids cannot be generated with pylib (they need SCHISM's gen_vqs), so VGrid and VgridGenerator reject them when configured, with a message to give vgrid.in as a file. VGrid now defaults to SZ, since its LSC2 default always failed.
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.
A 3D model could only use a
vgrid.infile. With a generated vertical grid (VGridorVgridGenerator),SCHISMGrid.is_3dwasFalseandSCHISMGrid.pylibs_vgridraised, so the 3D boundary files andhotstart.ncwere built as 2D.Changes
SCHISMGrid.pylibs_vgridworks for generated grids. It writes the grid once to a temporary directory and reads it back.is_3dandnvrtcome from the vertical grid itself. A 2Dvgrid.infile was taken as 3D. A 2D grid now hasnvrt = 2(one layer) instead ofNone.create_schism_vgridcannot build LSC² (ivcor=1 option not available yet), because it comes from the mesh depths through SCHISM'sgen_vqs.VGridandVgridGeneratornow say so when they are created, and ask forvgrid.inas a file. Before, it failed only at generation.VGrid()defaults to SZ. Its LSC² default always failed.VgridGenerator.vgrid_typeis aLiteral["2d", "sz", "lsc2"]. Unknown values fell back to LSC², which then failed.Checks
is_3d,nvrtandpylibs_vgridfor generated SZ and 2D grids.nvrtofNone, LSC² failing at generation, and an LSC²VGridinstance. They now check the new behaviour. The full suite passes.zCoordinatesfiles.