Skip to content

Commit

Permalink
tests: add newly generated ngen outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
program-- committed Aug 22, 2023
1 parent 8303d7b commit 790e921
Show file tree
Hide file tree
Showing 49 changed files with 107 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/troute-network/troute/AbstractNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,11 @@ def build_forcing_sets(self,):
t1 = datetime.strptime(t1, "%Y-%m-%d_%H:%M:%S")
t2 = nhd_io.get_param_str(second_file, "model_output_valid_time")
t2 = datetime.strptime(t2, "%Y-%m-%d_%H:%M:%S")
elif forcing_glob_filter=='*.nc':
t1_str = first_file.name.removeprefix('qlat_').removesuffix('.nc')
t1 = datetime.strptime(t1_str, '%Y-%m-%d %H:%M:%S')
t2_str = second_file.name.removeprefix('qlat_').removesuffix('.nc')
t2 = datetime.strptime(t2_str, '%Y-%m-%d %H:%M:%S')
elif forcing_glob_filter.startswith('*NEXOUT'):
t1_str = first_file.name.split('NEXOUT', 1)[0]
t1 = datetime.strptime(t1_str, '%Y%m%d%H%M')
t2_str = second_file.name.split('NEXOUT', 1)[0]
t2 = datetime.strptime(t2_str, '%Y%m%d%H%M')
else:
df = read_file(first_file)
t1_str = pd.to_datetime(df.columns[1]).strftime("%Y-%m-%d_%H:%M:%S")
Expand All @@ -755,7 +755,6 @@ def build_forcing_sets(self,):
t2_str = pd.to_datetime(df.columns[1]).strftime("%Y-%m-%d_%H:%M:%S")
t2 = datetime.strptime(t2_str,"%Y-%m-%d_%H:%M:%S")


dt_qlat_timedelta = t2 - t1
dt_qlat = dt_qlat_timedelta.seconds

Expand Down Expand Up @@ -816,8 +815,12 @@ def build_forcing_sets(self,):
final_qlat = qlat_input_folder.joinpath(run_sets[j]['qlat_files'][-1])
if forcing_glob_filter=="*.CHRTOUT_DOMAIN1":
final_timestamp_str = nhd_io.get_param_str(final_qlat,'model_output_valid_time')
elif forcing_glob_filter=='*.nc':
final_timestamp_str = final_qlat.name.removeprefix('qlat_').removesuffix('.nc').replace(' ', '_')
elif forcing_glob_filter.startswith('*NEXOUT'):

final_timestamp_str = datetime.strptime(
final_qlat.name.split('NEXOUT', 1)[0],
"%Y%m%d%H%M"
).strftime("%Y-%m-%d_%H:%M:%S")
else:
df = read_file(final_qlat)
final_timestamp_str = pd.to_datetime(df.columns[1]).strftime("%Y-%m-%d_%H:%M:%S")
Expand Down
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010000NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.5397760015846
nex-26,cat-26,7.4514116053885
nex-68,cat-68,5.809017708628
Binary file added test/hf/qlat/201512010000NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010100NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.5367897507005
nex-26,cat-26,7.4383755467321
nex-68,cat-68,5.800884801632
Binary file added test/hf/qlat/201512010100NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010200NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.515880525188
nex-26,cat-26,7.4253394880757
nex-68,cat-68,5.7846183671391
Binary file added test/hf/qlat/201512010200NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010300NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.480036399039
nex-26,cat-26,7.4018739459679
nex-68,cat-68,5.7703859350215
Binary file added test/hf/qlat/201512010300NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010400NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4651014984026
nex-26,cat-26,7.3836239412437
nex-68,cat-68,5.758186264277
Binary file added test/hf/qlat/201512010400NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010500NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4531537602043
nex-26,cat-26,7.3731952534501
nex-68,cat-68,5.7459865935326
Binary file added test/hf/qlat/201512010500NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010600NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.441206022006
nex-26,cat-26,7.3679805117244
nex-68,cat-68,5.7439532116583
Binary file added test/hf/qlat/201512010600NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010700NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4322454462457
nex-26,cat-26,7.3575518239309
nex-68,cat-68,5.7378536865366
Binary file added test/hf/qlat/201512010700NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010800NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4232839589315
nex-26,cat-26,7.3523370822052
nex-68,cat-68,5.7337869227882
Binary file added test/hf/qlat/201512010800NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512010900NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4202967964934
nex-26,cat-26,7.3497297113423
nex-68,cat-68,5.7297207795407
Binary file added test/hf/qlat/201512010900NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011000NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4143233831712
nex-26,cat-26,7.3471231361373
nex-68,cat-68,5.7276873976664
Binary file added test/hf/qlat/201512011000NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011100NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4143233831712
nex-26,cat-26,7.3471231361373
nex-68,cat-68,5.7276873976664
Binary file added test/hf/qlat/201512011100NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011200NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4143233831712
nex-26,cat-26,7.3445157652745
nex-68,cat-68,5.7256540157922
Binary file added test/hf/qlat/201512011200NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011300NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4202967964934
nex-26,cat-26,7.3497297113423
nex-68,cat-68,5.7297207795407
Binary file added test/hf/qlat/201512011300NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011400NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4262711213696
nex-26,cat-26,7.354944453068
nex-68,cat-68,5.7358203046624
Binary file added test/hf/qlat/201512011400NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011500NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4322454462457
nex-26,cat-26,7.354944453068
nex-68,cat-68,5.7378536865366
Binary file added test/hf/qlat/201512011500NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011600NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.444193184444
nex-26,cat-26,7.3705878825873
nex-68,cat-68,5.7480199754068
Binary file added test/hf/qlat/201512011600NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011700NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4501665977662
nex-26,cat-26,7.3705878825873
nex-68,cat-68,5.7480199754068
Binary file added test/hf/qlat/201512011700NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011800NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4651014984026
nex-26,cat-26,7.3862313121065
nex-68,cat-68,5.7561528824028
Binary file added test/hf/qlat/201512011800NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512011900NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.4949712996754
nex-26,cat-26,7.4096960585565
nex-68,cat-68,5.7764854601432
Binary file added test/hf/qlat/201512011900NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512012000NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.5099062003118
nex-26,cat-26,7.4279460632807
nex-68,cat-68,5.7907185127618
Binary file added test/hf/qlat/201512012000NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512012100NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.5099062003118
nex-26,cat-26,7.4253394880757
nex-68,cat-68,5.7886851308876
Binary file added test/hf/qlat/201512012100NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512012200NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.515880525188
nex-26,cat-26,7.4305534341435
nex-68,cat-68,5.7907185127618
Binary file added test/hf/qlat/201512012200NEXOUT.nc
Binary file not shown.
4 changes: 4 additions & 0 deletions test/hf/qlat/201512012300NEXOUT.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
feature_id,segment_id,q_lateral
nex-34,cat-34,8.5128933627499
nex-26,cat-26,7.4305534341435
nex-68,cat-68,5.7927512741351
Binary file added test/hf/qlat/201512012300NEXOUT.nc
Binary file not shown.

0 comments on commit 790e921

Please sign in to comment.