AetherModel / Aether

This is the home of the Aether model of the thermosphere and ionosphere
GNU General Public License v3.0
19 stars 29 forks source link

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

Closed oscarhua closed 1 year ago

oscarhua commented 1 year ago

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: