Open bartgol opened 3 years ago
@bartgol still relevant?
Well, I don't know. I do think that some names are somewhat confusing. dimension
vs extent
is probably not an issue, but the rank of a field is somewhat confusing. I don't think I am going to work on this anytime soon though.
The word 'dimension' is ambiguous. Currently, in FieldLayout is used as the "extent" corresponding to each tag. However, the word 'dimension' is useful to identify a "component" of the layout. E.g., if the stored tags are
(Column,Component,VerticalLevel)
, it is natural to refer toComponent
as the second "dimension" of the layout. This difficulty is evident when trying to document a field-related class, especially when documenting features that have to do with the layout and its indices/extents.Kokkos already replaced 'dimension' with 'extent', and doing the same in scream might avoid confusion.
As for the
rank()
method, I'd like to change it toview_rank()
, to stress that it is the rank of the multidimensional array used to store the data, as opposed to the rank of the mathematical field. The latter, could also be exposed via atensor_rank()
method. And finally, we could havespace_dimension()
to specify the number of geometric dimensions of the space where the field is defined. E.g., say we have a layout with (short) tags(COL, VAR, CMP, VL)
. This is a 2d field (the VAR dimension and the CMP dimension), defined in 3d (2d from the COL tag, and 1d from the VL tag), and will be stored as a 4d view. Sotensor_rank()=2
,space_dimension()=3
, andview_rank()=4
.