Skip to content

Commit e1fa096

Browse files
committed
add comments from MESMER-group#109
1 parent f5c9d1e commit e1fa096

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

mesmer/calibrate_mesmer/train_lt.py

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def train_lt(preds, targs, esm, cfg, save_params=True):
9696

9797
# specify necessary variables from config file
9898
wgt_scen_tr_eq = cfg.wgt_scen_tr_eq
99+
# This code will ever only work with a single target variable
99100
method_lt = cfg.methods[targ_name]["lt"]
100101
method_lv = cfg.methods[targ_name]["lv"]
101102
method_lt_each_gp_sep = cfg.method_lt_each_gp_sep
@@ -182,6 +183,8 @@ def train_lt(preds, targs, esm, cfg, save_params=True):
182183

183184
for pred in params_lv["preds"]:
184185
params_lv[f"coef_{pred}"][targ] = reg_xr[pred].values
186+
else:
187+
raise NotImplementedError()
185188

186189
# save the local trend paramters if requested
187190
if save_params:

mesmer/calibrate_mesmer/train_lv.py

+6
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ def train_lv_AR1_sci(params_lv, targs, y, wgt_scen_eq, aux, cfg):
249249
params_lv["AR1_std_innovs"][targ_name] = params_scen.standard_deviation.values
250250

251251
# determine localization radius, empirical cov matrix, and localized ecov matrix
252+
253+
# y.dims = (sample, gridpoint)
254+
# wgt_scen_eq.dims = (sample,)
255+
# aux["phi_gc"].dims = (gridpoint, gripoint)
256+
# where sample = is a stacked "time, scenario, ensmember"
257+
252258
res = train_lv_find_localized_ecov(y[targ_name], wgt_scen_eq, aux, cfg)
253259
params_lv["L"][targ_name] = res.localization_radius.values
254260
params_lv["ecov"][targ_name] = res.covariance.values

mesmer/create_emulations/create_emus_gv.py

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def create_emus_gv_AR(params_gv, nr_emus_v, nr_ts_emus_v, seed):
151151
np.random.seed(seed)
152152

153153
# buffer so that initial start at 0 does not influence overall result
154+
# Should this buffer be based on the length of ar_lags instead of hard-coded?
154155
buffer = 50
155156

156157
# re-name params for easier reading of code below

0 commit comments

Comments
 (0)