Skip to content

Push derived variables beyond user interface #268

@darothen

Description

@darothen

In the demonstration AR analysis script, we have to provide the following lines when we initializing an evaluation:

hres_forecast = inputs.ZarrForecast(
    source="gs://weatherbench2/datasets/hres/2016-2022-0012-1440x721.zarr",
    name="HRES",
    variables=[
        derived.AtmosphericRiverVariables(
            output_variables=["atmospheric_river_land_intersection"]
        )
    ],
    variable_mapping=inputs.HRES_metadata_variable_mapping,
)

Notably, we have to explicitly tell EWB that we want to derive a variable ("atmospheric_river_land_intersection"). But there is no way to know this a priori. Furthermore, we don't provide any specification to EWB to tell it how to compute this variable, beyond assuming that it will capture any naming harmonization with the "variable_mapping" argument.

The design here should be re-factored to push this sort of derived variable down the stack. It's a consequence of the event types of the cases we provide - not of the input dataset itself - and should logically be handled by that area of the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions