-
Notifications
You must be signed in to change notification settings - Fork 50
D3D updates #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
D3D updates #428
Changes from 8 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
bbbdf67
begin to add xarray capability and add new variables in coords
browniea bb27980
fix waterdepth name
browniea 2e78821
calculate_grid_convergence_index
browniea a43446c
add test for calculate_grid_convergence_index
browniea 0f5e015
black an pylint formating
browniea d2155a8
black and pulint formatting
browniea 3d11517
add xarray input to error checks
browniea 27800f7
update to develop branch
browniea fbb2434
added checkes to GCI function
browniea 6209f68
added citation
browniea de92303
fixed typo
browniea 8a15145
xarray testing still in progress
browniea f875e5f
update git_layer_function to take xarray
browniea 6c5d9d8
updated convert_time to take xarray
browniea 8229a7b
changed function to Second_to_index from convert_time
browniea 861d9d1
updated get_layer_data for xarray
browniea 82facb0
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
akeeste ed1273c
updated get_all_data for xarray
browniea e1b0d1a
finished adding xarray input analysis
browniea 665f23c
consolodated get_layer_data depth interpolation
browniea f8a4483
updated test to test xarray input
browniea d669bc6
Merge remote-tracking branch 'upstream/develop' into D3D_updates
simmsa 085ea85
Dev: Format with black
simmsa 930c2bc
removed grid_convergence_test wrong branch
browniea ad928ec
skip pylint errors
browniea 050ce85
black formatting
browniea fc5f3c6
add calculate_grid_convergence_index
browniea 13cf7ff
black formating
browniea d4c8fe0
moved pylint: disable to many lines
browniea e48ee94
updated GCI checkes
browniea e1d0e0e
pylint too longs error
browniea 6c38594
added in some functionality back in that got removed at some point
browniea 4dc6613
added mesh2D cords name
browniea eba3109
black
browniea d4577a0
ignore pylint error
browniea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -297,6 +297,15 @@ def test_turbulent_intensity(self): | |
| ucx_size = np.size(ucx["ucx"]) | ||
| self.assertEqual(TI_size, ucx_size) | ||
|
|
||
| def test_calculate_grid_convergence_index(self): | ||
| fine_grid = np.array([1.0, 2.0, 3.0]) | ||
| coarse_grid = np.array([0.5, 1.5, 2.5]) | ||
| refinement_ratio = 2.0 | ||
| gci = river.io.d3d.calculate_grid_convergence_index( | ||
| fine_grid, coarse_grid, refinement_ratio | ||
| ) | ||
| assert_array_almost_equal(gci, np.array([0.2083, 0.1042, 0.0694]), decimal=3) | ||
|
|
||
|
Comment on lines
+374
to
+382
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this test is failing, but I'm pretty sure it's an issue with the install that #436 should address |
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for xarray input