-
Notifications
You must be signed in to change notification settings - Fork 168
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
Added member and time dimension #432
Conversation
Looks good, I just have a few questions, which I will put in line |
pysteps/xarray_helpers.py
Outdated
"zerovalue": metadata["zerovalue"], | ||
"zr_a": metadata["zr_a"], | ||
"zr_b": metadata["zr_b"], | ||
"xpixelsize": xpixelsize, |
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 don't think we need to add the xpixelsize
and ypixelsize
as metadata, since the dataset has an evenly spaced x
and y
dimension. So I added these variables there. You can retrieve them from the dataset by doing dataset.x.attrs.stepsize
and dataset.y.attrs.stepsize
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.
Done
pysteps/xarray_helpers.py
Outdated
"zr_a", | ||
"zr_b", | ||
"cartesian_unit", | ||
"yorigin", |
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 also don't think the yorigin
needs to be kept as attribute any longer (at least not as attribute of the precip var), since at the end of this method we sort the dataset in the x
and y
dimension so the yorigin
will always be lower
.
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.
Done
92977df
to
810f23a
Compare
pysteps/xarray_helpers.py
Outdated
"zerovalue", | ||
"zr_a", | ||
"zr_b", | ||
"cartesian_unit", |
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.
Oh actually one more thing: the cartesian unit is also already present in the attributes of the x and y dimension
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.
Done
810f23a
to
d47bbe3
Compare
Added member and time dimension support into the convert_input_to_xarray_dataset method.