def test_read_cams_metadata(): _, metadata = sodapro.read_cams(testfile_mcclear_monthly, integrated=False) assert metadata['Time reference'] == 'Universal time (UT)' assert metadata['noValue'] == 'nan' assert metadata['latitude'] == 55.7906 assert metadata['longitude'] == 12.5251 assert metadata['altitude'] == 39.0 assert metadata['radiation_unit'] == 'W/m^2' assert metadata['time_step'] == '1M'
def test_read_cams_integrated_unmapped_label(): # Default label is 'left' for 1 minute time resolution, hence 1 minute is # added for label='right' expected = generate_expected_dataframe(values_radiation_verbose_integrated, columns_radiation_verbose_unmapped, index_verbose + pd.Timedelta(minutes=1), dtypes=dtypes_radiation_verbose) out, metadata = sodapro.read_cams(testfile_radiation_verbose, integrated=True, label='right', map_variables=False) assert_frame_equal(out, expected, check_less_precise=True)
def test_read_cams(testfile, index, columns, values, dtypes): expected = generate_expected_dataframe(values, columns, index, dtypes) out, metadata = sodapro.read_cams(testfile, integrated=False, map_variables=True) assert_frame_equal(out, expected, check_less_precise=True)