-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtesting.py
More file actions
31 lines (23 loc) · 861 Bytes
/
testing.py
File metadata and controls
31 lines (23 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pprint
import grib
def run_test():
prs_files = ["file1.prs", "file2.prs", "file3.prs"]
nat_files = ["file1.nat", "file2.nat", "file3.nat"]
shortnames_for_prs = ["blh", "t", "t", "t", "other"]
grid_cell_for_prs = [150, 150, 175]
level_for_prs = ["0", "1", "2", "11", "7"]
hour_date_for_prs = [(11, 202501), (12, 202501), (13, 202501)]
shortnames_for_nat = ["blh", "test"]
grid_cell_for_nat = [140, 119, 140]
level_for_nat = ["0", "15"]
hour_date_for_nat = [(5, 202502), (6, 202502), (7, 202502)]
test = grib.populate_files(
prs_files, nat_files,
shortnames_for_prs, level_for_prs, grid_cell_for_prs,
hour_date_for_prs,
shortnames_for_nat, level_for_nat, grid_cell_for_nat,
hour_date_for_nat
)
pprint.pprint(test)
if __name__ == "__main__":
run_test()