Skip to content

Commit 41c28a5

Browse files
Rename pb to go around a weird DaCe behavior with transient swapped as persistent
Removing unsued transient reset after computations is done in stencil (unused)
1 parent b7cb6a9 commit 41c28a5

File tree

1 file changed

+2
-9
lines changed
  • GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist

1 file changed

+2
-9
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/interpolations.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ def vertical_interpolation(
6767
pb = pt
6868

6969
with computation(FORWARD), interval(-1, None):
70-
pt = 0.5 * (log(p_interface_mb * 100) + log(p_interface_mb[0, 0, -1] * 100))
71-
pb = 0.5 * (log(p_interface_mb * 100) + log(p_interface_mb[0, 0, 1] * 100))
70+
pb2: FloatFieldIJ = 0.5 * (log(p_interface_mb * 100) + log(p_interface_mb[0, 0, 1] * 100))
7271
if (
73-
log(target_pressure) > pb
72+
log(target_pressure) > pb2
7473
and log(target_pressure) <= log(p_interface_mb[0, 0, 1] * 100)
7574
and not track_points
7675
):
@@ -80,9 +79,3 @@ def vertical_interpolation(
8079
# ensure every point was actually touched
8180
if track_points == False: # noqa
8281
interpolated_field = field
83-
84-
# reset masks and temporaries for later use
85-
with computation(FORWARD), interval(0, 1):
86-
track_points = False
87-
pb = 0
88-
pt = 0

0 commit comments

Comments
 (0)