Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Theunissen committed Jan 12, 2022
1 parent 9c6b20c commit b6f4935
Show file tree
Hide file tree
Showing 11 changed files with 250 additions and 878 deletions.
12 changes: 8 additions & 4 deletions isostasy_calib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"printOut = True\n",
"use_perplex_table_mantle = False\n",
"allrefdensity_crust = [2860]\n",
"alllith_depletion = [-13]\n",
"allsea_level_ref = [-200]\n",
"alllith_depletion = [-20] #[-13]\n",
"allsea_level_ref = [-400] #[-200]\n",
"\n",
"############################################################################################\n",
"\n",
Expand Down Expand Up @@ -134,8 +134,6 @@
" book_complith=update_book(book_complith,'rho',refdensity_crust,['UC','MC','LC'])\n",
" book_complith=update_book(book_complith,'deltarho',lith_depletion,['LM1','LM2','LM3'])\n",
" # ----------------------------------------\n",
"\n",
" print(book_complith)\n",
" \n",
" if printOut:\n",
" print(\"# Column 2: Reference Continental lithosphere ###############################################################\")\n",
Expand Down Expand Up @@ -197,6 +195,9 @@
"#\n",
"# Plot of the solutions (Figures 10b and S13)\n",
"#\n",
"# Same plot can be obtained using the \"results\" dictionnary from previous cell\n",
"# Here we read the already computed grid.\n",
"#\n",
"\n",
"%matplotlib widget\n",
"\n",
Expand All @@ -217,11 +218,14 @@
"# Reference mantle density 3300\n",
"#refdensity_mantle = \"3300_bl400_waterload\" # fixed sea level\n",
"#refdensity_mantle = \"3300_waterdepth2750_waterload\" # fixed water depth the ridge\n",
"#\n",
"# Reference mantle density 3311\n",
"#refdensity_mantle = \"3311_bl400_waterload\" # fixed sea level\n",
"#refdensity_mantle = \"3311_waterdepth2750_waterload\" # fixed water depth the ridge\n",
"\n",
"\n",
"\n",
"\n",
"filename = \"rhoc_lithdepletion_\"+str(refdensity_mantle)+\".txt\"\n",
"path_used = './data/isostasy_calibration/'\n",
"\n",
Expand Down
206 changes: 147 additions & 59 deletions isostasy_calib2.ipynb

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions isostasy_ref.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"sea_level_ref = -400e0 # meters = reference sea level based on average elevation of continents\n",
"dz = 200e0 # meters\n",
"\n",
"printOut = False # print more information\n",
"\n",
"\n",
"# Lithosphere 1 = Reference continental column\n",
"reflith = 'lith125'\n",
"book_reflith = book_lith125_GL # updated parameters (./scripts/book_lith.py)\n",
Expand All @@ -48,7 +51,7 @@
"# The MOR from 2-D thermechanical model is used to calibrate density structure of the reference continental column \n",
"# When you compare two continental columns, it should be no elevation differences!!\n",
"#\n",
"complith = 'MOR' # 'MOR' 'lith160' 'lith180' 'lith200' 'lith240' 'lith280'\n",
"complith = 'MOR' # 'MOR' 'lith160' 'lith180' 'lith200' 'lith240' 'lith280'\n",
"\n",
"use_perplex_table_mantle = True\n",
"perplex_name = 'slm_sp2008' # composition of the continental lithospheric mantle\n",
Expand Down Expand Up @@ -90,9 +93,9 @@
"print(\"# Column 1: Reference Continental lithosphere ###############################################################\")\n",
"lith1 = geodyn1d.lithosphere(reflith,printOut=False)\n",
"lith1.update_materials(book_reflith)\n",
"lith1.get_steady_state_geotherm(dz=dz,printOut=True)\n",
"lith1.get_steady_state_geotherm(dz=dz,printOut=printOut)\n",
"lith1.get_pressure_density_profile(printOut=False,path=path+perplex_name)\n",
"pref = lith1.get_reference_pressure(ref_depth,printOut=True)\n",
"pref = lith1.get_reference_pressure(ref_depth,printOut=printOut)\n",
"print('Pref = {0:7.5e} Pa with compensation depth of {1:5.1f} km'.format(pref,ref_depth/1e3))\n",
"# compute average crustal density for information\n",
"rhoc = lith1.P_rho_DepthProfile.rho[lith1.P_rho_DepthProfile.Z<35000]\n",
Expand All @@ -115,9 +118,9 @@
" path_used = './data/geodyn2d/M2/'\n",
"\n",
" water_depth_used = water_depth_at_ridge\n",
" lith2 = geodyn1d.lithosphere('ridge_Oc6_5_DiffLayer26',printOut=False)\n",
" lith2 = geodyn1d.lithosphere('ridge_Oc6_5_NoDiffLayer',printOut=False)\n",
" lith2.update_materials(book_complith)\n",
" lith2.get_imposed_geotherm(path_used+geotherm_filename,printOut=True)\n",
" lith2.get_imposed_geotherm(path_used+geotherm_filename,printOut=printOut)\n",
" lith2.get_pressure_density_profile(printOut=False,\n",
" filename=path_used+density_profile_filename_ridge,\n",
" drho=deltarho_ridge_correction,\n",
Expand All @@ -126,7 +129,7 @@
" water_depth_used = 0\n",
" lith2 = geodyn1d.lithosphere(complith,printOut=False)\n",
" lith2.update_materials(book_complith)\n",
" lith2.get_steady_state_geotherm(printOut=True)\n",
" lith2.get_steady_state_geotherm(printOut=printOut)\n",
" lith2.get_pressure_density_profile(printOut=False,path=path+perplex_name)\n",
" # compute average crustal density for information\n",
" rhoc = lith2.P_rho_DepthProfile.rho[lith2.P_rho_DepthProfile.Z<35000]\n",
Expand Down
25 changes: 8 additions & 17 deletions scripts/book_lith.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,38 +450,29 @@
'alpha': 3.0e-5,
'rho': 2900
},
'matLM1': {
'deltarho': -12,
'rho': 3311,
'use_tidv': 1,
'alpha': 3.0e-5,
'perplex_name': 'slm_sp2008'
},
'matLM2': {
'deltarho': -12,
'rho': 3311,
'use_tidv': 1,
'alpha': 3.0e-5,
'perplex_name': 'slm_sp2008'
},
'matLM3': {
'matSLMd': {
'deltarho': -12,
'rho': 3311,
'use_tidv': 1,
'alpha': 3.0e-5,
'perplex_name': 'slm_sp2008'
},
'matSLM': {
'deltarho': -12,
'deltarho': 0,
'rho': 3311,
'use_tidv': 1,
'alpha': 3.0e-5,
'perplex_name': 'slm_sp2008'
},
'thermBcSLMd': { # applied LM1 is adiabatic
'temp_bottom': 1603.15e0,
'temp_potential': 1553.15e0,
'q_bottom': 437.2421875e-3
},
'thermBcSLM': {
'temp_bottom': 1793.15e0,
'temp_potential': 1553.15e0,
'q_bottom': 18.5546875e-3 #19.5e-3,
'q_bottom': 437.2421875e-3
}
}

