[FEAT] Implement 3D interpolation in spherical and cubesphere grid #112
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.
Description
Addresses #99
The 3D interpolation scheme provides the interface Grid::set_interpolation_coefs and Grid::get_interpolation_values for geographical grid.
set_interpolation_coefs: Given the longitude, latitude and altitude of points, compute the interpolation coefficients and store them inside the Grid class. Return true if the function succeeds. Return false if the length of longitude, latitude and altitude are not the same.
get_interpolation_values: Given the value at known data points, create a map of geographic locations to data and do the interpolation. If the size of data is not the same as the size of geoGrid, return an empty vector. Otherwise return a vector of precision_t. For each point, if the processor can handle it, the value is the result of interpolation, otherwise the value is "cNinf".
Type of change
How Has This Been Tested?
Run
cmake -DTEST_INTERPOLATION:BOOL=TRUE ..
to build the Makefile.The required changes to the json file are in src/main/main_test_interpolation.cpp.
Test configuration
Checklist:
develop
(notmaster
) branchCHANGELOG.md
, summarizing the changes