EarthClass Module


Uses


Derived Types

type, public ::  TimeZoneList_

Components

Type Visibility Attributes Name Initial
type(string_), public :: ID(69)
real(kind=real64), public :: offset(69)

Type-Bound Procedures

procedure, public :: init => initTimeZoneList

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
procedure, public :: setTime => setTimeEarthClass
procedure, public :: setPosition => setPositionEarthClass
procedure, public :: setTimeZone => setTimeZoneEarthClass
procedure, public :: getSunTime => getSunTimeEarthClass
procedure, public :: getSunPosition => getSunPositionEarthClass
procedure, public :: getTimeZone => getTimeZoneEarthClass
procedure, public :: getTimeZoneOffset => getTimeZoneOffsetEarthClass

Functions

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)

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)

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

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)

public function JP_Cartesian_Origin(ID) result(lat_lon)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: ID

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

public function JP_to_World(lat, lon) result(ret)

Arguments

Type IntentOptional Attributes Name
real(kind=Real64), intent(in) :: lat
real(kind=Real64), intent(in) :: lon

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

public function to_Cartesian(longitude, latitude, origin) result(xy)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: longitude
real(kind=real64), intent(in) :: latitude
real(kind=real64), intent(in) :: origin(1:2)

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

public pure function to_DecimalDegree(dd_mm_ss) result(ret)

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: dd_mm_ss(1:3)

Return Value real(kind=real64)

public function to_MomentTensor(phi, delta, lambda, M) result(ret)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: phi
real(kind=real64), intent(in) :: delta
real(kind=real64), intent(in) :: lambda
real(kind=real64), intent(in) :: M

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


Subroutines

public subroutine initTimeZoneList(this)

Arguments

Type IntentOptional Attributes Name
class(TimeZoneList_), intent(inout) :: this

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)

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)

public subroutine setTimeZoneEarthClass(this, name)

Arguments

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

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