Skip to content

Commit

Permalink
Merge #45
Browse files Browse the repository at this point in the history
45: add orbital parameters needed in Insolation.jl r=charleskawczynski a=claresinger



Co-authored-by: claresinger <clareees@gmail.com>
  • Loading branch information
bors[bot] and claresinger authored Mar 3, 2021
2 parents 75c0c28 + 886d49e commit cd8e22b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CLIMAParameters"
uuid = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
authors = ["Charles Kawczynski <kawczynski.charles@gmail.com>"]
version = "0.1.9"
version = "0.1.10"

[deps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
8 changes: 7 additions & 1 deletion docs/src/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ Planet.Omega
Planet.grav
Planet.year_anom
Planet.orbit_semimaj
Planet.TSI
Planet.tot_solar_irrad
Planet.epoch
Planet.mean_anom_epoch
Planet.obliq_epoch
Planet.lon_perihelion_epoch
Planet.eccentricity_epoch
Planet.lon_perihelion
Planet.MSLP
Planet.T_surf_ref
Planet.T_min_ref
Expand Down
27 changes: 25 additions & 2 deletions src/Planet/Planet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ export molmass_dryair,
grav,
year_anom,
orbit_semimaj,
TSI,
tot_solar_irrad,
epoch,
mean_anom_epoch,
obliq_epoch,
lon_perihelion_epoch,
eccentricity_epoch,
lon_perihelion,
MSLP,
T_surf_ref,
T_min_ref
Expand Down Expand Up @@ -126,7 +132,24 @@ function year_anom end
""" ngth of semimajor orbital axis (m) """
function orbit_semimaj end
""" Total solar irradiance (W/m``^2``) """
function TSI end
function tot_solar_irrad end
""" Time of epoch (J2000) (s) """
function epoch end
""" Mean anomaly at the epoch (radians) """
function mean_anom_epoch end
""" Orbital obliquity at the epoch (radians) """
function obliq_epoch end
""" Longitude of perihelion at the epoch (radians),
measured relative to vernal equinox (i.e., the longitude of perihelion is the angle
subtended at the Sun by the orbital arc from vernal equinox to perihelion). """
function lon_perihelion_epoch end
""" Orbital eccentricity at the epoch """
function eccentricity_epoch end
""" Longitude of perihelion (radians), measured relative to vernal equinox.
The calculation of the mean anomaly is formulated such that the vernal equinox
is fixed in the calendar. However, this requires tracking both the current longitude of perihelion
as well as the reference longitude of perihelion at the reference time (epoch). """
function lon_perihelion end
""" Mean sea level pressure (Pa) """
function MSLP end
""" Mean surface temperature (K) in reference state """
Expand Down
27 changes: 16 additions & 11 deletions src/Planet/planet_parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ Planet.ρ_ocean(ps::AbstractEarthParameterSet) = 1.035e3
Planet.cp_ocean(ps::AbstractEarthParameterSet) = 3989.25

# Planetary parameters
Planet.planet_radius(ps::AbstractEarthParameterSet) = 6.371e6
Planet.day(ps::AbstractEarthParameterSet) = 86400
Planet.Omega(ps::AbstractEarthParameterSet) = 7.2921159e-5
Planet.grav(ps::AbstractEarthParameterSet) = 9.81
Planet.year_anom(ps::AbstractEarthParameterSet) = 365.26 * Planet.day(ps)
Planet.orbit_semimaj(ps::AbstractEarthParameterSet) = 1 * astro_unit()
Planet.TSI(ps::AbstractEarthParameterSet) = 1362
Planet.MSLP(ps::AbstractEarthParameterSet) = 1.01325e5
Planet.T_surf_ref(ps::AbstractEarthParameterSet) = 290.0
Planet.T_min_ref(ps::AbstractEarthParameterSet) = 220.0

Planet.planet_radius(ps::AbstractEarthParameterSet) = 6.371e6
Planet.day(ps::AbstractEarthParameterSet) = 86400
Planet.Omega(ps::AbstractEarthParameterSet) = 7.2921159e-5
Planet.grav(ps::AbstractEarthParameterSet) = 9.81
Planet.year_anom(ps::AbstractEarthParameterSet) = 365.26 * Planet.day(ps)
Planet.orbit_semimaj(ps::AbstractEarthParameterSet) = 1 * astro_unit()
Planet.tot_solar_irrad(ps::AbstractEarthParameterSet) = 1362.0
Planet.epoch(ps::AbstractEarthParameterSet) = 2451545.0 * Planet.day(ps)
Planet.mean_anom_epoch(ps::AbstractEarthParameterSet) = deg2rad(357.52911)
Planet.obliq_epoch(ps::AbstractEarthParameterSet) = deg2rad(23.432777778)
Planet.lon_perihelion_epoch(ps::AbstractEarthParameterSet) = deg2rad(282.937348)
Planet.eccentricity_epoch(ps::AbstractEarthParameterSet) = 0.016708634
Planet.lon_perihelion(ps::AbstractEarthParameterSet) = deg2rad(282.937348)
Planet.MSLP(ps::AbstractEarthParameterSet) = 1.01325e5
Planet.T_surf_ref(ps::AbstractEarthParameterSet) = 290.0
Planet.T_min_ref(ps::AbstractEarthParameterSet) = 220.0

2 comments on commit cd8e22b

@charleskawczynski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/31239

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.10 -m "<description of version>" cd8e22bffbd7b51fa8f3f530c2861642f13934c1
git push origin v0.1.10

Please sign in to comment.