Skip to content

[Backlog Item]: Make two modules of wofost72_pp efficient #18

@SarahAlidoost

Description

@SarahAlidoost

After #8, we want to make the computations of Root_Dynamics and Leaf_Dynamics efficient.

Assume the general form of a module is y = f(x, p) where, for a single time step, location, and parameter set, the input x, output y, and parameters p are scalars and their shape is [1].

With vectorization, model can handle multiple locations and multiple parameter sets per time step.

A. Data array organization inside a module (think of a chunk):

The idea is to change the crop model’s data structure so it can work with input arrays of any size, scalars, 1D, 2D, 3D, and so on. Ideally, the model should take in the parameters as ndarrays (or tensors) with the same length and return ndarrays (or tensors) in response.

B. Data array organization inside Engine (think of an xarray with Dask):

Currently engine takes care of slicing data over time steps and passes it to each module. n_timestpes will be added to the input/output of the engine. The computations are time-dependent, and the parallelization (or batch processing) is done on other dimensions. see also #30

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backlog itemA collection of tasksEpic 1Optimizing parameters in Wofost72_PP using pytorch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions