You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copyright (c) 2021-2022 Wenyu Ouyang. All rights reserved.
9
9
"""
10
10
@@ -103,6 +103,18 @@ def default_config_file():
103
103
"hindcast_length": 30,
104
104
# the length of the forecast data
105
105
"forecast_length": 1,
106
+
# config for data of "forecast_length" part
107
+
# for each batch, we fix length of hindcast and forecast length.
108
+
# data from different lead time with a number representing the lead time,
109
+
# for example, now is 2020-09-30, our min_time_interval is 1 day, hindcast length is 30 and forecast length is 1,
110
+
# lead_time = 3 means 2020-09-01 to 2020-09-30, and the forecast data is 2020-10-01 from 2020-09-28
111
+
# for forecast data, we have two different configurations:
112
+
# 1st, we can set a same lead time for all forecast time
113
+
# 2020-09-30now, 30hindcast, 2forecast, 3leadtime means 2020-09-01 to 2020-09-30 obs concatenate with 2020-10-01 forecast data from 2020-09-28 and 2020-10-02 forecast data from 2020-09-29
114
+
# 2nd, we can set a increasing lead time for each forecast time
115
+
# 2020-09-30now, 30hindcast, 2forecast, [1, 2]leadtime means 2020-09-01 to 2020-09-30 obs concatenate with 2020-10-01 to 2010-10-02 forecast data from 2020-09-30
116
+
"lead_time_type": "fixed", # must be fixed or increasing
117
+
"lead_time_start": 1,
106
118
# the min time step of the input data
107
119
"min_time_unit": "D",
108
120
# the min time interval of the input data
@@ -153,6 +165,12 @@ def default_config_file():
153
165
"geol_porostiy",
154
166
"geol_permeability",
155
167
],
168
+
# for forecast variables such as data from GFS
169
+
# for each period, they have multiple forecast data with different lead time
170
+
# hence we list them as a seperate type
171
+
"forecast_cols": None,
172
+
# global variables such as ENSO indictors are used in some long term models
173
+
"global_cols": None,
156
174
# specify the data source of each variable
157
175
"var_to_source_map": None,
158
176
# {
@@ -164,8 +182,6 @@ def default_config_file():
164
182
"constant_rm_nan": True,
165
183
# if constant_only, we will only use constant data as DL models' input: this is only for dpl models now
166
184
"constant_only": False,
167
-
# more other cols, use dict to express!
168
-
"other_cols": None,
169
185
# only numerical scaler: for categorical vars, they are transformed to numerical vars when reading them
170
186
"scaler": "StandardScaler",
171
187
# Some parameters for the chosen scaler function, default is DapengScaler's
@@ -208,7 +224,7 @@ def default_config_file():
208
224
"pbm_norm": False,
209
225
},
210
226
# For scaler from sklearn, we need to specify the stat_dict_file for three different parts:
211
-
# target_vars, relevant_vars and constant_vars, and the sequence must be target_vars, relevant_vars, constant_vars
227
+
# target_cols, relevant_vars and constant_cols, and the sequence must be target_cols, relevant_cols, constant_cols
212
228
# the seperator of three stat_dict_file is ";"
213
229
# for example: "stat_dict_file": "target_stat_dict_file;relevant_stat_dict_file;constant_stat_dict_file"
214
230
"stat_dict_file": None,
@@ -335,6 +351,8 @@ def cmd(
335
351
forecast_history=None,
336
352
hindcast_length=None,
337
353
forecast_length=None,
354
+
lead_time_type=None,
355
+
lead_time_start=None,
338
356
train_mode=None,
339
357
train_epoch=None,
340
358
save_epoch=None,
@@ -353,7 +371,8 @@ def cmd(
353
371
dropout=None,
354
372
weight_path_add=None,
355
373
var_t_type=None,
356
-
var_o=None,
374
+
var_f=None,
375
+
var_g=None,
357
376
var_out=None,
358
377
var_to_source_map=None,
359
378
out_rm_nan=0,
@@ -589,6 +608,20 @@ def cmd(
589
608
default=forecast_length,
590
609
type=int,
591
610
)
611
+
parser.add_argument(
612
+
"--lead_time_type",
613
+
dest="lead_time_type",
614
+
help="fixed or increasing",
615
+
default=lead_time_type,
616
+
type=str,
617
+
)
618
+
parser.add_argument(
619
+
"--lead_time_start",
620
+
dest="lead_time_start",
621
+
help="the start lead time",
622
+
default=lead_time_start,
623
+
type=int,
624
+
)
592
625
parser.add_argument(
593
626
"--model_type",
594
627
dest="model_type",
@@ -683,10 +716,17 @@ def cmd(
683
716
nargs="+",
684
717
)
685
718
parser.add_argument(
686
-
"--var_o",
687
-
dest="var_o",
688
-
help="more other inputs except for var_c and var_t",
689
-
default=var_o,
719
+
"--var_f",
720
+
dest="var_f",
721
+
help="forecast variables such as precipitation from GFS",
0 commit comments