Skip to content

Commit

Permalink
Merge pull request #398 from aodn/wave_new_facility
Browse files Browse the repository at this point in the history
Wave: path for new imos facility
  • Loading branch information
leonardolaiolo authored Nov 14, 2024
2 parents ae5b344 + 546718d commit a382b68
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aodndata/aodn_wave/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"IMOS_NTP-WAVE": 'IMOS/NTP/Low_Cost_Wave_Buoy_Technology',
"IMOS_ANMN-DEEP-WATER-WAVES": 'IMOS/ANMN/Deep_Water_Waves',
"IMOS_ANMN-WAVE-BUOYS": 'IMOS/ANMN/Wave_Buoys',
"IMOS_COASTAL-WAVE-BUOYS": 'IMOS/COASTAL-WAVE-BUOYS',
"NSW-DPE": 'Department_of_Planning_and_Environment-New_South_Wales',
"NSW": 'Department_of_Planning_and_Environment-New_South_Wales',
"VIC-DEAKIN-UNI": 'Deakin_University',
Expand All @@ -39,7 +40,7 @@

DATA_FILE_REGEX = re.compile(r"""
(?P<institution>BOM|DOT-WA|DTA|DES-QLD|MHL|IMOS_NTP-WAVE|IMOS_ANMN-DEEP-WATER-WAVES|
IMOS_ANMN-WAVE-BUOYS|NSW|NSW-DPE|VIC-DEAKIN-UNI|UWA|PPA|GP-VIC|SA-FLINDERS)_
IMOS_ANMN-WAVE-BUOYS|IMOS_COASTAL-WAVE-BUOYS|NSW|NSW-DPE|VIC-DEAKIN-UNI|UWA|PPA|GP-VIC|SA-FLINDERS)_
(?P<nc_time_cov_start>[0-9]{8}|[0-9]{8}T[0-9]{6}Z)_
(?P<site_name>(.*))_
(?P<mode>RT|DM)_
Expand Down
15 changes: 15 additions & 0 deletions test_aodndata/aodn_wave/test_aodn_wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,21 @@ def test_dest_path(self):
'2023',
'IMOS_ANMN-WAVE-BUOYS_20230530_MARIA-ISLAND_RT_WAVE-PARAMETERS_monthly.nc'))

testfile = 'IMOS_COASTAL-WAVE-BUOYS_20241112T003000Z_CORAL-BAY_RT_WAVE-PARAMETERS_20241112T003000Z.nc'
make_test_file(testfile, {'site_name': 'CORAL-BAY'},
WSSH={}
)
dest_dir = AodnWaveHandler.dest_path(testfile)
self.assertEqual(dest_dir,
os.path.join(
'IMOS', 'COASTAL-WAVE-BUOYS',
'WAVE-BUOYS',
'REALTIME',
'WAVE-PARAMETERS',
'CORAL-BAY',
'2024',
'IMOS_COASTAL-WAVE-BUOYS_20241112_CORAL-BAY_RT_WAVE-PARAMETERS_monthly.nc'))

def test_publication_integral_parameter(self):
testfile = 'DOT-WA_20170601_CAPE-NATURALISTE_DM_WAVE-PARAMETERS_END-20170918.nc'
make_test_file(testfile, {'site_name': 'Maroubra'},
Expand Down

0 comments on commit a382b68

Please sign in to comment.