Skip to content

Commit 6d31636

Browse files
committed
including calc_rmax in utils to be used with sco class
1 parent 4fb1bdd commit 6d31636

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pydomcfg/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import xarray as xr
99
from xarray import DataArray, Dataset
1010

11+
1112
# -----------------------------------------------------------------------------
1213
def is_nemo_none(var: Optional[float] = None) -> bool:
1314
"""
@@ -25,11 +26,12 @@ def is_nemo_none(var: Optional[float] = None) -> bool:
2526
"""
2627
return var in [None, 999999.0]
2728

29+
2830
# -----------------------------------------------------------------------------
2931
def calc_rmax(depth: DataArray) -> DataArray:
3032
"""
3133
Calculate rmax: measure of steepness
32-
This function returns the maximum slope paramater
34+
This function returns the maximum slope paramater
3335
3436
rmax = abs(Hb - Ha) / (Ha + Hb)
3537
@@ -68,6 +70,7 @@ def calc_rmax(depth: DataArray) -> DataArray:
6870

6971
return np.maximum(*both_rmax)
7072

73+
7174
# -----------------------------------------------------------------------------
7275
def generate_cartesian_grid(
7376
ppe1_m,

0 commit comments

Comments
 (0)