Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors running prediction example with real fes2022b database #39

Open
diegoiglesias opened this issue Jan 7, 2025 · 1 comment
Open

Comments

@diegoiglesias
Copy link

diegoiglesias commented Jan 7, 2025

Describe the bug
When I run ex_prediction.py with the real fes2022b database downloaded from aviso, it takes forever, and then I get the following errors:

`{'tide': {'tide': <pyfes.core.tidal_model.CartesianComplex64 object at 0x104bb3bb0>}, 'radial': {'radial': <pyfes.core.tidal_model.CartesianComplex64 object at 0x107196e70>}}
/usr/local/Caskroom/miniforge/base/envs/venv/lib/python3.12/site-packages/pyfes/leap_seconds.py:119: UserWarning: Leap second file leap-seconds.txt has expired. Downloading a new version.
warnings.warn(
Traceback (most recent call last):
File "/Users/**/aviso-fes/examples/ex_prediction.py", line 77, in
tide, lp, _ = pyfes.evaluate_tide(handlers['tide'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Caskroom/miniforge/base/envs/venv/lib/python3.12/site-packages/pyfes/init.py", line 124, in evaluate_tide
return core.evaluate_tide(
^^^^^^^^^^^^^^^^^^^
TypeError: evaluate_tide(): incompatible function arguments. The following argument types are supported:
1. (tidal_model: pyfes.core.AbstractTidalModelComplex128, date: numpy.ndarray, leap_seconds: numpy.ndarray[numpy.uint16[m, 1]], longitude: numpy.ndarray[numpy.float64[m, 1]], latitude: numpy.ndarray[numpy.float64[m, 1]], settings: Optional[pyfes.core.Settings] = None, num_threads: int = 0) -> tuple[numpy.ndarray[numpy.float64[m, 1]], numpy.ndarray[numpy.float64[m, 1]], numpy.ndarray[numpy.uint8[m, 1]]]
2. (tidal_model: pyfes.core.AbstractTidalModelComplex64, date: numpy.ndarray, leap_seconds: numpy.ndarray[numpy.uint16[m, 1]], longitude: numpy.ndarray[numpy.float64[m, 1]], latitude: numpy.ndarray[numpy.float64[m, 1]], settings: Optional[pyfes.core.Settings] = None, num_threads: int = 0) -> tuple[numpy.ndarray[numpy.float64[m, 1]], numpy.ndarray[numpy.float64[m, 1]], numpy.ndarray[numpy.uint8[m, 1]]]

Invoked with: {'tide': <pyfes.core.tidal_model.CartesianComplex64 object at 0x104bb3bb0>}, array(['1983-01-01T00:00:00', '1983-01-01T01:00:00',
'1983-01-01T02:00:00', '1983-01-01T03:00:00',
'1983-01-01T04:00:00', '1983-01-01T05:00:00',
'1983-01-01T06:00:00', '1983-01-01T07:00:00',
'1983-01-01T08:00:00', '1983-01-01T09:00:00',
'1983-01-01T10:00:00', '1983-01-01T11:00:00',
'1983-01-01T12:00:00', '1983-01-01T13:00:00',
'1983-01-01T14:00:00', '1983-01-01T15:00:00',
'1983-01-01T16:00:00', '1983-01-01T17:00:00',
'1983-01-01T18:00:00', '1983-01-01T19:00:00',
'1983-01-01T20:00:00', '1983-01-01T21:00:00',
'1983-01-01T22:00:00', '1983-01-01T23:00:00'],
dtype='datetime64[s]'), array([21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21], dtype=uint16), array([-7.688, -7.688, -7.688, -7.688, -7.688, -7.688, -7.688, -7.688,
-7.688, -7.688, -7.688, -7.688, -7.688, -7.688, -7.688, -7.688,
-7.688, -7.688, -7.688, -7.688, -7.688, -7.688, -7.688, -7.688]), array([59.195, 59.195, 59.195, 59.195, 59.195, 59.195, 59.195, 59.195,
59.195, 59.195, 59.195, 59.195, 59.195, 59.195, 59.195, 59.195,
59.195, 59.195, 59.195, 59.195, 59.195, 59.195, 59.195, 59.195]), None, 1`

pyfes/Numpy/Python version information
print(pyfes.version)
2024.11.1
print(numpy.version)
2.2.1
print(sys.version)
3.12.7 | packaged by conda-forge | (main, Oct 4 2024, 15:55:29) [Clang 17.0.6 ]

I'm using a Macbook Pro 2,5 GHz Dual-Core Intel Core i7

@fbriol
Copy link
Collaborator

fbriol commented Jan 19, 2025

Can you please provide a minimum example to reproduce your error? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants