Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
CB-Lim authored Apr 9, 2024
1 parent 4925f2d commit 67cbde0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
Binary file modified data/config.nc
Binary file not shown.
7 changes: 2 additions & 5 deletions src/IHSetDean/IHSetDean.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ def __init__(self, path):
cfg = xr.open_dataset(path+'config.nc')
ens = xr.open_dataset(path+'ens.nc')

self.Ymin = cfg['Ymin'].values
self.Ymax = cfg['Ymax'].values
self.Dmin = cfg['Dmin'].values
self.Dmax = cfg['Dmax'].values
self.dY = cfg['dy'].values
self.D50 = ens['D50'].values
self.dp = ens['d'].values
self.zp = ens['z'].values
Expand All @@ -44,10 +41,10 @@ def calibrate(self):
Y = np.log(-zp)
Y2 = 2 / 3 * np.log(dp)

fc = np.arange(self.Ymin, self.Ymax, self.dY)
fc = np.arange(-20, 20, 0.0001)
Y2_grid, fc_grid = np.meshgrid(Y2, fc, indexing="ij")
Y2t = fc_grid + Y2_grid

def RMSEq(Y, Y2t):
return np.sqrt(np.mean((Y - Y2t) ** 2, axis=0))

Expand Down
Binary file modified src/IHSetDean/__pycache__/IHSetDean.cpython-312.pyc
Binary file not shown.
Binary file not shown.
7 changes: 2 additions & 5 deletions src/IHSetDean/tests/test_dean.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
import os
import matplotlib.pyplot as plt

config = xr.Dataset(coords={'dy': 0.001, # Calibrate
'Ymin': -20, # Calibrate the minimum initial distance value
'Ymax': 20, # Calibrate the maximum initial distance value
'Dmin': 0, # Calibrate the minimum observed distnace value
'Dmax': 20, # Calibrate the maximum observed distance value
config = xr.Dataset(coords={'Dmin': 0, # Calibrate the minimum observed distnace value
'Dmax': 25, # Calibrate the maximum observed distance value
})

wrkDir = os.getcwd()
Expand Down

0 comments on commit 67cbde0

Please sign in to comment.