Comments (3)
In line 384 of read_tide_model.py, there is a missing [:] after v1.data causing the error:
AttributeError: can't set attribute
v1.data = bilinear_interp(xi,yv,v,x,y,dtype=np.complex128)
proposed fix:
adding the [:], this also matches the syntax used in line 324 for u1.data
from pytmd.
I would want to add in read_tide_model.py there's also this issue of len(npts) being used incorrectly. The fix would be changing npts = len(D) to npts = D.shape , and adding an asterisk (*) to before the npts used in the assignment of placeholder matrices. i.e.
np.ma.zeros((*npts,nc)....) and np.ma.zeros((*npts),...)
below to use the starred expression.
Thanks for the package but I had a hard time figuring this out …
from pytmd.
Hi @tommy307507, sorry I'm out of town so I'm a little slow on responses.
These are good points. I typically flatten the input fields so I don't run into the shape issues. It's a good point that I should add some logic for different shaped fields for people not using the "higher order" programs for computing heights or currents. I should also update the documentation so that people don't run into the problems you've noted.
I'll definitely fix the attribute error as soon as I get back in the office. Or if you want to put a PR in to fix it that would be great too.
from pytmd.
Related Issues (20)
- AtributeError running compute_tidal_currents.py HOT 2
- Getting tons of DeprecationWarning upon import HOT 6
- `scipy` v1.10.0 fails for `RegularGridInterpolator`
- compute_tidal_elevations.py --type=grid fails with shape mismatch HOT 1
- Suggestion: show tidal models in help HOT 2
- pyTMD without Jupyter HOT 2
- Getting-Started.rst old link to Arc2kmTM HOT 1
- Netcdf time needs to be double HOT 1
- Definition File for HAMTIDE constituents HOT 3
- Allow Glob patterns when specifying the model files in definition files HOT 8
- pyTMD.io.model not working for current with FES2014 HOT 3
- How to get a datum and a datum value? HOT 2
- setting directory and model HOT 17
- FES2012 support? HOT 4
- FileNotFoundError HOT 1
- Interpolation `METHOD="spline"` fails for TPXO8 HOT 8
- Issue with Iterating Over Model Files in pyTMD.io.ATLAS.extract_constants() HOT 2
- NameError: name 'ipyleaflet' is not defined HOT 1
- module 'pyTMD' has no attribute 'compute' HOT 2
- pyTMD.compute.tide_currents needing both u_* and v_* rather than only u_* HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytmd.