Skip to content

Commit

Permalink
Use ndsl.constants.SECONDS_PER_DAY
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianDeconinck committed Dec 2, 2024
1 parent 4c8403a commit bad27a8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pyFV3/stencils/ray_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@

import ndsl.constants as constants
from ndsl import StencilFactory, orchestrate
from ndsl.constants import X_INTERFACE_DIM, Y_INTERFACE_DIM, Z_DIM
from ndsl.constants import SECONDS_PER_DAY, X_INTERFACE_DIM, Y_INTERFACE_DIM, Z_DIM
from ndsl.dsl.typing import Float, FloatField, FloatFieldK


SDAY = Float(86400.0)


# NOTE: The fortran version of this computes rf in the first timestep only. Then
# rf_initialized let's you know you can skip it. Here we calculate it every
# time.
Expand Down Expand Up @@ -77,7 +74,7 @@ def ray_fast_wind_compute(
if pfull < rf_cutoff:
# rf is rayleigh damping increment, fraction of vertical velocity
# left after doing rayleigh damping (w -> w * rf)
rf = compute_rff_vals(pfull, dt, rf_cutoff, tau * SDAY, ptop)
rf = compute_rff_vals(pfull, dt, rf_cutoff, tau * SECONDS_PER_DAY, ptop)
with computation(FORWARD):
with interval(0, 1):
if pfull < rf_cutoff_nudge:
Expand Down

0 comments on commit bad27a8

Please sign in to comment.