geoips.interfaces.module_based package#
Submodules#
geoips.interfaces.module_based.algorithms module#
Algorithms interface module.
- class geoips.interfaces.module_based.algorithms.AlgorithmsInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for algorithms plugins.
- name = 'algorithms'#
- required_args = {'channel_combination': ['arrays'], 'list_numpy_to_numpy': ['arrays'], 'rgb': ['arrays'], 'scalar_to_scalar': [], 'single_channel': ['arrays'], 'xarray_dict_area_def_to_numpy': ['xarray_dict', 'area_def'], 'xarray_dict_dict_to_xarray': ['xarray_dict_dict'], 'xarray_dict_to_xarray': ['xarray_dict'], 'xarray_dict_to_xarray_dict': ['xarray_dict'], 'xarray_to_numpy': ['xobj'], 'xarray_to_xarray': ['xobj', 'variables', 'product_name']}#
- required_kwargs = {'channel_combination': [], 'list_numpy_to_numpy': [], 'rgb': [], 'scalar_to_scalar': ['value'], 'single_channel': [], 'xarray_dict_area_def_to_numpy': [], 'xarray_dict_dict_to_xarray': [], 'xarray_dict_to_xarray': [], 'xarray_dict_to_xarray_dict': [], 'xarray_to_numpy': [], 'xarray_to_xarray': []}#
geoips.interfaces.module_based.colormappers module#
Colormappers interface module.
- class geoips.interfaces.module_based.colormappers.ColormappersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for colormappers plugins.
- allowable_kwargs = {'matplotlib': ['data_range', 'cmap_name', 'ascii_path', 'create_colorbar', 'cbar_label', 'cbar_ticks', 'cbar_tick_labels', 'cbar_spacing', 'cbar_full_width', 'colorbar_kwargs', 'set_ticks_kwargs', 'set_label_kwargs']}#
- name = 'colormappers'#
- required_args = {'matplotlib': []}#
- required_kwargs = {'matplotlib': []}#
geoips.interfaces.module_based.coverage_checkers module#
Interpolators interface module.
- class geoips.interfaces.module_based.coverage_checkers.CoverageCheckersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for coverage_checkers plugins.
- allowable_kwargs = {'standard': {'area_def', 'radius_km'}}#
- name = 'coverage_checkers'#
- required_args = {'standard': ['xarray_obj', 'variable_name']}#
- required_kwargs = {'standard': {}}#
geoips.interfaces.module_based.databases module#
Databases interface module.
- class geoips.interfaces.module_based.databases.DatabasesInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for databases plugins.
- name = 'databases'#
- required_args = {'memusg_stats_to_table': [], 'overpass_dict_to_postgres_table': ['schema_name', 'table_name', 'overpass_dict'], 'overpass_dict_to_sqlite_table': ['overpass_dict', 'dbname'], 'query_overpass_table': ['window_start', 'window_end'], 'query_product_table': ['window_start', 'window_end'], 'schema_table_sector_opasses_to_postgres_table': ['schema_name', 'table_name', 'sector_name', 'sat_overpasses'], 'schema_table_storm_opasses_to_postgres_table': ['schema_name', 'table_name', 'storm_id', 'storm_time', 'satellite_overpasses'], 'storm_opasses_db_to_postgres_table': ['storm_id', 'storm_time', 'satellite_overpasses', 'dbname'], 'xarray_area_def_to_table': ['product_filename', 'xarray_obj', 'area_def'], 'xarray_dict_to_table': ['product_filename', 'xarray_dict']}#
- required_kwargs = {'memusg_stats_to_table': [], 'overpass_dict_to_postgres_table': [], 'overpass_dict_to_sqlite_table': [], 'query_overpass_table': [], 'query_product_table': [], 'schema_table_sector_opasses_to_postgres_table': [], 'schema_table_storm_opasses_to_postgres_table': [], 'storm_opasses_db_to_postgres_table': [], 'xarray_area_def_to_table': [], 'xarray_dict_to_table': []}#
geoips.interfaces.module_based.filename_formatters module#
Filename formatters interface module.
- class geoips.interfaces.module_based.filename_formatters.FilenameFormattersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for filename_formatters plugins.
- name = 'filename_formatters'#
- required_args = {'data': ['area_def', 'xarray_obj', 'product_names'], 'standard': ['area_def', 'xarray_obj', 'product_name'], 'standard_metadata': ['area_def', 'xarray_obj', 'product_filename'], 'xarray_area_product_to_filename': ['xarray_obj', 'area_def', 'product_name'], 'xarray_metadata_to_filename': ['xarray_obj']}#
- required_kwargs = {'data': ['coverage', 'output_type', 'output_type_dir', 'product_dir', 'product_subdir', 'source_dir', 'basedir'], 'standard': ['coverage', 'output_type', 'output_type_dir', 'product_dir', 'product_subdir', 'source_dir', 'basedir'], 'standard_metadata': ['metadata_dir', 'metadata_type', 'basedir'], 'xarray_area_product_to_filename': ['output_type', 'basedir', 'extra_field'], 'xarray_metadata_to_filename': ['extension', 'basedir']}#
geoips.interfaces.module_based.interpolators module#
Interpolators interface module.
- class geoips.interfaces.module_based.interpolators.InterpolatorsInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for interpolators plugins.
- name = 'interpolators'#
- required_args = {'2d': ['area_def', 'input_xarray', 'output_xarray', 'varlist'], 'grid': ['area_def', 'input_xarray', 'output_xarray', 'varlist']}#
- required_kwargs = {'2d': ['array_num'], 'grid': ['array_num']}#
geoips.interfaces.module_based.output_checkers module#
Output Checkers interface module.
- class geoips.interfaces.module_based.output_checkers.OutputCheckersBasePlugin[source]#
Bases:
BaseModulePlugin
Output Checkers Base Plugin for comparing data outputs.
- compare_outputs(compare_path, output_products, **kwargs)[source]#
Compare the “correct” imagery found the list of current output_products.
Compares files produced in the current processing run with the list of “correct” files contained in “compare_path”.
- Parameters:
compare_path (str) – Path to directory of “correct” products - filenames must match output_products
output_products (list of str) – List of strings of current output products, to compare with products in compare_path
kwargs (dict) – Dictionary containing kwargs for comparing products. This gets passed through to the “test_products” method.
- Returns:
Binary code: 0 if all comparisons were completed successfully.
- Return type:
int
- get_compare_products(compare_path)[source]#
Get dictionary of compare products from the compare_path.
- Parameters:
compare_path (str) – Full path to the comparison directory to populate compare_products dictionary.
- Returns:
compare_products (dict) – Dictionary of products found in the test comparison directory. The key of the compare_products dictionary is the filename that is stored in the comparison directory (ie, this may be a gzipped file).
stored_comparison is the actual name stored in the comparison test dir
gunzipped comparison is the gunzipped version of the file, or None if file was not gzipped
file_for_comparison is “compare_product” if the file is not gzipped, and “gunzipped_comparison” if file is gzipped.
remove_temp_files (list) – List of full paths to files that must be removed after processing (gunzipped files in GEOIPS_OUTDIRS scratch directory)
- get_out_diff_fname(compare_product, output_product, ext=None, flag=None)[source]#
Obtain the filename for output and comparison product diff.
- Parameters:
compare_product (str) – Full path to product filename in the comparison directory
output_product (str) – Full path to product filename in the current output directory
ext (str, default=None) – Extension to use as an alternative to the original file extension
flag (str, default=None) – Additional identifying string to include in output diff filename
- Returns:
out_diff_fname – Full path to output diff file.
- Return type:
str
- gunzip_product(fname, is_comparison_product=False, clobber=False)[source]#
Gunzip file fname.
- Parameters:
fname (str) – File to gunzip.
is_comparison_product (bool, default False) –
If True, set to $GEOIPS_OUTDIRS/gunzipped_products/comparison_products
If False, set to $GEOIPS_OUTDIRS/gunzipped_products/output_products
clobber (bool, default False) – If True, overwrite existing file, else do nothing.
- Returns:
Filename after gunzipping
- Return type:
str
- is_gz(fname)[source]#
Check if fname is a gzip file.
- Parameters:
fname (str) – Name of file to check.
- Returns:
True if it is a gz file, False otherwise.
- Return type:
bool
- perform_comparisons(output_products, compare_products, **kwargs)[source]#
Get the final output products list from the original list of outputs.
- Parameters:
output_products (list) – This is the original list of output products, exactly as they are produced during processing. If a product is gzipped during processing, the output_products list will include the gzipped file.
compare_products (dict) –
This is a dictionary containing all of the comparison products available in the test outputs directory.
Keys: basename of actual output product as created during run (ie, gzipped if applicable)
key: “file_for_comparison”, value: full path to file that is used when comparing against the current output (ie, could be temporary gunzip location).
key: “gunzipped_comparison”, value: None if original output file was not gzipped, full path to gunzipped file if original output file was gzipped.
key: “stored_comparison”, value: full path to file that is stored in the tests outputs location (ie, could be gzipped)
kwargs (dict) – keyword arguments to pass directly through to test products function.
- Returns:
output_products_for_comparison (list) – List of full paths to files that will be used for comparisons. Ie, if the output product was gzipped, this would be the full path to the gunzipped file in the temporary location.
missingcomps (list) – List of full paths to files that were found in the current run, and NOT found in the comparison directory.
goodcomps (list) – List of full paths to files that had good comparisons.
badcomps (list) – List of full paths to files that had bad comparisons between the current output products and the test comparison outputs.
compare_strings (list) – List of strings included in log output for each type of comparison.
remove_temp_files (list) – List of full paths to files that should be removed from temporary scratch directory.
- test_products(output_product, compare_product, goodcomps, badcomps, compare_strings, **kwargs)[source]#
Test output_product against “good” product stored in “compare_path”.
- Parameters:
output_product (str) –
Full path to current output product
compare_product (str) –
Full path to “good” comparison product
goodcomps (list of str) –
List of full paths to all “good” successful comparisons (output and compare images match)
Each str is prepended with a “compare_string” tag to identify which comparison type was performed.
badcomps (list of str) –
List of full paths to all “bad” unsuccessful comparisons (output and compare images differ)
Each str is prepended with a “compare_string” tag to identify which comparison type was performed.
compare_strings (list of str) –
List of all comparison “tags” included in goodcomps and badcomps lists.
This list is used to remove the comparison tags from goodcomps and badcomps to retrieve only the file path.
kwargs (dict) – Additional arguments to pass through to “outputs_match” method.
- Returns:
goodcomps (list of str) – All current good comparisons appended to the list passed in.
badcomps (list of str) – All current bad comparisons appended to the list passed in.
compare_strings (list of str) – All current comparison “tags” added to the list passed in.
- Raises:
TypeError – Raised when current output product does not have an associated comparison test defined.
- class geoips.interfaces.module_based.output_checkers.OutputCheckersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for output_checkers plugins.
- get_plugin(name, rebuild_registries=None)[source]#
Return the output checker plugin corresponding to checker_name.
- Parameters:
name (str) –
The name the desired plugin.
rebuild_registries (bool (default=None)) –
Whether or not to rebuild the registries if get_plugin fails. If set to None, default to what we have set in geoips.filenames.base_paths, which defaults to True. If specified, use the input value of rebuild_registries, which should be a boolean value. If rebuild registries is true and get_plugin fails, rebuild the plugin registry, call then call get_plugin once more with rebuild_registries toggled off, so it only gets rebuilt once.
- name = 'output_checkers'#
- plugin_class#
alias of
OutputCheckersBasePlugin
- required_args = {'standard': {}}#
- required_kwargs = {'standard': {}}#
- geoips.interfaces.module_based.output_checkers.get_missing_products(output_products_for_comparison, compare_products)[source]#
Get list of missing products from compare_products_dictionary.
- Parameters:
output_products_for_comparison (list) – List of output products from the current run.
compare_products (dict) – Dictionary of products found in the test comparison directory. Note the key of the compare_products dictionary is the filename that is stored in the comparison directory (ie, this may be a gzipped file). We must use the “gunzipped_comparison”, “stored_comparison”, and “file_for_comparison” keys within that dictionary to ensure we are accessing the correct versions of the files.
- Returns:
missingproducts – List of products that were missing from the current run.
- Return type:
list
- geoips.interfaces.module_based.output_checkers.gunzip_product(fname, is_comparison_product=False, clobber=False)[source]#
Gunzip file fname.
- Parameters:
fname (str) – File to gunzip.
is_comparison_product (bool, default False) –
If True, set to $GEOIPS_OUTDIRS/gunzipped_products/comparison_products
If False, set to $GEOIPS_OUTDIRS/gunzipped_products/output_products
clobber (bool, default False) – If True, overwrite existing file, else do nothing.
- Returns:
Filename after gunzipping
- Return type:
str
- geoips.interfaces.module_based.output_checkers.is_gz(fname)[source]#
Check if fname is a gzip file.
- Parameters:
fname (str) – Name of file to check.
- Returns:
True if it is a gz file, False otherwise.
- Return type:
bool
- geoips.interfaces.module_based.output_checkers.write_bad_comparisons_to_file(badcomps, compare_products, compare_strings, diffdir)[source]#
Write text file with cp commands to update products with bad comparisons.
Write a text file that can be sourced to replace test output comparison files with the most recent outputs when the output checker returns a bad comparisons.
When GeoIPS is updated in a way that changes the imagery and those changes are expected, the integration test image comparisons will fail. This function writes a file named cp_BADCOMPARES.txt which can be sourced to copy the new comparison files into place, overwriting the previous comparison files. This allows easily updating the test comparison outputs when code updates make expected changes to the output imagery.
We must ensure we also gzip the comparison product in the test outputs directory after copying if the original test comparison output file was gzipped. If applicable, a gzip command will also be added to cp_BADCOMPARES.txt.
- Parameters:
badcomps (list) – List of files that returned a “BAD COMPARISON” from the output checker. These are the full paths to the files produced during the most recent run.
compare_products (dict) – dictionary of comparison products - including the original comparison product file name, the gunzipped product file path if applicable, and the path to the file that should be used for comparison against “badcomps” files.
compare_strings (list of str) –
List of all comparison “tags” included in goodcomps and badcomps lists.
This list is used to remove the comparison tags from goodcomps and badcomps to retrieve only the file path.
diffdir (str) – Full path to write “cp_BADCOMPARES.txt” file. NOTE: diffdir currently also is used to specify the path to the output files. Eventually we should pass in 2 separate paths, one to specify where to write the diff files, and a separate path indicating where to write the updated test output comparison files.
- Returns:
Binary code: 0 if all comparisons were completed successfully, non-zero if there were bad comparisons.
- Return type:
int
- geoips.interfaces.module_based.output_checkers.write_good_comparisons_to_file(goodcomps, compare_strings, diffdir)[source]#
Write all good comparisons to a file for easy collection of outputs.
During integration tests, if the current product output matches the test output stored in the test comparison directories, the output checkers will return 0 as a GOOD COMPARE. These outputs do not need to be updated in the test comparison directories, since the current products and test comparison outputs match within tolerance.
The developer may desire copying these files to a single location convenience, however.
This function writes a file named cptest_GOODCOMPARE.txt which can be sourced to copy all products that were identical to the current output products to a common location, for convenience. This does not impact any files stored in the test comparison directories.
- Parameters:
goodcomps (list) – List of files that returned a “GOOD COMPARE” from the output checker. These are the full paths to the files produced during the most recent run.
compare_strings (list of str) –
List of all comparison “tags” included in goodcomps and badcomps lists.
This list is used to remove the comparison tags from goodcomps and badcomps to retrieve only the file path when writing the cp commands.
diffdir (str) – Full path to write “cptest_GOODCOMPARE.txt” file NOTE: diffdir currently also is used to specify the path to the output files. Eventually we should pass in 2 separate paths, one to specify where to write the diff files, and a separate path indicating where to write the updated test output comparison files.
- Returns:
Binary code: 0 for good comparisons
- Return type:
int
- geoips.interfaces.module_based.output_checkers.write_missing_comparisons_to_file(missingcomps, diffdir)[source]#
Write text file with cp commands to add products to comparison directory.
Write a text file contatining cp commands that can be sourced to add new test output comparison files to the test comparison directories that were found in the most recent output and were not previously in the test comparison directory.
When GeoIPS is updated in a way that intentionally causes a new output product, it will cause the integration test comparison to fail with a MISSING COMPARE error (ie, a file exists in the current output product path, but does not exist in the test comparison directory).
When this is intended behaviour due to recent code updates, we must add that new product to the test output comparison directories from the current output path.
This function writes a file named cp_MISSINGCOMPARE.txt which can be sourced to copy the appropriate files from the current output product path into the test comparison directory. This allows easily updating the test comparison outputs when code updates make expected changes to the output products.
- Parameters:
missingcomps (list) – List of files that returned a “MISSING COMPARE” from the output checker. These are the full paths to the files produced during the most recent run.
diffdir (str) – Full path to write “rm_MISSINGCOMPARE.txt” file NOTE: diffdir currently also is used to specify the path to the output files. Eventually we should pass in 2 separate paths, one to specify where to write the diff files, and a separate path indicating where to write the updated test output comparison files.
- Returns:
Binary code: 0 if all comparisons were completed successfully, non-zero if there were missing comparisons.
- Return type:
int
- geoips.interfaces.module_based.output_checkers.write_missing_products_to_file(missingproducts, compare_products, diffdir)[source]#
Write text file with rm commands to remove products from comparison directory.
Write a text file contatining rm commands that can be sourced to remove existing test output comparison files from the test comparison directories that were NOT found in the most recent output.
When GeoIPS is updated in a way that intentionally causes a previously expected output to no longer be produced, it will cause the integration test comparison to fail with a MISSING PRODUCT error (ie, a file exists in the test comparison directory, but is not a current output product).
When this is intended behaviour due to recent code updates, we must remove that product from the test output comparison directories.
This function writes a file named rm_MISSINGPRODUCTS.txt which can be sourced to remove the files from the test comparison directory that were NOT found in the list of current output products. This allows easily updating the test comparison outputs when code updates make expected changes to the output products.
- Parameters:
missingproducts (list) – List of files that returned a “MISSING PRODUCT” from the output checker. These are the full paths to the files produced during the most recent run.
compare_products (dict) – dictionary of comparison products - including the original comparison product file name, the gunzipped product file path if applicable, and the path to the file that should be used for comparison against “missingproducts” files.
diffdir (str) – Full path to write “rm_MISSINGPRODUCTS.txt” file NOTE: diffdir currently also is used to specify the path to the output files. Eventually we should pass in 2 separate paths, one to specify where to write the diff files, and a separate path indicating where to write the updated test output comparison files.
- Returns:
Binary code: 0 if all comparisons were completed successfully, non-zero if there were missing products.
- Return type:
int
- geoips.interfaces.module_based.output_checkers.write_remove_temp_files_to_file(remove_temp_files, diffdir)[source]#
Write text file with rm commands to remove temporary files.
Write a text file
rm_TEMPFILES.txt
that can be sourced to remove temporary files that were created in the$GEOIPS_OUTDIRS
scratch directory during the output comparison checks during integration tests. This currently includes temporary gunzipped versions of products (ie, if a product was gzipped during processing, then gunzipped to a temporary location during the comparison tests, it will get added to the remove_temp_files list), and may include additional temporary files in the future.The gunzipped files are not auto-deleted during the comparison process, because they must be manually copied to the tets outputs directory after processing is complete, so we do not remove the files at runtime.
- Parameters:
remove_temp_files (list) – List of files that should be written to
rm_TEMPFILES.txt
for deletion. This currently includes auto-gunzipped products, and potentially additional temporary files in the future.diffdir (str) – Full path to write
rm_TEMPFILES.txt
file NOTE: diffdir currently also is used to specify the path to the output files. Eventually we should pass in 2 separate paths, one to specify where to write the diff files, and a separate path indicating where to write the updated test output comparison files.
- Returns:
Binary code: 0 for successfully written
rm_TEMPFILES.txt
file.- Return type:
int
geoips.interfaces.module_based.output_formatters module#
Output formatters interface module.
- class geoips.interfaces.module_based.output_formatters.OutputFormattersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for output_formatters plugins.
- name = 'output_formatters'#
- required_args = {'image': ['area_def', 'xarray_obj', 'product_name', 'output_fnames'], 'image_multi': ['area_def', 'xarray_obj', 'product_names', 'output_fnames', 'mpl_colors_info'], 'image_overlay': ['area_def', 'xarray_obj', 'product_name', 'output_fnames'], 'standard_metadata': ['area_def', 'xarray_obj', 'metadata_yaml_filename', 'product_filename'], 'unprojected': ['xarray_obj', 'product_name', 'output_fnames'], 'xarray_data': ['xarray_obj', 'product_names', 'output_fnames'], 'xrdict_area_product_outfnames_to_outlist': ['xarray_dict', 'area_def', 'product_name', 'output_fnames'], 'xrdict_area_product_to_outlist': ['xarray_dict', 'area_def', 'product_name'], 'xrdict_area_varlist_to_outlist': ['xarray_dict', 'area_def', 'varlist'], 'xrdict_to_outlist': ['xarray_dict'], 'xrdict_varlist_outfnames_to_outlist': ['xarray_dict', 'varlist', 'output_fnames']}#
- required_kwargs = {'image': ['product_name_title', 'mpl_colors_info', 'existing_image'], 'image_multi': ['product_name_titles'], 'image_overlay': ['product_name_title', 'clean_fname', 'mpl_colors_info', 'clean_fname', 'feature_annotator', 'gridline_annotator', 'clean_fname', 'product_datatype_title', 'clean_fname', 'bg_data', 'bg_mpl_colors_info', 'clean_fname', 'bg_xarray', 'bg_product_name_title', 'bg_datatype_title', 'clean_fname', 'remove_duplicate_minrange'], 'standard_metadata': ['metadata_dir', 'basedir', 'output_dict'], 'unprojected': ['product_name_title', 'mpl_colors_info'], 'xarray_data': [], 'xarray_dict_data': ['append', 'overwrite'], 'xarray_dict_to_image': [], 'xrdict_area_product_outfnames_to_outlist': [], 'xrdict_area_product_to_outlist': [], 'xrdict_area_varlist_to_outlist': [], 'xrdict_to_outlist': [], 'xrdict_varlist_outfnames_to_outlist': []}#
geoips.interfaces.module_based.procflows module#
Procflows interface module.
geoips.interfaces.module_based.readers module#
Readers interface module.
- class geoips.interfaces.module_based.readers.ReadersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for readers plugins.
- call_files_and_get_top_level_metadata(fnames, all_metadata, call_single_file_func, metadata_only=False, chans=None, area_def=None, self_register=False)[source]#
Read in data from a list of filenames.
- Parameters:
fnames (list) –
List of strings, full paths to files
all_metadata (dict) –
Dictionary of metadata from all files in ‘fnames’
read_single_time_func (python function) –
Function which can be used to read a single scan time of files from a reader plugin.
Most likely named ‘call_single_time’.
metadata_only (bool, default=False) –
Return before actually reading data if True
chans (list of str, default=None) –
List of desired channels (skip unneeded variables as needed).
Include all channels if None.
area_def (pyresample.AreaDefinition, default=None) –
Specify region to read
Read all data if None.
self_register (str or bool, default=False) –
register all data to the specified dataset id (as specified in the return dictionary keys).
Read multiple resolutions of data if False.
- Returns:
dictionary of xarray.Dataset objects with required Variables and Attributes.
Dictionary keys can be any descriptive dataset ids.
- Return type:
dict of xarray.Datasets
See also
- Xarray and NetCDF Metadata Standards
Additional information regarding required attributes and variables for GeoIPS-formatted xarray Datasets.
- concatenate_metadata(all_metadata)[source]#
Merge together metadata sourced from a list of files into one dictionary.
Where the structure of the merged metadata is a nested dictionary of metadata.
Ie. (xarray_obj has no data and is merely just a container for metadata): {“METADATA”: xobj.source_file_attributes: {fname: xobj, …, “fnamex”: xobj}}
- Parameters:
all_metadata (list of xarray.Datasets) –
The incoming metadata from X number of files
- Returns:
md –
All metadata merged into a dictionary of xarray Datasets
- Return type:
dict of xarray Datasets
- name = 'readers'#
- read_data_to_xarray_dict(fnames, read_single_time_func, metadata_only=False, chans=None, area_def=None, self_register=False)[source]#
Read in data potentially from multiple scan times into an xarray dict.
This function does not require that you provide multiple scan times, but allows for that in the case those are provided.
Call this with information specific to your reader to generate a dictionary of xarray datasets created from the data provided in ‘fnames’.
- Parameters:
fnames (list) –
List of strings, full paths to files
all_metadata (dict) –
Dictionary of metadata from all files in ‘fnames’
read_single_time_func (python function) –
Function which can be used to read a single scan time of files from a reader plugin.
Most likely named ‘call_single_time’.
metadata_only (bool, default=False) –
Return before actually reading data if True
chans (list of str, default=None) –
List of desired channels (skip unneeded variables as needed).
Include all channels if None.
area_def (pyresample.AreaDefinition, default=None) –
Specify region to read
Read all data if None.
self_register (str or bool, default=False) –
register all data to the specified dataset id (as specified in the return dictionary keys).
Read multiple resolutions of data if False.
- Returns:
dictionary of xarray.Dataset objects with required Variables and Attributes.
Dictionary keys can be any descriptive dataset ids.
- Return type:
dict of xarray.Datasets
See also
- Xarray and NetCDF Metadata Standards
Additional information regarding required attributes and variables for GeoIPS-formatted xarray Datasets.
- required_args = {'standard': ['fnames']}#
- required_kwargs = {'standard': ['metadata_only', 'chans', 'area_def', 'self_register']}#
geoips.interfaces.module_based.sector_adjusters module#
Sector adjusters interface module.
- class geoips.interfaces.module_based.sector_adjusters.SectorAdjustersInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for sector_adjusters plugins.
- name = 'sector_adjusters'#
- required_args = {'list_xarray_list_variables_to_area_def_out_fnames': ['xobjs', 'area_def', 'variables']}#
- required_kwargs = {'list_xarray_list_variables_to_area_def_out_fnames': ['recenter_variables']}#
geoips.interfaces.module_based.sector_metadata_generators module#
Sector metadata generators interface module.
- class geoips.interfaces.module_based.sector_metadata_generators.SectorMetadataGeneratorsInterface[source]#
Bases:
BaseModuleInterface
GeoIPS interface for sector_metadata_generators plugins.
- name = 'sector_metadata_generators'#
- required_args = {'tc': ['trackfile_name']}#
- required_kwargs = {'tc': []}#
geoips.interfaces.module_based.sector_spec_generators module#
Sector spec generators interface module.
geoips.interfaces.module_based.title_formatters module#
Title formatters interface module.
Module contents#
Module based interfaces init file.