Skip to content

Commit 19d7471

Browse files
authored
Merge pull request #6477 from danieldouglas92/convert_percent_wb
Convert percent to fraction in Geodynamic WorldBuilder
2 parents b7d8bd2 + 380e297 commit 19d7471

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

contrib/world_builder/source/world_builder/features/oceanic_plate_models/composition/tian2019_water_content.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ namespace WorldBuilder
178178
const double slab_temperature = world->properties(position_in_cartesian_coordinates.get_array(), depth, {{{1,0,0}}})[0];
179179
double partition_coefficient = calculate_water_content(lithostatic_pressure,
180180
slab_temperature);
181-
182-
partition_coefficient = std::min(max_water_content, partition_coefficient);
181+
// The partition_coefficient is output as a percentage, but geodynamic modeling software
182+
// typically deal with fractions, so we divide by 100 below
183+
partition_coefficient = std::min(max_water_content, partition_coefficient) / 100;
183184

184185
for (unsigned int i = 0; i < compositions.size(); ++i)
185186
{

contrib/world_builder/source/world_builder/features/subducting_plate_models/composition/tian2019_water_content.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ namespace WorldBuilder
171171
const double slab_temperature = world->properties(position_in_cartesian_coordinates.get_array(), depth, {{{1,0,0}}})[0];
172172
double partition_coefficient = calculate_water_content(lithostatic_pressure,
173173
slab_temperature);
174-
175-
partition_coefficient = std::min(max_water_content, partition_coefficient);
174+
// The partition_coefficient is output as a percentage, but geodynamic modeling software
175+
// typically deal with fractions, so we divide by 100 below
176+
partition_coefficient = std::min(max_water_content, partition_coefficient) / 100;
176177

177178
for (unsigned int i = 0; i < compositions.size(); ++i)
178179
{

0 commit comments

Comments
 (0)