Skip to content

Commit 355aff7

Browse files
committed
Avoid zeros in jacobian when reaching tmp limits
1 parent 8602a33 commit 355aff7

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

res/config/planets/toi561b.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ title = "TOI-561 b"
1515
wind_speed = 2.0
1616

1717
[files]
18-
input_sf = "res/spectral_files/Dayspring/48/Dayspring.sf"
18+
input_sf = "greygas"
1919
input_star = "res/stellar_spectra/sun.txt"
2020
output_dir = "out/"
2121

@@ -33,7 +33,7 @@ title = "TOI-561 b"
3333
max_runtime = 400
3434
num_levels = 45
3535
continua = true
36-
rayleigh = true
36+
rayleigh = false
3737
cloud = false
3838
overlap_method = "ee"
3939
real_gas = false
@@ -46,10 +46,10 @@ title = "TOI-561 b"
4646
rainout = false
4747
solution_type = 3
4848
solver = "newton"
49-
dx_max = 400.0
50-
initial_state = ["iso","2000"] #["ncdf", "out/atm.nc"]
51-
linesearch = 0
52-
easy_start = false
49+
dx_max = 300.0
50+
initial_state = ["iso","3000"] #["ncdf", "out/atm.nc"]
51+
linesearch = 2
52+
easy_start = true
5353
converge_atol = 1.0e-2
5454
converge_rtol = 1.0e-3
5555
perturb_all = false

src/solver.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ module solver
178178
# Execution parameters
179179
# --------------------
180180
# padding
181-
tmp_pad::Float64 = 10.0 # do not allow the solver to get closer than this to tmp_floor
181+
tmp_pad::Float64 = 5.0 # do not allow the solver to get closer than this to tmp_floor
182182

183183
# easy_start
184184
easy_incr::Float64 = 2.0 # Factor by which to increase easy_sf at each step
@@ -251,7 +251,6 @@ module solver
251251
# Calculate the (remaining) temperatures from known temperatures
252252
function _set_tmps!(_x::Array{Float64,1})
253253
# Read new guess
254-
clamp!(_x, atmos.tmp_floor+1.0, atmos.tmp_ceiling-1.0)
255254
for i in 1:atmos.nlev_c
256255
atmos.tmp[i] = _x[i]
257256
end

0 commit comments

Comments
 (0)