Skip to content

Commit

Permalink
Merge pull request #18 from Climdyn/bugfix/symbolic_IP_aspect_ratio_i…
Browse files Browse the repository at this point in the history
…ssue

Bugfix for aspect ratio in symbolic IP issue
  • Loading branch information
jodemaey authored Mar 16, 2023
2 parents e939182 + 9d1095f commit c372ba3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- numba
- numpy
- scipy
- sympy=1.8
- sympy
- sphinx
- sphinx_rtd_theme
- pytest
Expand Down
9 changes: 6 additions & 3 deletions qgs/inner_products/symbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@
from qgs.inner_products.definition import StandardSymbolicInnerProductDefinition
from sympy import lambdify
from scipy.integrate import dblquad
from sympy import symbols

# TODO: - Add warnings if trying to connect analytic and symbolic inner products together

_n = symbols('n', real=True, nonnegative=True)


class AtmosphericSymbolicInnerProducts(AtmosphericInnerProducts):
"""Class which contains all the atmospheric inner products coefficients needed for the tendencies
Expand Down Expand Up @@ -170,7 +173,7 @@ def __init__(self, params=None, stored=True, inner_product_definition=None, inte
self.ground_basis = None
self.connected_to_ground = False

self.subs = [('n', self.n)]
self.subs = [(_n, self.n)]

if inner_product_definition is None:
self.ip = StandardSymbolicInnerProductDefinition()
Expand Down Expand Up @@ -694,7 +697,7 @@ def __init__(self, params=None, stored=True, inner_product_definition=None, inte
self.atmospheric_basis = None
self.connected_to_atmosphere = False

self.subs = [('n', self.n)]
self.subs = [(_n, self.n)]

if inner_product_definition is None:
self.ip = StandardSymbolicInnerProductDefinition()
Expand Down Expand Up @@ -1083,7 +1086,7 @@ def __init__(self, params=None, stored=True, inner_product_definition=None, inte
self.atmospheric_basis = None
self.connected_to_atmosphere = False

self.subs = [('n', self.n)]
self.subs = [(_n, self.n)]

if inner_product_definition is None:
self.ip = StandardSymbolicInnerProductDefinition()
Expand Down

0 comments on commit c372ba3

Please sign in to comment.