resqpy 4.16.2__tar.gz → 4.16.3__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.
- {resqpy-4.16.2 → resqpy-4.16.3}/PKG-INFO +1 -1
- {resqpy-4.16.2 → resqpy-4.16.3}/pyproject.toml +1 -1
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/__init__.py +1 -1
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_catalogue.py +9 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_forestry.py +6 -8
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_model.py +60 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_xml.py +38 -13
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/xml_et.py +12 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/_collection_add_part.py +4 -1
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/attribute_property_set.py +5 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/property_collection.py +9 -3
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_blocked_well.py +82 -52
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_trajectory.py +5 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/LICENSE +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/README.md +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/crs.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_edges_per_column_property_array.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_faults.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_one_blocked_well_property.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_one_grid_property_array.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_single_cell_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_wells_from_ascii_file.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_zone_by_layer_property.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_coarsened_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_common.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_copy_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_drape_to_surface.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_extract_box.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_extract_box_for_well.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_fault_throw_scaling.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_gather_ensemble.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_interpolated_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_local_depth_adjustment.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_refined_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_tilted_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_unsplit_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_zonal_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_zone_layer_ranges_from_array.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/fault/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/fault/_gcs_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/fault/_grid_connection_set.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_cell_properties.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_connection_sets.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_create_grid_xml.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_defined_geometry.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_extract_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_face_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_faults.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_grid_types.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_intervals_info.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_moved_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_pillars.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_pixel_maps.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_points_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_regular_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_transmissibility.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_write_hdf5_from_caches.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_write_nexus_corp.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid/_xyz.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/_blocked_well_populate.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/_find_faces.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/_grid_skin.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/_grid_surface.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/_trajectory_intersects.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/grid_surface/grid_surface_cuda.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/lines/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/lines/_common.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/lines/_polyline.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/lines/_polyline_set.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_context.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_grids.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/model/_hdf5.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/multi_processing/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/multi_processing/_multiprocessing.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/multi_processing/wrappers/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/multi_processing/wrappers/blocked_well_mp.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/multi_processing/wrappers/grid_surface_mp.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/multi_processing/wrappers/mesh_mp.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/ab_toolbox.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/base.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/box_utilities.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/class_dict.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/consolidation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/data/build.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/data/properties.json +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/dataframe.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/exceptions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/factors.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/fine_coarse.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/grid_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/intersection.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/keyword_files.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/load_data.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/point_inclusion.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/random_seed.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/read_nexus_fault.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/relperm.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/simple_lines.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/time.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/trademark.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/transmission.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/triangulation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/uuid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/vdb.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/vector_utilities.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/volume.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/wellspec_keywords.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/write_data.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/write_hdf5.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/xml_namespaces.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/olio/zmap_reader.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/_utils.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/boundary_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/boundary_feature_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/earth_model_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/fault_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/fluid_boundary_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/frontier_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/generic_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/genetic_boundary_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/geobody_boundary_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/geobody_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/geobody_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/geologic_unit_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/horizon_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/organization_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/rock_fluid_unit_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/structural_organization_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/tectonic_boundary_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/wellbore_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/organize/wellbore_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/_collection_create_xml.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/_collection_get_attributes.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/_collection_support.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/_property.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/grid_property_collection.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/property_common.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/property_kind.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/string_lookup.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/well_interval_property.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/well_interval_property_collection.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/well_log.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/property/well_log_collection.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/_add_ab_properties.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/_add_surfaces.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/_grid_from_cp.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/_import_nexus.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/_import_vdb_all_grids.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/rq_import/_import_vdb_ensemble.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_binary_contact_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_geologic_unit_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_strata_common.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_stratigraphic_column.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_stratigraphic_column_rank.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_stratigraphic_unit_feature.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/strata/_stratigraphic_unit_interpretation.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_base_surface.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_combined_surface.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_mesh.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_pointset.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_surface.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_tri_mesh.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_tri_mesh_stencil.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/surface/_triangulated_patch.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/_any_time_series.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/_from_nexus_summary.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/_functions.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/_geologic_time_series.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/_time_duration.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/time_series/_time_series.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/unstructured/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/unstructured/_hexa_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/unstructured/_prism_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/unstructured/_pyramid_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/unstructured/_tetra_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/unstructured/_unstructured_grid.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/weights_and_measures/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/weights_and_measures/nexus_units.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/weights_and_measures/weights_and_measures.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/__init__.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_deviation_survey.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_md_datum.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_wellbore_frame.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_wellbore_marker.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/_wellbore_marker_frame.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/blocked_well_frame.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/well_object_funcs.py +0 -0
- {resqpy-4.16.2 → resqpy-4.16.3}/resqpy/well/well_utils.py +0 -0
@@ -553,6 +553,15 @@ def _citation_title_for_part(model, part): # duplicate functionality to title_f
|
|
553
553
|
return title
|
554
554
|
|
555
555
|
|
556
|
+
def _source_for_part(model, part):
|
557
|
+
"""Returns the source string from the part's extra metadata, if present, else None."""
|
558
|
+
|
559
|
+
part_extra = rqet.load_metadata_from_xml(_root_for_part(model, part))
|
560
|
+
if not part_extra:
|
561
|
+
return None
|
562
|
+
return part_extra.get('source')
|
563
|
+
|
564
|
+
|
556
565
|
def _root_for_time_series(model, uuid = None):
|
557
566
|
"""Return root for time series part."""
|
558
567
|
|
@@ -200,8 +200,8 @@ def _load_epc(model, epc_file, full_load = True, epc_subdir = None, copy_from =
|
|
200
200
|
def _add_uuid_soft_relations(model, uuid_int, part):
|
201
201
|
if "EpcExternalPart" in part:
|
202
202
|
return
|
203
|
-
|
204
|
-
if
|
203
|
+
rels_part = rqet.rels_part_name_for_part(part)
|
204
|
+
if rels_part in model.rels_forest:
|
205
205
|
rels_root = m_c._root_for_part(model, rqet.rels_part_name_for_part(part), is_rels = True)
|
206
206
|
if rels_root is not None:
|
207
207
|
for relation_node in rels_root:
|
@@ -214,9 +214,10 @@ def _add_uuid_soft_relations(model, uuid_int, part):
|
|
214
214
|
if relation_uuid_str is None:
|
215
215
|
return # probably HDF5 external resource
|
216
216
|
relation_uuid_int = _hex_to_int(relation_uuid_str)
|
217
|
-
|
218
|
-
if
|
219
|
-
|
217
|
+
rels_sets = model.uuid_rels_dict.get(uuid_int)
|
218
|
+
if rels_sets is not None and relation_uuid_int not in rels_sets[
|
219
|
+
0] and relation_uuid_int not in rels_sets[1]:
|
220
|
+
rels_sets[2].add(relation_uuid_int)
|
220
221
|
|
221
222
|
|
222
223
|
def _add_uuid_relations(model, uuid_int, part):
|
@@ -719,9 +720,6 @@ def _copy_relationships_for_present_targets(model, other_model, consolidate, for
|
|
719
720
|
continue
|
720
721
|
else:
|
721
722
|
continue
|
722
|
-
if not force and resident_related_part in m_c._parts_list_filtered_by_related_uuid(
|
723
|
-
model, m_c._list_of_parts(model), resident_uuid):
|
724
|
-
continue
|
725
723
|
related_node = m_c._root_for_part(model, resident_related_part)
|
726
724
|
assert related_node is not None
|
727
725
|
|
@@ -1108,6 +1108,66 @@ class Model():
|
|
1108
1108
|
|
1109
1109
|
return m_c._citation_title_for_part(self, part)
|
1110
1110
|
|
1111
|
+
def source_for_part(self, part):
|
1112
|
+
"""Returns the source string from the part's extra metadata, if present, else None.
|
1113
|
+
|
1114
|
+
arguments:
|
1115
|
+
part (str): the part for which the source information is required
|
1116
|
+
|
1117
|
+
returns:
|
1118
|
+
str being the text of the source field in the xml extra metadata of the part, or None
|
1119
|
+
"""
|
1120
|
+
|
1121
|
+
return m_c._source_for_part(self, part)
|
1122
|
+
|
1123
|
+
def set_source_for_part(self, part, source):
|
1124
|
+
"""Sets the source string in the part's extra metadata.
|
1125
|
+
|
1126
|
+
arguments:
|
1127
|
+
part (str): the part for which the source information is to be set
|
1128
|
+
source (str): text for the extra metadata source item
|
1129
|
+
|
1130
|
+
notes:
|
1131
|
+
this function adds the source item to the in-memory xml extra metadata;
|
1132
|
+
any previous text for the source item (if present) will be replaced;
|
1133
|
+
it will be included in the epc if store_epc() is subsequently called
|
1134
|
+
"""
|
1135
|
+
|
1136
|
+
m_x._create_source(source, root = m_c._root_for_part(self, part))
|
1137
|
+
self.set_modified()
|
1138
|
+
|
1139
|
+
def source_for_obj(self, obj):
|
1140
|
+
"""Returns the source string from the object's extra metadata, if present, else None.
|
1141
|
+
|
1142
|
+
arguments:
|
1143
|
+
obj (BaseResqpy): any high level resqpy object (eg. Surface)
|
1144
|
+
|
1145
|
+
returns:
|
1146
|
+
str being the text of the source extra metadata item for the object, or None
|
1147
|
+
"""
|
1148
|
+
|
1149
|
+
return m_c._source_for_part(self, obj.part)
|
1150
|
+
|
1151
|
+
def set_source_for_obj(self, obj, source):
|
1152
|
+
"""Sets the source string in the object's extra metadata.
|
1153
|
+
|
1154
|
+
arguments:
|
1155
|
+
part (str): the part for which the source information is to be set
|
1156
|
+
source (str): text for the extra metadata source item
|
1157
|
+
|
1158
|
+
notes:
|
1159
|
+
this function adds the source item to the in-memory xml extra metadata as well as
|
1160
|
+
the object's extra_metadata dictionary
|
1161
|
+
any previous text for the source item (if present) will be replaced;
|
1162
|
+
it will be included in the epc if store_epc() is subsequently called
|
1163
|
+
"""
|
1164
|
+
|
1165
|
+
m_x._create_source(source, root = obj.root)
|
1166
|
+
if not hasattr(obj, 'extra_metadata') or obj.extra_metadata is None:
|
1167
|
+
obj.extra_metadata = {}
|
1168
|
+
obj.extra_metadata['source'] = str(source)
|
1169
|
+
self.set_modified()
|
1170
|
+
|
1111
1171
|
def root_for_time_series(self, uuid = None):
|
1112
1172
|
"""Return root for time series part.
|
1113
1173
|
|
@@ -420,22 +420,39 @@ def _create_supporting_representation(model,
|
|
420
420
|
|
421
421
|
|
422
422
|
def _create_source(source, root = None):
|
423
|
-
"""Create an extra meta data node holding information on the source of the data, optionally add to root.
|
423
|
+
"""Create an extra meta data node holding information on the source of the data, optionally add to root.
|
424
424
|
|
425
|
-
|
426
|
-
|
427
|
-
|
425
|
+
note:
|
426
|
+
if the root already contains a 'source' extra metadata item, its text field is updated and the
|
427
|
+
existing extra metadata xml node is returned
|
428
|
+
"""
|
428
429
|
|
429
|
-
|
430
|
-
|
431
|
-
|
430
|
+
emd_node = None
|
431
|
+
if root is not None:
|
432
|
+
emd_node = rqet.find_metadata_item_node_in_xml(root, 'source')
|
432
433
|
|
433
|
-
|
434
|
-
value_node.set(ns['xsi'] + 'type', ns['xsd'] + 'string')
|
435
|
-
value_node.text = source
|
434
|
+
if emd_node is None:
|
436
435
|
|
437
|
-
|
438
|
-
|
436
|
+
emd_node = rqet.Element(ns['resqml2'] + 'ExtraMetadata')
|
437
|
+
emd_node.set(ns['xsi'] + 'type', ns['resqml2'] + 'NameValuePair')
|
438
|
+
emd_node.text = rqet.null_xml_text
|
439
|
+
|
440
|
+
name_node = rqet.SubElement(emd_node, ns['resqml2'] + 'Name')
|
441
|
+
name_node.set(ns['xsi'] + 'type', ns['xsd'] + 'string')
|
442
|
+
name_node.text = 'source'
|
443
|
+
|
444
|
+
value_node = rqet.SubElement(emd_node, ns['resqml2'] + 'Value')
|
445
|
+
value_node.set(ns['xsi'] + 'type', ns['xsd'] + 'string')
|
446
|
+
value_node.text = str(source)
|
447
|
+
|
448
|
+
if root is not None:
|
449
|
+
root.append(emd_node)
|
450
|
+
|
451
|
+
else:
|
452
|
+
|
453
|
+
value_node = rqet.find_tag(emd_node, 'Value')
|
454
|
+
assert value_node is not None
|
455
|
+
value_node.text = str(source)
|
439
456
|
|
440
457
|
return emd_node
|
441
458
|
|
@@ -457,7 +474,9 @@ def _create_patch(model,
|
|
457
474
|
assert ext_uuid is not None
|
458
475
|
else:
|
459
476
|
assert const_count is not None and const_count > 0
|
460
|
-
if
|
477
|
+
if isinstance(const_value, bool):
|
478
|
+
hdf5_type = 'BooleanConstantArray' # not actually stored in hdf5
|
479
|
+
elif hdf5_type.endswith('Hdf5Array'):
|
461
480
|
hdf5_type = hdf5_type[:-9] + 'ConstantArray'
|
462
481
|
|
463
482
|
lxt = str(xsd_type).lower()
|
@@ -488,6 +507,7 @@ def _create_patch(model,
|
|
488
507
|
outer_values_node.text = rqet.null_xml_text
|
489
508
|
|
490
509
|
if discrete and const_value is None:
|
510
|
+
|
491
511
|
if null_value is None:
|
492
512
|
if str(xsd_type).startswith('u'):
|
493
513
|
null_value = 4294967295 # 2^32 - 1, used as default even for 64 bit data!
|
@@ -507,6 +527,11 @@ def _create_patch(model,
|
|
507
527
|
|
508
528
|
else:
|
509
529
|
|
530
|
+
# TODO: handle bool const_value as special case
|
531
|
+
if isinstance(const_value, bool):
|
532
|
+
const_value = str(const_value).lower()
|
533
|
+
xsd_type = 'boolean'
|
534
|
+
|
510
535
|
const_value_node = rqet.SubElement(outer_values_node, ns['resqml2'] + 'Value')
|
511
536
|
const_value_node.set(ns['xsi'] + 'type', ns['xsd'] + xsd_type)
|
512
537
|
const_value_node.text = str(const_value)
|
@@ -778,6 +778,18 @@ def load_metadata_from_xml(node):
|
|
778
778
|
return extra_metadata
|
779
779
|
|
780
780
|
|
781
|
+
def find_metadata_item_node_in_xml(node, key):
|
782
|
+
"""Returns the extra metadata node for a particular key, if present."""
|
783
|
+
|
784
|
+
if node is None:
|
785
|
+
return None
|
786
|
+
meta_nodes = list_of_tag(node, 'ExtraMetadata')
|
787
|
+
for meta in meta_nodes:
|
788
|
+
if find_tag_text(meta, 'Name') == key:
|
789
|
+
return meta
|
790
|
+
return None
|
791
|
+
|
792
|
+
|
781
793
|
def create_metadata_xml(node, extra_metadata):
|
782
794
|
"""Writes the xml for the given metadata dictionary."""
|
783
795
|
|
@@ -202,6 +202,9 @@ def _process_imported_property(collection, attributes, property_kind_uuid, strin
|
|
202
202
|
const_value, points, p_time_series_uuid, p_string_lookup_uuid) = attributes
|
203
203
|
|
204
204
|
log.debug('processing imported property ' + str(p_keyword))
|
205
|
+
print(
|
206
|
+
f'**** keyword: {p_keyword}; const value: {const_value}; type: {type(const_value)}; is bool: {isinstance(const_value, bool)}'
|
207
|
+
)
|
205
208
|
assert not points or not p_discrete
|
206
209
|
if local_property_kind_uuid is None:
|
207
210
|
local_property_kind_uuid = property_kind_uuid
|
@@ -214,7 +217,7 @@ def _process_imported_property(collection, attributes, property_kind_uuid, strin
|
|
214
217
|
p_keyword, p_discrete, string_lookup_uuid, points)
|
215
218
|
|
216
219
|
p_array = _process_imported_property_get_p_array(collection, p_cached_name)
|
217
|
-
p_array_bool =
|
220
|
+
p_array_bool = isinstance(const_value, bool) if p_array is None else p_array.dtype in [bool, np.int8]
|
218
221
|
|
219
222
|
add_min_max = pcga._process_imported_property_get_add_min_max(points, property_kind, string_lookup_uuid,
|
220
223
|
local_property_kind_uuid, p_array_bool)
|
@@ -159,6 +159,11 @@ class ApsProperty:
|
|
159
159
|
"""The extra metadata for this property (synonymous with extra)."""
|
160
160
|
return self.extra
|
161
161
|
|
162
|
+
@property
|
163
|
+
def source(self):
|
164
|
+
"""The source extra metadata value for this property (or None)."""
|
165
|
+
return self.aps.source_for_part(self.part)
|
166
|
+
|
162
167
|
@property
|
163
168
|
def support_uuid(self):
|
164
169
|
"""The uuid of the supporting representation for this property."""
|
@@ -85,7 +85,7 @@ class PropertyCollection():
|
|
85
85
|
self.realization = realization # model realization number within an ensemble
|
86
86
|
self.null_value = None
|
87
87
|
self.imported_list = []
|
88
|
-
# above is list of (uuid,
|
88
|
+
# above is list of (uuid, source, keyword, cached_name, discrete, uom, time_index, null_value,
|
89
89
|
# min_value, max_value, property_kind, facet_type, facet, realization,
|
90
90
|
# indexable_element, count, local_property_kind_uuid, const_value, points,
|
91
91
|
# time_series_uuid, string_lookup_uuid)
|
@@ -1300,6 +1300,12 @@ class PropertyCollection():
|
|
1300
1300
|
|
1301
1301
|
return [self.citation_title_for_part(p) for p in self.parts()]
|
1302
1302
|
|
1303
|
+
def source_for_part(self, part):
|
1304
|
+
"""Returns the source string from the part's extra metadata, if present, else None."""
|
1305
|
+
|
1306
|
+
assert self.model is not None
|
1307
|
+
return self.model.source_for_part(part)
|
1308
|
+
|
1303
1309
|
def time_series_uuid_for_part(self, part):
|
1304
1310
|
"""If the property has an associated time series (is not static), returns the uuid for the time series.
|
1305
1311
|
|
@@ -2275,7 +2281,7 @@ class PropertyCollection():
|
|
2275
2281
|
if cached_array is not None:
|
2276
2282
|
min_value, max_value = pcga._min_max_of_cached_array(self, cached_name, cached_array, null_value, discrete)
|
2277
2283
|
else:
|
2278
|
-
if const_value == null_value or (not discrete and np.isnan(const_value)):
|
2284
|
+
if const_value == null_value or isinstance(const_value, bool) or (not discrete and np.isnan(const_value)):
|
2279
2285
|
min_value = max_value = None
|
2280
2286
|
else:
|
2281
2287
|
min_value = max_value = const_value
|
@@ -2652,7 +2658,7 @@ class PropertyCollection():
|
|
2652
2658
|
must cycle fastest in the array, ie. be the last index
|
2653
2659
|
points (bool, default False): if True, this is a points property
|
2654
2660
|
extra_metadata (dictionary, optional): if present, adds extra metadata in the xml
|
2655
|
-
const_value (float or
|
2661
|
+
const_value (float, int or bool, optional): if present, create xml for a constant array filled with this value
|
2656
2662
|
expand_const_arrays (boolean, default False): if True, the hdf5 write must also have been called with the
|
2657
2663
|
same argument and the xml will treat a constant array as a normal array
|
2658
2664
|
|
@@ -328,6 +328,7 @@ class BlockedWell(BaseResqpy):
|
|
328
328
|
|
329
329
|
def __find_grid_node(self, node, unique_grid_indices):
|
330
330
|
"""Find the BlockedWell object's grid reference node(s)."""
|
331
|
+
|
331
332
|
grid_node_list = rqet.list_of_tag(node, 'Grid')
|
332
333
|
assert len(grid_node_list) > 0, 'blocked well grid reference(s) not found in xml'
|
333
334
|
assert unique_grid_indices[0] >= -1 and unique_grid_indices[-1] < len(
|
@@ -344,6 +345,7 @@ class BlockedWell(BaseResqpy):
|
|
344
345
|
|
345
346
|
def extract_property_collection(self, refresh = False):
|
346
347
|
"""Returns a property collection for the blocked well."""
|
348
|
+
|
347
349
|
if self.property_collection is None or refresh:
|
348
350
|
self.property_collection = rqp.PropertyCollection(support = self)
|
349
351
|
return self.property_collection
|
@@ -407,6 +409,7 @@ class BlockedWell(BaseResqpy):
|
|
407
409
|
|
408
410
|
def interval_for_cell(self, cell_index):
|
409
411
|
"""Returns the interval index for a given cell index (identical if there are no unblocked intervals)."""
|
412
|
+
|
410
413
|
assert 0 <= cell_index < self.cell_count
|
411
414
|
if self.node_count == self.cell_count + 1:
|
412
415
|
return cell_index
|
@@ -424,11 +427,13 @@ class BlockedWell(BaseResqpy):
|
|
424
427
|
(float, float) being the entry and exit measured depths for the cell, along the trajectory;
|
425
428
|
uom is held in trajectory object
|
426
429
|
"""
|
430
|
+
|
427
431
|
interval = self.interval_for_cell(cell_index)
|
428
432
|
return (self.node_mds[interval], self.node_mds[interval + 1])
|
429
433
|
|
430
434
|
def _set_cell_interval_map(self):
|
431
435
|
"""Sets up an index mapping from blocked cell index to interval index, accounting for unblocked intervals."""
|
436
|
+
|
432
437
|
self.cell_interval_map = np.zeros(self.cell_count, dtype = int)
|
433
438
|
ci = 0
|
434
439
|
for ii in range(self.node_count - 1):
|
@@ -718,6 +723,7 @@ class BlockedWell(BaseResqpy):
|
|
718
723
|
|
719
724
|
def __derive_from_wellspec_check_well_name(self, well_name):
|
720
725
|
"""Set the well name to be used in the wellspec file."""
|
726
|
+
|
721
727
|
if well_name:
|
722
728
|
self.well_name = well_name
|
723
729
|
else:
|
@@ -1211,6 +1217,7 @@ class BlockedWell(BaseResqpy):
|
|
1211
1217
|
@staticmethod
|
1212
1218
|
def __verify_header_lines_in_cellio_file(fp, well_name, cellio_file):
|
1213
1219
|
"""Find and verify the information in the header lines for the specified well in the RMS cellio file."""
|
1220
|
+
|
1214
1221
|
while True:
|
1215
1222
|
kf.skip_blank_lines_and_comments(fp)
|
1216
1223
|
line = fp.readline() # file format version number?
|
@@ -1637,41 +1644,46 @@ class BlockedWell(BaseResqpy):
|
|
1637
1644
|
if skip_interval_due_to_min_kh:
|
1638
1645
|
continue
|
1639
1646
|
|
1640
|
-
length, radw_i, skin_i, radb, wi, wbc
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1647
|
+
length, radw_i, skin_i, radb, wi, wbc, stat_i = \
|
1648
|
+
BlockedWell.__get_pc_arrays_for_interval(pc = pc,
|
1649
|
+
pc_timeless = pc_timeless,
|
1650
|
+
pc_titles = pc_titles,
|
1651
|
+
ci = ci,
|
1652
|
+
length = length,
|
1653
|
+
radw = radw,
|
1654
|
+
skin = skin,
|
1655
|
+
stat = stat,
|
1656
|
+
length_uom = length_uom,
|
1657
|
+
grid = grid,
|
1658
|
+
traj_crs = traj_crs)
|
1650
1659
|
if skin_i is None:
|
1651
1660
|
skin_i = 0.0
|
1652
1661
|
if radw_i is None:
|
1653
1662
|
radw_i = (0.33 if length_uom == 'ft' else 0.1)
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1663
|
+
if stat_i is None:
|
1664
|
+
stat_i = stat
|
1665
|
+
|
1666
|
+
radb, wi, wbc = \
|
1667
|
+
BlockedWell.__get_well_inflow_parameters_for_interval(do_well_inflow = do_well_inflow,
|
1668
|
+
isotropic_perm = isotropic_perm,
|
1669
|
+
ntg_is_one = ntg_is_one,
|
1670
|
+
k_i = k_i,
|
1671
|
+
k_j = k_j,
|
1672
|
+
k_k = k_k,
|
1673
|
+
sine_anglv = sine_anglv,
|
1674
|
+
cosine_anglv = cosine_anglv,
|
1675
|
+
sine_angla = sine_angla,
|
1676
|
+
cosine_angla = cosine_angla,
|
1677
|
+
grid = grid,
|
1678
|
+
cell_kji0 = cell_kji0,
|
1679
|
+
radw = radw_i,
|
1680
|
+
radb = radb,
|
1681
|
+
wi = wi,
|
1682
|
+
wbc = wbc,
|
1683
|
+
skin = skin_i,
|
1684
|
+
kh = kh,
|
1685
|
+
length_uom = length_uom,
|
1686
|
+
column_list = column_list)
|
1675
1687
|
|
1676
1688
|
xyz = self.__get_xyz_for_interval(doing_xyz = doing_xyz,
|
1677
1689
|
length_mode = length_mode,
|
@@ -1703,7 +1715,7 @@ class BlockedWell(BaseResqpy):
|
|
1703
1715
|
kh = kh,
|
1704
1716
|
xyz = xyz,
|
1705
1717
|
md = md,
|
1706
|
-
stat =
|
1718
|
+
stat = stat_i,
|
1707
1719
|
part_perf_fraction = part_perf_fraction,
|
1708
1720
|
radb = radb,
|
1709
1721
|
wi = wi,
|
@@ -1751,6 +1763,7 @@ class BlockedWell(BaseResqpy):
|
|
1751
1763
|
fraction of wellbore frame interval in cell,
|
1752
1764
|
fraction of cell's wellbore interval in wellbore frame interval)
|
1753
1765
|
"""
|
1766
|
+
|
1754
1767
|
return bwf.blocked_well_frame_contributions_list(self, wbf)
|
1755
1768
|
|
1756
1769
|
def add_properties_from_wellbore_frame(self,
|
@@ -1965,8 +1978,10 @@ class BlockedWell(BaseResqpy):
|
|
1965
1978
|
stat = str(stat).upper()
|
1966
1979
|
if 'STAT' not in column_list:
|
1967
1980
|
column_list.append('STAT')
|
1968
|
-
|
1969
|
-
|
1981
|
+
|
1982
|
+
|
1983
|
+
# else:
|
1984
|
+
# stat = 'ON'
|
1970
1985
|
|
1971
1986
|
if radw is not None and 'RADW' not in column_list:
|
1972
1987
|
column_list.append('RADW')
|
@@ -2418,29 +2433,37 @@ class BlockedWell(BaseResqpy):
|
|
2418
2433
|
return kh
|
2419
2434
|
|
2420
2435
|
@staticmethod
|
2421
|
-
def __get_pc_arrays_for_interval(pc, pc_timeless, pc_titles, ci, length, radw, skin, length_uom, grid,
|
2436
|
+
def __get_pc_arrays_for_interval(pc, pc_timeless, pc_titles, ci, length, radw, skin, stat, length_uom, grid,
|
2437
|
+
traj_crs):
|
2422
2438
|
"""Get the property collection arrays for the interval."""
|
2423
2439
|
|
2424
2440
|
def get_item(v, title, pc_titles, pc, pc_timeless, ci, uom):
|
2425
2441
|
|
2426
2442
|
def pk_for_title(title):
|
2427
|
-
d = {
|
2443
|
+
d = {
|
2444
|
+
'RADW': 'wellbore radius',
|
2445
|
+
'RADB': 'block equivalent radius',
|
2446
|
+
'SKIN': 'skin',
|
2447
|
+
'STAT': 'well connection open'
|
2448
|
+
}
|
2428
2449
|
return d.get(title)
|
2429
2450
|
|
2451
|
+
p = None
|
2452
|
+
pk = pk_for_title(title)
|
2430
2453
|
pc_uom = None
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
p
|
2437
|
-
|
2438
|
-
pk = pk_for_title(title)
|
2439
|
-
if pk is not None:
|
2440
|
-
p = pc_timeless.singleton(property_kind = pk)
|
2454
|
+
for try_pc in [pc, pc_timeless]:
|
2455
|
+
if try_pc is None:
|
2456
|
+
continue
|
2457
|
+
if title in pc_titles:
|
2458
|
+
p = try_pc.singleton(citation_title = title)
|
2459
|
+
if p is None and pk is not None:
|
2460
|
+
p = try_pc.singleton(property_kind = pk)
|
2441
2461
|
if p is not None:
|
2442
|
-
v =
|
2443
|
-
pc_uom =
|
2462
|
+
v = try_pc.cached_part_array_ref(p)[ci]
|
2463
|
+
pc_uom = try_pc.uom_for_part(p)
|
2464
|
+
break
|
2465
|
+
if (title == 'STAT' or pk == 'well connection open') and v is not None and not isinstance(v, str):
|
2466
|
+
v = 'ON' if v else 'OFF'
|
2444
2467
|
if pc_uom is not None and uom is not None and pc_uom != uom:
|
2445
2468
|
v = wam.convert_lengths(v, pc_uom, uom)
|
2446
2469
|
return v
|
@@ -2453,6 +2476,7 @@ class BlockedWell(BaseResqpy):
|
|
2453
2476
|
r_uom = length_uom
|
2454
2477
|
length = get_item(length, 'LENGTH', pc_titles, pc, pc_timeless, ci, l_uom)
|
2455
2478
|
radw = get_item(radw, 'RADW', pc_titles, pc, pc_timeless, ci, r_uom)
|
2479
|
+
stat = get_item(stat, 'STAT', pc_titles, pc, pc_timeless, ci, None)
|
2456
2480
|
assert radw is None or radw > 0.0 # todo: allow zero for inactive intervals?
|
2457
2481
|
skin = get_item(skin, 'SKIN', pc_titles, pc, pc_timeless, ci, None)
|
2458
2482
|
if skin is None:
|
@@ -2463,7 +2487,7 @@ class BlockedWell(BaseResqpy):
|
|
2463
2487
|
wi = get_item(None, 'WI', pc_titles, pc, pc_timeless, ci, None)
|
2464
2488
|
wbc = get_item(None, 'WBC', pc_titles, pc, pc_timeless, ci, None)
|
2465
2489
|
|
2466
|
-
return length, radw, skin, radb, wi, wbc
|
2490
|
+
return length, radw, skin, radb, wi, wbc, stat
|
2467
2491
|
|
2468
2492
|
@staticmethod
|
2469
2493
|
def __get_well_inflow_parameters_for_interval(do_well_inflow, isotropic_perm, ntg_is_one, k_i, k_j, k_k, sine_anglv,
|
@@ -2689,6 +2713,7 @@ class BlockedWell(BaseResqpy):
|
|
2689
2713
|
this method currently only handles single grid situations;
|
2690
2714
|
dataframe rows must be in the same order as the cells in the blocked well
|
2691
2715
|
"""
|
2716
|
+
|
2692
2717
|
# todo: enhance to handle multiple grids
|
2693
2718
|
assert len(self.grid_list) == 1
|
2694
2719
|
if columns is None or len(columns) == 0 or len(df) == 0:
|
@@ -2713,8 +2738,9 @@ class BlockedWell(BaseResqpy):
|
|
2713
2738
|
# 'SKIN': use defaults for now; todo: create local property kind for skin
|
2714
2739
|
if column == 'STAT':
|
2715
2740
|
col_as_list = list(df[column])
|
2716
|
-
expanded = np.array([(0 if (str(st).upper() in ['OFF', '0']) else 1) for st in col_as_list],
|
2717
|
-
dtype =
|
2741
|
+
expanded = np.array([(0 if (str(st).upper() in ['OFF', '0', 'FALSE']) else 1) for st in col_as_list],
|
2742
|
+
dtype = np.int8)
|
2743
|
+
dtype = np.int8
|
2718
2744
|
else:
|
2719
2745
|
expanded = df[column].to_numpy(dtype = dtype, copy = True, na_value = na_value)
|
2720
2746
|
extra_pc.add_cached_array_to_imported_list(
|
@@ -2739,6 +2765,7 @@ class BlockedWell(BaseResqpy):
|
|
2739
2765
|
|
2740
2766
|
def _get_uom_pk_discrete_for_df_properties(self, extra, length_uom, temperature_uom = None):
|
2741
2767
|
"""Set the property kind and unit of measure for all properties in the dataframe."""
|
2768
|
+
|
2742
2769
|
# todo: this is horribly inefficient, building a whole dictionary for every call but only using one entry
|
2743
2770
|
if length_uom not in ['m', 'ft']:
|
2744
2771
|
raise ValueError(f"The length_uom {length_uom} must be either 'm' or 'ft'.")
|
@@ -3297,6 +3324,7 @@ class BlockedWell(BaseResqpy):
|
|
3297
3324
|
def __create_trajectory_xml_if_needed(self, create_for_trajectory_if_needed, add_as_part, add_relationships,
|
3298
3325
|
originator, ext_uuid, title):
|
3299
3326
|
"""Create root node for associated Trajectory object if necessary."""
|
3327
|
+
|
3300
3328
|
if create_for_trajectory_if_needed and self.trajectory_to_be_written and self.trajectory.root is None:
|
3301
3329
|
md_datum_root = self.trajectory.md_datum.create_xml(add_as_part = add_as_part,
|
3302
3330
|
add_relationships = add_relationships,
|
@@ -3311,6 +3339,7 @@ class BlockedWell(BaseResqpy):
|
|
3311
3339
|
|
3312
3340
|
def __create_bw_node_sub_elements(self, bw_node):
|
3313
3341
|
"""Append sub-elements to the BlockedWell object's root node."""
|
3342
|
+
|
3314
3343
|
nc_node = rqet.SubElement(bw_node, ns['resqml2'] + 'NodeCount')
|
3315
3344
|
nc_node.set(ns['xsi'] + 'type', ns['xsd'] + 'positiveInteger')
|
3316
3345
|
nc_node.text = str(self.node_count)
|
@@ -3369,7 +3398,8 @@ class BlockedWell(BaseResqpy):
|
|
3369
3398
|
fis_values_node.set(ns['xsi'] + 'type', ns['eml'] + 'Hdf5Dataset')
|
3370
3399
|
fis_values_node.text = rqet.null_xml_text
|
3371
3400
|
|
3372
|
-
return nc_node, mds_node, mds_values_node, cc_node, cis_node, cnull_node, cis_values_node, gis_node,
|
3401
|
+
return (nc_node, mds_node, mds_values_node, cc_node, cis_node, cnull_node, cis_values_node, gis_node,
|
3402
|
+
gnull_node, gis_values_node, fis_node, fnull_node, fis_values_node)
|
3373
3403
|
|
3374
3404
|
def __create_trajectory_grid_wellbore_interpretation_reference_nodes(self, bw_node):
|
3375
3405
|
"""Create nodes and add to BlockedWell object root node."""
|
@@ -419,8 +419,13 @@ class Trajectory(BaseResqpy):
|
|
419
419
|
set_tangent_vectors = True):
|
420
420
|
"""Load MD and control points (xyz) data directly from numpy arrays."""
|
421
421
|
|
422
|
+
if isinstance(mds, list) or isinstance(mds, tuple):
|
423
|
+
mds = np.array(mds, dtype = float)
|
424
|
+
assert mds.ndim == 1
|
422
425
|
self.knot_count = len(mds)
|
423
426
|
assert self.knot_count >= 2 # vertical well could be hamdled by allowing a single station in survey?
|
427
|
+
if isinstance(control_points, list) or isinstance(control_points, tuple):
|
428
|
+
control_points = np.array(control_points, dtype = float)
|
424
429
|
assert control_points.shape == (self.knot_count, 3)
|
425
430
|
self.line_kind_index = 5 # assume minimum curvature spline
|
426
431
|
self.md_uom = wam.rq_length_unit(md_uom)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{resqpy-4.16.2 → resqpy-4.16.3}/resqpy/derived_model/_add_edges_per_column_property_array.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|