From 09ecd90f7c1b85191a5220190eb940ed69dfd66b Mon Sep 17 00:00:00 2001 From: Brian Groenke Date: Tue, 29 Aug 2023 20:01:34 +0200 Subject: [PATCH] Fix issues with example 6 --- examples/06_heat_freeW_seb_snow_bucketW_samoylov.jl | 2 +- src/Physics/Hydrology/water_ET.jl | 2 +- src/Physics/Soils/soil_water.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/06_heat_freeW_seb_snow_bucketW_samoylov.jl b/examples/06_heat_freeW_seb_snow_bucketW_samoylov.jl index ffb7a5db..b6f6a5fe 100644 --- a/examples/06_heat_freeW_seb_snow_bucketW_samoylov.jl +++ b/examples/06_heat_freeW_seb_snow_bucketW_samoylov.jl @@ -19,7 +19,7 @@ soilprofile = SoilProfile( ## mid-winter temperature profile tempprofile = CryoGrid.Presets.SamoylovDefault.tempprofile forcings = loadforcings(CryoGrid.Presets.Forcings.Samoylov_ERA_obs_fitted_1979_2014_spinup_extended_2044); -soilprofile, tempprofile = CryoGrid.Presets.SamoylovDefault +tempprofile = CryoGrid.Presets.SamoylovDefault.tempprofile initT = initializer(:T, tempprofile) z = 2.0u"m"; # height [m] for which the forcing variables (Temp, humidity, wind, pressure) are provided seb = SurfaceEnergyBalance(forcings.Tair, forcings.pressure, forcings.q, forcings.wind, forcings.Lin, forcings.Sin, z) diff --git a/src/Physics/Hydrology/water_ET.jl b/src/Physics/Hydrology/water_ET.jl index 92ce4ce6..105ff9e6 100644 --- a/src/Physics/Hydrology/water_ET.jl +++ b/src/Physics/Hydrology/water_ET.jl @@ -40,7 +40,7 @@ function evapotranspiration!( state.w_tr[i] = Δz[i]*exp(-z[i] / et.d_tr) let θwi = state.θwi[i], θfc = minwater(sub, water, state, i); - state.αᶿ[i] = ifelse(θwi < θfc, 0.25(1-cos(π*θwi/θfc))^2, one(θwi)) + state.αᶿ[i] = ifelse(θwi < θfc, 0.25*(1-cos(π*θwi/θfc))^2, one(θwi)) end end @inbounds @. state.f_et = et.f_tr*(state.αᶿ*state.w_tr) + (1-et.f_tr)*(state.αᶿ*state.w_ev) diff --git a/src/Physics/Soils/soil_water.jl b/src/Physics/Soils/soil_water.jl index a45ad44b..63c01995 100644 --- a/src/Physics/Soils/soil_water.jl +++ b/src/Physics/Soils/soil_water.jl @@ -1,7 +1,7 @@ """ RREqForm -Base type for different formulations of Richard's equation. +Base type for different formulations of Richardson-Richard's equation. """ abstract type RREqForm end """