Skip to content
Snippets Groups Projects
Commit d6419d75 authored by Stefano Serafin's avatar Stefano Serafin
Browse files

added random perturbations to surface heat flux

parent e0bbbe51
No related branches found
No related tags found
No related merge requests found
......@@ -240,6 +240,8 @@ class CBL:
z0 = self.z0
theta_0 = self.theta_0
Hmax = self.Hmax
H0_perturbation_ampl_init = self.H0_perturbation_ampl_init
H0_perturbation_ampl_time = self.H0_perturbation_ampl_time
exct = self.exct
ug = self.ug
vg = self.vg
......@@ -311,6 +313,9 @@ class CBL:
else:
H0 = Hmax
# Add random perturbations to the initial value
H0 += np.random.normal(scale=H0_perturbation_ampl_init)
# Set the surface momentum flux (ustar)
ustar = 0
......@@ -357,8 +362,9 @@ class CBL:
# Inverse grid spacing
rdz = 1./self.dz
# Compute sensible heat flux and integrate T equation
H[0,j] = H0
# Add time-dependent surface perturbations
# Then compute sensible heat flux and integrate T equation
H[0,j] = H0 + np.random.normal(scale=H0_perturbation_ampl_time)
H[1:-1,j] = -K[1:-1,j]*( (thetap[1:]-thetap[:-1])*rdz - gammac)
H[nz,j] = 2*H[nz-1,j]-H[nz-2,j]
theta[:,j] = thetap[:]-dt*rdz*(H[1:,j]-H[:-1,j])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment