satpy.tests.reader_tests.test_satpy_cf_nc module

Tests for the CF reader.

class satpy.tests.reader_tests.test_satpy_cf_nc.TestCFReader[source]

Bases: object

Test case for CF reader.

test_dataid_attrs_equal_contains_not_matching_key(cf_scene, nc_filename)[source]

Check that get_dataset returns valid dataset when dataid have key(s) not existing in data.

test_dataid_attrs_equal_matching_dataset(cf_scene, nc_filename)[source]

Check that get_dataset returns valid dataset when keys matches.

test_dataid_attrs_equal_not_matching_dataset(cf_scene, nc_filename)[source]

Check that get_dataset returns None when key(s) are not matching.

test_decoding_of_dict_type_attributes(cf_scene, nc_filename)[source]

Test decoding of dict type attributes.

test_decoding_of_timestamps(cf_scene, nc_filename)[source]

Test decoding of timestamps.

test_fix_modifier_attr()[source]

Check that fix modifier can handle empty list as modifier attribute.

test_read_prefixed_channels(cf_scene, nc_filename)[source]

Check channels starting with digit is prefixed and read back correctly.

test_read_prefixed_channels_by_user(cf_scene, nc_filename)[source]

Check channels starting with digit is prefixed by user and read back correctly.

test_read_prefixed_channels_by_user2(cf_scene, nc_filename)[source]

Check channels starting with digit is prefixed by user when saving and read back correctly without prefix.

test_read_prefixed_channels_by_user_include_prefix(cf_scene, nc_filename)[source]

Check channels starting with digit is prefixed by user and include original name when saving.

test_read_prefixed_channels_by_user_no_prefix(cf_scene, nc_filename)[source]

Check channels starting with digit is not prefixed by user.

test_read_prefixed_channels_include_orig_name(cf_scene, nc_filename)[source]

Check channels starting with digit and includeed orig name is prefixed and read back correctly.

test_write_and_read_from_two_files(nc_filename, nc_filename_i)[source]

Save two datasets with different resolution and read the solar_zenith_angle again.

test_write_and_read_with_area_definition(cf_scene, nc_filename)[source]

Save a dataset with an area definition to file with cf_writer and read the data again.

test_write_and_read_with_swath_definition(cf_scene, nc_filename)[source]

Save a dataset with a swath definition to file with cf_writer and read the data again.

satpy.tests.reader_tests.test_satpy_cf_nc._create_test_netcdf(filename, resolution=742)[source]
satpy.tests.reader_tests.test_satpy_cf_nc.area()[source]

Get area definition.

satpy.tests.reader_tests.test_satpy_cf_nc.cf_scene(datasets, common_attrs)[source]

Create a cf scene.

satpy.tests.reader_tests.test_satpy_cf_nc.common_attrs(area)[source]

Get common dataset attributes.

satpy.tests.reader_tests.test_satpy_cf_nc.datasets(vis006, ir_108, qual_flags, lonlats, prefix_data, swath_data)[source]

Get datasets belonging to the scene.

satpy.tests.reader_tests.test_satpy_cf_nc.ir_108(xy_coords)[source]

Get IR_108 dataset.

satpy.tests.reader_tests.test_satpy_cf_nc.lonlats(xy_coords)[source]

Get longitudes and latitudes.

satpy.tests.reader_tests.test_satpy_cf_nc.nc_filename(tmp_path)[source]

Create an nc filename for viirs m band.

satpy.tests.reader_tests.test_satpy_cf_nc.nc_filename_i(tmp_path)[source]

Create an nc filename for viirs i band.

satpy.tests.reader_tests.test_satpy_cf_nc.prefix_data(xy_coords, area)[source]

Get dataset whose name should be prefixed.

satpy.tests.reader_tests.test_satpy_cf_nc.qual_flags(xy_coords)[source]

Get quality flags.

satpy.tests.reader_tests.test_satpy_cf_nc.swath_data(prefix_data, lonlats)[source]

Get swath data.

satpy.tests.reader_tests.test_satpy_cf_nc.vis006(xy_coords, common_attrs)[source]

Get VIS006 dataset.

satpy.tests.reader_tests.test_satpy_cf_nc.xy_coords(area)[source]

Get projection coordinates.