62
3 Basics of Nonhydrostatic Modelling
code with a viscosity of A h = A z = 10
−4 m
2 /s, which is close to molecular values. This also gives us the opportunity to include a quadratic bottom-friction law,
reading:
τ
bot
x
ρ o
=
A z
∂u
∂z
z=−h
= r u b |u b |
where u b is the horizontal flow adjacent to the sea floor. The bottom-drag coefficient
is set to r = 0.001. The total simulation time is 6 hrs with data outputs at every
3 min. The time step is set to Δt = 1 s. The pressure accuracy of the S.O.R. iteration
is set to = 1 × 10
−3 Pa. This model application uses the rigid-lid approximation
(see Sect. 3.7).
3.15.3 A Trick to Avoid Substantial Round-off Errors
Owing to small numerical time steps, density increments caused by surface cooling
are very small (10
−8 kg/m
3 ) compared with the ambient density (1,028 kg/m
3 ).
When using true seawater density in the code, these minute density increments tend
to get lost due to round-off errors. The consequence is that you cannot simulate the
convection process when using true density. The trick to avoid this is to rather use
relative density (ρ − ρ s ), where ρ s is the initial surface value, as a variable in the
code, which significantly increases the accuracy of the prediction.
3.15.4 Inclusion of Momentum Diffusion and Bottom Friction
The momentum equations including diffusion terms can be written as:
∂u
∂t
+ u
∂u
∂ x
+ w
∂u
∂z
= −
1
ρ o
∂( p + q)
∂ x
+ Diff(u)
(3.68)
∂w
∂t
+ u
∂w
∂ x
+ w
∂w
∂z
= −
1
ρ o
∂q
∂z
+ Diff(w)
(3.69)
where the diffusion operator is defined by:
Diff(ψ) =
∂
∂ x
A h
∂ψ
∂ x
+
∂
∂z
A z
∂ψ
∂z
where the symbol ψ stands for either u or w. This formulation includes spatially variable values of eddy viscosities A h and A z , which is considered in later
exercises.
3 Basics of Nonhydrostatic Modelling
code with a viscosity of A h = A z = 10
−4 m
2 /s, which is close to molecular values. This also gives us the opportunity to include a quadratic bottom-friction law,
reading:
τ
bot
x
ρ o
=
A z
∂u
∂z
z=−h
= r u b |u b |
where u b is the horizontal flow adjacent to the sea floor. The bottom-drag coefficient
is set to r = 0.001. The total simulation time is 6 hrs with data outputs at every
3 min. The time step is set to Δt = 1 s. The pressure accuracy of the S.O.R. iteration
is set to = 1 × 10
−3 Pa. This model application uses the rigid-lid approximation
(see Sect. 3.7).
3.15.3 A Trick to Avoid Substantial Round-off Errors
Owing to small numerical time steps, density increments caused by surface cooling
are very small (10
−8 kg/m
3 ) compared with the ambient density (1,028 kg/m
3 ).
When using true seawater density in the code, these minute density increments tend
to get lost due to round-off errors. The consequence is that you cannot simulate the
convection process when using true density. The trick to avoid this is to rather use
relative density (ρ − ρ s ), where ρ s is the initial surface value, as a variable in the
code, which significantly increases the accuracy of the prediction.
3.15.4 Inclusion of Momentum Diffusion and Bottom Friction
The momentum equations including diffusion terms can be written as:
∂u
∂t
+ u
∂u
∂ x
+ w
∂u
∂z
= −
1
ρ o
∂( p + q)
∂ x
+ Diff(u)
(3.68)
∂w
∂t
+ u
∂w
∂ x
+ w
∂w
∂z
= −
1
ρ o
∂q
∂z
+ Diff(w)
(3.69)
where the diffusion operator is defined by:
Diff(ψ) =
∂
∂ x
A h
∂ψ
∂ x
+
∂
∂z
A z
∂ψ
∂z
where the symbol ψ stands for either u or w. This formulation includes spatially variable values of eddy viscosities A h and A z , which is considered in later
exercises.
