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
Copy file name to clipboardExpand all lines: include/gridpp.h
+59-9Lines changed: 59 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -293,23 +293,22 @@ namespace gridpp {
293
293
int max_points,
294
294
bool allow_extrapolation=true);
295
295
296
-
/**Optimal interpolation for an ensemble gridded field (alternative version). This is an experimental method.
297
-
* @param bgrid Grid of background field
296
+
/**Optimal interpolation for an ensemble gridded field with ensemble-based correlations. The function supports iterative corrections to the analysis. Each ensemble member is adjusted iteratively or "ensemble member by ensemble member" (ebe).
297
+
* @param bgrid Grid of background field
298
298
* @param bratios 2D vector (Y, X) of the ratio of background error standard deviation at grid points to that at observation points.
299
299
* @param background 3D vector (Y, X, E) representing the background values at grid points to be updated.
300
300
* @param background_corr 3D vector (Y, X, E) representing the background values used to compute dynamic correlations.
301
-
* @param obs_points observation points. S = num. observations
302
-
* @param pobs 2D vector of perturbed observations (S, E)
301
+
* @param obs_points Observation points (S = num. observations)
302
+
* @param pobs 2D vector of perturbed observations (S, E)
303
303
* @param pratios 1D vector (S) of the ratio of observation to background error variance.
304
304
* @param pbackground 2D vector (S, E) representing the background values at observation points used to compute innovations.
305
305
* @param pbackground_corr 2D vector (S, E) representing the background values at observation points used to compute dynamic correlations.
306
-
* @param structure Structure function
306
+
* @param structure Structure function for the localization function
307
307
* @param max_points Maximum number of observations to use inside localization zone; Use 0 to disable
308
-
* @param dynamic_correlations Determines whether to use flow-dependent correlations derived from the ensembles. If true, the structure function defines localization functions. If false, the structure function defines static (non-flow-dependent) correlations.
309
308
* @param allow_extrapolation Allow EnSI to extrapolate increments outside increments at observations
/** Optimal interpolation for an ensemble gridded field with ensemble-based correlations. The function supports iterative corrections to the analysis. First, "use (and adjust) the ensemble mean" (utem), then generate the analysis ensemble.
349
+
* @param bgrid Grid of background field
350
+
* @param bratios 2D vector (Y, X) of the ratio of background error standard deviation at grid points to that at observation points.
351
+
* @param background 3D vector (Y, X, E) representing the background values at grid points to be updated.
352
+
* @param background_corr 3D vector (Y, X, E) representing the background values used to compute dynamic correlations.
353
+
* @param obs_points Observation points (S = num. observations)
354
+
* @param pobs 1D vector of observations (S)
355
+
* @param pratios 1D vector (S) of the ratio of observation to background error variance.
356
+
* @param pbackground 2D vector (S, E) representing the background values at observation points used to compute innovations.
357
+
* @param pbackground_corr 2D vector (S, E) representing the background values at observation points used to compute dynamic correlations.
358
+
* @param structure Structure function for the localization function
359
+
* @param max_points Maximum number of observations to use inside localization zone; Use 0 to disable
360
+
* @param allow_extrapolation Allow EnSI to extrapolate increments outside increments at observations
/** Optimal interpolation for an ensemble point field with ensemble-based correlations. The function supports iterative corrections to the analysis. Each ensemble member is adjusted iteratively or "ensemble member by ensemble member" (ebe).
@@ -380,7 +430,7 @@ namespace gridpp {
380
430
* @param bratios 1D vector (L) of the ratio of background error standard deviation at grid points to that at observation points.
381
431
* @param background 2D vector (L, E) representing the background values at grid points to be updated.
382
432
* @param obs_points Observation points (S = num. observations)
383
-
* @param pobs 2D vector of perturbed observations (S, E)
433
+
* @param pobs 1D vector of observations (S)
384
434
* @param pratios 1D vector (S) of the ratio of observation to background error variance.
385
435
* @param pbackground 2D vector (S, E) representing the background values at observation points used to compute innovations.
386
436
* @param structure Structure function for the static correlations
if(background.size() != nY || background[0].size() != nX) {
71
71
std::stringstream ss;
72
-
ss << "Input left field (" << background.size() << "," << background[0].size() << "," << background[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
72
+
ss << "Input background field (" << background.size() << "," << background[0].size() << "," << background[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
ss << "Input LEFT field (" << background_corr.size() << "," << background_corr[0].size() << "," << background_corr[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
77
+
ss << "Input background_corr field (" << background_corr.size() << "," << background_corr[0].size() << "," << background_corr[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
78
78
throwstd::invalid_argument(ss.str());
79
79
}
80
80
if(bratios.size() != nY || bratios[0].size() != nX) {
ss << "Input right field at observation location (" << pbackground.size() << "," << pbackground[0].size() << ") and points (" << nS << "," << nE << ") size mismatch";
87
+
ss << "Input pbackground field at observation location (" << pbackground.size() << "," << pbackground[0].size() << ") and points (" << nS << "," << nE << ") size mismatch";
ss << "Input RIGHT field at observation location (" << pbackground_corr.size() << "," << pbackground_corr[0].size() << ") and points (" << nS << "," << nE << ") size mismatch";
92
+
ss << "Input pbackground_corr field at observation location (" << pbackground_corr.size() << "," << pbackground_corr[0].size() << ") and points (" << nS << "," << nE << ") size mismatch";
throwstd::invalid_argument("Both background grid and observations points must be of same coordinate type (lat/lon or x/y)");
168
+
}
169
+
// Check ensembles have consistent sizes
170
+
int nE = background[0][0].size();
171
+
if(background.size() != nY || background[0].size() != nX) {
172
+
std::stringstream ss;
173
+
ss << "Input background field (" << background.size() << "," << background[0].size() << "," << background[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
174
+
throwstd::invalid_argument(ss.str());
175
+
}
176
+
if(bratios.size() != nY || bratios[0].size() != nX) {
177
+
std::stringstream ss;
178
+
ss << "Input bratios field (" << bratios.size() << "," << bratios[0].size() << ") is not the same size as the grid (" << nY << "," << nX << ")";
throwstd::invalid_argument("Both background grid and observations points must be of same coordinate type (lat/lon or x/y)");
259
+
}
260
+
// Check ensembles have consistent sizes
261
+
int nE = background[0][0].size();
262
+
if(background.size() != nY || background[0].size() != nX) {
263
+
std::stringstream ss;
264
+
ss << "Input background field (" << background.size() << "," << background[0].size() << "," << background[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
ss << "Input background_corr field (" << background_corr.size() << "," << background_corr[0].size() << "," << background_corr[0][0].size() << ") is not the same size as the grid (" << nY << "," << nX << "," << nE << ")";
270
+
throwstd::invalid_argument(ss.str());
271
+
}
272
+
if(bratios.size() != nY || bratios[0].size() != nX) {
273
+
std::stringstream ss;
274
+
ss << "Input bratios field (" << bratios.size() << "," << bratios[0].size() << ") is not the same size as the grid (" << nY << "," << nX << ")";
0 commit comments