Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwilliams committed Feb 8, 2024
1 parent 16aa6ec commit 1616b53
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
30 changes: 20 additions & 10 deletions src/core.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,29 @@ module core

!*****************************************************************************************
!>
! Main routine.
! Calculate the flux of trapped particles at a specific location and time.
!
!@note This routine is not efficient since it will reload all the
! files every time it is called.

function get_flux(Lon,Lat,Height,Year,E,Imname) result(flux)

real(wp),intent(in) :: lon
real(wp),intent(in) :: lat
real(wp),intent(in) :: height
real(wp),intent(in) :: year
real(wp),intent(in) :: e
integer,intent(in) :: imname
real(wp) :: flux

real(wp) :: xl, bbx
real(wp),intent(in) :: lon !! geodetic longitude in degrees (east)
real(wp),intent(in) :: lat !! geodetic latitude in degrees (north)
real(wp),intent(in) :: height !! altitude in km above sea level
real(wp),intent(in) :: year !! decimal year for which geomagnetic field is to
!! be calculated (e.g.:1995.5 for day 185 of 1995)
real(wp),intent(in) :: e !! minimum energy
integer,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(wp) :: flux !! The flux of particles above the given energy, in units of cm^-2 s^-1.

real(wp) :: xl !! l value
real(wp) :: bbx
type(trm_type) :: trm
type(shellig_type) :: igrf

Expand Down
2 changes: 1 addition & 1 deletion src/shellig.f90
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ subroutine igrf(me,lon,lat,height,year,xl,bbx)
real(wp),intent(in) :: year !! decimal year for which geomagnetic field is to
!! be calculated (e.g.:1995.5 for day 185 of 1995)
real(wp),intent(out) :: xl !! l-value
real(wp),intent(out) :: bbx
real(wp),intent(out) :: bbx !! b_total / b_equatorial ratio

real(wp) :: bab1 , babs , bdel , bdown , beast , &
beq , bequ , bnorth , dimo , rr0
Expand Down

0 comments on commit 1616b53

Please sign in to comment.