Skip to content

Invert index order of SOLPS data arrays or make all arrays as column-major #37

@vsnever

Description

@vsnever

The current index order of SOLPS data arrays: (poloidal, radial, species) make sense only for column-major arrays (Fortran-style or F-style), because the species slice is needed more often than the radial slice and the radial slice is needed more often than the poloidal slice.

In the raw simulation files, the arrays are stored in column-major order, and load_b2f_file() and read_block44() return F-style arrays. But on the MDS server they are stored in row-major order (C-style) and with inverse indexing. When reading from MDS, the index order is inverted but the order is not changed from C-style to F-style.

Thus, to improve the performance we should either change the order from C-style to F-style when reading from MDS and also make sure that all arrays created for operation with the SOLPS data arrays are F-style, or to make all arrays C-style and invert the indexing: (species, radial, poloidal). I like the second option better because C-style arrays are default in numpy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions