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
95f69af0
Commit
95f69af0
authored
Jan 10, 2013
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added two new outputs to the MATLAB mesh structure (the sigma layer and level values)
parent
45101b6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
fvcom_prepro/read_sigma.m
fvcom_prepro/read_sigma.m
+12
-4
No files found.
fvcom_prepro/read_sigma.m
View file @
95f69af0
...
...
@@ -11,12 +11,14 @@ function Mobj = read_sigma(Mobj, sigmafile)
% sigmafile : Full path to an FVCOM sigma.dat file.
%
% OUTPUT:
% Mobj: Mesh object with two new fields (siglayz and siglevz) which
% contain depths of the sigma layers and levels at each grid
% node.
% Mobj: Mesh object with four new fields:
% - siglayz and siglevz: contain depths of the sigma layers
% and levels at each grid node.
% - siglay and siglev: the sigma layer and levels in the
% range 0 to -1.
%
% EXAMPLE USAGE:
% read_sigma(Mobj, 'sigma.dat')
%
Mobj =
read_sigma(Mobj, 'sigma.dat')
%
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
...
...
@@ -25,6 +27,8 @@ function Mobj = read_sigma(Mobj, sigmafile)
% 2013-01-08 Based on the code in show_sigma.m but instead of calculating
% sigma layers along a user-defined line, the depths are calculated for
% each node in the unstructured grid.
% 2013-01-10 Added two new outputs to the returned Mobj (siglay and
% siglev). They're useful in write_FVCOM_tsobc.m.
subname
=
'read_sigma'
;
...
...
@@ -105,6 +109,10 @@ 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
);
% Add the sigma levels and layers to the Mobj.
Mobj
.
siglev
=
z
;
Mobj
.
siglay
=
zlay
;
if
ftbverbose
;
fprintf
([
'end : '
subname
'\n'
])
end
\ No newline at end of file
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