Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CryoGrid.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CryoGrid
CryoGrid.jl
Commits
7ab9f697
Commit
7ab9f697
authored
2 months ago
by
Brian Groenke
Browse files
Options
Downloads
Patches
Plain Diff
Refactor PermafrostTemperatureInit to use relative depth offsets
parent
7f4422ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Physics/Heat/heat_init.jl
+6
-6
6 additions, 6 deletions
src/Physics/Heat/heat_init.jl
with
6 additions
and
6 deletions
src/Physics/Heat/heat_init.jl
+
6
−
6
View file @
7ab9f697
...
@@ -13,9 +13,9 @@ Base.@kwdef struct PermafrostTemperatureInit{TT1,TT2,TTb,TTm,Tz1,Tz2,Tz3,Tz4} <:
...
@@ -13,9 +13,9 @@ Base.@kwdef struct PermafrostTemperatureInit{TT1,TT2,TTb,TTm,Tz1,Tz2,Tz3,Tz4} <:
Tm
::
TTm
=
0.0
u
"°C"
# melting point
Tm
::
TTm
=
0.0
u
"°C"
# melting point
Tbot
::
TTb
=
10.0
u
"°C"
# bottom temperature
Tbot
::
TTb
=
10.0
u
"°C"
# bottom temperature
z0
::
Tz1
=
0.0
u
"m"
# surface depth
z0
::
Tz1
=
0.0
u
"m"
# surface depth
z_
thaw
::
Tz3
=
0.5
u
"m"
# thaw depth
(top of permafrost)
thaw
_depth_offset
::
Tz3
=
0.5
u
"m"
# thaw depth
relative to z0
z_pf
::
Tz2
=
20.0
u
"m"
# depth of peramfrost temperature
perm_depth_offset
::
Tz2
=
20.0
u
"m"
# depth
offset
of peramfrost temperature
Tpf, relative to z_thaw
z_
base
::
Tz4
=
50
0.0
u
"m"
# depth of permafrost base
base
_depth_offset
::
Tz4
=
48
0.0
u
"m"
# depth
offset
of permafrost base
, relative to z_pf
end
end
(
init
::
PermafrostTemperatureInit
)(
::
SubSurface
,
state
)
=
init
(
state
.
T
,
state
.
grid
)
(
init
::
PermafrostTemperatureInit
)(
::
SubSurface
,
state
)
=
init
(
state
.
T
,
state
.
grid
)
...
@@ -33,9 +33,9 @@ function (init::PermafrostTemperatureInit)(T::AbstractVector, grid::Grid)
...
@@ -33,9 +33,9 @@ function (init::PermafrostTemperatureInit)(T::AbstractVector, grid::Grid)
Tbot
=
ustrip
(
init
.
Tbot
)
Tbot
=
ustrip
(
init
.
Tbot
)
Tm
=
ustrip
(
init
.
Tm
)
Tm
=
ustrip
(
init
.
Tm
)
z0
=
ustrip
(
init
.
z0
)
z0
=
ustrip
(
init
.
z0
)
z_
deep
=
ustrip
(
init
.
z_pf
)
z_
thaw
=
ustrip
(
init
.
thaw_depth_offset
)
z_thaw
=
ustrip
(
init
.
z_thaw
)
z_deep
=
z_thaw
+
ustrip
(
init
.
perm_depth_offset
)
z_base
=
ustrip
(
init
.
z_
base
)
z_base
=
z_deep
+
ustrip
(
init
.
base
_depth_offset
)
z_bot
=
parent
(
grid
)[
end
]
z_bot
=
parent
(
grid
)[
end
]
Ts
=
[
T0
,
Tm
,
Tpf
,
Tm
,
Tbot
]
Ts
=
[
T0
,
Tm
,
Tpf
,
Tm
,
Tbot
]
zs
=
[
z0
,
z_thaw
,
z_deep
,
z_base
,
z_bot
]
zs
=
[
z0
,
z_thaw
,
z_deep
,
z_base
,
z_bot
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment