Conversation
|
@pwolfram, @sbrus89, @dengwirda, @mark-petersen, and @proteanplanet, this is just a heads-up that I'm working on reorganizing the mesh creation tools to separate out ocean-specific pieces from generic ones that might be useful for other components. @dengwirda, you may want to take a look at this and, again, make sure it doesn't conflict with changes you'd like to make. When things have progressed a big further and if there aren't major protests, I'll make a corresponding PR in MPAS-Model/ocean/develop to make the corresponding changes in existing COMPASS test cases. |
87b414f to
b5f4905
Compare
b5f4905 to
74776de
Compare
7ca961f to
df20f3f
Compare
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
932050f to
1e94806
Compare
…velop This merge updates COMPASS ocean test cases to make them compatible with MPAS-Dev/MPAS-Tools#314. This includes: * Changing `define_base_mesh.py` to `build_base_mesh.py`, which calls * `build_spherical_mesh()` explicitly (whereas the old `build_mesh` * called the `cellWidthVsLatLon()` from `define_base_mesh`, which * created a problematic import of a local module within `build_mesh`). * Update imports to handle move of `coastal_tools` (other than * `signed_distance` functions), `inject_bathymetry`, * `inject_meshDensity` and `inject_preserve_floodplain` to * `mpas_tools.ocean` Affected test cases are (check mark indicates they have been updated): - [x] `Gaussian_hump/USDEQU120cr10rr2/build_mesh/` - [x] `coastal/Maine/init` - [x] `coastal/USDEQU120cr10rr2/build_mesh` - [x] `global_ocean/ARM60to10/init` - [x] `global_ocean/CA120to3/build_mesh` - [x] `global_ocean/EC60to30/init` - [x] `global_ocean/EC60to30wISC/init` - [x] `global_ocean/HI120to12/build_mesh` - [x] `global_ocean/QU240/init` - [x] `global_ocean/QU240wISC/init` - [x] `global_ocean/SO60to10wISC/init` - [x] `global_ocean/WC12/init` - [x] `global_ocean/WC14/init` - [x] `hurricane/USDEQU120at30cr10rr2/build_mesh` - [x] `hurricane/USDEQU120at30cr10rr2WD/build_mesh` - [x] `hurricane/USDEQU120at30cr10rr2WD_veg/build_mesh` - [x] `hurricane/USDEQU240at60cr20rr4/build_mesh` - [x] `hurricane/USDEQU240at60cr20rr4WD/build_mesh` - [x] `hurricane/USDEQU240at60cr20rr4WD_veg/build_mesh` - [x] `hurricane/USDEQU60at15cr5rr1/build_mesh` - [x] `hurricane/USDEQU60at15cr5rr100WD/build_mesh` - [x] `hurricane/USDEQU60at15cr5rr1WD/build_mesh` - [x] `hurricane/USDEQU60at15cr5rr1WD_veg/build_mesh` - [x] `hurricane/USDEQU60at15cr5rr250WD/build_mesh` - [x] `hurricane/USDEQU60at15cr5rr500WD/build_mesh` - [x] `tides/USDEQU120at30cr10/build_mesh`
|
@mark-petersen and @sbrus89, please always approve the associated MPAS-Tools changes like this PR along with the MPAS-Model PR. Again, I am reluctantly merging without your review because it was tacitly given in MPAS-Dev/MPAS-Model#577 |
Update to version 0.1.11 of the compass environment #688 This brings in several changes from MPAS-Tools: * Changes to make sure the Earth radius is consistent throughout COMPASS and `mpas_tools.ocean` by using the CIME value (MPAS-Dev/MPAS-Tools#347 and MPAS-Dev/MPAS-Tools#341) * Improved performance for interpolation of meshDensity and bathymetry (MPAS-Dev/MPAS-Tools#344) * Reorganization of `mpas_tools.mesh.creation` (MPAS-Dev/MPAS-Tools#314)
Update to version 0.1.11 of the compass environment #688 This brings in several changes from MPAS-Tools: * Changes to make sure the Earth radius is consistent throughout COMPASS and `mpas_tools.ocean` by using the CIME value (MPAS-Dev/MPAS-Tools#347 and MPAS-Dev/MPAS-Tools#341) * Improved performance for interpolation of meshDensity and bathymetry (MPAS-Dev/MPAS-Tools#344) * Reorganization of `mpas_tools.mesh.creation` (MPAS-Dev/MPAS-Tools#314)
This PR builds on #311 by performing some reorganization of
mpas_tools.mesh.creation.It includes:
coastal_tools,inject_bathymetry,inject_meshDensityandinject_preserve_floodplaintompas_tools.ocean, since these are ocean-specific tools.inject_meshDensityhad been broken into 3 functions, one for reading from a file and one each for taking numpy arrays that define spherical or planar meshes.coastal_tools, since the former are general to any component. These tools are now inmpas_tools.mesh.creation.signed_distanceearth_radiusparameter to jigsaw_driver and a few other places so the Earth radius isn't hard coded with different values in different placesbuild_meshinto polar and spherical functions and move ocean-specific steps to a new modulempas_tools.ocean.build_mesh.