-
Notifications
You must be signed in to change notification settings - Fork 44
Towards standalone packages + ColumnFields #815
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
Conversation
Looks great already!! I like it how you tried to reuse some of the field functionality but I guess in the end there's just some duplication we can't avoid or it would be too cumbersome to do. Big question for me is just though how we handle arithmetic operations between a field and a column field, like should |
I fixed the broadcasting issue. Wrt arithmetics: What do we need for the model? I would probably keep this quite minimal now, and just see what we need later. E.g. with multiplication it's also not clear to me immediately how we should define it. One thing I didn't adapt is the interpolation, I think that's just not necessary. But this means, I'll probably have to restrict the interpolation to only accept |
I don't think we need anything for the model because the idea isn't to mix field and column fields but use the latter only after explicit tranposes. We could completely skip the idea of
Yes, I would do that too! |
Having said this, we could check whether another |
Tests are passing now on my laptop, so this is almost ready. I wouldn't add a lot of arithmetics, at least not now. I am just not sure about the exact way to do the I don't have further time today though, I'll look at it again later. |
Did this in f0125f1 I hope I didn't break anything! |
Okay I understand that julia> transpose(transpose([1,2,3]))
3-element Vector{Int64}:
1
2
3
julia> transpose([1,2,3])
1×3 transpose(::Vector{Int64}) with eltype Int64:
1 2 3 but the original size here is somehow stored, see how it says julia> field
24-element, 4-ring OctaminimalGaussianField{Float32, 1} on Array on Main.RingGrids.Architectures.CPU{KernelAbstractions.CPU}
0.0f0
...
0.0f0
julia> transpose(field)
1×24, 4-ring ColumnField{Float32, 2, Matrix{Float32}, OctaminimalGaussianGrid{Main.RingGrids.Architectures.CPU{KernelAbstractions.CPU}, Vector{UnitRange{Int64}}, Vector{Int64}}}
0.0f0 0.0f0 0.0f0 0.0f0 0.0f0 … 0.0f0 0.0f0 0.0f0 0.0f0 0.0f0
julia> transpose(transpose(field))
24×1, 4-ring OctaminimalGaussianField{Float32, 2} on Array on Main.RingGrids.Architectures.CPU{KernelAbstractions.CPU}
0.0f0
...
0.0f0 seee how 24-element transposes to 1x24, transposes to 24x1. Hence we have julia> field == transpose(transpose(field))
false which is consequent but counter intuitive. But it only arises with Field2D which transpose isn't made for anyway, so I'd be happy to just ignore that and note it here. One can always |
Ok... SpeedyInternals is there. So, are we happy with this now? Then, the docs would need to be adjusted to reflect this new structure. Then merge, then register. |
I can do a review later? |
Just checked, I can develop SpeedyWeather and any submodules independently in VS code on this branch with no package or scope issues. Fantastic! |
I revised the readme and the leading paragraph of the docs of the sub-packages. Anything else that we to adjust in the docs? |
Do we want to add a |
Yeah, we could do that. I am also not sure what exactly the registrator even requires for packages within other repos, the manual doesn't even mention that it's possible to register submodules at all. |
Sorry not done yet with the readmes ... |
Ok, I finished the readmes now. |
I think what's still missing for registering the sub packages is a license file in each subfolder. Our current license is including e.g. the copyright notice for the fortran speedy parametrization. I don't want to copy that to every submodule, but we have to keep the MIT licence obviously. Shall we just use a standard MIT licence with |
Or is that the moment where we think about using EUPL? I would like to have some copyleft aspect in our license and even if it's a weak one |
We would need the agreement of all contributors to the submodules though, right? |
Yes, unless you get the consent of all contributors, you need to keep it under the same license. I would recommend keeping MIT on everything in the Speedy monorepo for now. |
Okay happy with that |
Merge now? 😄 |
I think you should do the honors @milankl! |
Ok, I really quickly got the basics, but somehow this broke GPU broadcasting. So I'll have to finish this another time.