Closed bekozi closed 8 years ago
@nilshempelmann do you want to test the wrapping option before merging? I think it would be a good idea. You can find the code in the https://github.com/NCPP/ocgis/tree/i419-wrap-option branch. The documentation for the new spatial_wrapping
operations parameter is here: https://github.com/NCPP/ocgis/blob/i419-wrap-option/doc/api.rst#spatial_wrapping.
Let me know if you have any questions!
latitude looks fine, but seems there is still a problem with the longitude:
bbox = [-20,-20,20,20]
Also the the longitude output is:
[ 0. 1.875 3.75 5.625 7.5 9.375 11.25 13.125
while cdo stores only the required values as well in a other (preferable?) order:
[-78.75 -76.875 -75. -73.125 -71.25 -69.375 -67.5 -65.625 -63.75 -61.875 -60. -58.125 -56.25 -54.375 -52.5 -50.625 -48.75 -46.875 -45. -43.125 -41.25 -39.375 -37.5 -35.625 -33.75 -31.875 -30. -28.125 -26.25 -24.375 -22.5 -20.625 -18.75 -16.875 -15. -13.125 -11.25 -9.375 -7.5 -5.625 -3.75 -1.875 0. 1.875 3.75 5.625 7.5 9.375 11.25 13.125 15. 16.875 18.75 20.625 22.5 24.375 26.25 28.125 30. 31.875 33.75 35.625 37.5 39.375 41.25 43.125 45. 46.875 48.75 ]
here is an example: https://github.com/bird-house/flyingpigeon/blob/master/notebooks/ocgis_wrap.ipynb
Le 03/06/2016 à 00:28, Ben Koziol a écrit :
@nilshempelmann https://github.com/nilshempelmann do you want to test the wrapping option before merging? I think it would be a good idea. You can find the code in the https://github.com/NCPP/ocgis/tree/i419-wrap-option branch. The documentation for the new |spatial_wrapping| operations parameter is here: https://github.com/NCPP/ocgis/blob/i419-wrap-option/doc/api.rst#spatial_wrapping.
Let me know if you have any questions!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NCPP/ocgis/issues/419#issuecomment-223441562, or mute the thread https://github.com/notifications/unsubscribe/AIPUql7od9kBCaxRDRguVAVMd9QP_hiNks5qH1kQgaJpZM4ILwTW.
Thanks for testing. I was forgetting the piece about the ordering. Seemed to simple. :smile: The longitude array needs to be reordered such that: [-180, ..., 0, ..., 180]
. I'll test with that bounding box too before the next push.
@nilshempelmann This is again ready for testing. There are still elements that are a work-in-progress (i.e. mask handling and documentation). A new argument to OcgOperations
was added called spatial_reorder
. Setting this to True
, will reorder the coordinates and associated data arrays such that longitude is in ascending order. It is False
by default. I think there are edge cases I am not handling, so I will be interested in your mileage!
Branch: https://github.com/NCPP/ocgis/tree/i419-wrap-option.
Sorry for the delay in getting this in...
Great work! First tests looks very good: https://github.com/bird-house/flyingpigeon/blob/master/notebooks/cdo_ocgis.ipynb
Tests with rotated poles and chunking are fine as well: https://github.com/bird-house/flyingpigeon/blob/develop/notebooks/cdo_ocgis.ipynb
Excellent :+1:. Did you have more testing you wanted to do before I commit this?
You can commit this. Good work
On 27/06/2016 17:18, Ben Koziol wrote:
Excellent 👍. Did you have more testing you wanted to do before I commit this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NCPP/ocgis/issues/419#issuecomment-228777734, or mute the thread https://github.com/notifications/unsubscribe/AIPUqoZ1F-S-mx509-SRZdc4x3tCG-Y5ks5qP-nOgaJpZM4ILwTW.
Pushed to https://github.com/NCPP/ocgis/tree/next.
Provide a request dataset parameter to wrap grids before subsetting. This is relevant to: https://github.com/bird-house/flyingpigeon/issues/17#issuecomment-210621463. It is important that masked values are removed during a subset across the meridian.
@nilshempelmann