Commit 5d530138 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix whitespace errors.

parent 39bc593f
......@@ -43,7 +43,7 @@ subname = 'init_lag';
global ftbverbose;
if ftbverbose
fprintf('\nbegin : %s \n', subname)
fprintf('\nbegin : %s \n', subname)
end
tbeg = timerange(1);
......
......@@ -207,4 +207,4 @@ end
if ftbverbose
fprintf('end : %s \n', subname)
end
\ No newline at end of file
end
......@@ -38,7 +38,7 @@ end;
nElems = numel(turbine.numbers);
nSiglay = size(turbine.sigma_layer,2);
if(nElems == 0)
error('dimension of turbine_numbers is 0, something is wrong ')
error('dimension of turbine_numbers is 0, something is wrong ')
end;
%------------------------------------------------------------------------------
......
......@@ -38,10 +38,10 @@ function write_FVCOM_elevtide(Mobj,MJD,ElevationFile,MyTitle,varargin)
% write_FVCOM_elevtide(Mobj, MJD, '/tmp/elevtide.nc, ...
% 'Shelf tides', 'floattime', true)
%
% Author(s):
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
% Karen Amoudry (National Oceanography Centre Liverpool)
%
%
% Revision history
% 2012-08-08 (PWC) First version.
% 2012-11-14 (PWC) Updated to expect Modified Julian Day rather than
......@@ -59,7 +59,7 @@ function write_FVCOM_elevtide(Mobj,MJD,ElevationFile,MyTitle,varargin)
% to 'Itime' and 'Itime2' and finally 'time'. Also reinstate the original
% version of the calculation of Itime2 as the rounding effect was
% smoothing out the data too much, affecting its precision.
%
%
%==========================================================================
global ftbverbose
......@@ -104,7 +104,7 @@ if nObcs ~= chk1 || nTimes ~= chk2
fprintf('Surface elevation nodes and time sizes: (%d, %d)\n', chk1, chk2)
fprintf('Boundary nodes size: %d\n', nObcs)
fprintf('Times size: %d\n', nTimes)
error('Input data sizes do not match. Check and try again.');
error('Input data sizes do not match. Check and try again.');
end
%%
......
......@@ -20,7 +20,7 @@ function write_FVCOM_meanflow(Mobj, ncfile, data)
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
%
% TODO:
% TODO:
% Add support for multiple open boundaries (currently hard limit of
% one).
%
......
......@@ -288,7 +288,7 @@ if nesttype > 2
netcdf.putAtt(nc, cweights_varid, 'units', 'no units');
netcdf.putAtt(nc, cweights_varid, 'grid', 'fvcom_grid');
netcdf.putAtt(nc, cweights_varid, 'type', 'data');
nweights_varid = netcdf.defVar(nc, 'weight_node', 'NC_FLOAT', ...
[node_dimid, time_dimid]);
netcdf.putAtt(nc, nweights_varid, 'long_name', ...
......
......@@ -26,7 +26,7 @@ function write_FVCOM_river(RiverFile,RiverName,time,flux,temp,salt,RiverInfo1,Ri
% write_FVCOM_river('tst_riv.nc', {'Penobscot'}, time, flux, temp, ...
% salt, 'Penobscot Flux', 'source: USGS')
%
% Author(s):
% Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory)
%
......
......@@ -26,7 +26,7 @@ function write_FVCOM_river_ERSEM(RiverFile,RiverName,time,flux,temp,salt,n1p,n3n
% write_FVCOM_river('tst_riv.nc', {'Penobscot'}, time, flux, temp, ...
% salt, 'Penobscot Flux', 'source: USGS')
%
% Author(s):
% Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory)
%
......
......@@ -53,16 +53,16 @@ if(report); fprintf('Number of Open Boundary Nodes %d\n',nObcs); end;
[chk1,chk2] = size(Amp);
if( (nObcs-chk1)*(nComponents-chk2) ~= 0)
fprintf('Amp dimensions do not match!!!')
fprintf('nObcs %d nComponents %d\n',chk1,chk2)
error('bad');
fprintf('Amp dimensions do not match!!!')
fprintf('nObcs %d nComponents %d\n',chk1,chk2)
error('bad');
end;
[chk1,chk2] = size(Phase);
if( (nObcs-chk1)*(nComponents-chk2) ~= 0)
fprintf('Phase dimensions do not match!!!')
fprintf('nObcs %d nComponents %d\n',chk1,chk2)
error('bad');
fprintf('Phase dimensions do not match!!!')
fprintf('nObcs %d nComponents %d\n',chk1,chk2)
error('bad');
end;
%%
......
......@@ -59,7 +59,7 @@ if nargin == 5
else
disp(['We are adding nutrients to the BC file!!!',Nutrients{1:NNuts}])
tsOBCFile = [basename, '_Nutsobc.nc'];
end
end
......@@ -126,7 +126,7 @@ nTimes = numel(time);
nSiglev = nSiglay + 1;
for nuts=1:NNuts
in_temp=Mobj.(Nutrients{nuts});
% Create or process the temperature and salinity arrays.
if max(size(in_temp)) == 1
inc = 1/real(nSiglay);
......@@ -137,8 +137,8 @@ for nuts=1:NNuts
end
eval([Nutrients{nuts},'= zeros(nObc,nSiglay,nTimes);'])
eval(['obc_',Nutrients{nuts},' = repmat(Mobj.(',Nutrients{nuts},'), 1, nTimes);'])
for i=1:nObc
for j=1:nSiglay
eval([Nutrients{nuts},'(i,j,:)=obc_',Nutrients{nuts},';'])
......@@ -147,7 +147,7 @@ for nuts=1:NNuts
else
% We have a 3D array already so we just need a couple of stats.
eval([Nutrients{nuts},'= Mobj.',Nutrients{nuts},';'])
if nargin >= 4 && isfield(Mobj, 'siglay') && isfield(Mobj, 'siglev')
siglev = Mobj.siglev;
siglay = Mobj.siglay;
......@@ -157,7 +157,7 @@ for nuts=1:NNuts
siglev = 0:-inc:-1;
siglay = nan(1, nSiglay);
end
in_test= Mobj.(Nutrients{nuts});
if nSiglay ~= size(in_test, 2) || length(siglay) ~= size(in_test, 2)
error('Specified number of sigma layers does not match supplied data')
......
......@@ -40,19 +40,19 @@ end;
% Parse input arguments
%------------------------------------------------------------------------------
if(~exist('z0','var'))
error('incorrect usage of write_FVCOM_z0, must provide z0 field')
error('incorrect usage of write_FVCOM_z0, must provide z0 field')
end;
if(~exist('filename','var'))
error('incorrect usage of write_FVCOM_z0, must provide filename')
error('incorrect usage of write_FVCOM_z0, must provide filename')
end;
if(~exist('mytitle','var'))
error('incorrect usage of write_FVCOM_z0, must provide title field')
error('incorrect usage of write_FVCOM_z0, must provide title field')
end;
% check dimensions
nElems = numel(z0);
if(nElems == 0)
error('dimension of z0 is 0, something is wrong ')
error('dimension of z0 is 0, something is wrong ')
end;
%------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment