Skip to content
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

Dissolution, physical erosion and emperical denudation impletement #26

Merged
merged 111 commits into from
Sep 5, 2024

Conversation

xyl96
Copy link
Contributor

@xyl96 xyl96 commented Mar 6, 2024

Adding new features including chemical dissolution, physical erosion and emperical denudation into the main branch. Unit test is not included and will be included afterwards. Please check it and we can discuss whether these codes meet the goals set in the documentation.

@jhidding jhidding changed the base branch from main to develop September 4, 2024 11:17
@xyl96
Copy link
Contributor Author

xyl96 commented Sep 4, 2024

Hi @jhidding , we met a problem:

ERROR: MethodError: no method matching Facies(; viability_range::Tuple{…}, activation_range::Tuple{…}, maximum_growth_rate::Quantity{…}, extinction_coefficient::Quantity{…}, saturation_intensity::Quantity{…}, reactive_surface::Quantity{…}, mass_density::Quantity{…}, infiltration_coefficient::Float64). 

This basically says the defination of Facies is still in the old version, while the Facies I am now using is new version (i.e., with reactivesurface, density and infiltration co-eff). We know it's gonna be solved in DSL branch but what sbould we do right now?

@jhidding
Copy link
Member

jhidding commented Sep 4, 2024

Are you importing it from CarboKitten.Burgess2013 ?

@EmiliaJarochowska
Copy link
Member

yes

@EmiliaJarochowska
Copy link
Member

Different question:

using CarboKitten.Denudation: Dissolution, NoDenudation, PhysicalErosionParam, EmpericalDenudationParam
is not importing e.g. Dissolution from DissolutionMod, it seems each struct needs to be imported individually in a separate line. Is there a clever way of doing this?

@jhidding
Copy link
Member

jhidding commented Sep 4, 2024

That I don't understand: all the relevant structs are exported in CarboKitten.Denudation, so using CarboKitten.Denudation should suffice.

@xyl96
Copy link
Contributor Author

xyl96 commented Sep 4, 2024

That I don't understand: all the relevant structs are exported in CarboKitten.Denudation, so using CarboKitten.Denudation should suffice.

@xyl96 xyl96 closed this Sep 4, 2024
@jhidding jhidding reopened this Sep 4, 2024
@jhidding
Copy link
Member

jhidding commented Sep 4, 2024

@xyl96 I assume that was an accident?

@xyl96
Copy link
Contributor Author

xyl96 commented Sep 4, 2024

@xyl96 I assume that was an accident?

if only using
CarboKitten.Denudation
does not work, I have to use:
CarboKitten.Denudation: Dissolution
to make it work.

@jhidding
Copy link
Member

jhidding commented Sep 4, 2024

That's not behaviour I can reproduce. The relevant structs are explicitly exported in src/Denudation.jl and that's the beviour I observe when doing:

julia> using CarboKitten.Denudation

julia> methods(Dissolution)
# 3 methods for type constructor:
 [1] Dissolution(; temp, precip, pco2, reactionrate)
     @ /mnt/data/Projects/mind-the-gap/CarboKitten.jl/src/Denudation/DissolutionMod.jl:13
 [2] Dissolution(temp::Unitful.Quantity{Float64, 𝚯, Unitful.FreeUnits{(K,), 𝚯, nothing}}, precip::Unitful.Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}, pco2::Unitful.Quantity{Float64, 𝐌 𝐋^-1 𝐓^-2, Unitful.FreeUnits{(atm,), 𝐌 𝐋^-1 𝐓^-2, nothing}}, reactionrate::Unitful.Quantity{Float64, 𝐋 𝐓^-1, Unitful.FreeUnits{(m, yr^-1), 𝐋 𝐓^-1, nothing}})
     @ /mnt/data/Projects/mind-the-gap/CarboKitten.jl/src/Denudation/DissolutionMod.jl:14
 [3] Dissolution(temp, precip, pco2, reactionrate)
     @ /mnt/data/Projects/mind-the-gap/CarboKitten.jl/src/Denudation/DissolutionMod.jl:14

@xyl96
Copy link
Contributor Author

xyl96 commented Sep 4, 2024

That's not behaviour I can reproduce. The relevant structs are explicitly exported in src/Denudation.jl and that's the beviour I observe when doing:

julia> using CarboKitten.Denudation

julia> methods(Dissolution)
# 3 methods for type constructor:
 [1] Dissolution(; temp, precip, pco2, reactionrate)
     @ /mnt/data/Projects/mind-the-gap/CarboKitten.jl/src/Denudation/DissolutionMod.jl:13
 [2] Dissolution(temp::Unitful.Quantity{Float64, 𝚯, Unitful.FreeUnits{(K,), 𝚯, nothing}}, precip::Unitful.Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}, pco2::Unitful.Quantity{Float64, 𝐌 𝐋^-1 𝐓^-2, Unitful.FreeUnits{(atm,), 𝐌 𝐋^-1 𝐓^-2, nothing}}, reactionrate::Unitful.Quantity{Float64, 𝐋 𝐓^-1, Unitful.FreeUnits{(m, yr^-1), 𝐋 𝐓^-1, nothing}})
     @ /mnt/data/Projects/mind-the-gap/CarboKitten.jl/src/Denudation/DissolutionMod.jl:14
 [3] Dissolution(temp, precip, pco2, reactionrate)
     @ /mnt/data/Projects/mind-the-gap/CarboKitten.jl/src/Denudation/DissolutionMod.jl:14

Yes I know, we have exported from Denudation.jl, but when trying to run it, it just says ```Dissolution not defined'''
May be I can show you this tmrw online.

@jhidding
Copy link
Member

jhidding commented Sep 5, 2024

Ok, a little bit on communication here: when you're claiming something doesn't work, be very precise: what are you running and what is the exact error you're getting? Don't be lazy here.

# maximum_growth_rate = 100u"m/Myr",
# extinction_coefficient = 0.005u"m^-1",
# saturation_intensity = 60u"W/m^2")
# ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this kind of SHIT!

@jhidding jhidding merged commit 66224ee into develop Sep 5, 2024
7 checks passed
@jhidding jhidding deleted the xy_test branch September 5, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants