1 | MODULE diags_unstructured_mod |
---|
2 | USE ISO_C_BINDING |
---|
3 | USE OMP_LIB |
---|
4 | USE data_unstructured_mod |
---|
5 | USE transfer_unstructured_mod |
---|
6 | IMPLICIT NONE |
---|
7 | PRIVATE |
---|
8 | SAVE |
---|
9 | |
---|
10 | CONTAINS |
---|
11 | |
---|
12 | #include "unstructured.h90" |
---|
13 | |
---|
14 | #define HASNAN(field) (ANY(.NOT.ABS(field)<1e20)) |
---|
15 | |
---|
16 | SUBROUTINE wind_centered(un, uxyz) BINDC(wind_centered) |
---|
17 | FIELD_THETA :: uxyz ! OUT |
---|
18 | FIELD_U :: un ! IN, normal components |
---|
19 | !$OMP PARALLEL NUM_THREADS(nb_threads) |
---|
20 | CALL update_halo(transfer_edge, un) |
---|
21 | CALL compute_wind_centered(un,uxyz) |
---|
22 | !$OMP END PARALLEL |
---|
23 | END SUBROUTINE wind_centered |
---|
24 | |
---|
25 | SUBROUTINE compute_wind_centered(ue, ucenter) |
---|
26 | FIELD_THETA :: ucenter ! OUT |
---|
27 | FIELD_U :: ue ! IN, normal components |
---|
28 | DECLARE_INDICES |
---|
29 | DECLARE_EDGES |
---|
30 | NUM :: cx, cy, cz, ux, uy, uz, ue_le, fac |
---|
31 | NUM, parameter :: scale = 1. |
---|
32 | #include "../kernels_unst/wind_centered.k90" |
---|
33 | END SUBROUTINE compute_wind_centered |
---|
34 | |
---|
35 | |
---|
36 | END MODULE diags_unstructured_mod |
---|