CliMA / LandHydrology.jl

The CliMA land hydrology model, including soil, snow, and surface processes
6 stars 0 forks source link

Soil model default #55

Closed kmdeck closed 3 years ago

kmdeck commented 3 years ago

Set up the soil model structure so that it accepts defaults more easily

What should the default be? Are there default values for all fields? (soil type parameters, BC, domain, resolution, prognostic energy or hydrology on/off?) Currently, only the name of the model (used in partitioning the state vector Y) and the parameter set are clearcut.

function SoilModel(::Type{FT};
                   domain::AbstractVerticalDomain{FT},
                   energy_model::AbstractSoilComponentModel,
                   hydrology_model::AbstractSoilComponentModel,
                   boundary_conditions::SoilColumnBC,
                   soil_param_set::SP,
                   earth_param_set::EarthParameterSet = EarthParameterSet(),
                   name::Symbol = :soil,
                   ) where {FT, SP}
    args =  (domain, energy_model, hydrology_model, boundary_conditions, soil_param_set, earth_param_set, name)
    return SoilModel{FT, typeof.(args)...}(args...)
end
codecov[bot] commented 3 years ago

Codecov Report

Merging #55 (0cd0086) into main (c51879c) will increase coverage by 0.00%. The diff coverage is 100.00%.

:exclamation: Current head 0cd0086 differs from pull request most recent head 54620b7. Consider uploading reports for the commit 54620b7 to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##             main      #55   +/-   ##
=======================================
  Coverage   99.25%   99.26%           
=======================================
  Files           9       10    +1     
  Lines         402      407    +5     
=======================================
+ Hits          399      404    +5     
  Misses          3        3           
Impacted Files Coverage Δ
src/Domains/domain.jl 100.00% <ø> (ø)
src/SoilModel/boundary_methods.jl 96.38% <ø> (ø)
src/LandHydrology.jl 100.00% <100.00%> (ø)
src/SoilModel/boundary_types.jl 100.00% <100.00%> (ø)
src/SoilModel/models.jl 100.00% <100.00%> (ø)
src/SoilModel/right_hand_side.jl 100.00% <100.00%> (ø)
src/SoilModel/SoilWaterParameterizations.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c51879c...54620b7. Read the comment docs.