-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added separate Ye calculator (outside of DA)
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
function[Ye] = calculateYe( M, F ) | ||
%% Calculates Ye for a given ensemble and set of PSMs without conducting | ||
% any data assimilation. | ||
% | ||
% Ye = dash.calculateYe( M, F ) | ||
% Calculate Ye values. | ||
% | ||
% ----- Inputs ----- | ||
% | ||
% M: A model ensemble (nState x nEns), or a scalar ensemble object. | ||
% | ||
% F: A set of forward models | ||
% | ||
% ----- Outputs ----- | ||
% | ||
% Ye: A set of Ye values | ||
|
||
% Initialize an empty Kalman Filter, just to error check M and F | ||
kalmanFilter( M, ones(size(F)), ones(size(F)), F ); | ||
|
||
% Preallocate | ||
nObs = size(F,1); | ||
nEns = size(M,2); | ||
Ye = NaN( nObs, nEns ); | ||
|
||
% Generate model estimates | ||
for d = 1:numel(F) | ||
Mpsm = M( F{d}.H, : ); | ||
Ye(d,:) = dash.processYeR( F{d}, Mpsm, 1, NaN, d ); | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters