-
Notifications
You must be signed in to change notification settings - Fork 1
/
1_model_fabric.yml
71 lines (58 loc) · 2.2 KB
/
1_model_fabric.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
target_default: 1_model_fabric
packages:
- dplyr
- feather
- lubridate
- yaml
- igraph
sources:
- 1_model_fabric/src/get_prms_sntemp_model.R
- 1_model_fabric/src/get_subbasins.R
- 1_model_fabric/src/get_upstream_downstream_segs.R
- 4_pb_model/src/set_sntemp_output.R
targets:
1_model_fabric:
depends:
- set_sntemp_output_vars
- 1_model_fabric/out/drb_subbasins.rds.ind
# getting some settings for running PRMS-SNTemp uncalibrated
model_settings:
command: read_yaml('4_pb_model/cfg/model_settings.yml')
orig_model_loc:
command: model_settings[[I('orig_model_loc')]]
pb_model_run_loc:
command: model_settings[[I('pb_model_run_loc')]]
sntemp_output_vars:
command: model_settings[[I('sntemp_output')]]
cur_subbasin:
command: model_settings[[I('subbasin_outlet')]]
# using manual seg_id_nat if we don't want to model entire subbasin
cur_seg_id_nat:
command: model_settings[[I('cur_seg_id_nat')]]
# need to make sure that 20191002_Delaware_streamtemp folder is in project on
# local machine; this is on GD if not on local machine
# within this function, moving model to temporary run location so that we can change parameters, etc.. while keeping
# original model preserved
4_pb_model/tmp/control/delaware.control.ind:
command: get_prms_sntemp_model(
out_ind = target_name,
gd_zip_ind_file = '1_model_fabric/in/prms_sntemp/20191002_Delaware_streamtemp.zip.ind',
unzip_loc = I('prms_sntemp'),
orig_model_loc = orig_model_loc,
model_run_loc = pb_model_run_loc)
set_sntemp_output_vars:
command: set_sntemp_output(
output_names = sntemp_output_vars,
model_run_loc = pb_model_run_loc)
depends: '4_pb_model/tmp/control/delaware.control.ind'
1_model_fabric/out/drb_subbasins.rds.ind:
command: get_subbasins(
ind_file = target_name,
subbasin_outlet_file = '1_model_fabric/cfg/subbasin_outlets.yml',
model_run_loc = pb_model_run_loc)
1_model_fabric/out/model_locations.rds.ind:
command: get_model_locations(
ind_file = target_name,
subbasins_ind = '1_model_fabric/out/drb_subbasins.rds.ind',
seg_id_nats = cur_seg_id_nat,
model_run_loc = pb_model_run_loc)