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
Is your feature request related to a problem? Please describe.
When using the catalog with a derived variable registry and calling to_dataset_dict, all variables that were needed for the derived variable computation are in the final datasets, even if they were not requested directly.
Describe the solution you'd like
In the following imaginary example, say we have datasets for tasmin, tasmax and pr and a function for tas = func(tasmin, tasmax) in the DVR.
I would expect the ouput dataset to only include tas and pr, but with the current intake-esm tasmin and tasmax are also returned.
Describe alternatives you've considered
Wrapping it myself. Remembering what I wanted in a list and dropping the rest.
Instead of passing _requested_variables to the ESMDataSource objects, perform that subset in to_dataset_dict directly, after the derived variables have been created.
Add an aditionnal _needed_variables that would store a list of variables including dependencies, while _requested_variables would not list dependencies. And a subset would be performed by to_dataset_dict after the derived variable creation.
The text was updated successfully, but these errors were encountered:
There is already a dependents variable created during the search() function, but it gets merged into _requested_variables and the information is lost afterwards.
Would it be a realistic solution to decouple _dependent_variables and _requested_variables, using both when necessary to open the datasets and extract data, and then only keep the _requested_variables for the final output?
Is your feature request related to a problem? Please describe.
When using the catalog with a derived variable registry and calling
to_dataset_dict
, all variables that were needed for the derived variable computation are in the final datasets, even if they were not requested directly.Describe the solution you'd like
In the following imaginary example, say we have datasets for
tasmin
,tasmax
andpr
and a function fortas = func(tasmin, tasmax)
in the DVR.I would expect the ouput dataset to only include
tas
andpr
, but with the current intake-esmtasmin
andtasmax
are also returned.Describe alternatives you've considered
_requested_variables
to theESMDataSource
objects, perform that subset into_dataset_dict
directly, after the derived variables have been created._needed_variables
that would store a list of variables including dependencies, while_requested_variables
would not list dependencies. And a subset would be performed byto_dataset_dict
after the derived variable creation.The text was updated successfully, but these errors were encountered: