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
d4185d2c
Commit
d4185d2c
authored
Jan 09, 2013
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the returned variables to separate sigma level and sigma layer depths
parent
0c9ad637
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
fvcom_prepro/read_sigma.m
fvcom_prepro/read_sigma.m
+8
-3
No files found.
fvcom_prepro/read_sigma.m
View file @
d4185d2c
...
...
@@ -11,8 +11,9 @@ function Mobj = read_sigma(Mobj, sigmafile)
% sigmafile : Full path to an FVCOM sigma.dat file.
%
% OUTPUT:
% Mobj: Mesh object with a new field (sigmaz) which contains the
% depths of the sigma layers at each grid node.
% Mobj: Mesh object with two new fields (siglayz and siglevz) which
% contain depths of the sigma layers and levels at each grid
% node.
%
% EXAMPLE USAGE:
% read_sigma(Mobj, 'sigma.dat')
...
...
@@ -98,7 +99,11 @@ switch lower(sigtype)
error
(
'Can
''
t do that sigtype'
)
end
Mobj
.
sigmaz
=
repmat
(
Mobj
.
h
,
1
,
nlev
)
.*
repmat
(
z
,
Mobj
.
nVerts
,
1
);
% Create a siglay variable (i.e. midpoint in the sigma levels).
zlay
=
z
(
1
:
end
-
1
)
+
(
diff
(
z
)/
2
);
Mobj
.
siglevz
=
repmat
(
Mobj
.
h
,
1
,
nlev
)
.*
repmat
(
z
,
Mobj
.
nVerts
,
1
);
Mobj
.
siglayz
=
repmat
(
Mobj
.
h
,
1
,
nlev
-
1
)
.*
repmat
(
zlay
,
Mobj
.
nVerts
,
1
);
if
ftbverbose
;
fprintf
([
'end : '
subname
'\n'
])
...
...
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