-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor stacked climate dataset #103
Conversation
To Do:
|
09beb4a
to
c278d11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 50-50 on this, so you could convince me either way, but why does name
need to be a parameter for ClimateDatasetArgs
. For example, if I use ERA5Args
, it just makes sense that the name is "era5"
. A compromise solution could be that the default name
is "era5"
, but we still allow the user to specify a different name.
Otherwise, good PR.
Why |
Issues fixed by this PR:
StackedClimateDataset
is hard coded to work forDownscaling
only because it has a different return signature than theERA5
andClimateDataset
. Specifically,Downscaling
assumes that theraw_data
it would receive would be a list with 2 items, one forinput
and other foroutput
. Thus limiting us with a single dataset for input and single dataset for output.data/
folder were all absolute imports.Forecasting
'screate_copy()
allows illegal values for some of it's attributesSolution implemented:
ClimateDataset
has a new attribute calledname
. Thus, all variables are indexed byf"{dataset_name}:{variable}"
.StackedClimateDataset
now allows recursively stacking arbitraryClimateDataset
's while keeping the same return signature. Specifically, if it has two child datasets named"child1"
and"child2"
and it's own name is"parent"
, now the name of the children are changed to"parent:child1"
and"parent:child2"
.in_vars
,out_vars
, andconstants
of theTask
should have the dataset name followed by a colon followed by the variable name. Example:["2m_temperature", "geopotential"]
to["era5:2m_temperature", "era5:geopotential"]
.data/
folder to follow relative paths.create_copy()
forForecasting
.