Skip to content

Commit

Permalink
fixing 64-bit option in sqgturb
Browse files Browse the repository at this point in the history
  • Loading branch information
StevePny committed May 25, 2024
1 parent a1c3c21 commit 545db67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dabench/data/sqgturb.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@
import jax
import jax.numpy as jnp
from jax.numpy.fft import rfft2, irfft2
from jax import config
from functools import partial
from importlib import resources

from dabench.data import _data
from dabench import _suppl_data

# Set to enable 64bit floats in Jax
config.update('jax_enable_x64', True)
# Following:
# https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#double-64bit-precision
import os
os.environ["JAX_ENABLE_X64"] = 'True'


class SQGTurb(_data.Data):
Expand Down

0 comments on commit 545db67

Please sign in to comment.