You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include a detailed description of the bug or suggestion
Output of intake_esm.show_versions()
Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report:
Bug reports that follow these guidelines are easier to diagnose,
and so are often handled much more quickly.
Description
If the Derived Variable Registry (DVR) includes a derived variable (dv2) that also happens to be a dependent for another derived variable (dv2), this var (dv2) gets included when the catalog search needs the second (dv1). Lets show an example:
See how we provide a computation for FOO that requires FLNS and FLUT and also a computation for FLNS given FOO and FLUT. This makes a lot of sense and the goal here could be to fill missing variable that are not the same across datasets.
However, the current search method will first check for variable directly in the catalog, then parse the DVR to find if depends exist. In our case here, FOO is not available but FLNS and FLUT are. The problem resides in the subset of the DVR at the end of search method because FLNS and FLUT were appended to the variables list and thus the dependent variable for FLNS gets included in the final registry, even though it is not needed.
My suggestion would be to refactor (again) the derived variable search as to only include the dependent variable that did return results.
I can push a PR soon.
Version information: output of intake_esm.show_versions()
Paste the output of intake_esm.show_versions() here:
Here's a quick checklist in what to include:
Include a detailed description of the bug or suggestion
Output of
intake_esm.show_versions()
Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report:
Minimal Complete Verifiable Examples
Craft Minimal Bug Reports
Bug reports that follow these guidelines are easier to diagnose,
and so are often handled much more quickly.
Description
If the Derived Variable Registry (DVR) includes a derived variable (dv2) that also happens to be a dependent for another derived variable (dv2), this var (dv2) gets included when the catalog search needs the second (dv1). Lets show an example:
See how we provide a computation for
FOO
that requiresFLNS
andFLUT
and also a computation forFLNS
givenFOO
andFLUT
. This makes a lot of sense and the goal here could be to fill missing variable that are not the same across datasets.However, the current
search
method will first check for variable directly in the catalog, then parse the DVR to find if depends exist. In our case here,FOO
is not available butFLNS
andFLUT
are. The problem resides in the subset of the DVR at the end ofsearch
method becauseFLNS
andFLUT
were appended to thevariables
list and thus the dependent variable forFLNS
gets included in the final registry, even though it is not needed.My suggestion would be to refactor (again) the derived variable search as to only include the dependent variable that did return results.
I can push a PR soon.
Version information: output of
intake_esm.show_versions()
Paste the output of
intake_esm.show_versions()
here:The text was updated successfully, but these errors were encountered: