Skip to content

Commit

Permalink
Update rolling_statistic functionality with an acceptance test
Browse files Browse the repository at this point in the history
Update rolling_statistic functionality with an acceptance test
  • Loading branch information
MPWeeber committed Nov 1, 2023
1 parent 57547d2 commit e271718
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 0.0.0

input-data:
- dataset:
filename: ./tests_acceptance/input_nc_files/small_subset_FM-VZM_0000_map.nc
variable_mapping:
salinity_PSU : "IN_salinity_PSU"
# water_level_mNAP : "IN_water_level_mNAP"
# water_depth_mNAP : "IN_water_depth_mNAP"
# flow_velocity_ms : "IN_flow_velocity_ms"

rules:

- rolling_statistics_rule:
name: test rolling statistic 12.5 hours
description: test rolling statistic 12.5 hours
operation: MAX
time_scale: hour
period: 12.5
input_variable: IN_salinity_PSU
output_variable: salinity_tl_hour_max

- rolling_statistics_rule:
name: test rolling statistic 7 days
description: test rolling statistic 7 days
operation: MAX
time_scale: day
period: 7
input_variable: IN_salinity_PSU
output_variable: salinity_tl_week_max

- rolling_statistics_rule:
name: test rolling statistic 30 days
description: test rolling statistic 30 days
operation: AVERAGE
time_scale: day
period: 30
input_variable: IN_salinity_PSU
output_variable: salinity_tl_approxmonth_average

- rolling_statistics_rule:
name: test rolling statistic 365 days
description: test rolling statistic 365 days
operation: AVERAGE
time_scale: day
period: 365
input_variable: IN_salinity_PSU
output_variable: salinity_tl_apporxyear_average


output-data:
filename: ./tests_acceptance/output_nc_files/test15_rolling_statistic_multiple_hour_and_day_results.nc
Binary file not shown.

0 comments on commit e271718

Please sign in to comment.