Consider removing `BASE_SURFACE` from `SURFACE` keyword
- Dominant language
- Python
- Stars
- 161
- Forks
- 140
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 138
Description
As far as I can tell, `BASE_SURFACE` is only used to fetch the dimensions when creating a `SurfaceConfig`.
It can lead to subtle bugs that give error messages that are difficult to understand:
`cannot reshape array of size 6 into shape (3,3)`
To get an error such as this, change `ncol` of `base_surface` to `3` in `test_surface_param_update` and change the name of the `BASE_SURFACE` file to `surf_base.irap`.
This leads to a mismatch in dimensions between base surface and the surfaces of each realization.
Perhaps we could delay adding dimensions to `SurfaceConfig` until surfaces are available and not rely on base surface at all.
Contributor guide
Research direction
Start with test_surface_param_update and reproduce the reported dimension mismatch by changing base_surface.ncol and renaming the BASE_SURFACE file. Trace how BASE_SURFACE supplies dimensions while SurfaceConfig is created. Done means the configuration no longer depends on BASE_SURFACE dimensions and the mismatch produces a clear, covered outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100