Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coon, Ethan
ELM_Kernels
Commits
5723a30d
Commit
5723a30d
authored
Dec 31, 2020
by
Beisman, James Joseph
Browse files
started SoilMoistStress functions
parent
39db18a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/SoilMoistStressMod_functions.cc
0 → 100644
View file @
5723a30d
void
calc_effective_soilporosity
(
const
double
*
watsat
,
const
double
*
h2osoi_ice
,
const
double
*
dz
,
double
*
eff_por
)
{
double
vol_ice
;
for
(
int
i
=
0
;
i
<
nlevgrnd
;
i
++
)
{
//compute the volumetric ice content
vol_ice
=
std
::
min
(
watsat
[
i
],
(
h2osoi_ice
[
nlevsno
+
i
]
/
(
denice
*
dz
[
nlevsno
+
i
])));
// compute the maximum soil space to fill liquid water and air
eff_por
[
i
]
=
watsat
[
i
]
-
vol_ice
;
}
}
void
calc_volumetric_h2oliq
(
const
double
*
eff_por
,
const
double
*
h2osoi_liq
,
const
double
*
dz
,
double
*
vol_liq
)
{
for
(
int
i
=
0
;
i
<
nlevgrnd
;
i
++
)
{
// volume of liquid is no greater than effective void space
vol_liq
[
i
]
=
std
::
min
(
eff_por
[
i
],
(
h2osoi_liq
[
nlevsno
+
i
]
/
(
dz
[
h2osoi_liq
]
*
denh2o
)));
}
}
// CLM call tree:
// calc_root_moist_stress() -> normalize_unfrozen_rootfr() -> array_normalization()
// \
// calc_root_moist_stress_clm45default() -> soil_water_retention_curve%soil_suction() -- this is located in SoilWaterRetentionCurveClappHornberg1978Mod.F90
void
calc_root_moist_stress
(
)
{
}
void
normalize_unfrozen_rootfr
()
{
}
void
array_normalization
(
double
*
arr_inout
)
{
double
arr_sum
=
0.0
;
for
(
int
i
=
0
;
i
<
nlevgrnd
)
{
arr_sum
+=
arr_inout
[
i
];
}
for
(
int
i
=
0
;
i
<
nlevgrnd
)
{
arr_inout
[
i
]
=
arr_inout
[
i
]
/
arr_sum
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment