Skip to content

HYCOM Grid Optimizations#61

Open
NicholasMarkou wants to merge 15 commits into
xpublish-community:mainfrom
NicholasMarkou:simple-code-optimizations
Open

HYCOM Grid Optimizations#61
NicholasMarkou wants to merge 15 commits into
xpublish-community:mainfrom
NicholasMarkou:simple-code-optimizations

Conversation

@NicholasMarkou
Copy link
Copy Markdown

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