Skip to content

Commit

Permalink
Update GPU test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
lars2015 committed Jan 16, 2024
1 parent bfe97a1 commit 60fe530
Show file tree
Hide file tree
Showing 5 changed files with 316 additions and 313 deletions.
23 changes: 13 additions & 10 deletions src/libtrac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ double lapse_rate(

void level_definitions(
ctl_t * ctl) {

if (0 == ctl->press_level_def) {

ctl->met_np = 138;
Expand Down Expand Up @@ -1635,7 +1635,7 @@ void level_definitions(
ctl->met_np = 147;

double press[147] = {
0.0200, 0.0310, 0.0467, 0.0683, 0.0975, 0.1361, 0.1861, 0.2499,
0.0200, 0.0310, 0.0467, 0.0683, 0.0975, 0.1361, 0.1861, 0.2499,
0.3299, 0.4288, 0.5496, 0.6952, 0.8690, 1.0742, 1.3143, 1.5928, 1.9134,
2.2797, 2.6954, 3.1642, 3.6898, 4.2759, 4.9262, 5.6441, 6.4334, 7.2974,
8.2397, 9.2634, 10.3720, 11.5685, 12.8561, 14.2377, 15.7162, 17.2945,
Expand All @@ -1653,8 +1653,9 @@ void level_definitions(
870.2004, 882.7910, 894.6222, 905.7116, 916.0815, 925.7571, 934.7666,
943.1399, 950.9082, 958.1037, 964.7584, 970.9046, 976.5737, 981.7968,
986.6036, 991.0230, 995.0824, 998.8081, 1002.2250, 1005.3562, 1008.2239,
1010.8487, 1013.25, 1016.37, 1019.49, 1022.61, 1025.73, 1028.85, 1031.97,
1035.09, 1038.21, 1041.33, 1044.45
1010.8487, 1013.25, 1016.37, 1019.49, 1022.61, 1025.73, 1028.85,
1031.97,
1035.09, 1038.21, 1041.33, 1044.45
};

for (int ip = 0; ip < ctl->met_np; ip++)
Expand All @@ -1669,16 +1670,18 @@ void level_definitions(
1.0872, 1.5099, 2.0464, 2.7136, 3.5282, 4.5069, 5.6652, 7.0181,
8.5795, 10.3617, 12.3759, 14.6316, 17.1371, 19.8987, 22.9216, 26.2090,
29.7630, 33.5843, 37.6720, 42.0242, 46.6378, 51.5086, 56.6316, 61.9984,
67.5973, 73.4150, 79.4434, 85.7016, 92.2162, 99.0182, 106.1445, 113.6382,
67.5973, 73.4150, 79.4434, 85.7016, 92.2162, 99.0182, 106.1445,
113.6382,
121.5502, 129.9403, 138.8558, 148.3260, 158.3816, 169.0545, 180.3786,
192.3889, 205.1222, 218.6172, 232.9140, 248.0547, 264.0833, 281.0456,
298.9895, 317.9651, 338.0245, 359.2221, 381.6144, 405.2606, 430.2069,
456.4813, 483.8505, 512.0662, 540.8577, 569.9401, 599.0310, 627.9668,
656.6129, 684.8491, 712.5573, 739.5739, 765.7697, 791.0376, 815.2774,
838.3507, 860.1516, 880.6080, 899.6602, 917.2205, 933.2247, 947.6584,
960.5245, 971.8169, 981.5301, 989.7322, 996.8732, 1002.8013,
1007.4431, 1010.8487, 1013.25, 1016.37, 1019.49, 1022.61, 1025.73, 1028.85, 1031.97,
1035.09, 1038.21, 1041.33, 1044.45
1007.4431, 1010.8487, 1013.25, 1016.37, 1019.49, 1022.61, 1025.73,
1028.85, 1031.97,
1035.09, 1038.21, 1041.33, 1044.45
};

for (int ip = 0; ip < ctl->met_np; ip++)
Expand All @@ -1696,7 +1699,8 @@ void level_definitions(
201.997, 221.615, 242.772, 265.556, 290.055, 316.361, 344.566, 374.767,
407.058, 441.539, 478.31, 517.42, 558.343, 600.167, 683.262, 722.979,
760.6, 795.64, 827.776, 856.838, 882.791, 905.712, 925.757, 943.14,
958.104, 972.495, 986.886, 1001.28, 1015.67, 1030.06 , 1034.86, 1039.65, 1044.45
958.104, 972.495, 986.886, 1001.28, 1015.67, 1030.06, 1034.86, 1039.65,
1044.45
};

for (int ip = 0; ip < ctl->met_np; ip++)
Expand Down Expand Up @@ -2821,8 +2825,7 @@ void read_ctl(
/* KPP chemistry... */
ctl->kpp_chem =
(int) scan_ctl(filename, argc, argv, "KPP_CHEM", -1, "0", NULL);
ctl->dt_kpp =
scan_ctl(filename, argc, argv, "DT_KPP", -1, "1800", NULL);
ctl->dt_kpp = scan_ctl(filename, argc, argv, "DT_KPP", -1, "1800", NULL);

/* First order tracer chemistry... */
ctl->tracer_chem =
Expand Down
6 changes: 3 additions & 3 deletions src/trac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ void module_kpp_chem(

/* Loop over particles... */
const int np = atm->np;
#pragma omp parallel for
#pragma omp parallel for default(shared)
for (int ip = 0; ip < np; ip++) {
if (dt[ip] > 0) {

Expand Down Expand Up @@ -2010,13 +2010,13 @@ void module_mixing_help(
cmean[idx] += atm->q[qnt_idx][ip];
count[idx]++;
}
#pragma omp parallel for
#pragma omp parallel for default(shared)
for (int i = 0; i < ctl->mixing_nx * ctl->mixing_ny * ctl->mixing_nz; i++)
if (count[i] > 0)
cmean[i] /= count[i];

/* Calculate interparcel mixing... */
#pragma omp parallel for
#pragma omp parallel for default(shared)
for (int ip = 0; ip < atm->np; ip++)
if (izs[ip] >= 0) {

Expand Down
Loading

0 comments on commit 60fe530

Please sign in to comment.