-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEvaluateSandyError.m
More file actions
25 lines (16 loc) · 935 Bytes
/
EvaluateSandyError.m
File metadata and controls
25 lines (16 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function [ sandyError ] = EvaluateSandyError( observationData, modelData, modelDataCol )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
modelNaN = isnan(modelData(:,modelDataCol));
modelHeightInterpolant = scatteredInterpolant(modelData(~modelNaN,1),modelData(~modelNaN,2),modelData(~modelNaN,modelDataCol));
obsLon = observationData.LON_DEG_EAST;
obsLat = observationData.LAT_DEG_NORTH;
obsElev = observationData.OBS_METERS_NAVD88;
sandyModelElevAtObservedPoints = modelHeightInterpolant(obsLon, obsLat);
sandyError = [obsLon obsLat (sandyModelElevAtObservedPoints - obsElev)];
sandyError(obsElev<=0,:) = [];
obsElev(obsElev<=0) = [];
disp(['Bias: ' num2str(mean(sandyError(:,3)))]);
disp(['RMSE: ' num2str(sqrt(mean(sandyError(:,3).^2))) ]);
disp(['NRMSE: ' num2str(sqrt(mean(sandyError(:,3).^2)) / mean(obsElev)) ]);
end