Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added extrapolation for craters beyond 1000 km
  • Loading branch information
Austin Blevins committed Apr 14, 2021
1 parent 5fc97bf commit ceb5809
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/global-lunar-bombardment/craterlist.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Dcrat(m) vel ang xoff yoff t_Ga
1028181 18.3e3 45.0 -5.17529e5 1.037286e6 0.02
249840 18.3e3 45.0 -9.38629e5 1.3466084e6 0.03
1198390 18.3e3 45.0 -5.17529e5 1.037286e6 0.03
249840 18.3e3 45.0 -9.38629e5 1.3466084e6 0.02
6 changes: 3 additions & 3 deletions examples/global-lunar-bombardment/ctem.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

! Testing input. These are used to perform non-Monte Carlo tests.
testflag F ! Set to T to create a single crater with user-defined impactor properties
testimp 90856.5 ! Diameter of test impactor (m)
testimp 192832.5674475569 ! Diameter of test impactor (m)
testvel 18.3e3 ! Velocity of test crater (m/s)
testang 90.0 ! Impact angle of test crater (deg) - Default 90.0
testang 45.0 ! Impact angle of test crater (deg) - Default 90.0
testxoffset 0.0e0 ! x-axis offset of crater center from grid center (m) - Default 0.0
testyoffset 0.0e0 ! y-axis offset of crater center from grid center (m) - Default 0.0
tallyonly F ! Tally the craters without generating any craters
Expand Down Expand Up @@ -60,7 +60,7 @@ doseismic F ! Perform seismic shaking calcul

! Optional inputF These have internally set default values that work reasonable well. Comment them out with
deplimit 9e99 ! Depth limit for craters (m) - Default is to ignore.
maxcrat 0.20e0 ! Fraction of gridsize that maximum crater can be - Default 1.0
maxcrat 1.00e0 ! Fraction of gridsize that maximum crater can be - Default 1.0
killatmaxcrater F ! Stop the run if a crater larger than the maximum is produced - Default F
basinimp 35.0e3 ! Size of impactor to switch to lunar basin scaling law - Default is to ignore
docollapse T ! Do slope collapse - Default T
Expand Down
2 changes: 1 addition & 1 deletion examples/global-lunar-bombardment/ctem_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
df['log(Di)'] = numpy.log(df['#Dimp(m)'])
xnew = df['log(Dc)'].values
ynew = df['log(Di)'].values
interp = interp1d(xnew, ynew)
interp = interp1d(xnew, ynew, fill_value='extrapolate')
rclist[:,0] = numpy.exp(interp(numpy.log(rclist[:,0])))

#Convert age in Ga to "interval time"
Expand Down
25 changes: 17 additions & 8 deletions examples/global-lunar-bombardment/scale.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7ff09b075e20>]"
"[<matplotlib.lines.Line2D at 0x7fcf97f6fc10>]"
]
},
"execution_count": 5,
Expand Down Expand Up @@ -178,7 +178,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7ff09b23ee50>]"
"[<matplotlib.lines.Line2D at 0x7fcf9823c9d0>]"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -217,33 +217,33 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"xnew = df['log(Dc)'].values\n",
"ynew = df['log(Di)'].values\n",
"interp = interp1d(xnew, ynew)"
"interp = interp1d(xnew, ynew, fill_value='extrapolate')"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"35576.54212784875"
"192832.5674475569"
]
},
"execution_count": 10,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.exp(interp(np.log(400000))) #crater size as input; impactor size as output"
"np.exp(interp(np.log(2491870))) #crater size as input; impactor size as output"
]
},
{
Expand All @@ -259,6 +259,15 @@
" y offset = 0.000000000000000E+000\n",
" 0% ( ) Dcrat = 500013.835241806 "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"np.exp(interp(np.log(500000)))"
]
}
],
"metadata": {
Expand Down

0 comments on commit ceb5809

Please sign in to comment.