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

Splitting ice_grid module up #988

Open
anton-seaice opened this issue Oct 24, 2024 · 0 comments
Open

Splitting ice_grid module up #988

anton-seaice opened this issue Oct 24, 2024 · 0 comments

Comments

@anton-seaice
Copy link
Contributor

The current ice_grid module is unwieldy and the file is >4000 lines.

There is lots of discussion about possible ways to split this up here

We decided it was not worth it to try and split the ice_grid module without changing the interfaces to/from it. The best approach seemed to be keep the current ice_grid module, and that would contain the public grid data, and then move all methods out into a group of other modules. Each different grid load method (e.g. gridbox, popgrid, rectgrid) could then access the public data.

This approach is summarised here:

Another idea would be to keep the data in module ice_grid and have that be the "data" module. Then we could move the current public methods into a separate module called something like ice_grid_methods. Then the use statement only has to change for CICE subroutines that use the methods, not the data. We could then add some middle layers called something like ice_grid_popgrid, ice_grid_momgrid, ice_grid_othergrids and also some infrastructure files like ice_grid_bathy and ice_grid_average if that would work. Personally, I'm not convinced this is the way to go overall. I'm not that troubled by the ice_grid file as it stands and I worry that if things get split apart, we add some risk that a change in one file for one grid breaks another grid implementation. If it's all in one file, we sort of force it to be "one".

The obvious candidates for new modules are the bathymetry - see #987 and the grid average / neighbour routines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants