SHARPlib v1.4.0#113
Merged
Merged
Conversation
…emplate instantiation
…pass, renamed several variables, improved const correctness and data sharing
…ovide either LUT/lifter_lut. Added missing and NaN data checks. Updated documentation. Added test for LUTs
LUT based parcel ascent implemented (#101)
This PR implements a major refactor of how the nanobind python bindings are generated. With the introduction of the parcel ascent lookup tables, the amount of explicit instantiations for various functions increased dramatically... and would have a much larger increase per additional lifter added in the future. So, it was prudent and worthwhile to look at refactoring the nanobind python bindings. The primary goal was to leverage the strong recurring patterns that occur in the binding functions to generalize code. A new header file, binding_utils.h, is the destination for template metaprogramming code that leverages the compiler to generate bindings based on known structures. This approach has reduced duplicate code, simplified the process for adding new bindings in the future, and better standardized the bindings to be more consistent. It has also had the effect of helping reduce duplicate documentation and documentation errors.
This PR updates `mean_wind` to integrate on native-level data, rather than iterating on interpolated pressure levels. This should result in more accurate/correct computations, and potentially more performant as well. Tests were updated to account for changes in known-values.
Owner
Author
|
Once I update the python notebook example (#114), this should be good to merge and release. Hopefully before the end of the day tomorrow! |
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.
This PR merges all changes made in SHARPlib v1.4.0. This update contains new features, optimizations, bug fixes, and code-maintentance/quality-of-life improvements.
SHARPlib v1.4.0
New Features
sharp::lut_data.sharp::lifter_cm1) to construct a lookup table in memory. This lookup table can then be used to perform interpolation lookups rather than having to directly solve for moist adiabatic ascent. It is intended that this only be run once ahead of bulk computations, and is thread safe. NOTE: Only works for pseudoadiabatic ascent and will throw an error if using reversible adiabatic ascent.sharp::lifter_lut.mean_windnow uses native data levels instead of interpolating.Bug Fixes
integrate_layer_trapz.Quality of Life/Code Maintenance