Earth_ Derived Type

type, public :: Earth_


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: AirPressure = 101.325d0
real(kind=real64), public :: AxisTilt = 23.4392811d0
real(kind=real64), public :: StandardGravity = 9.80665d0
real(kind=real64), public :: MyPosition(2) = [36.380d0, 140.470d0]
real(kind=real64), public :: MyTimeZonePosition = 135.0d0
character(len=:), public, allocatable :: TimeZone
character(len=:), public, allocatable :: TimeZoneName
real(kind=real64), public :: TimeZoneOffset
integer(kind=int32), public :: Year = 2022
integer(kind=int32), public :: Month = 1
integer(kind=int32), public :: Day = 1
integer(kind=int32), public :: Hour = 0
integer(kind=int32), public :: Minute = 0
integer(kind=int32), public :: Second = 0
integer(kind=int32), public :: Day_Per_Month(0:13) = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31]

Type-Bound Procedures

procedure, public :: init => initEarth

  • public subroutine initEarth(this, Now, time, DateTime)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(inout) :: this
    logical, intent(in), optional :: Now
    type(time_), intent(in), optional :: time
    integer(kind=int32), intent(in), optional :: DateTime(6)

procedure, public :: setTime => setTimeEarthClass

  • public subroutine setTimeEarthClass(this, Now, time, DateTime)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(inout) :: this
    logical, intent(in), optional :: Now
    type(time_), intent(in), optional :: time
    integer(kind=int32), intent(in), optional :: DateTime(6)

procedure, public :: setPosition => setPositionEarthClass

  • public subroutine setPositionEarthClass(this, MyPosition, MyTimeZonePosition, MyTimeZone)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(inout) :: this
    real(kind=real64), intent(in), optional :: MyPosition(2)
    real(kind=real64), intent(in), optional :: MyTimeZonePosition
    character(len=5), intent(in), optional :: MyTimeZone

procedure, public :: setTimeZone => setTimeZoneEarthClass

  • public subroutine setTimeZoneEarthClass(this, name)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(inout) :: this
    character(len=*), intent(in) :: name

procedure, public :: getSunTime => getSunTimeEarthClass

  • public function getSunTimeEarthClass(this, Now) result(times)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(inout) :: this
    integer(kind=int32), intent(in) :: Now(6)

    Return Value real(kind=real64), (2)

procedure, public :: getSunPosition => getSunPositionEarthClass

  • public function getSunPositionEarthClass(this, Now, DateTime, dt) result(angles)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(inout) :: this
    logical, intent(in), optional :: Now
    integer(kind=int32), intent(in), optional :: DateTime(6)
    integer(kind=int32), intent(in), optional :: dt

    Return Value real(kind=real64), (2)

procedure, public :: getTimeZone => getTimeZoneEarthClass

  • public function getTimeZoneEarthClass(this, name) result(timezone)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value character(len=:), allocatable

procedure, public :: getTimeZoneOffset => getTimeZoneOffsetEarthClass

  • public function getTimeZoneOffsetEarthClass(this, name) result(timezoneoffset)

    Arguments

    Type IntentOptional Attributes Name
    class(Earth_), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value real(kind=real64)