Oceananigans.jl
Oceananigans.jl copied to clipboard
`BackgroundField` is a confusing name
It's not a Field
. The docstring for the struct admits as much:
https://github.com/CliMA/Oceananigans.jl/blob/7a4b3f04e402be70d45fcb775a4dedef087f3bb0/src/Fields/background_fields.jl#L33-L41
and this temporary struct is always thrown away to build a "real" field:
https://github.com/CliMA/Oceananigans.jl/blob/7a4b3f04e402be70d45fcb775a4dedef087f3bb0/src/Fields/background_fields.jl#L63-L64
The problem is that the name leads to confusing patterns like
https://github.com/CliMA/Oceananigans.jl/blob/7a4b3f04e402be70d45fcb775a4dedef087f3bb0/examples/tilted_bottom_boundary_layer.jl#L98
where B_field
is not a field. Indeed, later on when we need a "real" field we have to write
https://github.com/CliMA/Oceananigans.jl/blob/7a4b3f04e402be70d45fcb775a4dedef087f3bb0/examples/tilted_bottom_boundary_layer.jl#L178
Can we think of a better name? For example BackgroundFieldInfo
is one. That's sorta clumsy though. Maybe we can come up with something more concise and elegant.
cc @tomchor @hdrake @liuchihl because you are using this feature
Maybe just BackgroundFieldDefinition
?
Not bad...