Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fvcom-toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FVCOM
fvcom-toolbox
Commits
2c400ffa
Commit
2c400ffa
authored
Oct 20, 2014
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix verbose statements being printed even when the verbose flag is disabled.
parent
9826f1e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
utilities/read_netCDF_FVCOM.m
utilities/read_netCDF_FVCOM.m
+13
-5
No files found.
utilities/read_netCDF_FVCOM.m
View file @
2c400ffa
...
...
@@ -277,7 +277,9 @@ for aa=1:length(varnames)
% Extract number of dimensions, lengths and names of all variables
%----------------------------------------------------------------------
% tic
fprintf
(
'Processing variable %s: '
,
varnames
{
aa
})
if
ftbverbose
fprintf
(
'Processing variable %s: '
,
varnames
{
aa
})
end
% Tidy up the previous iteration's variables so we don't get confused.
clear
dimName
dimLength
...
...
@@ -289,7 +291,7 @@ for aa=1:length(varnames)
else
netcdf
.
close
(
nc
)
varargout
{
1
}
=
0
;
fprintf
(
'\n'
)
if
ftbverbose
;
fprintf
(
'\n'
);
end
error
(
'Variable %s NOT found in file. Stopping. Check input variable names.'
,
varnames
{
aa
})
end
varID
=
netcdf
.
inqVarID
(
nc
,
vars
{
varidx
(
aa
)});
...
...
@@ -302,12 +304,18 @@ for aa=1:length(varnames)
if
ftbverbose
if
dd
==
1
if
length
(
dimids
)
==
1
fprintf
(
'%i dimension: %s '
,
dimens
,
dimName
{
dd
})
if
ftbverbose
fprintf
(
'%i dimension: %s '
,
dimens
,
dimName
{
dd
})
end
else
fprintf
(
'%i dimensions: %s '
,
dimens
,
dimName
{
dd
})
if
ftbverbose
fprintf
(
'%i dimensions: %s '
,
dimens
,
dimName
{
dd
})
end
end
else
fprintf
(
'%s '
,
dimName
{
dd
})
if
ftbverbose
fprintf
(
'%s '
,
dimName
{
dd
})
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment