| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | value | :: | n | ||
| real(kind=dp), | intent(out), | device, dimension(:, :, :) | :: | dst | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | src |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | value | :: | n | ||
| real(kind=dp), | intent(in), | value | :: | alpha | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | x | ||
| real(kind=dp), | intent(in), | value | :: | beta | ||
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | y |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | y | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | x | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | u_send_s | ||
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | u_send_e | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | u | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_halo |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | value | :: | alpha | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | value | :: | const | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | vort | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudz | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdz | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdy | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | qcrit | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudz | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdz | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdz | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(out), | device, dimension(:, :, :) | :: | nut | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | mixing_length_sq | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dudz | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dvdz | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdx | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdy | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | dwdz | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(out), | device, dimension(:, :, :) | :: | stress | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | nut | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | gradient_a | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | gradient_b | ||
| real(kind=dp), | intent(in), | value | :: | scale_a | ||
| real(kind=dp), | intent(in), | value | :: | scale_b | ||
| integer, | intent(in), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device | :: | s | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | x | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | y | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device | :: | s | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | a | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | b | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | c | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |
s(1:3, l) += sums of ga, gb and g*c over the points labelled l; launch as vector_norm_squared. Each thread accumulates runs of equal labels along its pencil and flushes a run when the label changes, so the atomics scale with the label changes rather than the points.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device | :: | s(3,n_label) | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | g | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | label | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | a | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | b | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | c | ||
| integer, | intent(in), | value | :: | n_label | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |
a, b, c += coeffs(1:3, l)*g at the points labelled l; launch as vector_norm_squared.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | device | :: | coeffs(3,n_label) | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | g | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | label | ||
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | a | ||
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | b | ||
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | c | ||
| integer, | intent(in), | value | :: | n_label | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device | :: | max_f | ||
| real(kind=dp), | intent(inout), | device | :: | sum_f | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | f | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |
Set domain Y_FACE boundary values. c_start: Dirichlet value applied at the bottom face (j = 1) c_end: Dirichlet value applied at the top face (j = ny) set_start/set_end: whether that face carries a prescribed value at all, so the two y-faces can differ (ABL: no-slip floor, free-slip lid).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | value | :: | c_start | ||
| real(kind=dp), | intent(in), | value | :: | c_end | ||
| logical, | intent(in), | value | :: | set_start | ||
| logical, | intent(in), | value | :: | set_end | ||
| real(kind=dp), | intent(in), | value | :: | flow_rate_diff | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
First pass of field_plane_sums: partial(j, z) is the sum over x of y index j at z. Launch with threads = dim3(SZ, 1, 1) and blocks = dim3(n_y_blocks, nz, 1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(out), | device, dimension(:, :) | :: | partial | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | f | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
Second pass of field_plane_sums: sums(j) = sum over z of partial(j, z), in a fixed order. Launch with one thread per y index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(out), | device, dimension(:) | :: | sums | ||
| real(kind=dp), | intent(in), | device, dimension(:, :) | :: | partial | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
Set one interior y-plane to a constant. The caller resolves the plane into its position within a y-block and the group offset for that block, so this kernel stays free of layout arithmetic.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | value | :: | c | ||
| integer, | intent(in), | value | :: | i_in_block | ||
| integer, | intent(in), | value | :: | group_offset | ||
| integer, | intent(in), | value | :: | nx |
Drag law tau = drag_coeffu_c|u_h| from each column's own sampled velocity, written into one stress plane (component 1: x, 3: z).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | stress | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | u | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | w | ||
| real(kind=dp), | intent(in), | value | :: | drag_coeff | ||
| integer, | intent(in), | value | :: | sample_i | ||
| integer, | intent(in), | value | :: | stress_i | ||
| integer, | intent(in), | value | :: | sample_offset | ||
| integer, | intent(in), | value | :: | stress_offset | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | component |
Set domain Y_FACE boundary values from another field. Both f and f_start are DIR_X VERT pencil-layout. Only the bottom (j = 1) and top (j = ny) y-pencil planes of f_start are read.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | f_start | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
Set domain X_FACE boundary values. c_start: Dirichlet value applied at the left face (i = 1) c_end: convective velocity Uc = uxmax * gdt / dx, used as multiplier in the outflow scheme du/dt + Uc*du/dx = 0
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | value | :: | c_start | ||
| real(kind=dp), | intent(in), | value | :: | c_end | ||
| integer, | intent(in), | value | :: | bc_start | ||
| integer, | intent(in), | value | :: | bc_end | ||
| real(kind=dp), | intent(in), | value | :: | flow_rate_diff | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
Set domain X_FACE boundary values with a spatially-varying inlet.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | f_start | ||
| real(kind=dp), | intent(in), | value | :: | c_end | ||
| integer, | intent(in), | value | :: | bc_start | ||
| integer, | intent(in), | value | :: | bc_end | ||
| real(kind=dp), | intent(in), | value | :: | flow_rate_diff | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
Adds a uniform constant c to a single x-normal plane (pencil index
i_plane) of a DIR_X VERT field, in place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | value | :: | c | ||
| integer, | intent(in), | value | :: | i_plane | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
Copies plane(y, z) into the x = 1 plane (pencil index 1) of a DIR_X VERT field, where f(i, 1, b) holds y = (y_block - 1)SZ + i and z = b - (y_block - 1)nz. Launch as add_scalar_x_face.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | device, dimension(:, :) | :: | plane | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
f += g on the x-faces (pencil index 1 and nx) flagged by set_start/set_end. Launch as field_set_x_face_from_field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | g | ||
| logical, | intent(in), | value | :: | set_start | ||
| logical, | intent(in), | value | :: | set_end | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
f += g on the y-faces (j = 1 and ny) flagged by set_start/set_end. Launch as field_set_y_face.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | f | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | g | ||
| logical, | intent(in), | value | :: | set_start | ||
| logical, | intent(in), | value | :: | set_end | ||
| integer, | intent(in), | value | :: | nx | ||
| integer, | intent(in), | value | :: | ny | ||
| integer, | intent(in), | value | :: | nz |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device | :: | s | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | f | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |