Commit 060f15ca authored by Pierre Augier's avatar Pierre Augier
Browse files

spatiotemporal: support equation='omega=N/2'

parent 8490413638fd
Pipeline #22428 passed with stage
in 16 minutes and 34 seconds
......@@ -939,7 +939,11 @@ class SpatioTemporalSpectraNS:
equation = f"ikz={ikz}"
if equation.startswith("omega="):
omega = eval(equation[len("omega=") :])
try:
variables = dict(N=self.sim.params.N)
except AttributeError:
variables = dict()
omega = eval(equation[len("omega=") :], variables)
omegas = spectra_kzkhomega["omegas"]
iomega = abs(omegas - omega).argmin()
spect = spectra_kzkhomega[key_spect][:, :, iomega]
......
......@@ -337,7 +337,7 @@ class TestForcingOutput(TestSimulBase):
sim2.output.spatiotemporal_spectra.plot_kzkhomega(key_field="ux")
sim2.output.spatiotemporal_spectra.plot_kzkhomega(
key_field="ux", equation="omega=1"
key_field="ux", equation="omega=N/2"
)
sim2.output.spatiotemporal_spectra.plot_kzkhomega(
key_field="ux", equation="kh=1"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment