Skip to content

Sync some fix from latest PyTelTools commits #52

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lucduron
Copy link
Collaborator

1a32c40: Fix mesh_origin to int + build_params
a719ed1: Change params(8) header nb_el to 0

1a32c40: Fix mesh_origin to int + build_params
a719ed1: Change params(8) header nb_el to 0
@tomsail
Copy link
Contributor

tomsail commented May 28, 2025

Hi @lucduron just change actions/cache@v2 to actions/cache@v3 in /.github/workflows/run_tests.yml
Tests should continue on.

@lucduron
Copy link
Collaborator Author

Hi @tomsail, I included your suggestion to fix the tests in this PR. All tests pass now.

@tomsail
Copy link
Contributor

tomsail commented May 28, 2025

Sorry which PR should I look at now?
I see more changes in the other one

@lucduron
Copy link
Collaborator Author

Hi @tomsail, I pushed 2 additional commits on Serafin.py to synchronize PyTelTools and xarray-selafin.
Both PR should be reviewed, they include both the fix to pass tests.

@@ -120,7 +120,7 @@ class SerafinHeader:
- nb_nodes_per_elem <int>: number of nodes per element (= 3 in 2D and 6 in 3D)
- nb_nodes_2d <int>: number of 2D nodes (equals to `nb_nodes` in 2D)

- mesh_origin <(float, float)>: x and y shift to apply to written coordinates (set by `set_mesh_origin`)
- mesh_origin <(int, int)>: x and y shift to apply to written coordinates (set by `set_mesh_origin`)
- x_stored <numpy.1D-array>: east written coordinates [shape = nb_nodes]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we not specify decimal lat/lon coordinates ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mesh_origin is a tuple of 2 integers in PyTelTools, corresponding to x-coordinate and y-coordinate of the origin of the model.
It is excepted to be integers in the Selafin file format (IPARAM is a vector of 10 integers), see for example:

I do not know if a lat/long is possible, but it has to be an integer, due to the Selafin binary file format.

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