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

HYCOM Grid Optimizations #61

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

Conversation

NicholasMarkou
Copy link

This PR contains two changes:

New method of dropping longitude >500 in HYCOM Grid

Instead of running mask() in the project function of HYCOMGrid, we drop the last row of the DataArray, where all junk data is contained da = da[0:, :-1, ]. Notably, this must be ran before time is selected, otherwise the junk data is no longer in the last row of the DataArray. As a result, it was required to move this inside the get_map() function.

Optimization of HYCOM Grid projection

In the project() function of HYCOMGrid, there was redundant code which increased the runtime of the function. This change reduces the number of computed masks by one and reuses it when splitting the DataArray into two. Additionally, temp_da_0 and temp_da_1 were removed as there was no need to recreate the DataArray before concatenating them together.

@NicholasMarkou NicholasMarkou marked this pull request as ready for review February 23, 2024 21:13
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.

1 participant