-
Notifications
You must be signed in to change notification settings - Fork 18
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
QGDataset does not support data input with even number of latitude gridpoints #85
Comments
Did you already implement a fix for this issue? https://github.com/csyhuang/hn2016_falwa/blob/master/hn2016_falwa/xarrayinterface.py#L299 looks like it does the trick and We could alternatively keep all the logic in |
It looks like I am going to rewrite/reorganize the dimension, shape and metadata generation of the xarrayinterface with the implementation of a dask-aware |
@chpolste Thanks for taking care of this! I am thinking if this would be a better solution: rename @property
def ylat(self):
return self._ylat_input Since all the computed field will be interpolated onto Besides that, there is another procedure in # Call interpolate_fields on all QGField objects
out_fields = _map_collect(
lambda field: field.interpolate_fields(),
self._fields,
["qgpv", "interpolated_u", "interpolated_v", "interpolated_theta", "static_stability"],
postprocess=np.asarray
) Is it possible to get directly from each In the near future, I want to eliminate the returning of processed arguments in the 3 public methods of Let me know what you think is pragmatic in the given time frame. If that's too much to change, we can do the second part in another release. 😃 Thanks a lot! |
@chpolste For the suggested changes I mentioned above (use The unit tests all pass so it should be working properly. If you think the changes look OK, you can start from there when working on Let me know what you think 😃 Thanks for taking care of this! |
Perfect, thanks!
Sounds good. Branch xr-delayed up to a26b150 implements this, with |
@chpolste : 👍 Awesome! I finally got a chance to test the code with MDTF calculations! Your updated version of |
Christopher has addressed this issue in commits up to a26b150 so this can be closed |
When climate data with even number of latitudinal gridpoints is input to
QGFieldBase
, the following will occur inside the class:hn2016_falwa/hn2016_falwa/oopinterface.py
Lines 286 to 292 in 9acd810
When returning the computation results to the user, the computed fields are interpolated back to the original grid (
self.ylat_no_equator
).Right now, this behavior is not mirrored in
QGDataset
, which causes an inconsistency in results output when input data has even number of latitude gridpoints.TODO: Modify
QGDataset.interpolate_fields
to handle this scenario.The text was updated successfully, but these errors were encountered: