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

[WIP] Create quarter administration #360

Merged
merged 17 commits into from
Jun 19, 2024

Conversation

martijn-siemerink
Copy link
Collaborator

No description provided.

@@ -78,7 +78,7 @@ subroutine set_2d_computational_nodes_lines(origin, lgrmin, kmax, mmax, nmax, dx
deallocate(area_mask_padded)
endif
write(*,*) '** INFO: Number of 2D nodes is: ', nod - 1
write(*,*) '** INFO: Number of 2D lines is: ', l_u + l_v
write(*,*) '** INFO: Number of 2D lines is: ', l_u + (l_v - l_u)
Copy link
Contributor

Choose a reason for hiding this comment

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

interesting!

Comment on lines +271 to +281
if (ku==kd) then
quarter_line(get_quarter_idx(nodd, 2), 1) = l - 1 ! This needs to be an index in Python again.
quarter_line(get_quarter_idx(nodd, 4), 1) = l - 1
quarter_line(get_quarter_idx(nodu, 1), 1) = l - 1
quarter_line(get_quarter_idx(nodu, 3), 1) = l - 1
quarter_neighbour(get_quarter_idx(nodd, 2), 1) = nodu - 1
quarter_neighbour(get_quarter_idx(nodd, 4), 1) = nodu - 1
quarter_neighbour(get_quarter_idx(nodu, 1), 1) = nodd - 1
quarter_neighbour(get_quarter_idx(nodu, 3), 1) = nodd - 1
elseif (ku == kd + 1) then
if (nd == 2 * nu - 1) then
Copy link
Contributor

Choose a reason for hiding this comment

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

Some comments here explaining the logic would be nice I think.

Suggested change
if (ku==kd) then
quarter_line(get_quarter_idx(nodd, 2), 1) = l - 1 ! This needs to be an index in Python again.
quarter_line(get_quarter_idx(nodd, 4), 1) = l - 1
quarter_line(get_quarter_idx(nodu, 1), 1) = l - 1
quarter_line(get_quarter_idx(nodu, 3), 1) = l - 1
quarter_neighbour(get_quarter_idx(nodd, 2), 1) = nodu - 1
quarter_neighbour(get_quarter_idx(nodd, 4), 1) = nodu - 1
quarter_neighbour(get_quarter_idx(nodu, 1), 1) = nodd - 1
quarter_neighbour(get_quarter_idx(nodu, 3), 1) = nodd - 1
elseif (ku == kd + 1) then
if (nd == 2 * nu - 1) then
if (ku==kd) then
! ?
quarter_line(get_quarter_idx(nodd, 2), 1) = l - 1 ! This needs to be an index in Python again.
quarter_line(get_quarter_idx(nodd, 4), 1) = l - 1
quarter_line(get_quarter_idx(nodu, 1), 1) = l - 1
quarter_line(get_quarter_idx(nodu, 3), 1) = l - 1
quarter_neighbour(get_quarter_idx(nodd, 2), 1) = nodu - 1
quarter_neighbour(get_quarter_idx(nodd, 4), 1) = nodu - 1
quarter_neighbour(get_quarter_idx(nodu, 1), 1) = nodd - 1
quarter_neighbour(get_quarter_idx(nodu, 3), 1) = nodd - 1
elseif (ku == kd + 1) then
if (nd == 2 * nu - 1) then
! ?

@@ -225,6 +228,7 @@ def make_gridadmin(
progress_callback: Optional[Callable[[float, str], None]] = None,
upgrade: bool = False,
convert_to_geopackage: bool = False,
create_triangulation: bool = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is never used?

Copy link
Contributor

@daanvaningen daanvaningen left a comment

Choose a reason for hiding this comment

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

2 small comments/questions

@martijn-siemerink martijn-siemerink merged commit 9fcf3a9 into master Jun 19, 2024
8 checks passed
@martijn-siemerink martijn-siemerink deleted the martijn-waterlevel-interpolation branch June 19, 2024 09:46
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