-
Notifications
You must be signed in to change notification settings - Fork 40
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
CATS2008 compute_tidal_elevations.py AttributeError: 'model' object has no attribute 'minor' #320
Comments
PS I see I can comment out line 340 to avoid the error. |
Have you installed pyTMD before? The |
Hi, thanks for getting back. I've only just started to use it pyTMD so not downloaded before. I'm trying to find an alternative to using Matlab to implement a tidal correction. Ideally to work on grid files.
If it's ok to just comment out the minor constituents bit I am happy to go with that.
Dr Suzanne Bevan
Geography Dept
Swansea University
Singleton Park
Swansea SA2 8PP
01792 602375
…________________________________
From: Tyler Sutterley ***@***.***>
Sent: 20 August 2024 15:54
To: tsutterley/pyTMD ***@***.***>
Cc: Suzanne Bevan ***@***.***>; Author ***@***.***>
Subject: Re: [tsutterley/pyTMD] CATS2008 compute_tidal_elevations.py AttributeError: 'model' object has no attribute 'minor' (Issue #320)
You don't often get email from ***@***.*** Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
CAUTION: This email originated from outside of Swansea University. Do not click links or open attachments unless you recognise the sender and know the content is safe.
RHYBUDD: Daeth yr e-bost hwn o'r tu allan i Brifysgol Abertawe. Peidiwch â chlicio ar atodiadau neu agor atodiadau oni bai eich bod chi'n adnabod yr anfonwr a'ch bod yn gwybod bod y cynnwys yn ddiogel.
Have you installed pyTMD before? The minor attribute is super new and only in the "bleeding edge".
—
Reply to this email directly, view it on GitHub<#320 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A7EZUXITXTFCARP6CRGHKJDZSNKBZAVCNFSM6AAAAABMZ3EIN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZGA3DAOJXGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
That works fine. I can't currently recreate this error, but I'll try to track it down. |
if you check the version, what do you get?
|
Sorry for the delay. I have version 2.1.4 |
Ok! Yes, this is likely a version conflict issue (running a newer version of
(no python in the beginning) |
thank you, I will try that tomorrow. A second issue I had was needing to change the default geotiff driver in spatial.py from cog to GTiff. Is it possible to supply this via the call to compute_tidal_elevations.py? |
Sure, I exposed that in #321. Note that now you need to use |
So now I can use GTiff with the git cloned version of compute_tidal_elevations.py, but which still has the model.minor error. OK because I can comment out line 342. One other small issue, somehow pip install pyTMD upgraded numpy to version 2, which then doesn't allow pyTMD to be imported. Sorry for my inexperience with python and github. Thanks for your help. |
No worries! There's definitely a learning curve to python and GitHub. I haven't made a release yet so For now, I think you can install the "bleeding edge" version directly using
This will install the latest version directly from the GitHub repo. |
I created a release (2.1.5) that should simplify your workflows (can now be directly installed with pip for the latest version). |
That works great, thanks Tyler. I admit I'd not had much luck with getting the pre-release version of it. |
Hi tsutterley,
I have been able to successfully use CATS2008 with pyTMD.compute.tide_elevations, but running the compute_tidal_elevations.py gives me the error AttributeError: 'model' object has no attribute 'minor'.
e.g.
python compute_tidal_elevations.py --directory /mnt/raid1/suzanne/ripice --tide CATS2008-v2023 --format geotiff --projection 3031 --type grid in.tif out.tif
I have also tried with CATS2008_V2023
Sorry I'm only a python beginner so may be doing something basic wrong.
Thanks, Suzanne
The text was updated successfully, but these errors were encountered: