Fix issue with bounds on coastal boxes#343
Merged
xylar merged 13 commits intoMPAS-Dev:masterfrom Sep 4, 2020
Merged
Conversation
Move several tools that are specifically for the ocean to `mpas_tools.ocean`. Tools related to defining signed distance functions have been pulled out of `coastal_tools` and remain in `mpas_tools.mesh.creation`, since they should be generally useful. In the function lonlat2xyz, the radius has been added as an optional parameter, and the Earth radius is now a required parameter for signed distance functions.
Each function now takes as parameters the results of the function in define_base_mesh, rather than calling that function. This is a much cleaner way to pass in the fields and gives users a lot more flexibility. Since bathymetry and floodplain are ocean-specific concepts, the code for adding them has been moved to mpas_tools.ocean and isn't appropriate to include in build_spherical_mesh anymore. So calling code will need to add these steps after calling build_shperical_mesh.
Add a warning that build_mesh docs are now completely useless.
This particular meaning of meshDensity is a legacy of the pre-JIGSAW method for mesh generation and is only used in the ocean core.
This saves us from having to know the name of the output file in cases where we don't need to write out and read back the mesh density.
These add meshDensity and optionally add bathymetry and preserve floodplain
It is not very safe to use a non-integer step in arange because round-off causes trouble. Also, in this case you want to include the end point in the arange and this was not happening with the previous code.
Collaborator
Author
|
This is based off of #314 because it modifies files that were moved in that PR. |
Collaborator
Author
TestingWith this branch, I get a base mesh in the With this change, interpolation of mesh density will no longer require adding of an extra element to make the mesh periodic and to include the north pole. |
Collaborator
Author
|
Implicitly approved by @mark-petersen and @sbrus89 via MPAS-Dev/MPAS-Model#680 |
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.
It is not very safe to use a non-integer step in
arangebecause round-off causes trouble. Also, in this case you want to includethe end point in the
arangeand this was not happening with the previous code. As a result, global boxes did not include +180 longitude and +90 latidude.This merge also raises an exception if
mesh_typeis not one of the known values, so the error message is clearer in this case.