C interface to get_flux_g.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_intptr_t), | intent(in) | :: | ipointer | |||
real(kind=c_double), | intent(in) | :: | lon |
geodetic longitude in degrees (east) |
||
real(kind=c_double), | intent(in) | :: | lat |
geodetic latitude in degrees (north) |
||
real(kind=c_double), | intent(in) | :: | height |
altitude in km above sea level |
||
real(kind=c_double), | intent(in) | :: | year |
decimal year for which geomagnetic field is to be calculated (e.g.:1995.5 for day 185 of 1995) |
||
real(kind=c_double), | intent(in) | :: | e |
minimum energy |
||
integer(kind=c_int), | intent(in) | :: | imname |
which method to use:
|
||
real(kind=c_double), | intent(out) | :: | flux |
The flux of particles above the given energy, in units of cm^-2 s^-1. |
subroutine get_flux_g_c(ipointer, lon, lat, height, year, e, imname, flux) bind(C, name="get_flux_g_c") integer(c_intptr_t), intent(in) :: ipointer real(c_double), intent(in) :: lon !! geodetic longitude in degrees (east) real(c_double), intent(in) :: lat !! geodetic latitude in degrees (north) real(c_double), intent(in) :: height !! altitude in km above sea level real(c_double), intent(in) :: year !! decimal year for which geomagnetic field is to !! be calculated (e.g.:1995.5 for day 185 of 1995) real(c_double), intent(in) :: e !! minimum energy integer(c_int), intent(in) :: imname !! which method to use: !! !! * 1 -- particle species: electrons, solar activity: min !! * 2 -- particle species: electrons, solar activity: max !! * 3 -- particle species: protons, solar activity: min !! * 4 -- particle species: protons, solar activity: max real(c_double), intent(out) :: flux !! The flux of particles above the given energy, in units of cm^-2 s^-1. type(radbelt_type), pointer :: p call int_pointer_to_f_pointer(ipointer, p) if (associated(p)) then flux = p%get_flux(lon, lat, height, year, e, imname) else error stop 'error in get_flux_g_c: class is not associated' end if end subroutine get_flux_g_c