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

Update dataset.py #106

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Update dataset.py #106

merged 2 commits into from
Dec 20, 2023

Conversation

Shiyu-Sandy-Du
Copy link
Contributor

open_dataset can only get coordinates in single precision. Here in this change, the coordinates can be extracted in double precision

Shiyu-Sandy-Du and others added 2 commits December 19, 2023 14:21
open_dataset can only get coordinates in single precision. Here in this change, the coordinates can be extracted in double precision
@ashwinvis
Copy link
Member

@Shiyu-Sandy-Du if your mesh is so fine, then it might be worthwhile to also modify the precision for np.round call. Have you tested it with your data?

@Shiyu-Sandy-Du
Copy link
Contributor Author

@Shiyu-Sandy-Du if your mesh is so fine, then it might be worthwhile to also modify the precision for np.round call. Have you tested it with your data?

Hi! My mesh is a spectral element mesh, so at the interface the coordinates of the points is not exactly the same to the precision of e-16 (it somehow to the error of e-14 in the global coordinates), but it could be avoided by identifying them by single precision and extracting them by double precision (just like what is modified in this PR)

@ashwinvis
Copy link
Member

Ok. I understand. It is unlikely to have super-fine meshes. Let's merge as it is.

@ashwinvis ashwinvis merged commit a7e685f into eX-Mech:main Dec 20, 2023
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants