Skip to content

Commit

Permalink
Error on output units
Browse files Browse the repository at this point in the history
Fixed errors on the units used in the report (e.g. mass in kg, duration
in minutes). Thanks to Jean-Marie Prival
  • Loading branch information
e5k committed Feb 12, 2017
1 parent 8f5075c commit 611b4e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
35 changes: 17 additions & 18 deletions TError_propagation.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
% University of Geneva
% Copyright (C) 2014
%
% Updates: April 2016: Minor bug on plottig function
% Updates: Apr 2016: Minor bug on plottig function
% Feb 2017: Fixed error on units (Thanks to Jean-Marie Prival)
%
% Email contact: [email protected], [email protected]
% Email contact: [email protected], [email protected]
%
% This program is free software;
% you can redistribute it and/or modify it under the terms of the
Expand Down Expand Up @@ -49,7 +50,7 @@
cstMa_e = 20; % Constant error (%)

% MER - Degruyter and Bonadonna (2012)
wind_v = -1; % Maximum wind speed below tropopause (m/s)
wind_v = -1; % Maximum wind speed below tropopause (m/s)
% Set -1 to propagate the wind speed obtained from
% Carey and Sparks (1986)
wind_e = 20; % Wind speed error (%)
Expand Down Expand Up @@ -100,7 +101,7 @@
%% Beginning of calculations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tstart = now;
clc;
home;
display('_________________________________________________________________');
display(sprintf('TError run %s started: %s', run_nm, datestr(tstart)));

Expand Down Expand Up @@ -501,20 +502,20 @@
writefile(fid, VOL(:,:,3), vol(3), [], 'Volume WBL (km3)', 1,1, pcile);
fprintf(fid, '\n');

writefile(fid, MASS(:,:,1), mass(1), [], 'Mass Exp (km3)', 1,1, pcile);
writefile(fid, MASS(:,:,2), mass(2), [], 'Mass PL (km3)', 1,1, pcile);
writefile(fid, MASS(:,:,3), mass(3), [], 'Mass WBL (km3)', 1,1, pcile);
writefile(fid, MASS(:,:,1), mass(1), [], 'Mass Exp (kg)', 1,1, pcile);
writefile(fid, MASS(:,:,2), mass(2), [], 'Mass PL (kg)', 1,1, pcile);
writefile(fid, MASS(:,:,3), mass(3), [], 'Mass WBL (kg)', 1,1, pcile);
fprintf(fid, '\n');

writefile(fid, [DUR(:,1,1), DUR(:,2,1)], dur(1), [], 'Duration W&W87-Exp (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,2), DUR(:,2,2)], dur(2), [], 'Duration W&W87-PL (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,3), DUR(:,2,3)], dur(3), [], 'Duration W&W87-WBL (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,4), DUR(:,2,4)], dur(4), [], 'Duration Ma09-Exp (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,5), DUR(:,2,5)], dur(5), [], 'Duration Ma09-PL (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,6), DUR(:,2,6)], dur(6), [], 'Duration Ma09-WBL (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,7), DUR(:,2,7)], dur(7), [], 'Duration D&B12-Exp (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,8), DUR(:,2,8)], dur(8), [], 'Duration D&B12-PL (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,9), DUR(:,2,9)], dur(9), [], 'Duration D&B12-WBL (h)', 0,1, pcile);
writefile(fid, [DUR(:,1,1), DUR(:,2,1)], dur(1), [], 'Duration W&W87-Exp (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,2), DUR(:,2,2)], dur(2), [], 'Duration W&W87-PL (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,3), DUR(:,2,3)], dur(3), [], 'Duration W&W87-WBL (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,4), DUR(:,2,4)], dur(4), [], 'Duration Ma09-Exp (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,5), DUR(:,2,5)], dur(5), [], 'Duration Ma09-PL (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,6), DUR(:,2,6)], dur(6), [], 'Duration Ma09-WBL (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,7), DUR(:,2,7)], dur(7), [], 'Duration D&B12-Exp (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,8), DUR(:,2,8)], dur(8), [], 'Duration D&B12-PL (min)', 0,1, pcile);
writefile(fid, [DUR(:,1,9), DUR(:,2,9)], dur(9), [], 'Duration D&B12-WBL (min)', 0,1, pcile);
fclose(fid);


Expand Down Expand Up @@ -586,5 +587,3 @@

display(sprintf('TError run %s finished: %s (time elapsed: %3.0f min)', run_nm, datestr(now), etime(datevec(now),datevec(tstart))/60));
display('_________________________________________________________________');


1 change: 1 addition & 0 deletions dep/bc2012.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

% TError package
% Weibull fit for volume calulation with the method of Bonadonna and Costa 2012
% xdata: Square root of the area (km)
Expand Down

0 comments on commit 611b4e7

Please sign in to comment.