Skip to content

calc_worker management of multiple variable names #177

@MAKassien

Description

@MAKassien

I was looking into the calc_worker auxiliary function while developing the new calculate_edgar function, and it is failing to handle a from spatRaster where there is more than one variable contained in the layer names. This seems to stem from line 508 where the merging is done by rbind, since different variables will not have a match in column names.
I also tested functionality with multiple levels and multiple times, and found no problems there, just on multiple variables.

Potential solutions to this are:

  1. Edit the binding to allow for the possibility of multiple variable names within the same input SpatRaster
  2. Warn the user that the function only accepts a single variable name per raster. So far this is the mode the function has been used in beethoven because we usually branch the process and calculate steps by variable, so we had not encountered this problem previously.

What do you think would be best, @mitchellmanware, @sigmafelix? I can make any necessary changes once we agree on a solution. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions