Skip to content
Snippets Groups Projects
Commit fb65e61c authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

fix codestyle

parent ee2890ce
No related branches found
No related tags found
No related merge requests found
......@@ -496,20 +496,19 @@ def test_interp_special_cases():
def test_from_pywasp_pwc():
A = np.array([
[ 5.757, 6.088, 5.369],
[ 5.584, 5.806, 5.358],
[ 7.506, 7.707, 7.098],
[ 9.383, 10.082, 11.018],
[ 8.835, 9.644, 10.244],
[ 6.464, 7.071, 7.066],
[ 6.265, 6.626, 5.846],
[ 7.562, 7.858, 7.289],
[10.005, 10.42 , 10.124],
A = np.array([
[5.757, 6.088, 5.369],
[5.584, 5.806, 5.358],
[7.506, 7.707, 7.098],
[9.383, 10.082, 11.018],
[8.835, 9.644, 10.244],
[6.464, 7.071, 7.066],
[6.265, 6.626, 5.846],
[7.562, 7.858, 7.289],
[10.005, 10.42, 10.124],
[10.046, 11.211, 12.218],
[ 8.821, 9.624, 10.19 ],
[ 5.948, 6.504, 6.499]
[8.821, 9.624, 10.19],
[5.948, 6.504, 6.499]
])
k = np.array([
......@@ -528,40 +527,40 @@ def test_from_pywasp_pwc():
])
wdfreq = np.array([
[0.0544071 , 0.0532056 , 0.04288784],
[0.0376036 , 0.0355262 , 0.03168268],
[0.0544071, 0.0532056, 0.04288784],
[0.0376036, 0.0355262, 0.03168268],
[0.05400841, 0.05099307, 0.04538284],
[0.08345144, 0.08324289, 0.09760682],
[0.09817267, 0.102156 , 0.1072249 ],
[0.09817267, 0.102156, 0.1072249],
[0.06296581, 0.06525171, 0.06451698],
[0.04901042, 0.04791974, 0.03865756],
[0.06785324, 0.0656789 , 0.05674313],
[0.1384152 , 0.1309593 , 0.1174582 ],
[0.1622368 , 0.1655659 , 0.1941505 ],
[0.1219364 , 0.1269784 , 0.1319477 ],
[0.06993906, 0.07252219, 0.0717409 ]
[0.06785324, 0.0656789, 0.05674313],
[0.1384152, 0.1309593, 0.1174582],
[0.1622368, 0.1655659, 0.1941505],
[0.1219364, 0.1269784, 0.1319477],
[0.06993906, 0.07252219, 0.0717409]
])
sector = np.linspace(0.0, 330.0, 12)
x = np.array([263655.0, 263891.1, 264022.2])
y = np.array([6506601.0, 6506394.0, 6506124.0])
h = np.array([70]*3)
h = np.array([70] * 3)
pwc = xr.Dataset(
data_vars={
"A": (("sector", "point"), A),
"k": (("sector", "point"), k),
"wdfreq": (("sector", "point"), wdfreq),
"turbulence_intensity": (("sector", "point"), np.zeros_like(A)),
},
"A": (("sector", "point"), A),
"k": (("sector", "point"), k),
"wdfreq": (("sector", "point"), wdfreq),
"turbulence_intensity": (("sector", "point"), np.zeros_like(A)),
},
coords={
"sector": (("sector",), sector),
"sector_floor": (("sector",), np.mod(sector - 15, 360)),
"sector_ceil": (("sector",), np.mod(sector + 15, 360)),
"point": (("point"), np.arange(len(x))),
"west_east": (("point",), x),
"south_north": (("point",), y),
"sector_floor": (("sector",), np.mod(sector - 15, 360)),
"sector_ceil": (("sector",), np.mod(sector + 15, 360)),
"point": (("point"), np.arange(len(x))),
"west_east": (("point",), x),
"south_north": (("point",), y),
"height": (("point",), h)
}
)
......@@ -570,14 +569,14 @@ def test_from_pywasp_pwc():
speedups = np.array([
[0.94574503, 0.96176405, 0.97405529, 0.85145872, 0.86463324,
0.91415641, 0.94562806, 0.962134 , 0.9601336 , 0.82210133,
0.86466306, 0.91451415, 0.94574503],
[1. , 1. , 1. , 0.9150481 , 0.94375361,
1. , 1. , 1. , 1. , 0.91755896,
0.94337573, 1. , 1. ],
[0.8811313 , 0.92283872, 0.92266141, 1. , 1. ,
0.99929289, 0.88201829, 0.92721526, 0.97155348, 1. ,
1. , 0.99923124, 0.8811313 ]
0.91415641, 0.94562806, 0.962134, 0.9601336, 0.82210133,
0.86466306, 0.91451415, 0.94574503],
[1., 1., 1., 0.9150481, 0.94375361,
1., 1., 1., 1., 0.91755896,
0.94337573, 1., 1.],
[0.8811313, 0.92283872, 0.92266141, 1., 1.,
0.99929289, 0.88201829, 0.92721526, 0.97155348, 1.,
1., 0.99923124, 0.8811313]
])
wd = np.linspace(0.0, 360.0, 13)
......@@ -592,4 +591,3 @@ def test_from_pywasp_pwc():
npt.assert_array_equal(site.ds.i.values, i)
npt.assert_array_equal(site.ds.wd.values, wd)
npt.assert_allclose(site.ds.Speedup.values, speedups, rtol=1e-8)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment