-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functionality to file_index and filep_path generation
- Loading branch information
Showing
12 changed files
with
268 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from wetterdienst import Parameter, TimeResolution, PeriodType | ||
from wetterdienst.dwd.metadata.constants import DWDWeatherBase, DWDCDCBase | ||
from wetterdienst.dwd.metadata.radar_data_types import RadarDataTypes | ||
from wetterdienst.dwd.metadata.radar_sites import RadarSites | ||
from wetterdienst.dwd.radolan.index import _create_file_index_radolan | ||
|
||
|
||
def test_radolan_fileindex(): | ||
|
||
file_index = _create_file_index_radolan( | ||
Parameter.SWEEP_VOL_VELOCITY_V, | ||
TimeResolution.MINUTE_5, | ||
DWDWeatherBase.RADAR_SITES, | ||
radar_site=RadarSites.BOO, | ||
radar_data_type=RadarDataTypes.HDF5 | ||
) | ||
test_split = file_index.iat[0, 0].split('/') | ||
assert test_split[0] == 'sweep_vol_v' | ||
assert test_split[1] == 'boo' | ||
assert test_split[2] == 'hdf5' | ||
|
||
file_index = _create_file_index_radolan( | ||
Parameter.PX250_REFLECTIVITY, | ||
TimeResolution.MINUTE_5, | ||
DWDWeatherBase.RADAR_SITES, | ||
radar_site=RadarSites.BOO) | ||
test_split = file_index.iat[0, 0].split('/') | ||
assert test_split[0] == 'px250' | ||
assert test_split[1] == 'boo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from datetime import datetime | ||
from pathlib import PosixPath | ||
|
||
from wetterdienst import Parameter, TimeResolution | ||
from wetterdienst.dwd.metadata.constants import DWD_FOLDER_MAIN | ||
from wetterdienst.dwd.radolan.store import build_local_filepath_for_radar | ||
|
||
|
||
def test_build_local_filepath_for_radar(): | ||
assert PosixPath('/home/dlassahn/projects/forecast-system/wetterdienst/' | ||
'dwd_data/dx/5_minutes/dx_5_minutes_202001011215') == \ | ||
build_local_filepath_for_radar( | ||
Parameter.DX_REFLECTIVITY, | ||
datetime(2020, 1, 1, 12, 15), | ||
DWD_FOLDER_MAIN, | ||
TimeResolution.MINUTE_5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
DWD_FOLDER_STATION_DATA, | ||
DWD_FILE_STATION_DATA, | ||
DataFormat, | ||
) | ||
|
||
|
||
def store_climate_observations( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.