Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Fixed a bug in the writing of ECMWF files
  • Loading branch information
e5k committed Jul 27, 2018
1 parent 85013e9 commit 1a209b7
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CODE/dwind/process_wind.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function process_wind(varargin)

stor_data(iL,:,tI) = [z, speed, angle]; % Convert vectors to wind speed and direction and fill the storage matrix
end
dlmwrite(fullfile(out_path, [num2str(tI, '%05i'), '.gen']), stor_data(:,:,tI), 'delimiter', '\t', 'precision', 5); % Write the wind file
dlmwrite(fullfile(out_path, [num2str(tI, '%05i'), '.gen']), sortrows(stor_data(:,:,tI),1), 'delimiter', '\t', 'precision', 5); % Write the wind file
tI = tI+1;
end

Expand Down Expand Up @@ -222,7 +222,7 @@ function process_wind(varargin)

stor_data(iL,:,tI) = [z, speed, angle]; % Convert vectors to wind speed and direction and fill the storage matrix
end
dlmwrite(fullfile(out_path, [num2str(tI, '%05i'), '.gen']), stor_data(:,:,tI), 'delimiter', '\t', 'precision', 5); % Write the wind file
dlmwrite(fullfile(out_path, [num2str(tI, '%05i'), '.gen']), sortrows(stor_data(:,:,tI),1), 'delimiter', '\t', 'precision', 5); % Write the wind file
tI = tI+1;
end
end
Expand Down
4 changes: 4 additions & 0 deletions CODE/load_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
load('tmp.mat', 'tmp');
project.run_pth = tmp.run_pth;
project.grd_pth = tmp.grd_pth;
project.run_name = tmp.run_name;
project.vent = tmp.vent;
if isfield(tmp, 'points')
project.points = tmp.points;
Expand All @@ -115,6 +116,9 @@

project.grd_type = tmp.grd_type;

project.par = tmp.par;
project.cores = tmp.cores;

else
% Select run file
[flname, flpath] = uigetfile('RUNS/*.mat', 'Select a RUN file to open');
Expand Down
2 changes: 2 additions & 0 deletions CODE/probability_maker.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ function probability_maker(varargin)
for iR = 1:length(runs)
if length(dir([project.run_pth, 'DATA', filesep, 'dataT2_*.mat'])) < length(runs)
preProcess(project, runs, prefs);
else
fprintf('Tephra2 files have already been post processed. To re-process them, delete the dataT2_*.mat files from the DATA/ folder of your run\n')
end
end

Expand Down
Binary file modified MODEL/forward_src/new_tephra.o
Binary file not shown.
Binary file modified MODEL/forward_src/tephra2_calc.o
Binary file not shown.
Binary file modified MODEL/tephra2-2012
Binary file not shown.
Binary file removed MODEL/tephra2-2012.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion tephraProb.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
'HorizontalAlignment', 'center',...
'BackgroundColor', [.25 .25 .25],...
'ForegroundColor', [.9 .5 0],...
'String', 'v. 1.5');
'String', 'v. 1.5.1');

t.ax = axes(...
'parent', t.main,...
Expand Down

0 comments on commit 1a209b7

Please sign in to comment.