Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
most_cpu.f90
Go to the documentation of this file.
1! Copyright (c) 2026, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
35 use num_types, only : rp
36 use utils, only : neko_error, neko_warning
37 use logger, only : log_size, neko_log
38 use math, only : glsum, glmin, glmax
39 implicit none
40 private
41
42 public :: most_compute_cpu
43
44 abstract interface
45 function slaw_m_interface(z, L_ob, z0) result(slaw)
46 import rp
47 real(kind=rp), intent(in) :: z, l_ob, z0
48 real(kind=rp) :: slaw
49 end function slaw_m_interface
50
51 function slaw_h_interface(z, L_ob, z0h) result(slaw)
52 import rp
53 real(kind=rp), intent(in) :: z, l_ob, z0h
54 real(kind=rp) :: slaw
55 end function slaw_h_interface
56
57 function corr_m_interface(z, L_ob) result(corr)
58 import rp
59 real(kind=rp), intent(in) :: z, l_ob
60 real(kind=rp) :: corr
61 end function corr_m_interface
62
63 function corr_h_interface(z, L_ob) result(corr)
64 import rp
65 real(kind=rp), intent(in) :: z, l_ob
66 real(kind=rp) :: corr
67 end function corr_h_interface
68
69 function f_interface(Ri_b, z, z0, z0h, Pr, L_ob, slaw_m, slaw_h) result(f)
71 real(kind=rp), intent(in) :: ri_b, z, z0, z0h, l_ob, pr
72 real(kind=rp) :: f
73 procedure(slaw_m_interface) :: slaw_m
74 procedure(slaw_h_interface) :: slaw_h
75 end function f_interface
76
77 function dfdl_interface(l_upper, l_lower, z, z0, z0h, Pr, L_ob,&
78 slaw_m, slaw_h, fd_h) result(dfdl)
80 real(kind=rp), intent(in) :: l_upper, l_lower, z, z0, z0h, l_ob, fd_h, pr
81 real(kind=rp) :: dfdl
82 procedure(slaw_m_interface) :: slaw_m
83 procedure(slaw_h_interface) :: slaw_h
84 end function dfdl_interface
85 end interface
86
87
88 ! These will point to the correct functions
89 ! depending on stability regime and bc_type.
90 !! @note These are reassigned per node inside the compute loop, so every
91 !! thread needs its own copy. They are always set before being used.
92 procedure(slaw_m_interface), pointer :: slaw_m_ptr => null()
93 procedure(slaw_h_interface), pointer :: slaw_h_ptr => null()
94 procedure(corr_m_interface), pointer :: corr_m_ptr => null()
95 procedure(corr_h_interface), pointer :: corr_h_ptr => null()
96 procedure(f_interface), pointer :: f_ptr => null()
97 procedure(dfdl_interface), pointer :: dfdl_ptr => null()
98 !$omp threadprivate(slaw_m_ptr, slaw_h_ptr, corr_m_ptr, corr_h_ptr, &
99 !$omp& f_ptr, dfdl_ptr)
100
101contains
102
105 subroutine select_bc_operators(bc_type, bc_value, q, ts, ti, kappa, &
106 utau, z0h, hi, Pr)
107 character(len=*), intent(in) :: bc_type
108 real(kind=rp), intent(in) :: hi, ti, kappa, utau, z0h, bc_value, pr
109 real(kind=rp), intent(inout) :: q,ts
110 select case (bc_type)
111 case ("neumann")
112 ! ts not used
113 q = bc_value
116 case ("dirichlet")
117 ts = bc_value
118 q = (kappa/pr)*utau*(ts - ti)/log(hi/z0h)
121 case default
122 call neko_error("Invalid specified temperature b.c. type " // &
123 "('neumann' or 'dirichlet'?)")
124 end select
125 end subroutine select_bc_operators
126
128 subroutine compute_ri_b(bc_type, g_dot_n, hi, ti, ts, magu, kappa, q, &
129 Pr, Ri_b)
130 character(len=*), intent(in) :: bc_type
131 real(kind=rp), intent(in) :: hi, ti, ts, pr
132 real(kind=rp), intent(in) :: magu, kappa, g_dot_n
133 real(kind=rp), intent(inout) :: q, ri_b
134
135 select case (bc_type)
136 case ("neumann")
137 ri_b = - g_dot_n*hi / ti*q*pr / (magu**3*kappa**2)
138 case ("dirichlet")
139 ri_b = g_dot_n*hi/ti*(ti - ts)/magu**2
140 case default
141 call neko_error("Invalid specified temperature b.c. type " // &
142 "('neumann' or 'dirichlet'?)")
143 end select
144 end subroutine compute_ri_b
145
148 subroutine set_stability_regime(Ri_b, Ri_threshold)
149 real(kind=rp), intent(in) :: ri_b, ri_threshold
150
151 if (ri_b > ri_threshold) then
156 elseif (ri_b < -ri_threshold) then
161 else
164 end if
165 end subroutine set_stability_regime
166
169 subroutine most_compute_cpu(u, v, w, temp, temp_w, &
170 n_x, n_y, n_z, h, tau_x, tau_y, tau_z, n_nodes, &
171 kappa, mu_w, rho_w, g_vec, Pr, z0, z0h_in, bc_type, bc_value, tstep, &
172 Ri_b_diagn, L_ob_diagn, utau_diagn, magu_diagn, ti_diagn, ts_diagn,&
173 q_diagn)
174 integer, intent(in) :: n_nodes, tstep
175 real(kind=rp), dimension(n_nodes), intent(in) :: u, v, w, temp, temp_w
176 real(kind=rp), dimension(n_nodes), intent(in) :: n_x, n_y, n_z, h
177 real(kind=rp), intent(in) :: kappa, z0, z0h_in, bc_value, pr
178 real(kind=rp), dimension(3), intent(in) :: g_vec
179 real(kind=rp), dimension(n_nodes), intent(in) :: mu_w, rho_w
180 real(kind=rp) :: g_dot_n
181 character(len=*), intent(in) :: bc_type
182 real(kind=rp), dimension(n_nodes), intent(inout) :: tau_x, tau_y, tau_z
183 real(kind=rp) :: ui, vi, wi, hi, rho, mu
184 real(kind=rp) :: normu, z0h
185 real(kind=rp) :: l_upper, l_lower, l_old
186 real(kind=rp) :: f, dfdl, fd_h, l_new, l_sign
187 integer :: i, count
188 integer, parameter :: max_count = 50
189 real(kind=rp), parameter :: tol = 0.001_rp
190 real(kind=rp), parameter :: nr_step = 0.001_rp
191 real(kind=rp), parameter :: ri_threshold = 0.0001_rp
192 character(len=LOG_SIZE) :: log_buf
193 real(kind=rp) :: utau, ri_b, l_ob, magu, q, ti, ts
194 real(kind=rp), dimension(n_nodes), intent(inout) :: ri_b_diagn, l_ob_diagn
195 real(kind=rp), dimension(n_nodes), intent(inout) :: utau_diagn, magu_diagn
196 real(kind=rp), dimension(n_nodes), intent(inout) :: ti_diagn, ts_diagn
197 real(kind=rp), dimension(n_nodes), intent(inout) :: q_diagn
198
199 !$omp parallel do private(i, ui, vi, wi, hi, rho, mu, normu, z0h, &
200 !$omp& L_upper, L_lower, L_old, f, dfdl, fd_h, L_new, L_sign, count, &
201 !$omp& utau, Ri_b, L_ob, magu, q, ti, ts, g_dot_n)
202 do i=1, n_nodes
203 ! Sample the variables
204 ui = u(i)
205 vi = v(i)
206 wi = w(i)
207 ti = temp(i)
208 hi = h(i)
209 rho = rho_w(i)
210 mu = mu_w(i)
211
212 ! Project on horizontal directions
213 normu = ui * n_x(i) + vi * n_y(i) + wi * n_z(i)
214 ui = ui - normu * n_x(i)
215 vi = vi - normu * n_y(i)
216 wi = wi - normu * n_z(i)
217
218 ! Compute velocity magnitude
219 magu = sqrt(ui**2 + vi**2 + wi**2)
220 magu = max(magu, 1.0e-6_rp)
221 utau = magu*kappa / log(hi/z0)
222
223 ! Compute thermal roughness length from Zilitinkevich, 1995
224 if (z0h_in < 0) then
225 ! z0h_in is interpreted as -C_Zil (Zilitinkevich constant) for z0h
226 z0h = z0 * exp(z0h_in*sqrt((utau*z0)/(mu/rho)))
227 else
228 z0h = z0h_in
229 end if
230
231 ! Get q, Ri_b, f_ptr, dfdl_ptr based on bc_type
232 ! Maybe redundant, but needed to initialise Rib
233 call select_bc_operators(bc_type, bc_value, q, ts, ti, kappa, &
234 utau, z0h, hi, pr)
235
236 ! Compute g along the normal (generalisation for hills and similar)
237 g_dot_n = abs(g_vec(1)*n_x(i) + g_vec(2)*n_y(i) + g_vec(3)*n_z(i))
238
239 ! Compute Richardson and set stability accordingly
240 call compute_ri_b(bc_type, g_dot_n, hi, ti, ts, magu, kappa, q, pr, ri_b)
241 call set_stability_regime(ri_b, ri_threshold)
242
243 if (abs((ri_b)) <= ri_threshold) then
244 ! Neutral (L_ob undefined)
245 l_ob = 0.0_rp
246 else
247 ! Determine target regime sign
248 if ((ri_b) > 0.0_rp) then
249 l_ob = hi / max(ri_b, ri_threshold) ! Stable guess
250 l_sign = 1.0_rp
251 else
252 l_ob = hi / min(ri_b, -ri_threshold) ! Convective guess
253 l_sign = -1.0_rp
254 end if
255
256 l_old = 1.0e10_rp
257 count = 0
258
259 ! Find Obukhov length
260 do while ((abs(l_old - l_ob) / abs(l_ob) > tol) .and. &
261 (count < max_count))
262 ! Switch between stable and convective based on bulk
263 ! Richardson (Ri_b)
264 l_old = l_ob
265 count = count + 1
266 fd_h = nr_step*l_ob
267 l_upper = l_ob + fd_h
268 l_lower = l_ob - fd_h
269
270 ! Compute L_ob based on stability and bc_type
271 f = f_ptr(ri_b, hi, z0, z0h, pr, l_ob, slaw_m_ptr, slaw_h_ptr)
272 dfdl = dfdl_ptr(l_upper, l_lower, hi, z0, z0h, pr, l_ob, &
273 slaw_m_ptr, slaw_h_ptr, fd_h)
274 if (abs(dfdl) < 1.0e-12_rp) then
275 call neko_error("Division by zero in dfdl")
276 end if
277 l_new = l_ob - f/dfdl
278 ! Avoid regime crossing during Newton iter (otherwise crash)
279 if (l_new*l_sign <= 0.0_rp) then
280 ! "damp update" (stay on same side)
281 l_new = 0.5_rp * l_ob
282 end if
283 ! Bound L_ob
284 l_ob = sign(max(abs(l_new), 1.0e-8_rp), l_sign)
285 l_ob = sign(min(abs(l_ob), 1.0e8_rp), l_sign)
286 end do
287
288 if (abs(l_ob) > 5e5_rp .or. abs(l_ob) < 1e-6_rp) then
289 count = max_count
290 !$omp critical
291 call neko_warning("Obukhov length did not converge " // &
292 "(MOST wall model)")
293 !$omp end critical
294 end if
295
296 if (.not. associated(f_ptr) .or. .not. associated(dfdl_ptr)) then
297 call neko_error("Unassociated pointer for f or dfdl")
298 end if
299 end if
300
301 ! Based on stability and bc_type, compute utau/q
302 select case (bc_type)
303 case ("neumann")
304 ! Compute u* with the new Obukhov length
305 utau = kappa*magu/slaw_m_ptr(hi, l_ob, z0)
306 case ("dirichlet")
307 ! Compute u* with the new Obukhov length
308 utau = kappa*magu/slaw_m_ptr(hi, l_ob, z0)
309 ! and compute q from here
310 q = kappa/pr*utau*(ts - ti)/slaw_h_ptr(hi, l_ob, z0h)
311 case default
312 call neko_error("Invalid specified temperature b.c. type " // &
313 "('neumann' or 'dirichlet'?)")
314 end select
315
316 ! Distribute according to the velocity vector and bound magu
317 ! to avoid 0 division
318 magu = max(magu, 1.0e-6_rp)
319 tau_x(i) = -rho * utau**2 * ui / magu
320 tau_y(i) = -rho * utau**2 * vi / magu
321 tau_z(i) = -rho * utau**2 * wi / magu
322
323 ri_b_diagn(i) = ri_b
324 l_ob_diagn(i) = l_ob
325 utau_diagn(i) = utau
326 magu_diagn(i) = magu
327 ti_diagn(i) = ti
328 ts_diagn(i) = temp_w(i)
329 q_diagn(i) = q
330 end do
331 !$omp end parallel do
332 end subroutine most_compute_cpu
333
341 function slaw_m_stable(z, L_ob, z0) result(slaw)
342 real(kind=rp), intent(in) :: z, l_ob, z0
343 real(kind=rp) :: slaw
344
345 slaw = log(z/z0)-corr_m_stable(z,l_ob)+corr_m_stable(z0,l_ob)
346 end function slaw_m_stable
347
348 function slaw_h_stable(z,L_ob,z0h) result(slaw)
349 real(kind=rp), intent(in) :: z,l_ob,z0h
350 real(kind=rp) :: slaw
351
352 slaw = log(z/z0h)-corr_h_stable(z,l_ob)+corr_h_stable(z0h,l_ob)
353 end function slaw_h_stable
354
355 function corr_m_stable(z, L_ob) result(corr)
356 real(kind=rp), intent(in) :: z, l_ob
357 real(kind=rp) :: corr
358 real(kind=rp) :: a, b, c, d
359 real(kind=rp) :: zeta
360 zeta = z/l_ob
361 ! Coefficients specific to Cheng & Brutsaert (2005)
362 a = 1.0_rp
363 b = 2.0_rp/3.0_rp
364 c = 5.0_rp
365 d = 0.35_rp
366 corr = - a*zeta - b*(zeta-c/d)*exp(-d*zeta) - b*c/d
367 end function corr_m_stable
368
369 function corr_h_stable(z, L_ob) result(corr)
370 real(kind=rp), intent(in) :: z, l_ob
371 real(kind=rp) :: corr
372 real(kind=rp) :: a, b, c, d
373 real(kind=rp) :: zeta
374
375 zeta = z/l_ob
376 ! Coefficients specific to Cheng & Brutsaert (2005)
377 a = 1.0_rp
378 b = 2.0_rp/3.0_rp
379 c = 5.0_rp
380 d = 0.35_rp
381 corr = -b * (zeta - c / d) * exp(-d * zeta) - &
382 (1.0_rp + 2.0_rp / 3.0_rp * a * zeta)**1.5_rp - b * c / d + &
383 1.0_rp
384 end function corr_h_stable
385
393 function slaw_m_convective(z, L_ob, z0) result(slaw)
394 real(kind=rp), intent(in) :: z, l_ob, z0
395 real(kind=rp) :: slaw
396
397 slaw = log(z/z0) - corr_m_convective(z, l_ob) + corr_m_convective(z0, l_ob)
398 end function slaw_m_convective
399
400 function slaw_h_convective(z, L_ob, z0h) result(slaw)
401 real(kind=rp), intent(in) :: z, l_ob, z0h
402 real(kind=rp) :: slaw
403
404 slaw = log(z / z0h) - corr_h_convective(z, l_ob) + &
405 corr_h_convective(z0h, l_ob)
406 end function slaw_h_convective
407
408 function corr_m_convective(z, L_ob) result(corr)
409 real(kind=rp), intent(in) :: z, l_ob
410 real(kind=rp) :: xi, pi, zeta
411 real(kind=rp) :: corr
412
413 zeta = z/l_ob
414 pi = 4*atan(1.0_rp)
415 ! Standard Dyer-Businger coefficient gamma = 16.0
416 xi = (1.0_rp - 16.0_rp*zeta)**0.25_rp
417 corr = 2*log(0.5_rp*(1 + xi)) + log(0.5_rp*(1 + xi**2)) - 2*atan(xi) + pi/2
418 end function corr_m_convective
419
420 function corr_h_convective(z, L_ob) result(corr)
421 real(kind=rp), intent(in) :: z, l_ob
422 real(kind=rp) :: zeta, pi, xi
423 real(kind=rp) :: corr
424
425 zeta = z/l_ob
426 pi = 4*atan(1.0_rp)
427 ! Standard Dyer-Businger coefficient gamma = 16.0
428 xi = (1.0_rp - 16.0_rp*zeta)**0.25_rp
429 corr = 2*log(0.5_rp*(1 + xi**2))
430 end function corr_h_convective
431
433 function slaw_m_neutral(z, L_ob, z0) result(slaw)
434 real(kind=rp), intent(in) :: z, l_ob, z0
435 real(kind=rp) :: slaw
436
437 slaw = log(z/z0)
438 end function slaw_m_neutral
439
440 function slaw_h_neutral(z, L_ob, z0h) result(slaw)
441 real(kind=rp), intent(in) :: z, l_ob, z0h
442 real(kind=rp) :: slaw
443
444 slaw = log(z/z0h)
445 end function slaw_h_neutral
446
448 function f_neumann(Ri_b, z, z0, z0h, Pr, L_ob, slaw_m, slaw_h) result(f)
449 real(kind=rp), intent(in) :: ri_b, z, z0, z0h, l_ob, pr
450 procedure(slaw_m_interface) :: slaw_m
451 procedure(slaw_h_interface) :: slaw_h
452 real(kind=rp) :: f
453
454 f = (ri_b - pr*z/l_ob/slaw_m(z, l_ob, z0)**3)
455 end function f_neumann
456
457 function dfdl_neumann(l_upper, l_lower, z, z0, z0h, Pr, L_ob, &
458 slaw_m, slaw_h, fd_h) result(dfdl)
459 real(kind=rp), intent(in) :: l_upper, l_lower, z, z0, z0h, l_ob, fd_h, pr
460 procedure(slaw_m_interface) :: slaw_m
461 procedure(slaw_h_interface) :: slaw_h
462 real(kind=rp) :: dfdl
463
464 dfdl = (-z/l_upper/slaw_m(z, l_upper, z0)**3) ! conv
465 dfdl = dfdl + (z/l_lower/slaw_m(z, l_lower, z0)**3) ! conv
466 dfdl = pr*dfdl/(2*fd_h)
467 end function dfdl_neumann
468
469 function f_dirichlet(Ri_b, z, z0, z0h, Pr, L_ob, slaw_m, slaw_h) result(f)
470 real(kind=rp), intent(in) :: ri_b, z, z0, z0h, l_ob, pr
471 procedure(slaw_m_interface) :: slaw_m
472 procedure(slaw_h_interface) :: slaw_h
473 real(kind=rp) :: f
474
475 f = (ri_b - pr*z/l_ob*slaw_h(z, l_ob, z0h)/slaw_m(z, l_ob, z0)**2) ! conv
476 end function f_dirichlet
477
478 function dfdl_dirichlet(l_upper, l_lower, z, z0, z0h, Pr, L_ob, &
479 slaw_m, slaw_h, fd_h) result(dfdl)
480 real(kind=rp), intent(in) :: l_upper, l_lower, z, z0, z0h, l_ob, fd_h, pr
481 procedure(slaw_m_interface) :: slaw_m
482 procedure(slaw_h_interface) :: slaw_h
483 real(kind=rp) :: dfdl
484
485 dfdl = (-z / l_upper * slaw_h(z, l_upper, z0h) / &
486 slaw_m(z, l_upper, z0)**2) ! conv
487 dfdl = dfdl + (z / l_lower * slaw_h(z, l_lower, z0h) / &
488 slaw_m(z, l_lower, z0)**2) ! conv
489 dfdl = pr*dfdl/(2*fd_h)
490 end function dfdl_dirichlet
491
492
493end module most_cpu
Logging routines.
Definition log.f90:34
type(log_t), public neko_log
Global log stream.
Definition log.f90:80
integer, parameter, public log_size
Definition log.f90:46
Definition math.f90:60
real(kind=rp), parameter, public pi
Definition math.f90:78
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
Definition math.f90:632
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
Definition math.f90:653
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
Definition math.f90:691
Implements the CPU kernel for the most_t type.
Definition most_cpu.f90:34
real(kind=rp) function slaw_m_stable(z, l_ob, z0)
Similarity laws and corrections for the STABLE regime: REFERENCE: Holtslag, A. A. M....
Definition most_cpu.f90:342
real(kind=rp) function corr_m_convective(z, l_ob)
Definition most_cpu.f90:409
real(kind=rp) function corr_h_convective(z, l_ob)
Definition most_cpu.f90:421
real(kind=rp) function f_neumann(ri_b, z, z0, z0h, pr, l_ob, slaw_m, slaw_h)
Simialrity laws (different for neumann and dirichlet bc's)
Definition most_cpu.f90:449
real(kind=rp) function slaw_m_neutral(z, l_ob, z0)
Similarity laws and corrections for the NEUTRAL regime:
Definition most_cpu.f90:434
procedure(slaw_m_interface), pointer slaw_m_ptr
Definition most_cpu.f90:92
subroutine compute_ri_b(bc_type, g_dot_n, hi, ti, ts, magu, kappa, q, pr, ri_b)
Computes the Richardson number.
Definition most_cpu.f90:130
real(kind=rp) function corr_m_stable(z, l_ob)
Definition most_cpu.f90:356
subroutine set_stability_regime(ri_b, ri_threshold)
Sets the stability regime based on the Richardson number value (quite arbitrary).
Definition most_cpu.f90:149
procedure(corr_h_interface), pointer corr_h_ptr
Definition most_cpu.f90:95
procedure(dfdl_interface), pointer dfdl_ptr
Definition most_cpu.f90:97
real(kind=rp) function slaw_h_neutral(z, l_ob, z0h)
Definition most_cpu.f90:441
subroutine, public most_compute_cpu(u, v, w, temp, temp_w, n_x, n_y, n_z, h, tau_x, tau_y, tau_z, n_nodes, kappa, mu_w, rho_w, g_vec, pr, z0, z0h_in, bc_type, bc_value, tstep, ri_b_diagn, l_ob_diagn, utau_diagn, magu_diagn, ti_diagn, ts_diagn, q_diagn)
Main routine to compute the surface stresses based on MOST.
Definition most_cpu.f90:174
procedure(slaw_h_interface), pointer slaw_h_ptr
Definition most_cpu.f90:93
real(kind=rp) function dfdl_dirichlet(l_upper, l_lower, z, z0, z0h, pr, l_ob, slaw_m, slaw_h, fd_h)
Definition most_cpu.f90:480
real(kind=rp) function slaw_h_stable(z, l_ob, z0h)
Definition most_cpu.f90:349
procedure(corr_m_interface), pointer corr_m_ptr
Definition most_cpu.f90:94
real(kind=rp) function slaw_h_convective(z, l_ob, z0h)
Definition most_cpu.f90:401
real(kind=rp) function corr_h_stable(z, l_ob)
Definition most_cpu.f90:370
real(kind=rp) function f_dirichlet(ri_b, z, z0, z0h, pr, l_ob, slaw_m, slaw_h)
Definition most_cpu.f90:470
procedure(f_interface), pointer f_ptr
Definition most_cpu.f90:96
real(kind=rp) function slaw_m_convective(z, l_ob, z0)
Similarity laws and corrections for the UNSTABLE (convective) regime: REFERENCE: Dyer,...
Definition most_cpu.f90:394
subroutine select_bc_operators(bc_type, bc_value, q, ts, ti, kappa, utau, z0h, hi, pr)
Selects different expressions for the similarity functions in MOST based on the type of bottom bounda...
Definition most_cpu.f90:107
real(kind=rp) function dfdl_neumann(l_upper, l_lower, z, z0, z0h, pr, l_ob, slaw_m, slaw_h, fd_h)
Definition most_cpu.f90:459
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Utilities.
Definition utils.f90:35
subroutine, public neko_warning(warning_msg)
Reports a warning to standard output.
Definition utils.f90:398
#define max(a, b)
Definition tensor.cu:40