store_nbi_photons Subroutine

public subroutine store_nbi_photons(pos, vi, lambda0, photons, neut_type)

Store BES photons in Spectra

Arguments

TypeIntentOptionalAttributesName
real(kind=Float64), intent(in), dimension(3):: pos

Position of neutral in beam grid coordinates

real(kind=Float64), intent(in), dimension(3):: vi

Velocitiy of neutral [cm/s]

real(kind=Float64), intent(in) :: lambda0

Reference wavelength [nm]

real(kind=Float64), intent(in) :: photons

Photons from colrad [Ph/(s*cm^3)]

integer, intent(in) :: neut_type

Neutral type (full,half,third,halo)


Calls

proc~~store_nbi_photons~~CallsGraph proc~store_nbi_photons store_nbi_photons proc~store_photons store_photons proc~store_nbi_photons->proc~store_photons proc~get_passive_grid_indices get_passive_grid_indices proc~store_photons->proc~get_passive_grid_indices proc~spectrum spectrum proc~store_photons->proc~spectrum proc~get_fields get_fields proc~store_photons->proc~get_fields proc~get_indices get_indices proc~store_photons->proc~get_indices proc~uvw_to_xyz uvw_to_xyz proc~store_photons->proc~uvw_to_xyz proc~xyz_to_cyl xyz_to_cyl proc~get_passive_grid_indices->proc~xyz_to_cyl proc~get_fields->proc~uvw_to_xyz proc~get_position get_position proc~get_fields->proc~get_position proc~in_plasma in_plasma proc~get_fields->proc~in_plasma proc~calc_perp_vectors calc_perp_vectors proc~get_fields->proc~calc_perp_vectors proc~xyz_to_uvw xyz_to_uvw proc~get_fields->proc~xyz_to_uvw proc~cyl_to_xyz cyl_to_xyz proc~get_position->proc~cyl_to_xyz proc~xyz_to_cyl->proc~xyz_to_uvw proc~uvw_to_cyl uvw_to_cyl proc~xyz_to_cyl->proc~uvw_to_cyl proc~in_plasma->proc~xyz_to_uvw 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~cyl_to_xyz->proc~uvw_to_xyz proc~cyl_to_xyz->proc~cyl_to_uvw

Called by

proc~~store_nbi_photons~~CalledByGraph proc~store_nbi_photons store_nbi_photons proc~ndmc ndmc proc~ndmc->proc~store_nbi_photons program~fidasim fidasim program~fidasim->proc~ndmc

Contents

Source Code


Source Code

subroutine store_nbi_photons(pos, vi, lambda0, photons, neut_type)
    !+ Store BES photons in [[libfida:spectra]]
    real(Float64), dimension(3), intent(in) :: pos
        !+ Position of neutral in beam grid coordinates
    real(Float64), dimension(3), intent(in) :: vi
        !+ Velocitiy of neutral [cm/s]
    real(Float64), intent(in)               :: lambda0
        !+ Reference wavelength [nm]
    real(Float64), intent(in)               :: photons
        !+ Photons from [[libfida:colrad]] [Ph/(s*cm^3)]
    integer,intent(in)                      :: neut_type
        !+ Neutral type (full,half,third,halo)

    select case (neut_type)
           case (nbif_type)
               call store_photons(pos,vi,lambda0,photons,spec%full,spec%fullstokes)
           case (nbih_type)
               call store_photons(pos,vi,lambda0,photons,spec%half, spec%halfstokes)
           case (nbit_type)
               call store_photons(pos,vi,lambda0,photons,spec%third,spec%thirdstokes)
           case default
               if(inputs%verbose.ge.0) then
                   write(*,'("STORE_NBI_PHOTONS: Unknown neutral type: ",i2)') neut_type
               endif
               stop
    end select

end subroutine store_nbi_photons