-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outgassing handled by CALLIOPE and other minor additions #176
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
940b8a8
temp stuff
nichollsh e6b3c79
Minor fix to how R_star is stored with Baraffe calc
nichollsh fc922e2
Dummy cases no longer try to find a spectral file
nichollsh f38f1b1
AGNI initial guess now loglinear rather than isothermal
nichollsh 2d1846c
Update default example. Fixed MakeExample.sh. Don't plot emission wit…
nichollsh 1e8d3e1
New example - HD 63433d using AGNI
nichollsh 3823ef2
Remove solvevol
nichollsh 46ec931
Updated dummy example. Stub postprocess script
nichollsh 614a626
Postprocess seems to work
nichollsh 56a6a00
Fixes to postprocess notebook. Updated gitignore
nichollsh f031228
Removed surface_gases.py and added calliope as a dependency
nichollsh bf7b192
Reworking postprocesshighres into script
nichollsh ebe2348
Script uses highres file
nichollsh 961b138
Updated installation
nichollsh 9104066
Merge branch 'main' into calliope
nichollsh 97e1d39
Fix CI?
nichollsh 26ddc6c
Fix CI?
nichollsh c1aef1c
Updated pyproject and calliope
nichollsh 867a280
Update pyproject.toml
nichollsh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,9 @@ JANUS | |
agni | ||
Agni | ||
AGNI | ||
calliope | ||
Calliope | ||
CALLIOPE | ||
|
||
# misc | ||
###### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ repos: | |
types_or: [python, pyi] | ||
# - id: ruff-format | ||
# types_or: [python, pyi] | ||
|
||
exclude: 'examples/.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,13 @@ You will need to setup Python (>=3.10) on your system. This can be done via brew | |
pip install -e JANUS/. | ||
``` | ||
|
||
- CALLIOPE outgassing model | ||
|
||
```console | ||
git clone [email protected]:FormingWorlds/CALLIOPE | ||
pip install -e CALLIOPE/. | ||
``` | ||
|
||
9. Setup PROTEUS coupled framework | ||
|
||
- Get the remaining Python dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
########## PROTEUS configuration file | ||
|
||
##### Star configuration | ||
|
||
star_model = 1 # Evolution model to use for star (0: Spada, 1: Baraffe) | ||
star_mass = 0.99 # M_sun, mass of star | ||
star_radius_modern = 0.912 # R_sun, radius of star (TODAY) | ||
star_temperature_modern = 5640.0 # K, temperature of star (TODAY) | ||
star_luminosity_modern = 0.753 # L_sun, luminosity of star (TODAY) used for Baraffe model | ||
star_age_modern = 4.14e8 # yr, age of star (TODAY) | ||
star_rot_pctle = 50.0 | ||
star_spectrum = 'stellar_spectra/Named/sun.txt' # Stellar spectrum file at 1 AU (TODAY) | ||
|
||
##### Planet configuration | ||
mean_distance = 0.0503 # AU, star-planet distance | ||
mass = 1.0 # M_earth | ||
radius = 1.073 # R_earth | ||
|
||
zenith_angle = 54.74 # Tidally locked [Hamano+15, acos(1/sqrt(3)) ] | ||
asf_scalefactor = 0.25 # absorbed solar flux scale factor = 1/4 | ||
albedo_s = 0.2 # surface albedo | ||
albedo_pl = 0.0 # Bond albedo (scattering) | ||
|
||
P_top = 1.0e-5 # bar, Pressure at TOA | ||
|
||
##### PROTEUS settings | ||
|
||
iter_max = 9000 | ||
log_level = 'DEBUG' | ||
|
||
# Output subdirectory name (relative to output folder) | ||
dir_output = 'hd63433d' | ||
|
||
# Choose times | ||
time_star = 50.0e6 # yr, time since star formation | ||
time_target = 4.567e+9 # yr, target time for MO evolution | ||
|
||
# SOCRATES spectral file to use (relative to FWL_DATA folder) | ||
spectral_file = 'spectral_files/Dayspring/256/Dayspring.sf' | ||
|
||
# Stellar heating toggle, 0: disabled | 1: enabled | ||
stellar_heating = 1 | ||
|
||
# Time-stepping stuff | ||
plot_iterfreq = 1 # Plotting frequency, 0: wait until completion | n: every n iterations | ||
plot_format = 'png' # Plotting image file format | ||
sspec_dt_update = 3e6 # Time intervals at which to re-calculate the stellar spectrum | ||
sinst_dt_update = 1e2 # Time intervals at which to re-calculate the instellation | ||
dt_maximum = 1e7 # Maximum time-step | ||
dt_minimum = 3e2 # Minimum time-step | ||
dt_method = 1 # Time-stepping method, 0: proportional | 1: adaptive | 2: maximum | ||
dt_propconst = 52.0 # Proportionality constant for dt_method=0 | ||
dt_atol = 0.02 # Step size atol | ||
dt_rtol = 0.07 # Step size rtol | ||
dt_initial = 1e3 # Inital step size | ||
|
||
# Flux convergence scheme and tolerances for surface equilibration | ||
shallow_ocean_layer = 0 # 0: off | 1: on | ||
F_atm_bc = 0 # Boundary condition choice for F_atm, 0: TOA | 1: Surface | ||
skin_d = 0.01 # m | ||
skin_k = 2.0 # W m-1 K-1 | ||
prevent_warming = 1 # Require that the planet only cool down over time, 0: disabled | 1: enabled | ||
|
||
# Break at solidification? | ||
solid_stop = 1 | ||
phi_crit = 0.005 # melt fraction | ||
|
||
# Break at steady state? | ||
steady_stop = 1 | ||
steady_flux = 0.8 # Maximum absolute value of F_atm allowed for convergence | ||
steady_dprel = 3.0e-9 # Percentage change in melt fraction over time (dp/p)/dt*100 | ||
|
||
# Break at small flux? | ||
emit_stop = 1 # Enable this break condition | ||
F_crit = 0.1 # Model will terminate when |F_atm| < F_crit | ||
|
||
# Atmospheric escape | ||
escape_model = 0 # Escape model to be used, 0: None | 1: ZEPHYRUS | 2: Dummy | ||
escape_stop = 3e-4 # Terminate when atm mass drops below this fraction of its initial mass | ||
escape_dummy_rate = 0.0 # Bulk escape rate for dummy escape model [kg s-1] | ||
|
||
|
||
# Method for solving for T(p) profile | ||
atmosphere_model = 1 # Atmosphere model to be used, 0: JANUS | 1: AGNI | ||
atmosphere_surf_state = 2 # Atmosphere bottom edge boundary condition, 0: free | 1: fixed at T_surf | 2: conductive skin | ||
|
||
# Number of levels | ||
atmosphere_nlev = 40 | ||
|
||
# Temperature limits throughout atmosphere [K] | ||
min_temperature = 0.5 | ||
max_temperature = 5000.0 | ||
|
||
# Clouds | ||
water_cloud = 0 # enable water cloud radiative effects? (1: yes, 0: no) | ||
alpha_cloud = 0.0 # condensate retention fraction (1 -> fully retained) | ||
|
||
# Tropopause type, 0: none | 1: skin temperature | 2: dynamic | ||
tropopause = 1 | ||
|
||
# Rayleigh scattering, 0: Disabled | 1: Enabled | ||
rayleigh = 1 | ||
|
||
# Atmospheric chemistry, 0: Disabled | 1: Equilibrium | 2: Kinetics | ||
atmosphere_chemistry = 0 | ||
|
||
##### SPIDER-specific settings | ||
|
||
interior_nlev = 290 | ||
grain_size = 0.1 | ||
|
||
# Mixing length parameterization: 1: variable | 2: constant | ||
mixing_length = 2 | ||
|
||
# Standard tolerance for solvers | ||
solver_tolerance = 1.0e-10 | ||
|
||
# Maximum absolute surface temperature change [K] | ||
tsurf_poststep_change = 20.0 | ||
|
||
# Maximum fractional surface temperature change [fraction] | ||
tsurf_poststep_change_frac = 0.01 | ||
|
||
# Fractional core radius | ||
planet_coresize = 0.55 | ||
|
||
# Initial entropy conditions for interior | ||
ic_adiabat_entropy = 3200.0 | ||
ic_dsdr = -4.698e-06 | ||
|
||
# Atmosphere heat flux start guess, adjusted during runtime [W/m^2] | ||
F_atm = 1e5 | ||
|
||
# Oxygen fugacity offset relative to the IW buffer (log10 units) | ||
fO2_shift_IW = 0 | ||
|
||
# Enable solving for initial partial pressures (0: off | 1: on) | ||
solvevol_use_params = 1 | ||
|
||
# Parameters used to solve for initial partial pressures (when solvepp_use_params = 1) | ||
Phi_global = 1.0 # Mantle melt fraction initial guess | ||
CH_ratio = 1.0 # C/H ratio | ||
hydrogen_earth_oceans = 8.0 # Hydrogen inventory in units of equivalent Earth oceans | ||
nitrogen_ppmw = 2.0 # Nitrogen inventory in ppmw relative to mantle mass | ||
sulfur_ppmw = 300.0 # Sulfur inventory in ppmw relative to mass of melt | ||
|
||
# Prescribed injected partial pressures [bar] | ||
H2O_included = 1 | ||
H2O_initial_bar = 0.0 | ||
|
||
CO2_included = 1 | ||
CO2_initial_bar = 0.0 | ||
|
||
N2_included = 1 | ||
N2_initial_bar = 0.0 | ||
|
||
S2_included = 1 | ||
S2_initial_bar = 0.0 | ||
|
||
SO2_included = 1 | ||
SO2_initial_bar = 0.0 | ||
|
||
H2_included = 1 | ||
H2_initial_bar = 0.0 | ||
|
||
CH4_included = 1 | ||
CH4_initial_bar = 0.0 | ||
|
||
CO_included = 1 | ||
CO_initial_bar = 0.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All plots in examples/dummy look the same. Could you confirm they are different?
Same comment for examples/earth_demo pdf files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They probably are indeed the same as before, since this PR doesn't change any of the physics involved in running the simulations. The only changes related to that are ensuring that PROTEUS doesn't try to plot the atmosphere fluxes and structure when using the dummy model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did re-run the examples to make sure that they were generated with a recent version of the code, although this would be better solved by #165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum... the csv output displays small differences. So I guess it is fine to upload the new plots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does - that's interesting. The differences are quite small, but I think this is something we should keep in mind, especially as we get closer to setting up proper tests for PROTEUS.