Skip to content

Commit

Permalink
Merge pull request #36 from NOAA-GFDL/fix/fix_public_ETA_fn
Browse files Browse the repository at this point in the history
Revert public API changes done in PR34
  • Loading branch information
fmalatino authored Apr 17, 2024
2 parents 6a8b674 + 044155b commit 61c4cbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ndsl/grid/eta.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@ def set_hybrid_pressure_coefficients(
return HybridPressureCoefficients(ks, ptop, ak, bk)


def _vertical_coordinate(eta_value) -> np.ndarray:
def vertical_coordinate(eta_value) -> np.ndarray:
"""
Equation (1) JRMS2006
computes eta_v, the auxiliary variable vertical coordinate
"""
return (eta_value - ETA_0) * math.pi * 0.5


def _compute_eta(ak, bk) -> Tuple[np.ndarray, np.ndarray]:
def compute_eta(ak, bk) -> Tuple[np.ndarray, np.ndarray]:
"""
Equation (1) JRMS2006
eta is the vertical coordinate and eta_v is an auxiliary vertical coordinate
"""
eta = 0.5 * ((ak[:-1] + ak[1:]) / SURFACE_PRESSURE + bk[:-1] + bk[1:])
eta_v = _vertical_coordinate(eta)
eta_v = vertical_coordinate(eta)
return eta, eta_v


def _check_eta(ak, bk):
return _compute_eta(ak, bk)
return compute_eta(ak, bk)

0 comments on commit 61c4cbe

Please sign in to comment.