Question concerning the function input #79
Unanswered
kadir-orhan
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @kadir-orhan, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to run the function below to predict water levels on model grid points for generating an initial conditions file:
predict_tide(t, hc, constituents, DELTAT=0.0, CORRECTIONS='OTIS')
Although it is a straightforward function, I'm struggling to provide the input parameters in the right format, and I couldn't find a relevant example or explanation in the documentation. Can you please explain a bit more in detail how to define "hc" harmonic constant vector and "constituents" tidal constituent IDs?
Edit:
I have also tried "compute_tide_corrections" function, thinking it could be more suitable.
wl_ini[ii,jj] = tmd.compute_tide_corrections(model['X'][ii,jj], model['Y'][ii,jj], delta_time,
DIRECTORY = 'c:\Users\user01\Scripts_Python', MODEL = 'TPXO9-atlas-v4',
EPSG = 4326, EPOCH = (2000,1,1,0,0,0), TYPE = 'grid', TIME = 'UTC',
METHOD = 'spline', EXTRAPOLATE = False, FILL_VALUE = np.nan)
This is the line I have tried to run. "wl_ini[ii,jj]" is the tidal water level I am trying to predict. "model['X'][ii,jj]" is a single longitude (106.55), "model['Y'][ii,jj]" is a single latitude (-5.45), delta_time is the seconds since EPOCH (675993600) and the rest of the arguments are defined based on the documentation. But somehow it doesn't work. The error I am getting is:
cannot reshape array of size 175089971 into shape (1853423616,2)
Do you have any idea what am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions