Skip to content

Make routine for reading of Xcompact files faster #3

@joneuhauser

Description

@joneuhauser

Reading a restart file takes ~50s on my system, which is the main bottleneck of the FTLE computation. (Compared to this, reading the file in Numpy takes about 2 seconds).
The relevant code:

diskfield=OPEN(field_name)
WITH diskfield:
LOOP FOR iV=0 TO 2 AND iz=0 TO nzd-1
ARRAY(0..ny, 0..nxd-1) OF REAL buf = fieldimage(iV,iz,*,*);
DO V(ix,iz,iy,iV) = buf(iy,ix) FOR iy=0 TO ny AND ix=0 TO nxd-1
REPEAT
CLOSE diskfield

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions