Skip to content

Backwards-compatible collect function #9

Description

@TomNicholas

xBOUT should contain a new collect() function whose purpose is to maintain backwards compatibility with the old collect().

These would make it easier to phase out usage of the old collect.

It should have the same signature, so needs to return a numpy array. Would look something like

def collect(var, path, prefix='BOUT.dmp', info=True):
    datapath = path + prefix + '*.nc' 
    ds = open_boutdataset(datapath=datapath, info=info)
    return ds[var].values

There is no way that it would be able to print out the same info, but it might be able to throw some of the same errors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingInvolves writing or running unit, integrated, or regression tests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions