jacchia_roberts_type Derived Type

type, public :: jacchia_roberts_type

Jacchia-Roberts atmosphere model type


Inherits

type~~jacchia_roberts_type~~InheritsGraph type~jacchia_roberts_type jacchia_roberts_type type~sw_data_type sw_data_type type~jacchia_roberts_type->type~sw_data_type sw_data

Components

Type Visibility Attributes Name Initial
real(kind=dp), private :: cb_polar_radius = 0.0_dp

Central body polar radius (km)

real(kind=dp), private :: cb_polar_squared = 0.0_dp

Polar radius squared (km^2)

real(kind=dp), private :: root1 = 0.0_dp

Auxiliary temperature root

real(kind=dp), private :: root2 = 0.0_dp

Auxiliary temperature root

real(kind=dp), private :: x_root = 0.0_dp

Complex root real part

real(kind=dp), private :: y_root = 0.0_dp

Complex root imaginary part (absolute value)

real(kind=dp), private :: t_infinity = 0.0_dp

Exospheric temperature at infinity

real(kind=dp), private :: tx = 0.0_dp

Temperature at boundary

real(kind=dp), private :: sum = 0.0_dp

Intermediate temperature sum

logical, private :: use_sw_file = .true.

Flag to control whether to use space weather file data or specified values.

real(kind=dp), private :: f107_override = nominalF107

Override value for F10.7 if not using space weather file

real(kind=dp), private :: f107a_override = nominalF107a

Override value for F10.7a if not using space weather file

real(kind=dp), private :: kp_override = nominalKp

Override value for Kp index if not using space weather file

type(sw_data_type), private :: sw_data

Space weather data type (from space_weather_module)


Type-Bound Procedures

procedure, public :: density => jacchia_roberts_density

  • private function jacchia_roberts_density(me, height, position, sun_vector, geo_lat, utc_mjd) result(density)

    Compute atmospheric density using the Jacchia-Roberts model

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me
    real(kind=dp), intent(in) :: height

    Spacecraft height above reference ellipsoid (km)

    real(kind=dp), intent(in) :: position(3)

    Spacecraft position vector (km, TOD/GCI)

    real(kind=dp), intent(in) :: sun_vector(3)

    Unit vector to Sun (TOD/GCI)

    real(kind=dp), intent(in) :: geo_lat

    Geodetic latitude (degrees)

    real(kind=dp), intent(in) :: utc_mjd

    UTC Modified Julian Date

    Return Value real(kind=dp)

    Atmospheric density (kg/m^3)

procedure, public :: initialize => jr_init

  • private subroutine jr_init(me, cb_polar_radius, status, filename, f107_override, f107a_override, kp_override)

    Initialize the Jacchia-Roberts module with central body parameters.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me
    real(kind=dp), intent(in) :: cb_polar_radius

    Polar radius of central body (km)

    integer(kind=ip), intent(out) :: status

    Output status (0=success, non-zero=error)

    character(len=*), intent(in), optional :: filename

    Path to CSSI space weather file

    real(kind=dp), intent(in), optional :: f107_override

    Override value for F10.7 if not using space weather file

    real(kind=dp), intent(in), optional :: f107a_override

    Override value for F10.7a if not using space weather file

    real(kind=dp), intent(in), optional :: kp_override

    Override value for Kp index if not using space weather file

procedure, public :: destroy => jr_cleanup

  • private subroutine jr_cleanup(me)

    Clean up module resources

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me

procedure, private :: exotherm

  • private function exotherm(me, position, sun_vector, geo, height, sun_dec, geo_lat) result(exotemp)

    Compute the temperature of Earth's atmosphere and auxiliary temperature-related quantities at a given altitude

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me
    real(kind=dp), intent(in) :: position(3)

    Spacecraft position (km)

    real(kind=dp), intent(in) :: sun_vector(3)

    Sun unit vector

    type(geoparms_type), intent(in) :: geo

    Geomagnetic parameters

    real(kind=dp), intent(in) :: height

    Spacecraft height (km)

    real(kind=dp), intent(in) :: sun_dec

    Sun declination (radians)

    real(kind=dp), intent(in) :: geo_lat

    Geodetic latitude (radians)

    Return Value real(kind=dp)

    Local exospheric temperature (K)

procedure, private :: rho_100

  • private function rho_100(me, height, temperature) result(density)

    Compute density of the atmosphere between 90 and 100 km

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me
    real(kind=dp), intent(in) :: height

    Spacecraft altitude (km)

    real(kind=dp), intent(in) :: temperature

    Exospheric temperature (K)

    Return Value real(kind=dp)

    Atmospheric density (g/cm^3)

procedure, private :: rho_125

  • private function rho_125(me, height, temperature) result(density)

    Compute density of the atmosphere between 100 and 125 km

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me
    real(kind=dp), intent(in) :: height

    Spacecraft altitude (km)

    real(kind=dp), intent(in) :: temperature

    Exospheric temperature (K)

    Return Value real(kind=dp)

    Atmospheric density (g/cm^3)

procedure, private :: rho_high

  • private function rho_high(me, height, temperature, t_500, sun_dec, geo_lat) result(density)

    Compute density of the atmosphere between 125 and 2500 km

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(inout) :: me
    real(kind=dp), intent(in) :: height

    Spacecraft altitude (km)

    real(kind=dp), intent(in) :: temperature

    Exospheric temperature at spacecraft altitude (K)

    real(kind=dp), intent(in) :: t_500

    Exospheric temperature at altitude of 500 km (K)

    real(kind=dp), intent(in) :: sun_dec

    Declination of the sun in TOD coordinates (radians)

    real(kind=dp), intent(in) :: geo_lat

    Geodetic latitude of spacecraft (radians)

    Return Value real(kind=dp)

procedure, private :: parms_to_temp

  • private pure function parms_to_temp(me, f107_daily, f107a_avg, tkp) result(xtemp)

    Compute exospheric temperature from F10.7 values using the Jacchia-Roberts formula

    Arguments

    Type IntentOptional Attributes Name
    class(jacchia_roberts_type), intent(in) :: me
    real(kind=dp), intent(in) :: f107_daily

    Daily F10.7 value

    real(kind=dp), intent(in) :: f107a_avg

    81-day average F10.7a

    real(kind=dp), intent(in) :: tkp

    Kp index

    Return Value real(kind=dp)

    Exospheric temperature (K)

Source Code

   type,public :: jacchia_roberts_type
      !! Jacchia-Roberts atmosphere model type
      private
      ! Module state variables
      real(dp) :: cb_polar_radius  = 0.0_dp   !! Central body polar radius (km)
      real(dp) :: cb_polar_squared = 0.0_dp   !! Polar radius squared (km^2)
      real(dp) :: root1            = 0.0_dp   !! Auxiliary temperature root
      real(dp) :: root2            = 0.0_dp   !! Auxiliary temperature root
      real(dp) :: x_root           = 0.0_dp   !! Complex root real part
      real(dp) :: y_root           = 0.0_dp   !! Complex root imaginary part (absolute value)
      real(dp) :: t_infinity       = 0.0_dp   !! Exospheric temperature at infinity
      real(dp) :: tx               = 0.0_dp   !! Temperature at boundary
      real(dp) :: sum              = 0.0_dp   !! Intermediate temperature sum

      logical :: use_sw_file = .true. !! Flag to control whether to use space weather file data or specified values.
      real(dp) :: f107_override = nominalF107 !! Override value for F10.7 if not using space weather file
      real(dp) :: f107a_override = nominalF107a !! Override value for F10.7a if not using space weather file
      real(dp) :: kp_override = nominalKp !! Override value for Kp index if not using space weather file
      type(sw_data_type) :: sw_data  !! Space weather data type (from space_weather_module)

      contains
      private
      procedure, public :: density     => jacchia_roberts_density
      procedure, public :: initialize  => jr_init
      procedure, public :: destroy     => jr_cleanup
      procedure :: exotherm
      procedure :: rho_100
      procedure :: rho_125
      procedure :: rho_high
      procedure :: parms_to_temp
   end type jacchia_roberts_type