4 changes: 2 additions & 2 deletions scripts/geodyn1d/geotherm/geotherm.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def k_type1(self,depth,layers,temperature):
Tbasal = layers[i].thermalBc.temp_bottom
Tp = layers[i].thermalBc.temp_potential
Qbasal = layers[i].thermalBc.q_bottom
Grad_slm = (Tbasal-Tp)/Column_thickness
Grad_slm = (Tbasal-Tp)/(cumdepth+layers[i].thickness) #Column_thickness
k = Qbasal/Grad_slm
return k

Expand All @@ -304,7 +304,7 @@ def k_type2(self,depth,layers,temperature):
Tbasal = layers[i].thermalBc.temp_bottom
Tp = layers[i].thermalBc.temp_potential
Qbasal = layers[i].thermalBc.q_bottom
Grad_slm = (Tbasal-Tp)/Column_thickness
Grad_slm = (Tbasal-Tp)/(cumdepth+layers[i].thickness) #Column_thickness
k = Qbasal/Grad_slm
return k

Expand Down
1 change: 1 addition & 0 deletions scripts/geodyn1d/isostasy/isostasy.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def alpha_type0(self,ilayer,depth,pressure,temp,layers):
# Density constant
# defined by layer properties
alpha = 0.0e0
print(alpha)
return alpha

def alpha_type1(self,ilayer,depth,pressure,temp,layers):
Expand Down
Loading

0 comments on commit b6f4935

Please sign in to comment.