polytope-python 2.1.5__tar.gz → 2.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.github/ci-config.yml +1 -1
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.github/workflows/label-public-pr.yml +1 -1
- {polytope_python-2.1.5 → polytope_python-2.1.7}/PKG-INFO +1 -1
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/3D_shipping_route.py +6 -19
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/3D_shipping_route_wave_model.py +4 -12
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/4D_flight_path.py +7 -21
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/country_slicing.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/cyclic_route_around_earth.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/healpix_grid_box_example.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/plotting_country_data.py +1 -2
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/slicing_all_ecmwf_countries.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/wind_farms.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/fdb_performance.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/fdb_performance_3D.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/fdb_slice_many_numbers_timeseries.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/scalability_test.py +11 -33
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/scalability_test_2.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance_unstructured/octahedral_vs_unstructured_slicing.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance_unstructured/plot_structured_vs_unstructured_slicing.py +2 -7
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/_version.py +1 -1
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/datacube.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/fdb.py +28 -62
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/datacube_axis.py +6 -19
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/quadtree/quad_tree.py +6 -21
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/quadtree/quadtree_additional_operations.py +7 -21
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/switching_grid_helper.py +5 -10
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/tensor_index_tree.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_cyclic/datacube_cyclic.py +4 -12
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/datacube_mappers.py +2 -4
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix.py +10 -40
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py +14 -46
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/lambert_conformal.py +7 -25
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/local_regular.py +7 -18
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/octahedral.py +9 -28
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_gaussian.py +9 -33
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py +6 -22
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/regular.py +7 -25
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_merger/datacube_merger.py +8 -15
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_reverse/datacube_reverse.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_transformations.py +6 -18
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_type_change/datacube_type_change.py +9 -23
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/engine.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/hullslicer.py +9 -28
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/optimised_point_in_polygon_slicer.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/optimised_quadtree_slicer.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/point_in_polygon_slicer.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/quadtree_slicer.py +5 -12
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/slicing_tools.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/options.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/polytope.py +8 -23
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/shapes.py +14 -29
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/utility/engine_tools.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/utility/exceptions.py +3 -8
- polytope_python-2.1.7/polytope_feature/utility/geometry.py +34 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_python.egg-info/PKG-INFO +1 -1
- {polytope_python-2.1.5 → polytope_python-2.1.7}/pyproject.toml +3 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/Cargo.toml +1 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/quadtree_mod.rs +66 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/conftest.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/quadtree_slicer_profiler.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_axis_mappers.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_bad_request_error.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_cyclic_nearest.py +29 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_datacube_axes_init.py +8 -34
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_datacube_xarray.py +5 -16
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_ecmwf_oper_data_fdb.py +5 -15
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_engine_slicer.py +5 -15
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_fdb_datacube.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_fdb_unmap_tree.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_float_type.py +6 -18
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_healpix_mapper.py +2 -10
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_healpix_nested_grid.py +12 -46
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_hull_slicer.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_icon_grid_unstructured.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_icon_grid_unstructured_fdb.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_incomplete_tree_fdb.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_lambert_lam_grid_unstructured_fdb.py +51 -20
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_lambert_lam_grid_unstructured_fdb_optimised_quadtree.py +4 -14
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_local_grid_cyclic.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_local_regular_grid.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_local_swiss_grid.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_mappers.py +4 -15
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_merge_cyclic_octahedral.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_merge_octahedral_one_axis.py +1 -7
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_merge_transformation.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_multiple_param_fdb.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_octahedral_grid.py +4 -16
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_orca_irregular_grid.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_orca_irregular_grid_optimised_point_in_polygon.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_orca_irregular_grid_point_in_polygon.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_override_md5_hash_options.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_point_nearest.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_point_shape.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_point_union.py +5 -15
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_polytope_extract_fdb.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_quad_tree.py +6 -18
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_quadtree_edge_cases.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_quadtree_indices.py +7 -21
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_quadtree_optimisation.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_reduced_ll_grid.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_regular_grid.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_regular_reduced_grid.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_request_tree.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_shapes.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slice_date_range_fdb.py +4 -12
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slice_date_range_fdb_v2.py +2 -6
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slice_fdb_box.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slicer_xarray.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slicing_xarray_3D.py +22 -70
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_snapping.py +3 -9
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_tree_protobuf_encoding.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_tree_protobuf_encoding_fdb.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_type_change_transformation.py +10 -25
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_union_gj.py +4 -12
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_union_point_box.py +1 -3
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_wave_spectra_data.py +1 -3
- polytope_python-2.1.5/polytope_feature/utility/geometry.py +0 -28
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.github/ci-hpc-config.yml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.github/workflows/cd.yml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.github/workflows/downstream-ci.yml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.github/workflows/test-pypi.yml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.gitignore +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.pre-commit-config.yaml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/.readthedocs.yaml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/ACKNOWLEDGEMENTS.rst +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/CONTRIBUTING.rst +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/LICENSE +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/Makefile +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/README.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/codecov.yml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/API.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/Axis_types.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/Datacube.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/Overview.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/Slicer.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/images/Polytope_APIs_3.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/images/polytope_components_5.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/images/slicing_process.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Developer_Guide/shapes.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Overview/Overview.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Overview/Polytope_at_ECMWF.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Overview/images_overview/ecmwf_datacube.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/Overview/images_overview/ecmwf_polytope.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/User_Guide/Building_Features.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/User_Guide/Example.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/User_Guide/Getting_started.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/User_Guide/Overview.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Algorithm/User_Guide/images_users/shipping_route.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Client/Overview.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Server/Design.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Server/Overview.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Data_Portfolio.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Design_doc.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_boundingbox_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_circle_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_country_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_polygon_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_position_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_timeseries_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_trajectory_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/OpenData/od_vertical_profile_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/boundingbox_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/circle_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/climate_dt_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/country_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/examples.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/extremes_dt_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/on-demand_dt_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/opendata_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/operational_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/polygon_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/position_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/timeseries_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/trajectory_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Examples/vertical_profile_example.ipynb +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/boundingbox.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/circle.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/feature.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/polygon.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/position.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/timeseries.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/trajectory.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Features/vertical_profile.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Full_fields.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Installation.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Overview.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/Service/Quick_Start.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/extra.css +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/flight_path.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/greece.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/logo.gif +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/polytope_feature.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/polytope_logo_new_animated_AdobeExpress_3.gif +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/timeseries.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/timeseries_example.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/images/timeseries_qs.png +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/index.md +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/docs/requirements.txt +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/EMODnet_HA_WindFarms_pg_20220324.shp +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/EMODnet_HA_WindFarms_pg_20220324.shx +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/Shipping-Lanes-v1.shp +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/Shipping-Lanes-v1.shx +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/World_Countries__Generalized_.shp +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/World_Countries__Generalized_.shx +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/earth_image.jpg +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/map_earth_4k.jpg +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/mars_req_9km_wind.req +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/mars_req_levels.req +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/mars_req_timeseries.req +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/output4.grib +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/output4.req +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/output8.grib +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/output8.req +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/temp_model_levels.grib +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/timeseries_t2m.grib +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/data/winds.grib +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/octahedral_grid_box_example.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/octahedral_grid_country_example.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/read_me_example.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/requirements_examples.txt +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/examples/timeseries_example.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/mkdocs.yml +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/fdb_scalability_plot.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/performance_many_num_steps.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/performance/plotting_scalability.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/catalogue_helper.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/mock.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/xarray.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/index_tree.proto +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/index_tree_pb2.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_cyclic/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/icon.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/irregular_mapper_types/unstructured.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_merger/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_reverse/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/transformations/datacube_type_change/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/tree_encoding.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/engine/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/utility/__init__.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/utility/combinatorics.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/utility/list_tools.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/utility/profiling.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_python.egg-info/SOURCES.txt +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_python.egg-info/dependency_links.txt +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_python.egg-info/requires.txt +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_python.egg-info/top_level.txt +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/distance.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/healpix_nested.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/lambert_conformal.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/lib.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/list_tools.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/octahedral.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/point_in_polygon.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/rust/src/slicing_tools.rs +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/setup.cfg +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/setup.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/fdb_data/schema +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/helper_functions.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/profiled_quadtree.profile +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_combinatorics.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_cyclic_axis_over_negative_vals.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_cyclic_axis_slicer_not_0.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_cyclic_axis_slicing.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_cyclic_simple.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_cyclic_snapping.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_datacube_mock.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_date_time_unmerged.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_hullslicer_engine.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_polytope_extract.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_profiling_requesttree.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_request_trees_after_slicing.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_reverse_transformation.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_shapes_volume.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slicer_engine.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slicer_era5.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slicing_unsliceable_axis.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_slicing_xarray_4D.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_snapping_real_data.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tests/test_tree_protobuf.py +0 -0
- {polytope_python-2.1.5 → polytope_python-2.1.7}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polytope-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.7
|
|
4
4
|
Summary: Polytope datacube feature extraction library
|
|
5
5
|
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
6
|
Maintainer-email: James Hawkes <James.Hawkes@ecmwf.int>, Mathilde Leuridan <Mathilde.Leuridan@ecmwf.int>
|
|
@@ -39,13 +39,8 @@ class Test:
|
|
|
39
39
|
lines.append(point_list)
|
|
40
40
|
|
|
41
41
|
speed_km_hr = 100
|
|
42
|
-
initial_distance = math.sqrt(
|
|
43
|
-
|
|
44
|
-
) # This is technically only the degrees...
|
|
45
|
-
time_hours = [
|
|
46
|
-
(math.sqrt(pt[0] ** 2 + pt[1] ** 2) - initial_distance) / speed_km_hr
|
|
47
|
-
for pt in lines
|
|
48
|
-
]
|
|
42
|
+
initial_distance = math.sqrt(lines[0][0] ** 2 + lines[0][1] ** 2) # This is technically only the degrees...
|
|
43
|
+
time_hours = [(math.sqrt(pt[0] ** 2 + pt[1] ** 2) - initial_distance) / speed_km_hr for pt in lines]
|
|
49
44
|
step_list_seconds = np.array(time_hours)
|
|
50
45
|
step_list_seconds = step_list_seconds * 3600 * 1000 * 1000 * 1000
|
|
51
46
|
step_list_seconds = [int(a) for a in step_list_seconds]
|
|
@@ -55,23 +50,17 @@ class Test:
|
|
|
55
50
|
|
|
56
51
|
new_points = []
|
|
57
52
|
for point, step in zip(lines[:7], step_list):
|
|
58
|
-
new_points.append(
|
|
59
|
-
[point[1], point[0], step + np.timedelta64(3600000000000, "ns")]
|
|
60
|
-
)
|
|
53
|
+
new_points.append([point[1], point[0], step + np.timedelta64(3600000000000, "ns")])
|
|
61
54
|
|
|
62
55
|
# Pad the shipping route with an initial shape
|
|
63
56
|
|
|
64
57
|
padded_point_upper = [0.24, 0.24, np.timedelta64(3590, "s")]
|
|
65
58
|
padded_point_lower = [-0.24, -0.24, np.timedelta64(-3590, "s")]
|
|
66
|
-
initial_shape = Ellipsoid(
|
|
67
|
-
["latitude", "longitude", "step"], padded_point_lower, padded_point_upper
|
|
68
|
-
)
|
|
59
|
+
initial_shape = Ellipsoid(["latitude", "longitude", "step"], padded_point_lower, padded_point_upper)
|
|
69
60
|
|
|
70
61
|
# Then somehow make this list of points into just a sequence of points
|
|
71
62
|
|
|
72
|
-
ship_route_polytope = Path(
|
|
73
|
-
["latitude", "longitude", "step"], initial_shape, *new_points
|
|
74
|
-
)
|
|
63
|
+
ship_route_polytope = Path(["latitude", "longitude", "step"], initial_shape, *new_points)
|
|
75
64
|
request = Request(
|
|
76
65
|
ship_route_polytope,
|
|
77
66
|
Select("number", [0]),
|
|
@@ -101,9 +90,7 @@ class Test:
|
|
|
101
90
|
fig, ax = plt.subplots(figsize=(12, 6))
|
|
102
91
|
worldmap.plot(color="darkgrey", ax=ax)
|
|
103
92
|
ax.scatter(longs, lats, s=8, c=parameter_values, cmap="viridis")
|
|
104
|
-
norm = mpl.colors.Normalize(
|
|
105
|
-
vmin=min(parameter_values), vmax=max(parameter_values)
|
|
106
|
-
)
|
|
93
|
+
norm = mpl.colors.Normalize(vmin=min(parameter_values), vmax=max(parameter_values))
|
|
107
94
|
|
|
108
95
|
sm = plt.cm.ScalarMappable(cmap="viridis", norm=norm)
|
|
109
96
|
sm.set_array([])
|
|
@@ -25,9 +25,7 @@ class TestReducedLatLonGrid:
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"date": {
|
|
29
|
-
"transformation": {"merge": {"with": "time", "linkers": ["T", "00"]}}
|
|
30
|
-
},
|
|
28
|
+
"date": {"transformation": {"merge": {"with": "time", "linkers": ["T", "00"]}}},
|
|
31
29
|
"step": {"transformation": {"type_change": "int"}},
|
|
32
30
|
"number": {"transformation": {"type_change": "int"}},
|
|
33
31
|
"longitude": {"transformation": {"cyclic": [0, 360]}},
|
|
@@ -35,9 +33,7 @@ class TestReducedLatLonGrid:
|
|
|
35
33
|
self.config = {"class": "od", "stream": "wave"}
|
|
36
34
|
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)
|
|
37
35
|
self.slicer = HullSlicer()
|
|
38
|
-
self.API = Polytope(
|
|
39
|
-
datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options
|
|
40
|
-
)
|
|
36
|
+
self.API = Polytope(datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options)
|
|
41
37
|
|
|
42
38
|
def find_nearest_latlon(self, grib_file, target_lat, target_lon):
|
|
43
39
|
messages = grib_file
|
|
@@ -77,15 +73,11 @@ class TestReducedLatLonGrid:
|
|
|
77
73
|
|
|
78
74
|
padded_point_upper = [0.24, 0.24, 1]
|
|
79
75
|
padded_point_lower = [-0.24, -0.24, 1]
|
|
80
|
-
initial_shape = Ellipsoid(
|
|
81
|
-
["latitude", "longitude", "step"], padded_point_lower, padded_point_upper
|
|
82
|
-
)
|
|
76
|
+
initial_shape = Ellipsoid(["latitude", "longitude", "step"], padded_point_lower, padded_point_upper)
|
|
83
77
|
|
|
84
78
|
# Then somehow make this list of points into just a sequence of points
|
|
85
79
|
|
|
86
|
-
ship_route_polytope = Path(
|
|
87
|
-
["latitude", "longitude", "step"], initial_shape, *new_points
|
|
88
|
-
)
|
|
80
|
+
ship_route_polytope = Path(["latitude", "longitude", "step"], initial_shape, *new_points)
|
|
89
81
|
|
|
90
82
|
request = Request(
|
|
91
83
|
ship_route_polytope,
|
|
@@ -21,9 +21,7 @@ class Test:
|
|
|
21
21
|
array = array.sortby(dim)
|
|
22
22
|
self.array = array
|
|
23
23
|
self.slicer = HullSlicer()
|
|
24
|
-
self.API = Polytope(
|
|
25
|
-
datacube=array, engine=self.slicer, axis_options=axis_options
|
|
26
|
-
)
|
|
24
|
+
self.API = Polytope(datacube=array, engine=self.slicer, axis_options=axis_options)
|
|
27
25
|
|
|
28
26
|
def test_slice_shipping_route(self):
|
|
29
27
|
colorscale = [
|
|
@@ -56,9 +54,7 @@ class Test:
|
|
|
56
54
|
texture = np.asarray(Image.open("./examples/data/earth_image.jpg")).T
|
|
57
55
|
radius = 1
|
|
58
56
|
x, y, z = sphere(radius, texture)
|
|
59
|
-
surf = go.Surface(
|
|
60
|
-
x=x, y=y, z=z, surfacecolor=texture, colorscale=colorscale, hoverinfo="none"
|
|
61
|
-
)
|
|
57
|
+
surf = go.Surface(x=x, y=y, z=z, surfacecolor=texture, colorscale=colorscale, hoverinfo="none")
|
|
62
58
|
layout = go.Layout(scene=dict(aspectratio=dict(x=1, y=1, z=1)), spikedistance=0)
|
|
63
59
|
fig = go.Figure(data=[surf], layout=layout)
|
|
64
60
|
fig.update_layout(scene=dict(xaxis_showspikes=False, yaxis_showspikes=False))
|
|
@@ -96,9 +92,7 @@ class Test:
|
|
|
96
92
|
*route_point_CDG_LHR,
|
|
97
93
|
)
|
|
98
94
|
|
|
99
|
-
request = Request(
|
|
100
|
-
flight_route_polytope, Select("time", ["2022-12-02T12:00:00"])
|
|
101
|
-
)
|
|
95
|
+
request = Request(flight_route_polytope, Select("time", ["2022-12-02T12:00:00"]))
|
|
102
96
|
result = self.API.retrieve(request)
|
|
103
97
|
|
|
104
98
|
lats = []
|
|
@@ -128,9 +122,7 @@ class Test:
|
|
|
128
122
|
for i in range(len(lats)):
|
|
129
123
|
x1 = radius * np.cos(longs[i]) * np.cos(lats[i])
|
|
130
124
|
y1 = radius * np.sin(longs[i]) * np.cos(lats[i])
|
|
131
|
-
z1 = (
|
|
132
|
-
radius * np.sin(lats[i]) + alts[i] / 300
|
|
133
|
-
) # the 300 here should really be the earth of the radius
|
|
125
|
+
z1 = radius * np.sin(lats[i]) + alts[i] / 300 # the 300 here should really be the earth of the radius
|
|
134
126
|
x.append(x1)
|
|
135
127
|
y.append(y1)
|
|
136
128
|
z.append(z1)
|
|
@@ -157,15 +149,9 @@ class Test:
|
|
|
157
149
|
landcolor="rgb(230, 145, 56)",
|
|
158
150
|
lakecolor="rgb(0, 255, 255)",
|
|
159
151
|
oceancolor="rgb(0, 255, 255)",
|
|
160
|
-
projection=dict(
|
|
161
|
-
|
|
162
|
-
),
|
|
163
|
-
lonaxis=dict(
|
|
164
|
-
showgrid=True, gridcolor="rgb(102, 102, 102)", gridwidth=0.5
|
|
165
|
-
),
|
|
166
|
-
lataxis=dict(
|
|
167
|
-
showgrid=True, gridcolor="rgb(102, 102, 102)", gridwidth=0.5
|
|
168
|
-
),
|
|
152
|
+
projection=dict(type="orthographic", rotation=dict(lon=-100, lat=40, roll=0)),
|
|
153
|
+
lonaxis=dict(showgrid=True, gridcolor="rgb(102, 102, 102)", gridwidth=0.5),
|
|
154
|
+
lataxis=dict(showgrid=True, gridcolor="rgb(102, 102, 102)", gridwidth=0.5),
|
|
169
155
|
),
|
|
170
156
|
)
|
|
171
157
|
|
|
@@ -18,9 +18,7 @@ class Test:
|
|
|
18
18
|
axis_options = {"longitude": {"cyclic": [0, 360.0]}}
|
|
19
19
|
self.xarraydatacube = XArrayDatacube(array)
|
|
20
20
|
self.slicer = HullSlicer()
|
|
21
|
-
self.API = Polytope(
|
|
22
|
-
datacube=array, engine=self.slicer, axis_options=axis_options
|
|
23
|
-
)
|
|
21
|
+
self.API = Polytope(datacube=array, engine=self.slicer, axis_options=axis_options)
|
|
24
22
|
|
|
25
23
|
def test_slice_country(self):
|
|
26
24
|
# Read a shapefile for a given country and extract the geometry polygons
|
|
@@ -17,15 +17,11 @@ class Test:
|
|
|
17
17
|
axis_options = {"longitude": {"cyclic": [0, 360.0]}}
|
|
18
18
|
self.xarraydatacube = XArrayDatacube(array)
|
|
19
19
|
self.slicer = HullSlicer()
|
|
20
|
-
self.API = Polytope(
|
|
21
|
-
datacube=array, engine=self.slicer, axis_options=axis_options
|
|
22
|
-
)
|
|
20
|
+
self.API = Polytope(datacube=array, engine=self.slicer, axis_options=axis_options)
|
|
23
21
|
|
|
24
22
|
def test_slice_country(self):
|
|
25
23
|
bounding_box = Box(["latitude", "longitude"], [-0.1, -0.1], [0.1, 0.1])
|
|
26
|
-
request_obj = PathSegment(
|
|
27
|
-
["latitude", "longitude"], bounding_box, [-88, -67], [68, 170]
|
|
28
|
-
)
|
|
24
|
+
request_obj = PathSegment(["latitude", "longitude"], bounding_box, [-88, -67], [68, 170])
|
|
29
25
|
request = Request(
|
|
30
26
|
request_obj,
|
|
31
27
|
Select("number", [0]),
|
|
@@ -12,9 +12,7 @@ from polytope_feature.shapes import Box, Select
|
|
|
12
12
|
class TestOctahedralGrid:
|
|
13
13
|
def setup_method(self, method):
|
|
14
14
|
ds = data.from_source("file", "./tests/data/healpix.grib")
|
|
15
|
-
self.latlon_array = (
|
|
16
|
-
ds.to_xarray().isel(step=0).isel(time=0).isel(isobaricInhPa=0).z
|
|
17
|
-
)
|
|
15
|
+
self.latlon_array = ds.to_xarray().isel(step=0).isel(time=0).isel(isobaricInhPa=0).z
|
|
18
16
|
self.xarraydatacube = XArrayDatacube(self.latlon_array)
|
|
19
17
|
self.options = {
|
|
20
18
|
"values": {
|
|
@@ -26,9 +24,7 @@ class TestOctahedralGrid:
|
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
26
|
self.slicer = HullSlicer()
|
|
29
|
-
self.API = Polytope(
|
|
30
|
-
datacube=self.latlon_array, engine=self.slicer, axis_options=self.options
|
|
31
|
-
)
|
|
27
|
+
self.API = Polytope(datacube=self.latlon_array, engine=self.slicer, axis_options=self.options)
|
|
32
28
|
|
|
33
29
|
def find_nearest_latlon(self, grib_file, target_lat, target_lon):
|
|
34
30
|
# Open the GRIB file
|
|
@@ -75,9 +71,7 @@ class TestOctahedralGrid:
|
|
|
75
71
|
lon = cubepath["longitude"]
|
|
76
72
|
lats.append(lat)
|
|
77
73
|
lons.append(lon)
|
|
78
|
-
nearest_points = self.find_nearest_latlon(
|
|
79
|
-
"./tests/data/healpix.grib", lat, lon
|
|
80
|
-
)
|
|
74
|
+
nearest_points = self.find_nearest_latlon("./tests/data/healpix.grib", lat, lon)
|
|
81
75
|
eccodes_lat = nearest_points[0][0]["lat"]
|
|
82
76
|
eccodes_lon = nearest_points[0][0]["lon"]
|
|
83
77
|
eccodes_lats.append(eccodes_lat)
|
|
@@ -85,8 +85,7 @@ improved_polytope_data = [improved_polytope_data_original[i] for i in mask]
|
|
|
85
85
|
country_list = [country_list_original[i] for i in mask]
|
|
86
86
|
|
|
87
87
|
normalised_improvement = [
|
|
88
|
-
polytope / rectangle
|
|
89
|
-
for polytope, rectangle in zip(improved_polytope_data, naive_rectangle_data)
|
|
88
|
+
polytope / rectangle for polytope, rectangle in zip(improved_polytope_data, naive_rectangle_data)
|
|
90
89
|
]
|
|
91
90
|
|
|
92
91
|
normalised_rectangle_data = list(np.ones(len(naive_rectangle_data)))
|
|
@@ -18,9 +18,7 @@ class Test:
|
|
|
18
18
|
axis_options = {"longitude": {"cyclic": [0, 360.0]}}
|
|
19
19
|
self.xarraydatacube = XArrayDatacube(array)
|
|
20
20
|
self.slicer = HullSlicer()
|
|
21
|
-
self.API = Polytope(
|
|
22
|
-
datacube=array, engine=self.slicer, axis_options=axis_options
|
|
23
|
-
)
|
|
21
|
+
self.API = Polytope(datacube=array, engine=self.slicer, axis_options=axis_options)
|
|
24
22
|
|
|
25
23
|
def test_slice_country(self):
|
|
26
24
|
# Read a shapefile for a given country and extract the geometry polygons
|
|
@@ -153,9 +151,7 @@ class Test:
|
|
|
153
151
|
for geom in multi_polygon.geoms:
|
|
154
152
|
plt.plot(*geom.exterior.xy, color="black", linewidth=0.7)
|
|
155
153
|
countries_temps = np.array(countries_temps)
|
|
156
|
-
plt.scatter(
|
|
157
|
-
countries_longs, countries_lats, s=8, c=countries_temps, cmap="YlOrRd"
|
|
158
|
-
)
|
|
154
|
+
plt.scatter(countries_longs, countries_lats, s=8, c=countries_temps, cmap="YlOrRd")
|
|
159
155
|
plt.colorbar(label="Temperature")
|
|
160
156
|
|
|
161
157
|
plt.show()
|
|
@@ -21,16 +21,12 @@ class Test:
|
|
|
21
21
|
axis_options = {"longitude": {"cyclic": [0, 360.0]}}
|
|
22
22
|
self.xarraydatacube = XArrayDatacube(array)
|
|
23
23
|
self.slicer = HullSlicer()
|
|
24
|
-
self.API = Polytope(
|
|
25
|
-
datacube=array, engine=self.slicer, axis_options=axis_options
|
|
26
|
-
)
|
|
24
|
+
self.API = Polytope(datacube=array, engine=self.slicer, axis_options=axis_options)
|
|
27
25
|
|
|
28
26
|
def test_slice_wind_farms(self):
|
|
29
27
|
gdal.SetConfigOption("SHAPE_RESTORE_SHX", "YES")
|
|
30
28
|
|
|
31
|
-
shapefile = gpd.read_file(
|
|
32
|
-
"./examples/data/EMODnet_HA_WindFarms_pg_20220324.shp"
|
|
33
|
-
)
|
|
29
|
+
shapefile = gpd.read_file("./examples/data/EMODnet_HA_WindFarms_pg_20220324.shp")
|
|
34
30
|
polygons = []
|
|
35
31
|
for i in range(306):
|
|
36
32
|
country = shapefile.iloc[i]
|
|
@@ -89,9 +85,7 @@ class Test:
|
|
|
89
85
|
fig, ax = plt.subplots(figsize=(12, 6))
|
|
90
86
|
worldmap.plot(color="darkgrey", ax=ax)
|
|
91
87
|
ax.scatter(longs, lats, s=8, c=parameter_values, cmap="viridis")
|
|
92
|
-
norm = mpl.colors.Normalize(
|
|
93
|
-
vmin=min(parameter_values), vmax=max(parameter_values)
|
|
94
|
-
)
|
|
88
|
+
norm = mpl.colors.Normalize(vmin=min(parameter_values), vmax=max(parameter_values))
|
|
95
89
|
|
|
96
90
|
sm = plt.cm.ScalarMappable(cmap="viridis", norm=norm)
|
|
97
91
|
sm.set_array([])
|
|
@@ -21,17 +21,13 @@ class TestSlicingFDBDatacube:
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
"date": {
|
|
25
|
-
"transformation": {"merge": {"with": "time", "linkers": [" ", "00"]}}
|
|
26
|
-
},
|
|
24
|
+
"date": {"transformation": {"merge": {"with": "time", "linkers": [" ", "00"]}}},
|
|
27
25
|
"step": {"transformation": {"type_change": "int"}},
|
|
28
26
|
}
|
|
29
27
|
self.config = {"class": "od", "expver": "0001", "levtype": "sfc", "step": 0}
|
|
30
28
|
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)
|
|
31
29
|
self.slicer = HullSlicer()
|
|
32
|
-
self.API = Polytope(
|
|
33
|
-
datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options
|
|
34
|
-
)
|
|
30
|
+
self.API = Polytope(datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options)
|
|
35
31
|
|
|
36
32
|
# Testing different shapes
|
|
37
33
|
# @pytest.mark.skip(reason="can't install fdb branch on CI")
|
|
@@ -21,9 +21,7 @@ class TestSlicingFDBDatacube:
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
"date": {
|
|
25
|
-
"transformation": {"merge": {"with": "time", "linkers": [" ", "00"]}}
|
|
26
|
-
},
|
|
24
|
+
"date": {"transformation": {"merge": {"with": "time", "linkers": [" ", "00"]}}},
|
|
27
25
|
"step": {"transformation": {"type_change": "int"}},
|
|
28
26
|
"levelist": {"transformation": {"type_change": "int"}},
|
|
29
27
|
"longitude": {"transformation": {"cyclic": [0, 360]}},
|
|
@@ -31,9 +29,7 @@ class TestSlicingFDBDatacube:
|
|
|
31
29
|
self.config = {"class": "od", "expver": "0001", "levtype": "sfc"}
|
|
32
30
|
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)
|
|
33
31
|
self.slicer = HullSlicer()
|
|
34
|
-
self.API = Polytope(
|
|
35
|
-
datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options
|
|
36
|
-
)
|
|
32
|
+
self.API = Polytope(datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options)
|
|
37
33
|
|
|
38
34
|
# Testing different shapes
|
|
39
35
|
# @pytest.mark.skip(reason="can't install fdb branch on CI")
|
{polytope_python-2.1.5 → polytope_python-2.1.7}/performance/fdb_slice_many_numbers_timeseries.py
RENAMED
|
@@ -21,9 +21,7 @@ options = {
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"axis_name": "date",
|
|
24
|
-
"transformations": [
|
|
25
|
-
{"name": "merge", "other_axis": "time", "linkers": ["T", "00"]}
|
|
26
|
-
],
|
|
24
|
+
"transformations": [{"name": "merge", "other_axis": "time", "linkers": ["T", "00"]}],
|
|
27
25
|
},
|
|
28
26
|
{
|
|
29
27
|
"axis_name": "values",
|
|
@@ -11,9 +11,7 @@ from polytope_feature.shapes import Box, Disk, Ellipsoid, Select
|
|
|
11
11
|
|
|
12
12
|
class Test:
|
|
13
13
|
def setup_method(self):
|
|
14
|
-
array = xr.open_dataset(
|
|
15
|
-
"../examples/data/temp_model_levels.grib", engine="cfgrib"
|
|
16
|
-
).t
|
|
14
|
+
array = xr.open_dataset("../examples/data/temp_model_levels.grib", engine="cfgrib").t
|
|
17
15
|
options = {"longitude": {"Cyclic": [0, 360.0]}}
|
|
18
16
|
self.xarraydatacube = XArrayDatacube(array)
|
|
19
17
|
for dim in array.dims:
|
|
@@ -26,9 +24,7 @@ class Test:
|
|
|
26
24
|
time_start = time.time()
|
|
27
25
|
print(time_start)
|
|
28
26
|
box = Box(["latitude", "longitude"], [0, 0], [50, 360])
|
|
29
|
-
request = Request(
|
|
30
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
31
|
-
)
|
|
27
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
32
28
|
result = self.API.retrieve(request)
|
|
33
29
|
# result.pprint()
|
|
34
30
|
print(len(result.leaves))
|
|
@@ -38,9 +34,7 @@ class Test:
|
|
|
38
34
|
time_start = time.time()
|
|
39
35
|
print(time_start)
|
|
40
36
|
box = Box(["latitude", "longitude"], [0, 0], [100, 360])
|
|
41
|
-
request = Request(
|
|
42
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
43
|
-
)
|
|
37
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
44
38
|
result = self.API.retrieve(request)
|
|
45
39
|
print(len(result.leaves))
|
|
46
40
|
print(time.time() - time_start)
|
|
@@ -49,9 +43,7 @@ class Test:
|
|
|
49
43
|
time_start = time.time()
|
|
50
44
|
print(time_start)
|
|
51
45
|
box = Box(["latitude", "longitude"], [-50, 0], [100, 360])
|
|
52
|
-
request = Request(
|
|
53
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
54
|
-
)
|
|
46
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
55
47
|
result = self.API.retrieve(request)
|
|
56
48
|
print(len(result.leaves))
|
|
57
49
|
print(time.time() - time_start)
|
|
@@ -60,9 +52,7 @@ class Test:
|
|
|
60
52
|
time_start = time.time()
|
|
61
53
|
print(time_start)
|
|
62
54
|
box = Box(["latitude", "longitude"], [-100, 0], [100, 360])
|
|
63
|
-
request = Request(
|
|
64
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
65
|
-
)
|
|
55
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
66
56
|
result = self.API.retrieve(request)
|
|
67
57
|
print(len(result.leaves))
|
|
68
58
|
print(time.time() - time_start)
|
|
@@ -71,9 +61,7 @@ class Test:
|
|
|
71
61
|
time_start = time.time()
|
|
72
62
|
print(time_start)
|
|
73
63
|
box = Box(["latitude", "longitude"], [0, 0], [50, 180])
|
|
74
|
-
request = Request(
|
|
75
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
76
|
-
)
|
|
64
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
77
65
|
result = self.API.retrieve(request)
|
|
78
66
|
print(len(result.leaves))
|
|
79
67
|
print(time.time() - time_start)
|
|
@@ -82,9 +70,7 @@ class Test:
|
|
|
82
70
|
time_start = time.time()
|
|
83
71
|
print(time_start)
|
|
84
72
|
box = Box(["latitude", "longitude"], [-100, -180], [100, 360])
|
|
85
|
-
request = Request(
|
|
86
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
87
|
-
)
|
|
73
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
88
74
|
result = self.API.retrieve(request)
|
|
89
75
|
print(len(result.leaves))
|
|
90
76
|
print(time.time() - time_start)
|
|
@@ -93,9 +79,7 @@ class Test:
|
|
|
93
79
|
time_start = time.time()
|
|
94
80
|
print(time_start)
|
|
95
81
|
box = Box(["latitude", "longitude"], [-100, -360], [100, 360])
|
|
96
|
-
request = Request(
|
|
97
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
98
|
-
)
|
|
82
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
99
83
|
result = self.API.retrieve(request)
|
|
100
84
|
print(len(result.leaves))
|
|
101
85
|
print(time.time() - time_start)
|
|
@@ -156,9 +140,7 @@ class Test:
|
|
|
156
140
|
time_start = time.time()
|
|
157
141
|
print(time_start)
|
|
158
142
|
box = Disk(["latitude", "longitude"], [0, 0], [25, 180])
|
|
159
|
-
request = Request(
|
|
160
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
161
|
-
)
|
|
143
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
162
144
|
result = self.API.retrieve(request)
|
|
163
145
|
# result.pprint()
|
|
164
146
|
print(len(result.leaves))
|
|
@@ -168,9 +150,7 @@ class Test:
|
|
|
168
150
|
time_start = time.time()
|
|
169
151
|
print(time_start)
|
|
170
152
|
box = Disk(["latitude", "longitude"], [0, 0], [50, 180])
|
|
171
|
-
request = Request(
|
|
172
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
173
|
-
)
|
|
153
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
174
154
|
result = self.API.retrieve(request)
|
|
175
155
|
# result.pprint()
|
|
176
156
|
print(len(result.leaves))
|
|
@@ -180,9 +160,7 @@ class Test:
|
|
|
180
160
|
time_start = time.time()
|
|
181
161
|
print(time_start)
|
|
182
162
|
box = Disk(["latitude", "longitude"], [0, 0], [25, 90])
|
|
183
|
-
request = Request(
|
|
184
|
-
box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
185
|
-
)
|
|
163
|
+
request = Request(box, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
186
164
|
result = self.API.retrieve(request)
|
|
187
165
|
# result.pprint()
|
|
188
166
|
print(len(result.leaves))
|
|
@@ -11,9 +11,7 @@ from polytope_feature.shapes import Box, Select, Union
|
|
|
11
11
|
|
|
12
12
|
class Test:
|
|
13
13
|
def setup_method(self):
|
|
14
|
-
array = xr.open_dataset(
|
|
15
|
-
"./examples/data/temp_model_levels.grib", engine="cfgrib"
|
|
16
|
-
).t
|
|
14
|
+
array = xr.open_dataset("./examples/data/temp_model_levels.grib", engine="cfgrib").t
|
|
17
15
|
options = {"longitude": {"Cyclic": [0, 360.0]}}
|
|
18
16
|
self.xarraydatacube = XArrayDatacube(array)
|
|
19
17
|
for dim in array.dims:
|
|
@@ -88,9 +86,7 @@ class Test:
|
|
|
88
86
|
union = Union(["latitude", "longitude"], union, box)
|
|
89
87
|
time_start = time.time()
|
|
90
88
|
print(time_start)
|
|
91
|
-
request = Request(
|
|
92
|
-
union, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1])
|
|
93
|
-
)
|
|
89
|
+
request = Request(union, Select("step", [np.timedelta64(0, "ns")]), Select("hybrid", [1]))
|
|
94
90
|
result = self.API.retrieve(request)
|
|
95
91
|
# result.pprint()
|
|
96
92
|
print(len(result.leaves))
|
|
@@ -96,9 +96,7 @@ def set_up_slicing_unstructured(file_name):
|
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"axis_name": "date",
|
|
99
|
-
"transformations": [
|
|
100
|
-
{"name": "merge", "other_axis": "time", "linkers": ["T", "00"]}
|
|
101
|
-
],
|
|
99
|
+
"transformations": [{"name": "merge", "other_axis": "time", "linkers": ["T", "00"]}],
|
|
102
100
|
},
|
|
103
101
|
{
|
|
104
102
|
"axis_name": "values",
|
|
@@ -181,9 +179,7 @@ def set_up_slicing_structured():
|
|
|
181
179
|
},
|
|
182
180
|
{
|
|
183
181
|
"axis_name": "date",
|
|
184
|
-
"transformations": [
|
|
185
|
-
{"name": "merge", "other_axis": "time", "linkers": ["T", "00"]}
|
|
186
|
-
],
|
|
182
|
+
"transformations": [{"name": "merge", "other_axis": "time", "linkers": ["T", "00"]}],
|
|
187
183
|
},
|
|
188
184
|
{
|
|
189
185
|
"axis_name": "values",
|
|
@@ -30,13 +30,8 @@ tot_retrieve_time_unstructured = [
|
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
pure_poly_time_structured = [
|
|
34
|
-
|
|
35
|
-
]
|
|
36
|
-
pure_poly_time_unstructured = [
|
|
37
|
-
tot_retrieve_time_unstructured[i] - gj_retrieve_unstructured_time[i]
|
|
38
|
-
for i in range(4)
|
|
39
|
-
]
|
|
33
|
+
pure_poly_time_structured = [tot_retrieve_time_structured[i] - gj_retrieve_structured_time[i] for i in range(4)]
|
|
34
|
+
pure_poly_time_unstructured = [tot_retrieve_time_unstructured[i] - gj_retrieve_unstructured_time[i] for i in range(4)]
|
|
40
35
|
|
|
41
36
|
fig, ax = plt.subplots(1, 1)
|
|
42
37
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# Do not change! Do not track in version control!
|
|
2
|
-
__version__ = "2.1.
|
|
2
|
+
__version__ = "2.1.7"
|
{polytope_python-2.1.5 → polytope_python-2.1.7}/polytope_feature/datacube/backends/datacube.py
RENAMED
|
@@ -49,9 +49,7 @@ class Datacube(ABC):
|
|
|
49
49
|
"""returns true if the input axes can be resolved against the datacube axes"""
|
|
50
50
|
return validate_axes(list(self.axes.keys()), axes)
|
|
51
51
|
|
|
52
|
-
def _create_axes(
|
|
53
|
-
self, name, values, transformation_type_key, transformation_options
|
|
54
|
-
):
|
|
52
|
+
def _create_axes(self, name, values, transformation_type_key, transformation_options):
|
|
55
53
|
# first check what the final axes are for this axis name given transformations
|
|
56
54
|
transformation_options = transformation_type_key
|
|
57
55
|
final_axis_names, transformation = DatacubeAxisTransformation.get_final_axes(
|
|
@@ -98,9 +96,7 @@ class Datacube(ABC):
|
|
|
98
96
|
# etc axis properties add the specific transformation handled here to the relevant axes
|
|
99
97
|
# Modify the axis to update with the tag
|
|
100
98
|
|
|
101
|
-
if
|
|
102
|
-
transformation not in self._axes[axis_name].transformations
|
|
103
|
-
): # Avoids duplicates being stored
|
|
99
|
+
if transformation not in self._axes[axis_name].transformations: # Avoids duplicates being stored
|
|
104
100
|
self._axes[axis_name].transformations.append(transformation)
|
|
105
101
|
else:
|
|
106
102
|
# Means we have an unsliceable axis since we couln't transform values to desired type
|
|
@@ -145,9 +141,7 @@ class Datacube(ABC):
|
|
|
145
141
|
|
|
146
142
|
idx_between = axis.find_indices_between(indexes, lower, upper, self, method)
|
|
147
143
|
|
|
148
|
-
logging.debug(
|
|
149
|
-
f"For axis {axis.name} between {lower} and {upper}, found indices {idx_between}"
|
|
150
|
-
)
|
|
144
|
+
logging.debug(f"For axis {axis.name} between {lower} and {upper}, found indices {idx_between}")
|
|
151
145
|
|
|
152
146
|
return idx_between
|
|
153
147
|
|