Closed mattldawson closed 4 weeks ago
Add the ability for host applications to update grid data at runtime.
Acceptance Criteria
Ideas
grid_map_t
grid_t
tuvx_interface
type :: grid_map_t type(c_ptr) :: ptr_ ! Pointer to internal tuvx_core%grid_warehouse_ end type
type :: grid_t type(cptr) :: ptr ! Pointer to specific grid in tuvx_core%gridwarehouse end type
- Add `internal_get_grids_tuvx` function to `module tuvx_interface`:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
function internal_get_grids_tuvx(tuvx) result(grids) use iso_c_binding, only: c_ptr, c_f_pointer type(c_ptr), intent(in) :: tuvx type(grid_map_t) :: grids type(core_t), pointer :: core call c_f_pointer(tuvx, core) grids%ptr_ = c_loc( core%grid_warehouse_ ) end function internal_get_grids_tuvx
- do something similar for `grid_t` that looks up grids by name and units - add `grid_t::update_edges()` and `grid_t::update_mid_points()` - a user could do something like this:
tuvx => tuvx_t( config_path ) grids = tuvx%create_grids( ) grid = grids%get( "height", "m" ) call grid%update_edges( new_edge_data_array ) call grid%update_mid_points( new_mid_point_data_array )
![image](https://github.com/NCAR/musica/assets/13836216/2dff242c-68dc-409c-8666-95530ade460e)
Add the ability for host applications to update grid data at runtime.
Acceptance Criteria
Ideas
grid_map_t
andgrid_t
types to thetuvx_interface
module, something like:type :: grid_t type(cptr) :: ptr ! Pointer to specific grid in tuvx_core%gridwarehouse end type
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
tuvx => tuvx_t( config_path ) grids = tuvx%create_grids( ) grid = grids%get( "height", "m" ) call grid%update_edges( new_edge_data_array ) call grid%update_mid_points( new_mid_point_data_array )