-
Notifications
You must be signed in to change notification settings - Fork 4
/
4_model_calibrate.yml
93 lines (81 loc) · 3.48 KB
/
4_model_calibrate.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
target_default: 4_model_calibrate
packages:
- yaml
- dplyr
- tidyr
- scipiper
- igraph
sources:
- 4_model/src/EnKF_functions.R
- 4_model/src/get_sntemp_values.R
- 4_model/src/run_sntemp.R
- 4_model/src/update_sntemp.R
- 4_model/src/set_sntemp_output.R
- 4_model_calibrate/src/calibrate_sntemp.R
- 4_model_calibrate/src/get_subbasins.R
- 4_model/src/get_upstream_downstream_segs.R
- 4_model_calibrate/src/get_calibration_order.R
- 4_model_calibrate/src/ssh_utils.R
- 2_3_model_parameters/src/add_default_sntemp_params.R
- 2_1_model_fabric/src/get_segment_hrus.R
- 4_model_calibrate/src/write_pestpp_tpl_files.R
- 4_model_calibrate/src/write_pestpp_ins_files.R
- 4_model_calibrate/src/write_pestpp_pst_files.R
- 4_model_calibrate/src/calibrate_sntemp_denali.R
targets:
4_model_calibrate:
depends:
- 4_model_calibrate/out/drb_subbasins.rds.ind
- 4_model_calibrate/out/model_out_cal.rds.ind
#############################################
# calibrating PRMS-SNTemp for DRB
#############################################
cal_start:
command: calibration_settings[[I('start')]]
cal_stop:
command: calibration_settings[[I('stop')]]
4_model_calibrate/out/drb_subbasins.rds.ind:
command: get_subbasins(
ind_file = target_name,
subbasin_outlet_file = '4_model_calibrate/cfg/subbasin_outlets.yml')
4_model_calibrate/out/drb_subbasins.rds:
command: gd_get(ind_file = '4_model_calibrate/out/drb_subbasins.rds.ind')
4_model_calibrate/out/model_out_cal.rds.ind:
command: calibrate_sntemp(
ind_file = target_name,
start = cal_start,
stop = cal_stop,
model_fabric_file = '20191002_Delaware_streamtemp/GIS/Segments_subset.shp',
obs_file = '3_observations/out/obs_temp_flow.rds',
init_param_file = '2_3_model_parameters/out/calibration_params_init.rds',
model_run_loc = I('4_model_calibrate/tmp'),
orig_model_loc = I('20191002_Delaware_streamtemp'),
subbasin_file = '4_model_calibrate/out/drb_subbasins.rds',
subbasin_outlet_file = '4_model_calibrate/cfg/subbasin_outlets.yml',
calibration_settings = calibration_settings)
# setting up remote calibration
create_files_for_denali:
command: create_cal_files_denali(
start = cal_start,
stop = cal_stop,
model_fabric_file = '20191002_Delaware_streamtemp/GIS/Segments_subset.shp',
obs_file = '3_observations/out/obs_temp_flow.rds',
init_param_file = '2_3_model_parameters/out/calibration_params_init.rds',
model_run_loc = I('4_model_calibrate/tmp'),
orig_model_loc = I('20191002_Delaware_streamtemp'),
subbasin_file = '4_model_calibrate/out/drb_subbasins.rds',
subbasin_outlet_file = '4_model_calibrate/cfg/subbasin_outlets.yml',
calibration_settings = calibration_settings,
calibrate_flow = FALSE,
calibrate_temp = TRUE,
weight_by_magnitude = FALSE)
remote_cal_path:
command: calibration_settings[[I(c('remote_cal_path'))]]
transfer_cal_files:
command: server_put(
local_dir = I('4_model_calibrate/tmp'),
server_dir = remote_cal_path,
server = I('caldera-dtn')) # caldera-dtn is the data transfer node
### If copying files from Windows machine to Denali, you need to convert delaware.control, myparams.param, seg_outflow.csv, and seg_tave_water.csv files to unix using the dos2unix command
# > dos2unix input/myparams.param
### need to run model once to create an ic file that can be restarted on unix (current windows ic file won't work on denali)