read_distribution Subroutine

public subroutine read_distribution()

Reads in the fast-ion distribution

Arguments

None

Calls

proc~~read_distribution~~CallsGraph proc~read_distribution read_distribution proc~read_f read_f proc~read_distribution->proc~read_f proc~read_mc read_mc proc~read_distribution->proc~read_mc proc~h5ltread_dataset_int_scalar_f h5ltread_dataset_int_scalar_f proc~read_distribution->proc~h5ltread_dataset_int_scalar_f h5open_f h5open_f proc~read_distribution->h5open_f h5close_f h5close_f proc~read_distribution->h5close_f h5fclose_f h5fclose_f proc~read_distribution->h5fclose_f h5fopen_f h5fopen_f proc~read_distribution->h5fopen_f proc~read_f->proc~h5ltread_dataset_int_scalar_f h5ltpath_valid_f h5ltpath_valid_f proc~read_f->h5ltpath_valid_f proc~read_mc->proc~h5ltread_dataset_int_scalar_f proc~circle_grid_intersect circle_grid_intersect proc~read_mc->proc~circle_grid_intersect h5ltread_dataset_double_f h5ltread_dataset_double_f proc~read_mc->h5ltread_dataset_double_f h5ltread_dataset_int_f h5ltread_dataset_int_f proc~read_mc->h5ltread_dataset_int_f proc~read_mc->h5ltpath_valid_f proc~in_plasma in_plasma proc~read_mc->proc~in_plasma proc~uvw_to_xyz uvw_to_xyz proc~read_mc->proc~uvw_to_xyz proc~in_grid in_grid proc~read_mc->proc~in_grid proc~h5ltread_dataset_int_scalar_f->h5ltread_dataset_int_f proc~circle_grid_intersect->proc~in_grid proc~approx_eq approx_eq proc~circle_grid_intersect->proc~approx_eq proc~grid_intersect grid_intersect proc~circle_grid_intersect->proc~grid_intersect interface~interpol_coeff interpol_coeff proc~in_plasma->interface~interpol_coeff proc~cyl_to_uvw cyl_to_uvw proc~in_plasma->proc~cyl_to_uvw proc~xyz_to_uvw xyz_to_uvw proc~in_plasma->proc~xyz_to_uvw proc~approx_le approx_le proc~in_grid->proc~approx_le proc~approx_ge approx_ge proc~in_grid->proc~approx_ge proc~cyl_interpol3d_coeff cyl_interpol3D_coeff interface~interpol_coeff->proc~cyl_interpol3d_coeff proc~interpol1d_coeff interpol1D_coeff interface~interpol_coeff->proc~interpol1d_coeff proc~interpol2d_coeff_arr interpol2D_coeff_arr interface~interpol_coeff->proc~interpol2d_coeff_arr proc~interpol2d_coeff interpol2D_coeff interface~interpol_coeff->proc~interpol2d_coeff proc~cyl_interpol3d_coeff_arr cyl_interpol3D_coeff_arr interface~interpol_coeff->proc~cyl_interpol3d_coeff_arr proc~interpol1d_coeff_arr interpol1D_coeff_arr interface~interpol_coeff->proc~interpol1d_coeff_arr proc~approx_le->proc~approx_eq proc~approx_ge->proc~approx_eq proc~in_passive_grid in_passive_grid proc~grid_intersect->proc~in_passive_grid proc~cyl_interpol3d_coeff->proc~interpol2d_coeff proc~interpol2d_coeff_arr->proc~interpol2d_coeff proc~in_passive_grid->proc~approx_le proc~in_passive_grid->proc~approx_ge proc~uvw_to_cyl uvw_to_cyl proc~in_passive_grid->proc~uvw_to_cyl proc~cyl_interpol3d_coeff_arr->proc~cyl_interpol3d_coeff proc~cyl_interpol3d_coeff_arr->proc~interpol2d_coeff proc~interpol1d_coeff_arr->proc~interpol1d_coeff

Called by

proc~~read_distribution~~CalledByGraph proc~read_distribution read_distribution program~fidasim fidasim program~fidasim->proc~read_distribution

Contents

Source Code


Source Code

subroutine read_distribution
    !+ Reads in the fast-ion distribution
    integer(HID_T) :: fid
    integer :: error

    !!Initialize HDF5 interface
    call h5open_f(error)

    !!Open HDF5 file
    call h5fopen_f(inputs%distribution_file, H5F_ACC_RDONLY_F, fid, error)

    !!Get distribution type
    call h5ltread_dataset_int_scalar_f(fid, "/type", inputs%dist_type, error)

    if(inputs%dist_type.eq.1) then
        call read_f(fid, error)
    else !2 or 3
        call read_mc(fid, error)
    endif

    !!Close file
    call h5fclose_f(fid, error)

    !!Close HDF5 interface
    call h5close_f(error)

end subroutine read_distribution