Commit df6526ca authored by Pierre Augier's avatar Pierre Augier
Browse files

Try to fix no_vz_kz0 option

parent a7f967c7c78e
Pipeline #20602 passed with stage
in 15 minutes and 56 seconds
......@@ -199,9 +199,6 @@ class Simul(SimulNS3D):
oper.project_perpk3d(fx_fft, fy_fft, fz_fft)
if self.no_vz_kz0:
dealiasing_variable(fz_fft, self.where_kz_0)
if state_spect is None:
b = self.state.state_phys.get_var("b")
......@@ -211,6 +208,10 @@ class Simul(SimulNS3D):
div_vb_fft = oper.div_vb_fft_from_vb(vx, vy, vz, b)
fb_fft = compute_fb_fft(div_vb_fft, self.params.N, vz_fft)
if self.no_vz_kz0:
dealiasing_variable(fz_fft, self.where_kz_0)
dealiasing_variable(fb_fft, self.where_kz_0)
tendencies_fft.set_var("b_fft", fb_fft)
if self.is_forcing_enabled:
......@@ -19,6 +19,11 @@ class TimeSteppingPseudoSpectralNS3D(TimeSteppingPseudoSpectral):
self.sim.oper.project_perpk3d(vx_fft, vy_fft, vz_fft)
if self.sim.no_vz_kz0:
dealiasing_variable(vz_fft, self.sim.where_kz_0)
if "b_fft" in state_spect.keys:
state_spect.get_var("b_fft"), self.sim.where_kz_0
# np.isnan(np.sum seems to be really fast
if np.isnan(np.sum(state_spect[0])):
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