Skip to content
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

[FEAT] Implement 3D interpolation in spherical and cubesphere grid #112

Merged
merged 10 commits into from
Jun 3, 2023

Conversation

oscarhua
Copy link
Contributor

@oscarhua oscarhua commented May 18, 2023

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

  • New feature (non-breaking change that adds functionality)

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

  • Operating system: Ubuntu-20.04
  • Compiler, version number: gcc 9.4.0

Checklist:

  • [N/A] Make sure you are merging into the develop (not master) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • [N/A] Add a note to CHANGELOG.md, summarizing the changes

@aaronjridley aaronjridley merged commit d41829f into AetherModel:develop Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants