Neko 1.99.5
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 procedure(slaw_m_interface), pointer :: slaw_m_ptr => null()
91 procedure(slaw_h_interface), pointer :: slaw_h_ptr => null()
92 procedure(corr_m_interface), pointer :: corr_m_ptr => null()
93 procedure(corr_h_interface), pointer :: corr_h_ptr => null()
94 procedure(f_interface), pointer :: f_ptr => null()
95 procedure(dfdl_interface), pointer :: dfdl_ptr => null()
96
97contains
98
101 subroutine select_bc_operators(bc_type, bc_value, q, ts, ti, kappa, &
102 utau, z0h, hi, Pr)
103 character(len=*), intent(in) :: bc_type
104 real(kind=rp), intent(in) :: hi, ti, kappa, utau, z0h, bc_value, pr
105 real(kind=rp), intent(inout) :: q,ts
106 select case (bc_type)
107 case ("neumann")
108 ! ts not used
109 q = bc_value
112 case ("dirichlet")
113 ts = bc_value
114 q = (kappa/pr)*utau*(ts - ti)/log(hi/z0h)
117 case default
118 call neko_error("Invalid specified temperature b.c. type " // &
119 "('neumann' or 'dirichlet'?)")
120 end select
121 end subroutine select_bc_operators
122
124 subroutine compute_ri_b(bc_type, g_dot_n, hi, ti, ts, magu, kappa, q, &
125 Pr, Ri_b)
126 character(len=*), intent(in) :: bc_type
127 real(kind=rp), intent(in) :: hi, ti, ts, pr
128 real(kind=rp), intent(in) :: magu, kappa, g_dot_n
129 real(kind=rp), intent(inout) :: q, ri_b
130
131 select case (bc_type)
132 case ("neumann")
133 ri_b = - g_dot_n*hi / ti*q*pr / (magu**3*kappa**2)
134 case ("dirichlet")
135 ri_b = g_dot_n*hi/ti*(ti - ts)/magu**2
136 case default
137 call neko_error("Invalid specified temperature b.c. type " // &
138 "('neumann' or 'dirichlet'?)")
139 end select
140 end subroutine compute_ri_b
141
144 subroutine set_stability_regime(Ri_b, Ri_threshold)
145 real(kind=rp), intent(in) :: ri_b, ri_threshold
146
147 if (ri_b > ri_threshold) then
152 elseif (ri_b < -ri_threshold) then
157 else
160 end if
161 end subroutine set_stability_regime
162
165 subroutine most_compute_cpu(u, v, w, temp, ind_r, ind_s, ind_t, ind_e, &
166 n_x, n_y, n_z, h, tau_x, tau_y, tau_z, n_nodes, lx, nelv, &
167 kappa, mu_w, rho_w, g_vec, Pr, z0, z0h_in, bc_type, bc_value, tstep, &
168 Ri_b_diagn, L_ob_diagn, utau_diagn, magu_diagn, ti_diagn, ts_diagn,&
169 q_diagn, h_x_idx, h_y_idx, h_z_idx)
170 integer, intent(in) :: n_nodes, lx, nelv, tstep
171 real(kind=rp), dimension(lx, lx, lx, nelv), intent(in) :: u, v, w, temp
172 integer, intent(in), dimension(n_nodes) :: ind_r, ind_s, ind_t, ind_e
173 real(kind=rp), dimension(n_nodes), intent(in) :: n_x, n_y, n_z, h
174 real(kind=rp), intent(in) :: kappa, z0, z0h_in, bc_value, pr
175 real(kind=rp), dimension(3), intent(in) :: g_vec
176 real(kind=rp), dimension(n_nodes), intent(in) :: mu_w, rho_w
177 real(kind=rp) :: g_dot_n
178 character(len=*), intent(in) :: bc_type
179 real(kind=rp), dimension(n_nodes), intent(inout) :: tau_x, tau_y, tau_z
180 real(kind=rp) :: ui, vi, wi, hi, rho, mu
181 real(kind=rp) :: normu, z0h
182 real(kind=rp) :: l_upper, l_lower, l_old
183 real(kind=rp) :: f, dfdl, fd_h, l_new, l_sign
184 integer :: i, count
185 integer, parameter :: max_count = 50
186 real(kind=rp), parameter :: tol = 0.001_rp
187 real(kind=rp), parameter :: nr_step = 0.001_rp
188 real(kind=rp), parameter :: ri_threshold = 0.0001_rp
189 character(len=LOG_SIZE) :: log_buf
190 real(kind=rp) :: utau, ri_b, l_ob, magu, q, ti, ts
191 real(kind=rp), dimension(n_nodes), intent(inout) :: ri_b_diagn, l_ob_diagn
192 real(kind=rp), dimension(n_nodes), intent(inout) :: utau_diagn, magu_diagn
193 real(kind=rp), dimension(n_nodes), intent(inout) :: ti_diagn, ts_diagn
194 real(kind=rp), dimension(n_nodes), intent(inout) :: q_diagn
195 integer, dimension(n_nodes), intent(in) :: h_x_idx
196 integer, dimension(n_nodes), intent(in) :: h_y_idx
197 integer, dimension(n_nodes), intent(in) :: h_z_idx
198
199 do i=1, n_nodes
200 ! Sample the variables
201 ui = u(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
202 vi = v(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
203 wi = w(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
204 ti = temp(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
205 hi = h(i)
206 rho = rho_w(i)
207 mu = mu_w(i)
208
209 ! Project on horizontal directions
210 normu = ui * n_x(i) + vi * n_y(i) + wi * n_z(i)
211 ui = ui - normu * n_x(i)
212 vi = vi - normu * n_y(i)
213 wi = wi - normu * n_z(i)
214
215 ! Compute velocity magnitude
216 magu = sqrt(ui**2 + vi**2 + wi**2)
217 magu = max(magu, 1.0e-6_rp)
218 utau = magu*kappa / log(hi/z0)
219
220 ! Compute thermal roughness length from Zilitinkevich, 1995
221 if (z0h_in < 0) then
222 ! z0h_in is interpreted as -C_Zil (Zilitinkevich constant) for z0h
223 z0h = z0 * exp(z0h_in*sqrt((utau*z0)/(mu/rho)))
224 else
225 z0h = z0h_in
226 end if
227
228 ! Get q, Ri_b, f_ptr, dfdl_ptr based on bc_type
229 ! Maybe redundant, but needed to initialise Rib
230 call select_bc_operators(bc_type, bc_value, q, ts, ti, kappa, &
231 utau, z0h, hi, pr)
232
233 ! Compute g along the normal (generalisation for hills and similar)
234 g_dot_n = abs(g_vec(1)*n_x(i) + g_vec(2)*n_y(i) + g_vec(3)*n_z(i))
235
236 ! Compute Richardson and set stability accordingly
237 call compute_ri_b(bc_type, g_dot_n, hi, ti, ts, magu, kappa, q, pr, ri_b)
238 call set_stability_regime(ri_b, ri_threshold)
239
240 if (abs((ri_b)) <= ri_threshold) then
241 ! Neutral (L_ob undefined)
242 l_ob = 0.0_rp
243 else
244 ! Determine target regime sign
245 if ((ri_b) > 0.0_rp) then
246 l_ob = hi / max(ri_b, ri_threshold) ! Stable guess
247 l_sign = 1.0_rp
248 else
249 l_ob = hi / min(ri_b, -ri_threshold) ! Convective guess
250 l_sign = -1.0_rp
251 end if
252
253 l_old = 1.0e10_rp
254 count = 0
255
256 ! Find Obukhov length
257 do while ((abs(l_old - l_ob) / abs(l_ob) > tol) .and. &
258 (count < max_count))
259 ! Switch between stable and convective based on bulk
260 ! Richardson (Ri_b)
261 l_old = l_ob
262 count = count + 1
263 fd_h = nr_step*l_ob
264 l_upper = l_ob + fd_h
265 l_lower = l_ob - fd_h
266
267 ! Compute L_ob based on stability and bc_type
268 f = f_ptr(ri_b, hi, z0, z0h, pr, l_ob, slaw_m_ptr, slaw_h_ptr)
269 dfdl = dfdl_ptr(l_upper, l_lower, hi, z0, z0h, pr, l_ob, &
270 slaw_m_ptr, slaw_h_ptr, fd_h)
271 if (abs(dfdl) < 1.0e-12_rp) then
272 call neko_error("Division by zero in dfdl")
273 end if
274 l_new = l_ob - f/dfdl
275 ! Avoid regime crossing during Newton iter (otherwise crash)
276 if (l_new*l_sign <= 0.0_rp) then
277 ! "damp update" (stay on same side)
278 l_new = 0.5_rp * l_ob
279 end if
280 ! Bound L_ob
281 l_ob = sign(max(abs(l_new), 1.0e-8_rp), l_sign)
282 l_ob = sign(min(abs(l_ob), 1.0e8_rp), l_sign)
283 end do
284
285 if (abs(l_ob) > 5e5_rp .or. abs(l_ob) < 1e-6_rp) then
286 count = max_count
287 call neko_warning("Obukhov length did not converge " // &
288 "(MOST wall model)")
289 end if
290
291 if (.not. associated(f_ptr) .or. .not. associated(dfdl_ptr)) then
292 call neko_error("Unassociated pointer for f or dfdl")
293 end if
294 end if
295
296 ! Based on stability and bc_type, compute utau/q
297 select case (bc_type)
298 case ("neumann")
299 ! Compute u* with the new Obukhov length
300 utau = kappa*magu/slaw_m_ptr(hi, l_ob, z0)
301 case ("dirichlet")
302 ! Compute u* with the new Obukhov length
303 utau = kappa*magu/slaw_m_ptr(hi, l_ob, z0)
304 ! and compute q from here
305 q = kappa/pr*utau*(ts - ti)/slaw_h_ptr(hi, l_ob, z0h)
306 case default
307 call neko_error("Invalid specified temperature b.c. type " // &
308 "('neumann' or 'dirichlet'?)")
309 end select
310
311 ! Distribute according to the velocity vector and bound magu
312 ! to avoid 0 division
313 magu = max(magu, 1.0e-6_rp)
314 tau_x(i) = -rho * utau**2 * ui / magu
315 tau_y(i) = -rho * utau**2 * vi / magu
316 tau_z(i) = -rho * utau**2 * wi / magu
317
318 ri_b_diagn(i) = ri_b
319 l_ob_diagn(i) = l_ob
320 utau_diagn(i) = utau
321 magu_diagn(i) = magu
322 ti_diagn(i) = ti
323 ts_diagn(i) = temp(ind_r(i) - h_x_idx(i), ind_s(i) - h_y_idx(i), &
324 ind_t(i) - h_z_idx(i), ind_e(i))
325 q_diagn(i) = q
326 end do
327 end subroutine most_compute_cpu
328
336 function slaw_m_stable(z, L_ob, z0) result(slaw)
337 real(kind=rp), intent(in) :: z, l_ob, z0
338 real(kind=rp) :: slaw
339
340 slaw = log(z/z0)-corr_m_stable(z,l_ob)+corr_m_stable(z0,l_ob)
341 end function slaw_m_stable
342
343 function slaw_h_stable(z,L_ob,z0h) result(slaw)
344 real(kind=rp), intent(in) :: z,l_ob,z0h
345 real(kind=rp) :: slaw
346
347 slaw = log(z/z0h)-corr_h_stable(z,l_ob)+corr_h_stable(z0h,l_ob)
348 end function slaw_h_stable
349
350 function corr_m_stable(z, L_ob) result(corr)
351 real(kind=rp), intent(in) :: z, l_ob
352 real(kind=rp) :: corr
353 real(kind=rp) :: a, b, c, d
354 real(kind=rp) :: zeta
355 zeta = z/l_ob
356 ! Coefficients specific to Cheng & Brutsaert (2005)
357 a = 1.0_rp
358 b = 2.0_rp/3.0_rp
359 c = 5.0_rp
360 d = 0.35_rp
361 corr = - a*zeta - b*(zeta-c/d)*exp(-d*zeta) - b*c/d
362 end function corr_m_stable
363
364 function corr_h_stable(z, L_ob) result(corr)
365 real(kind=rp), intent(in) :: z, l_ob
366 real(kind=rp) :: corr
367 real(kind=rp) :: a, b, c, d
368 real(kind=rp) :: zeta
369
370 zeta = z/l_ob
371 ! Coefficients specific to Cheng & Brutsaert (2005)
372 a = 1.0_rp
373 b = 2.0_rp/3.0_rp
374 c = 5.0_rp
375 d = 0.35_rp
376 corr = -b * (zeta - c / d) * exp(-d * zeta) - &
377 (1.0_rp + 2.0_rp / 3.0_rp * a * zeta)**1.5_rp - b * c / d + &
378 1.0_rp
379 end function corr_h_stable
380
388 function slaw_m_convective(z, L_ob, z0) result(slaw)
389 real(kind=rp), intent(in) :: z, l_ob, z0
390 real(kind=rp) :: slaw
391
392 slaw = log(z/z0) - corr_m_convective(z, l_ob) + corr_m_convective(z0, l_ob)
393 end function slaw_m_convective
394
395 function slaw_h_convective(z, L_ob, z0h) result(slaw)
396 real(kind=rp), intent(in) :: z, l_ob, z0h
397 real(kind=rp) :: slaw
398
399 slaw = log(z / z0h) - corr_h_convective(z, l_ob) + &
400 corr_h_convective(z0h, l_ob)
401 end function slaw_h_convective
402
403 function corr_m_convective(z, L_ob) result(corr)
404 real(kind=rp), intent(in) :: z, l_ob
405 real(kind=rp) :: xi, pi, zeta
406 real(kind=rp) :: corr
407
408 zeta = z/l_ob
409 pi = 4*atan(1.0_rp)
410 ! Standard Dyer-Businger coefficient gamma = 16.0
411 xi = (1.0_rp - 16.0_rp*zeta)**0.25_rp
412 corr = 2*log(0.5_rp*(1 + xi)) + log(0.5_rp*(1 + xi**2)) - 2*atan(xi) + pi/2
413 end function corr_m_convective
414
415 function corr_h_convective(z, L_ob) result(corr)
416 real(kind=rp), intent(in) :: z, l_ob
417 real(kind=rp) :: zeta, pi, xi
418 real(kind=rp) :: corr
419
420 zeta = z/l_ob
421 pi = 4*atan(1.0_rp)
422 ! Standard Dyer-Businger coefficient gamma = 16.0
423 xi = (1.0_rp - 16.0_rp*zeta)**0.25_rp
424 corr = 2*log(0.5_rp*(1 + xi**2))
425 end function corr_h_convective
426
428 function slaw_m_neutral(z, L_ob, z0) result(slaw)
429 real(kind=rp), intent(in) :: z, l_ob, z0
430 real(kind=rp) :: slaw
431
432 slaw = log(z/z0)
433 end function slaw_m_neutral
434
435 function slaw_h_neutral(z, L_ob, z0h) result(slaw)
436 real(kind=rp), intent(in) :: z, l_ob, z0h
437 real(kind=rp) :: slaw
438
439 slaw = log(z/z0h)
440 end function slaw_h_neutral
441
443 function f_neumann(Ri_b, z, z0, z0h, Pr, L_ob, slaw_m, slaw_h) result(f)
444 real(kind=rp), intent(in) :: ri_b, z, z0, z0h, l_ob, pr
445 procedure(slaw_m_interface) :: slaw_m
446 procedure(slaw_h_interface) :: slaw_h
447 real(kind=rp) :: f
448
449 f = (ri_b - pr*z/l_ob/slaw_m(z, l_ob, z0)**3)
450 end function f_neumann
451
452 function dfdl_neumann(l_upper, l_lower, z, z0, z0h, Pr, L_ob, &
453 slaw_m, slaw_h, fd_h) result(dfdl)
454 real(kind=rp), intent(in) :: l_upper, l_lower, z, z0, z0h, l_ob, fd_h, pr
455 procedure(slaw_m_interface) :: slaw_m
456 procedure(slaw_h_interface) :: slaw_h
457 real(kind=rp) :: dfdl
458
459 dfdl = (-z/l_upper/slaw_m(z, l_upper, z0)**3) ! conv
460 dfdl = dfdl + (z/l_lower/slaw_m(z, l_lower, z0)**3) ! conv
461 dfdl = pr*dfdl/(2*fd_h)
462 end function dfdl_neumann
463
464 function f_dirichlet(Ri_b, z, z0, z0h, Pr, L_ob, slaw_m, slaw_h) result(f)
465 real(kind=rp), intent(in) :: ri_b, z, z0, z0h, l_ob, pr
466 procedure(slaw_m_interface) :: slaw_m
467 procedure(slaw_h_interface) :: slaw_h
468 real(kind=rp) :: f
469
470 f = (ri_b - pr*z/l_ob*slaw_h(z, l_ob, z0h)/slaw_m(z, l_ob, z0)**2) ! conv
471 end function f_dirichlet
472
473 function dfdl_dirichlet(l_upper, l_lower, z, z0, z0h, Pr, L_ob, &
474 slaw_m, slaw_h, fd_h) result(dfdl)
475 real(kind=rp), intent(in) :: l_upper, l_lower, z, z0, z0h, l_ob, fd_h, pr
476 procedure(slaw_m_interface) :: slaw_m
477 procedure(slaw_h_interface) :: slaw_h
478 real(kind=rp) :: dfdl
479
480 dfdl = (-z / l_upper * slaw_h(z, l_upper, z0h) / &
481 slaw_m(z, l_upper, z0)**2) ! conv
482 dfdl = dfdl + (z / l_lower * slaw_h(z, l_lower, z0h) / &
483 slaw_m(z, l_lower, z0)**2) ! conv
484 dfdl = pr*dfdl/(2*fd_h)
485 end function dfdl_dirichlet
486
487
488end 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:76
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
Definition math.f90:629
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
Definition math.f90:650
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
Definition math.f90:688
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:337
subroutine, public most_compute_cpu(u, v, w, temp, ind_r, ind_s, ind_t, ind_e, n_x, n_y, n_z, h, tau_x, tau_y, tau_z, n_nodes, lx, nelv, 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, h_x_idx, h_y_idx, h_z_idx)
Main routine to compute the surface stresses based on MOST.
Definition most_cpu.f90:170
real(kind=rp) function corr_m_convective(z, l_ob)
Definition most_cpu.f90:404
real(kind=rp) function corr_h_convective(z, l_ob)
Definition most_cpu.f90:416
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:444
real(kind=rp) function slaw_m_neutral(z, l_ob, z0)
Similarity laws and corrections for the NEUTRAL regime:
Definition most_cpu.f90:429
procedure(slaw_m_interface), pointer slaw_m_ptr
Definition most_cpu.f90:90
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:126
real(kind=rp) function corr_m_stable(z, l_ob)
Definition most_cpu.f90:351
subroutine set_stability_regime(ri_b, ri_threshold)
Sets the stability regime based on the Richardson number value (quite arbitrary).
Definition most_cpu.f90:145
procedure(corr_h_interface), pointer corr_h_ptr
Definition most_cpu.f90:93
procedure(dfdl_interface), pointer dfdl_ptr
Definition most_cpu.f90:95
real(kind=rp) function slaw_h_neutral(z, l_ob, z0h)
Definition most_cpu.f90:436
procedure(slaw_h_interface), pointer slaw_h_ptr
Definition most_cpu.f90:91
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:475
real(kind=rp) function slaw_h_stable(z, l_ob, z0h)
Definition most_cpu.f90:344
procedure(corr_m_interface), pointer corr_m_ptr
Definition most_cpu.f90:92
real(kind=rp) function slaw_h_convective(z, l_ob, z0h)
Definition most_cpu.f90:396
real(kind=rp) function corr_h_stable(z, l_ob)
Definition most_cpu.f90:365
real(kind=rp) function f_dirichlet(ri_b, z, z0, z0h, pr, l_ob, slaw_m, slaw_h)
Definition most_cpu.f90:465
procedure(f_interface), pointer f_ptr
Definition most_cpu.f90:94
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:389
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:103
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:454
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
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