Skip to content

add functions to get total input/output volumes and delta storage per model #97

Description

@DirkEilander

The total input/output volume functions are implemented for PCR and CMF yielding good results, see reference to old post below. We should try to extent this to other models and add a "delta storage" or "storage state" function.


we should should try to implement a "_get_tot_volume_out" and "_get_tot_volume_in" function for each mode (so far PCR and CMF). For instance for CMF the functions are given below. We could implement similar function to get the change in storage. But, if we assume the change in storage is neglectable over long periods we can get the approximate mass balance per model. To get the volume of water leaving the CMF outside the LFP/DFM domain we simply can substract the volume exchanged from the CMF model from the total outlfow.

def _get_tot_volume_in(self):
    # runoff in [m3/s]
    Rin = np.nansum(self.get_value('runoff')) * self._dt.total_seconds()
    return Rin

def _get_tot_volume_out(self):
    # get outlfow at pits
    Qout = np.nansum(self.get_value_at_indices('outflw', self.grid.pits)) * self._dt.total_seconds()
    return Qout

I'm doing some test runs and will update later ...

Originally posted by @DirkEilander in #92 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions