Skip to content

Prepare the time series of input sequences only when necessary #38

@tyralla

Description

@tyralla

The following idea would improve the changes introduced by commit a37364d.

At the moment, methods HydPy.prepare_allseries and HydPy.prepare_inputseries always cause that each relevant InputSequence object prepares its IOSequence.series attribute. This is a waste of resources for those InputSequence objects getting their data "on the fly" via Node objects. Similar holds for methods HydPy.load_allseries and HydPy.load_inputseries.

It seems advisable to prevent this by disabling methods IOSequence.activate_ram, IOSequence.activate_disk, and IOSequence.load_data for IOSequence objects with a True inputflag.

(Eventually, one could introduce a force argument to the three latter methods to overwrite this behaviour. However, I do not see a real use case for this at the moment.)

On the other side, we require a more convenient mechanism to activate and load the data of those Node objects, that supply the data "on the fly" but do not receive it from an upstream model. Maybe we need additional methods like HydPy.prepare_inputnodeseries?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions