-
Notifications
You must be signed in to change notification settings - Fork 33
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
Apply spline to the mass conserving temperature #659
Apply spline to the mass conserving temperature #659
Conversation
@MFraters I see there are file differences not from the modification I committed in "File Changed". I only modified the source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc and the include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #659 +/- ##
==========================================
+ Coverage 98.28% 98.31% +0.03%
==========================================
Files 107 107
Lines 7341 7358 +17
==========================================
+ Hits 7215 7234 +19
+ Misses 126 124 -2
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
|
Thanks for this pull request! I think it would be good for @mibillen to take a first look at it, given that she is more familiar with the mass conserving temperature model
I assume you also added the test files? As for the doc/world_builder_declarations files, for now don't worry about them. You can remove them from you commits for now if you want. They will be mostly cleaned up in #652, althoug, because you are adding an option, these files will change in the end. |
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.
Just a few comments to clarify and then this can be merged. This is a very clean straightforward change to the code and the extra "cost" to calculate the spline is minimal due to the way you implemented this with the get_temperatures_analytic function.
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Show resolved
Hide resolved
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.
This is cool functionality, thanks for implementing this! This looks good to me, so when you addressed Magali's comments and rebased the code, I think it is good to merge.
e52488f
to
2e411cc
Compare
I have addressed Magali's comments and rebased them. |
@@ -1168,7 +1180,11 @@ | |||
"items": { | |||
"type": "array", | |||
"minItems": 1, | |||
<<<<<<< HEAD |
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.
This doesn't look correct. Can you run ctest -R generate_declarations_and_schema
and check in the new result?
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 fixed this. But this is from the conflict I get from rebase. I am not sure why this happens:
Auto-merging doc/world_builder_declarations.schema.json
CONFLICT (content): Merge conflict in doc/world_builder_declarations.schema.json
Auto-merging doc/world_builder_declarations_closed.md
CONFLICT (content): Merge conflict in doc/world_builder_declarations_closed.md
Auto-merging doc/world_builder_declarations_open.md
CONFLICT (content): Merge conflict in doc/world_builder_declarations_open.md
also, do not forget to add a changlog entry, either here or in a follow up pull request. |
2e411cc
to
b0d99ad
Compare
Fix the conflicts and add change log. |
Thanks! |
In this PR, I applied a spline to the mass-conserving temperature. Previously, there was a high-order discontinuity at the coldest part of the slab. This additional treatment would generate a continuous profile by the spline operation.
To show the effect, below is the visualization of a slab temperature (from the new test mass_conserving_slab_temperature_spline.wb).
The line features show 2 profiles across the slab.
One free variable is the number of points on the spline.
To maintain the minimum temperature in the slab, one point is always pinned on the coldest point of the slab.
In addition to that, an equal number of points are chosen on both sides (default is 5).
A profile at 500 km depth (the deeper one in the first plot) is chosen to show the temperature profile from different numbers of spline points.
n = 2 there is a strong smoothing effect on the slab's internal temperature.
n = 5, the spline only affects the center of the slab as designated.
As other parts of the profile are already continuous, the spline would follow the analytic profile.
n = 10, there is little effect on the temperature profile.