C interface for setting the igrf
data file path
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_intptr_t), | intent(in) | :: | ipointer | |||
character(kind=c_char, len=1), | intent(in), | dimension(n) | :: | igrf_dir | ||
integer(kind=c_int), | intent(in) | :: | n |
size of |
subroutine set_igrf_file_path_c(ipointer, igrf_dir, n) bind(C, name="set_igrf_file_path") integer(c_intptr_t), intent(in) :: ipointer integer(c_int), intent(in) :: n !! size of `igrf_dir` character(kind=c_char, len=1), dimension(n), intent(in) :: igrf_dir character(len=:), allocatable :: igrf_dir_ type(radbelt_type), pointer :: p call int_pointer_to_f_pointer(ipointer, p) if (associated(p)) then igrf_dir_ = c2f_str(igrf_dir) call p%set_igrf_file_path(igrf_dir_) else error stop 'error in set_igrf_file_path: class is not associated' end if end subroutine set_igrf_file_path_c