gpm package#
Subpackages#
- gpm.accessor package
- Submodules
- gpm.accessor.methods module
GPM_Base_Accessor
GPM_Base_Accessor.collocate()
GPM_Base_Accessor.crop()
GPM_Base_Accessor.crop_around_point()
GPM_Base_Accessor.crop_by_continent()
GPM_Base_Accessor.crop_by_country()
GPM_Base_Accessor.end_time
GPM_Base_Accessor.extent()
GPM_Base_Accessor.extract_at_points()
GPM_Base_Accessor.extract_transect_around_point()
GPM_Base_Accessor.extract_transect_at_points()
GPM_Base_Accessor.extract_transect_between_points()
GPM_Base_Accessor.get_crop_slices_around_point()
GPM_Base_Accessor.get_crop_slices_by_continent()
GPM_Base_Accessor.get_crop_slices_by_country()
GPM_Base_Accessor.get_crop_slices_by_extent()
GPM_Base_Accessor.get_height_at_bin()
GPM_Base_Accessor.get_slices_contiguous_granules()
GPM_Base_Accessor.get_slices_contiguous_scans()
GPM_Base_Accessor.get_slices_regular()
GPM_Base_Accessor.get_slices_regular_time()
GPM_Base_Accessor.get_slices_valid_geolocation()
GPM_Base_Accessor.has_contiguous_scans
GPM_Base_Accessor.has_missing_granules
GPM_Base_Accessor.has_regular_time
GPM_Base_Accessor.has_valid_geolocation
GPM_Base_Accessor.is_grid
GPM_Base_Accessor.is_orbit
GPM_Base_Accessor.is_regular
GPM_Base_Accessor.is_spatial_2d
GPM_Base_Accessor.is_spatial_3d
GPM_Base_Accessor.isel()
GPM_Base_Accessor.mask_above_bin()
GPM_Base_Accessor.mask_below_bin()
GPM_Base_Accessor.mask_between_bins()
GPM_Base_Accessor.plot_map_mesh()
GPM_Base_Accessor.plot_map_mesh_centroids()
GPM_Base_Accessor.plot_swath()
GPM_Base_Accessor.plot_swath_lines()
GPM_Base_Accessor.plot_transect_line()
GPM_Base_Accessor.pyproj_crs
GPM_Base_Accessor.pyresample_area
GPM_Base_Accessor.quadmesh_centroids()
GPM_Base_Accessor.quadmesh_corners()
GPM_Base_Accessor.quadmesh_polygons()
GPM_Base_Accessor.quadmesh_vertices()
GPM_Base_Accessor.remap_on()
GPM_Base_Accessor.sel()
GPM_Base_Accessor.slice_range_at_bin()
GPM_Base_Accessor.slice_range_at_height()
GPM_Base_Accessor.slice_range_at_max_value()
GPM_Base_Accessor.slice_range_at_min_value()
GPM_Base_Accessor.slice_range_at_value()
GPM_Base_Accessor.spatial_dimensions
GPM_Base_Accessor.start_time
GPM_Base_Accessor.subset_by_time()
GPM_Base_Accessor.subset_by_time_slice()
GPM_Base_Accessor.subset_range_where_values()
GPM_Base_Accessor.subset_range_with_valid_data()
GPM_Base_Accessor.vertical_dimension
GPM_DataArray_Accessor
GPM_DataArray_Accessor.decibel
GPM_DataArray_Accessor.get_slices_var_between()
GPM_DataArray_Accessor.get_slices_var_equals()
GPM_DataArray_Accessor.idecibel
GPM_DataArray_Accessor.integrate_profile_concentration()
GPM_DataArray_Accessor.plot_cross_section()
GPM_DataArray_Accessor.plot_image()
GPM_DataArray_Accessor.plot_map()
GPM_DataArray_Accessor.title()
GPM_Dataset_Accessor
GPM_Dataset_Accessor.available_retrievals()
GPM_Dataset_Accessor.bin_variables
GPM_Dataset_Accessor.cross_section_variables
GPM_Dataset_Accessor.extract_dataset_above_bin()
GPM_Dataset_Accessor.extract_dataset_below_bin()
GPM_Dataset_Accessor.extract_l2_dataset()
GPM_Dataset_Accessor.frequency_variables
GPM_Dataset_Accessor.plot_cross_section()
GPM_Dataset_Accessor.plot_image()
GPM_Dataset_Accessor.plot_map()
GPM_Dataset_Accessor.retrieve()
GPM_Dataset_Accessor.select_bin_variables()
GPM_Dataset_Accessor.select_cross_section_variables()
GPM_Dataset_Accessor.select_frequency_variables()
GPM_Dataset_Accessor.select_spatial_2d_variables()
GPM_Dataset_Accessor.select_spatial_3d_variables()
GPM_Dataset_Accessor.select_vertical_variables()
GPM_Dataset_Accessor.set_encoding()
GPM_Dataset_Accessor.slice_range_at_temperature()
GPM_Dataset_Accessor.spatial_2d_variables
GPM_Dataset_Accessor.spatial_3d_variables
GPM_Dataset_Accessor.title()
GPM_Dataset_Accessor.to_dask_dataframe()
GPM_Dataset_Accessor.to_pandas_dataframe()
GPM_Dataset_Accessor.variables
GPM_Dataset_Accessor.vertical_variables
auto_wrap_docstring()
get_imported_gpm_method()
get_imported_gpm_method_path()
- Module contents
GPM_DataArray_Accessor
GPM_DataArray_Accessor.decibel
GPM_DataArray_Accessor.get_slices_var_between()
GPM_DataArray_Accessor.get_slices_var_equals()
GPM_DataArray_Accessor.idecibel
GPM_DataArray_Accessor.integrate_profile_concentration()
GPM_DataArray_Accessor.plot_cross_section()
GPM_DataArray_Accessor.plot_image()
GPM_DataArray_Accessor.plot_map()
GPM_DataArray_Accessor.title()
GPM_Dataset_Accessor
GPM_Dataset_Accessor.available_retrievals()
GPM_Dataset_Accessor.bin_variables
GPM_Dataset_Accessor.cross_section_variables
GPM_Dataset_Accessor.extract_dataset_above_bin()
GPM_Dataset_Accessor.extract_dataset_below_bin()
GPM_Dataset_Accessor.extract_l2_dataset()
GPM_Dataset_Accessor.frequency_variables
GPM_Dataset_Accessor.plot_cross_section()
GPM_Dataset_Accessor.plot_image()
GPM_Dataset_Accessor.plot_map()
GPM_Dataset_Accessor.retrieve()
GPM_Dataset_Accessor.select_bin_variables()
GPM_Dataset_Accessor.select_cross_section_variables()
GPM_Dataset_Accessor.select_frequency_variables()
GPM_Dataset_Accessor.select_spatial_2d_variables()
GPM_Dataset_Accessor.select_spatial_3d_variables()
GPM_Dataset_Accessor.select_vertical_variables()
GPM_Dataset_Accessor.set_encoding()
GPM_Dataset_Accessor.slice_range_at_temperature()
GPM_Dataset_Accessor.spatial_2d_variables
GPM_Dataset_Accessor.spatial_3d_variables
GPM_Dataset_Accessor.title()
GPM_Dataset_Accessor.to_dask_dataframe()
GPM_Dataset_Accessor.to_pandas_dataframe()
GPM_Dataset_Accessor.variables
GPM_Dataset_Accessor.vertical_variables
- gpm.bucket package
- Submodules
- gpm.bucket.analysis module
- gpm.bucket.dataframe module
- gpm.bucket.filters module
- gpm.bucket.io module
- gpm.bucket.partitioning module
Base2DPartitioning
Base2DPartitioning.add_centroids()
Base2DPartitioning.add_labels()
Base2DPartitioning.bounds
Base2DPartitioning.centroids
Base2DPartitioning.directories
Base2DPartitioning.directories_around_point()
Base2DPartitioning.directories_by_extent()
Base2DPartitioning.get_partitions_around_point()
Base2DPartitioning.get_partitions_by_extent()
Base2DPartitioning.labels
Base2DPartitioning.quadmesh_corners()
Base2DPartitioning.query_centroids()
Base2DPartitioning.query_centroids_by_indices()
Base2DPartitioning.query_indices()
Base2DPartitioning.query_labels()
Base2DPartitioning.query_labels_by_indices()
Base2DPartitioning.query_vertices()
Base2DPartitioning.query_vertices_by_indices()
Base2DPartitioning.to_shapely()
Base2DPartitioning.to_xarray()
Base2DPartitioning.vertices()
LonLatPartitioning
TilePartitioning
XYPartitioning
check_default_levels()
check_partitioning_flavor()
check_partitioning_order()
check_valid_x_y()
flatten_indices_arrays()
flatten_xy_arrays()
get_array_combinations()
get_bounds()
get_centroids_from_bounds()
get_directories()
get_n_decimals()
get_partition_dir_name()
get_tile_id_labels()
get_tile_xy_labels()
justify_labels()
mask_invalid_indices()
np_broadcast_like()
query_indices()
- gpm.bucket.readers module
- gpm.bucket.routines module
- gpm.bucket.writers module
convert_size_to_bytes()
estimate_row_group_size()
get_table_from_dask_dataframe_partition()
get_table_schema_without_partitions()
preprocess_writer_kwargs()
write_arrow_partitioned_dataset()
write_dask_partitioned_dataset()
write_dataset_metadata()
write_pandas_partitioned_dataset()
write_partitioned_dataset()
write_polars_partitioned_dataset()
- Module contents
- gpm.dataset package
- Subpackages
- gpm.dataset.decoding package
- Submodules
- gpm.dataset.decoding.cf module
- gpm.dataset.decoding.coordinates module
- gpm.dataset.decoding.dataarray_attrs module
- gpm.dataset.decoding.decode_1b_radar module
- gpm.dataset.decoding.decode_1c_pmw module
- gpm.dataset.decoding.decode_2a_pmw module
- gpm.dataset.decoding.decode_2a_radar module
- gpm.dataset.decoding.decode_2b_corra module
- gpm.dataset.decoding.decode_imerg module
- gpm.dataset.decoding.routines module
- gpm.dataset.decoding.utils module
- Module contents
- gpm.dataset.decoding package
- Submodules
- gpm.dataset.attrs module
- gpm.dataset.conventions module
- gpm.dataset.coords module
- gpm.dataset.crs module
- gpm.dataset.dataset module
- gpm.dataset.datatree module
- gpm.dataset.dimensions module
- gpm.dataset.granule module
- gpm.dataset.groups_variables module
- Module contents
- Subpackages
- gpm.encoding package
- gpm.etc package
- gpm.gv package
- gpm.io package
- Submodules
- gpm.io.checks module
check_base_dir()
check_date()
check_filepaths()
check_full_product_level()
check_full_product_levels()
check_groups()
check_product()
check_product_categories()
check_product_category()
check_product_level()
check_product_levels()
check_product_type()
check_product_types()
check_product_validity()
check_product_version()
check_remote_storage()
check_satellite()
check_satellites()
check_scan_mode()
check_sensor()
check_sensors()
check_start_end_time()
check_storage()
check_time()
check_transfer_tool()
check_transfer_tool_availability()
check_valid_time_request()
check_variables()
check_version()
check_versions()
get_current_utc_time()
- gpm.io.data_integrity module
- gpm.io.download module
- gpm.io.filter module
- gpm.io.find module
- gpm.io.ges_disc module
- gpm.io.info module
check_groups()
get_end_time_from_filepaths()
get_granule_from_filepaths()
get_info_from_filepath()
get_key_from_filepath()
get_key_from_filepaths()
get_product_from_filepath()
get_product_from_filepaths()
get_season()
get_start_end_time_from_filepaths()
get_start_time_from_filepaths()
get_time_component()
get_version_from_filepath()
get_version_from_filepaths()
group_filepaths()
- gpm.io.local module
- gpm.io.pps module
- gpm.io.products module
available_product_categories()
available_product_levels()
available_product_versions()
available_products()
available_satellites()
available_scan_modes()
available_sensors()
available_versions()
filter_info_dict_by_time()
get_available_product_categories()
get_available_product_levels()
get_available_product_types()
get_available_products()
get_available_satellites()
get_available_sensors()
get_available_versions()
get_info_dict()
get_info_dict_subset()
get_last_product_version()
get_product_category()
get_product_end_time()
get_product_info()
get_product_level()
get_product_pattern()
get_product_start_time()
get_products_pattern_dict()
is_gpm_api_product()
is_trmm_product()
- Module contents
- gpm.retrievals package
- Submodules
- gpm.retrievals.retrieval_1b_radar module
get_dielectric_constant()
get_radar_wavelength()
open_dataset_1b_ka_fs()
resample_hs_to_fs()
retrieve_Psignal()
retrieve_ellipsoidBinOffset()
retrieve_geolocation_3d()
retrieve_height()
retrieve_range_distance_from_ellipsoid()
retrieve_range_distance_from_satellite()
retrieve_sampling_type()
retrieve_scRangeDEM()
retrieve_sigmaMeasured()
retrieve_signalPower()
retrieve_snRatio()
retrieve_zMeasured()
- gpm.retrievals.retrieval_2a_pmw module
- gpm.retrievals.retrieval_2a_radar module
get_nrange()
get_range_resolution()
retrieve_EchoDepth()
retrieve_EchoTopHeight()
retrieve_HailKineticEnergy()
retrieve_MESH()
retrieve_MESHS()
retrieve_POH()
retrieve_POSH()
retrieve_REFC()
retrieve_REFCH()
retrieve_SHI()
retrieve_VIL()
retrieve_VILD()
retrieve_bright_band_ratio()
retrieve_c_band_tan()
retrieve_dfrFinal()
retrieve_dfrFinalNearSurface()
retrieve_dfrMeasured()
retrieve_flagHydroClass()
retrieve_flagPrecipitationType()
retrieve_gate_resolution()
retrieve_gate_volume()
retrieve_heightClutterFreeBottom()
retrieve_heightRealSurfaceKa()
retrieve_heightRealSurfaceKu()
retrieve_range_distance_from_ellipsoid()
retrieve_range_distance_from_satellite()
retrieve_range_resolution()
retrieve_s_band_cao2013()
retrieve_x_band_tan()
- gpm.retrievals.routines module
- Module contents
- gpm.utils package
- Submodules
- gpm.utils.archive module
- gpm.utils.area module
geocentric_to_geographic()
geographic_to_geocentric()
get_centroids_from_corners()
get_corners_from_centroids()
get_corners_from_quadmesh()
get_lonlat_corners_from_1d_centroids()
get_lonlat_corners_from_centroids()
get_lonlat_quadmesh_vertices()
get_projection_centroids()
get_projection_corners_from_1d_centroids()
get_projection_corners_from_centroids()
get_projection_quadmesh_vertices()
get_quadmesh_centroids()
get_quadmesh_corners()
get_quadmesh_from_corners()
get_quadmesh_polygons()
get_quadmesh_vertices()
infer_interval_breaks()
is_clockwise()
preserve_dimension_order()
- gpm.utils.checks module
apply_on_valid_geolocation()
check_contiguous_granules()
check_contiguous_scans()
check_missing_granules()
check_regular_time()
check_valid_geolocation()
get_missing_granule_numbers()
get_slices_contiguous_granules()
get_slices_contiguous_scans()
get_slices_non_contiguous_scans()
get_slices_non_regular_time()
get_slices_non_valid_geolocation()
get_slices_non_wobbling_swath()
get_slices_regular()
get_slices_regular_time()
get_slices_valid_geolocation()
get_slices_var_between()
get_slices_var_equals()
get_slices_wobbling_swath()
has_contiguous_granules()
has_contiguous_scans()
has_missing_granules()
has_regular_time()
has_valid_geolocation()
is_regular()
- gpm.utils.collocation module
- gpm.utils.dask module
- gpm.utils.dataframe module
- gpm.utils.decorators module
- gpm.utils.directories module
get_filepaths_by_path()
get_filepaths_within_paths()
get_parallel_dict_results()
get_parallel_list_results()
get_subdirectories()
list_and_filter_files()
list_directories()
list_files()
list_paths()
match_extension()
match_filters()
match_glob_pattern()
match_regex_pattern()
search_leaf_directories()
search_leaf_files()
- gpm.utils.geospatial module
Extent
adjust_extent()
adjust_geographic_extent()
check_extent()
crop()
crop_around_point()
crop_by_continent()
crop_by_country()
extend_extent()
extend_geographic_extent()
get_circle_coordinates_around_point()
get_continent_extent()
get_country_extent()
get_crop_slices_around_point()
get_crop_slices_by_continent()
get_crop_slices_by_country()
get_crop_slices_by_extent()
get_extent_around_point()
get_geodesic_line()
get_geographic_extent_around_point()
get_geographic_extent_from_xarray()
get_great_circle_arc_endpoints()
read_continents_extent_dictionary()
read_countries_extent_dictionary()
unwrap_longitude_degree()
- gpm.utils.list module
- gpm.utils.manipulations module
conversion_factors_degree_to_meter()
convert_from_decibel()
convert_to_decibel()
ensure_vertical_datarray_prototype()
extract_at_points()
extract_dataset_above_bin()
extract_dataset_below_bin()
extract_l2_dataset()
extract_transect_around_point()
extract_transect_at_points()
extract_transect_between_points()
get_bin_dataarray()
get_bright_band_mask()
get_height_at_bin()
get_height_at_temperature()
get_height_dataarray()
get_liquid_phase_mask()
get_max_value_point()
get_min_value_point()
get_range_axis()
get_range_index_at_max()
get_range_index_at_min()
get_range_index_at_value()
get_range_slices_with_valid_data()
get_range_slices_within_values()
get_solid_phase_mask()
get_vertical_coords_and_vars()
get_vertical_datarray_prototype()
integrate_profile_concentration()
mask_above_bin()
mask_below_bin()
mask_between_bins()
mask_vertical_variables()
reverse_range()
select_bin_variables()
select_cross_section_variables()
select_frequency_variables()
select_spatial_2d_variables()
select_spatial_3d_variables()
select_vertical_variables()
slice_range_at_bin()
slice_range_at_height()
slice_range_at_max_value()
slice_range_at_min_value()
slice_range_at_temperature()
slice_range_at_value()
subset_range_where_values()
subset_range_with_valid_data()
- gpm.utils.parallel module
- gpm.utils.pyresample module
- gpm.utils.remapping module
- gpm.utils.slices module
enlarge_slice()
enlarge_slices()
ensure_is_slice()
get_indices_from_list_slices()
get_list_slices_from_bool_arr()
get_list_slices_from_indices()
get_slice_from_idx_bounds()
get_slice_size()
list_slices_combine()
list_slices_difference()
list_slices_filter()
list_slices_flatten()
list_slices_intersection()
list_slices_simplify()
list_slices_sort()
list_slices_union()
pad_slice()
pad_slices()
- gpm.utils.subsetting module
- gpm.utils.time module
- gpm.utils.timing module
- gpm.utils.warnings module
- gpm.utils.xarray module
check_is_xarray()
check_is_xarray_dataarray()
check_is_xarray_dataset()
check_variable_availabilty()
ensure_dim_order_dataarray()
ensure_dim_order_dataset()
ensure_unique_chunking()
get_dataset_variables()
get_dimensions_without()
get_xarray_variable()
has_unique_chunking()
squeeze_unsqueeze_dataarray()
squeeze_unsqueeze_dataset()
xr_ensure_dimension_order()
xr_squeeze_unsqueeze()
- gpm.utils.yaml module
- gpm.utils.zonal_stats module
BarnesGaussianWeights
CressmanWeights
InverseDistanceWeights
PolyAggregator
PolyAggregator.apply()
PolyAggregator.average()
PolyAggregator.counts()
PolyAggregator.dict_distances
PolyAggregator.dict_intersection_areas
PolyAggregator.first()
PolyAggregator.fraction_covered_area()
PolyAggregator.list_distances
PolyAggregator.list_intersection_areas
PolyAggregator.max()
PolyAggregator.mean()
PolyAggregator.min()
PolyAggregator.n_source_polygons
PolyAggregator.n_target_polygons
PolyAggregator.source_centroids
PolyAggregator.source_polygons_areas
PolyAggregator.std()
PolyAggregator.sum()
PolyAggregator.target_centroids
PolyAggregator.target_intersecting_indices
PolyAggregator.target_non_intersecting_indices
PolyAggregator.target_polygons_areas
PolyAggregator.var()
create_list_indices()
create_target_dictionary()
split_dict()
- Module contents
- gpm.visualization package
- Submodules
- gpm.visualization.animation module
- gpm.visualization.cross_section module
- gpm.visualization.facetgrid module
CartopyFacetGrid
CustomFacetGrid
CustomFacetGrid.adapt_fig_size()
CustomFacetGrid.add_colorbar()
CustomFacetGrid.map_dataarray()
CustomFacetGrid.remove_bottom_ticks_and_labels()
CustomFacetGrid.remove_duplicated_axis_labels()
CustomFacetGrid.remove_left_ticks_and_labels()
CustomFacetGrid.remove_title_dimension_prefix()
CustomFacetGrid.remove_titles()
CustomFacetGrid.set_title()
ImageFacetGrid
sanitize_facetgrid_plot_kwargs()
- gpm.visualization.grid module
- gpm.visualization.orbit module
- gpm.visualization.plot module
adapt_fig_size()
add_map_inset()
add_optimize_layout_method()
check_object_format()
create_grid_mesh_data_array()
get_antimeridian_mask()
get_inset_bounds()
get_valid_pcolormesh_inputs()
infer_map_xy_coords()
infer_xy_labels()
infill_invalid_coords()
initialize_cartopy_plot()
is_generator()
mask_antimeridian_crossing_array()
plot_cartopy_background()
plot_cartopy_imshow()
plot_cartopy_pcolormesh()
plot_colorbar()
plot_image()
plot_labels()
plot_map()
plot_map_mesh()
plot_map_mesh_centroids()
plot_patches()
plot_sides()
plot_xr_imshow()
plot_xr_pcolormesh()
preprocess_figure_args()
preprocess_rgb_dataarray()
preprocess_subplot_kwargs()
set_colorbar_fully_transparent()
- gpm.visualization.plot_3d module
- gpm.visualization.title module
- Module contents
Submodules#
gpm.checks module#
This module defines functions providing GPM-API Dataset information.
- gpm.checks.check_has_frequency_dim(xr_obj, strict=False, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset has a frequency dimension.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=False
(default), the xarray.DataArray can also have additional dimensions. Ifstrict=True
, the xarray.DataArray must have just the spatial dimensions.
- gpm.checks.check_has_spatial_dim(xr_obj, strict=False, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset has at least one spatial horizontal dimension.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=False
(default), the xarray.DataArray can also have additional dimensions. Ifstrict=True
, the xarray.DataArray must have just the spatial dimensions.
- gpm.checks.check_has_vertical_dim(xr_obj, strict=False, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset have a vertical dimension.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=False
(default), the xarray.DataArray can also have additional dimensions. Ifstrict=True
, the xarray.DataArray must have just the vertical dimension.
- gpm.checks.check_is_cross_section(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a cross-section.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just the vertical dimension and a horizontal dimension. Ifstrict=False
, the xarray.DataArray can also have additional dimensions, but only a single vertical and horizontal dimension.
- gpm.checks.check_is_spatial_2d(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a spatial 2D field.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just the 2D spatial dimensions. Ifstrict=False
, the xarray.DataArray can also have additional dimensions (except vertical).
- gpm.checks.check_is_spatial_3d(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a spatial 3D field.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just the 3D spatial dimensions. Ifstrict=False
, the xarray.DataArray can also have additional dimensions.
- gpm.checks.check_is_transect(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a transect.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just an horizontal dimension. Ifstrict=False
, the xarray.DataArray can also have additional dimensions, but only an horizontal dimension.
- gpm.checks.get_bin_variables(ds)[source][source]#
Get list of xarray.Dataset radar product variables with name starting with bin or ending with Bin.
In CMB products, bin variables end with the Bin suffix. In L1 and L2 RADAR products, bin variables starts with the bin prefix.
- gpm.checks.get_cross_section_variables(ds, strict=False, squeeze=True)[source][source]#
Get list of xarray.Dataset cross-section variables.
If
strict=False
(default), the potential variables for which a strict cross-section can be derived. Ifstrict=True
, the variables that are already a cross-section.
- gpm.checks.get_frequency_dimension(xr_obj)[source][source]#
Return the name of the available frequency dimension.
- gpm.checks.get_frequency_variables(ds)[source][source]#
Get list of xarray.Dataset variables with frequency-related dimension.
- gpm.checks.get_spatial_2d_variables(ds, strict=False, squeeze=True)[source][source]#
Get list of xarray.Dataset 2D spatial variables.
If
strict=False
(default), the potential variables for which a 2D spatial field can be derived. Ifstrict=True
, the variables that are already a 2D spatial field.
- gpm.checks.get_spatial_3d_variables(ds, strict=False, squeeze=True)[source][source]#
Get list of xarray.Dataset 3D spatial variables.
If
strict=False
(default), the potential variables for which a 3D spatial field can be derived. Ifstrict=True
, the variables that are already a 3D spatial field.
- gpm.checks.get_spatial_dimensions(xr_obj)[source][source]#
Return the name of the available spatial dimensions.
- gpm.checks.get_vertical_dimension(xr_obj)[source][source]#
Return the name of the available vertical dimension.
- gpm.checks.get_vertical_variables(ds)[source][source]#
Get list of xarray.Dataset variables with vertical dimension.
- gpm.checks.has_frequency_dim(xr_obj, strict=False, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset have a frequency dimension.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
, the xarray.DataArray must have just the frequency dimension. Ifstrict=False
(default), the xarray.DataArray can also have additional dimensions.
- gpm.checks.has_spatial_dim(xr_obj, strict=False, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset have a spatial dimension.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
, the xarray.DataArray can have only spatial dimensions. Ifstrict=False
(default), the xarray.DataArray can also have other dimensions.
- gpm.checks.has_vertical_dim(xr_obj, strict=False, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset have a vertical dimension.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
, the xarray.DataArray must have just the vertical dimension. Ifstrict=False
(default), the xarray.DataArray can also have additional dimensions.
- gpm.checks.is_cross_section(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a cross-section object.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just the vertical dimension and a horizontal dimension. Ifstrict=False
, the xarray.DataArray can have additional dimensions but only a single horizontal and vertical dimension.
- gpm.checks.is_grid(xr_obj)[source][source]#
Check whether the xarray object is a GPM GRID.
A GRID slice is not considered a GRID object ! An GRID object must have the coordinates available !
- gpm.checks.is_orbit(xr_obj)[source][source]#
Check whether the xarray object is a GPM ORBIT.
An ORBIT cross-section (nadir view) or transect is considered ORBIT. An ORBIT object must have the coordinates available.
- gpm.checks.is_spatial_2d(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a spatial 2D object.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just the 2D spatial dimensions. Ifstrict=False
, the xarray.DataArray can have additional dimensions (except vertical).
- gpm.checks.is_spatial_3d(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset i as spatial 3d object.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just the 3D spatial dimensions. Ifstrict=False
, the xarray.DataArray can also have additional dimensions.
- gpm.checks.is_transect(xr_obj, strict=True, squeeze=True)[source][source]#
Check if the xarray.DataArray or xarray.Dataset is a transect object.
If
squeeze=True
(default), dimensions of size=1 are removed prior testing. Ifstrict=True
(default), the xarray.DataArray must have just an horizontal dimension. Ifstrict=False
, the xarray.DataArray can have additional dimensions but only a single horizontal dimension.
gpm.configs module#
GPM-API configurations settings.
- gpm.configs.define_configs(base_dir: str | None = None, username_pps: str | None = None, password_pps: str | None = None, username_earthdata: str | None = None, password_earthdata: str | None = None)[source][source]#
Defines the GPM-API configuration file with the given credentials and base directory.
- Parameters:
base_dir (str) – The base directory where GPM data are stored.
username_pps (str, optional) – The username for the NASA GPM PPS account.
password_pps (str, optional) – The password for the NASA GPM PPS account.
username_earthdata (str, optional) – The username for the NASA EarthData account.
password_earthdata (str, optional) – The password for the NASA EarthData account.
Notes
This function writes a YAML file to the user’s home directory at ~/.config_gpm_api.yaml with the given GPM-API credentials and base directory. The configuration file can be used for authentication when making GPM-API requests.
- gpm.configs.read_configs() dict[str, str] [source][source]#
Reads the GPM-API configuration file and returns a dictionary with the configuration settings.
- Returns:
A dictionary containing the configuration settings for the GPM-API, including the username, password, and GPM base directory.
- Return type:
- Raises:
ValueError – If the configuration file has not been defined yet. Use gpm.define_configs() to specify the configuration file path and settings.
Notes
This function reads the YAML configuration file located at ~/.config_gpm_api.yaml, which should contain the GPM-API credentials and base directory specified by gpm.define_configs().
- gpm.configs.set_ges_disc_authentification(username, password)[source][source]#
Create authentication files for access to the GES DISC Data Archive.
Follow the additional steps detailed at https://disc.gsfc.nasa.gov/earthdata-login to enable access to the GES DISC HTTPS Data Archive.
The code snippet is taken from https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Generate%20Earthdata%20Prerequisite%20Files
Module contents#
GPM-API Package.