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
c4494c92
Commit
c4494c92
authored
Sep 10, 2012
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to improve the description of the inputs. Also made the formatting of the components better
parent
5faf3beb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
fvcom_prepro/write_FVCOM_spectide.m
fvcom_prepro/write_FVCOM_spectide.m
+17
-10
No files found.
fvcom_prepro/write_FVCOM_spectide.m
View file @
c4494c92
function
write_FVCOM_spectide
(
ObcNodes
,
StartDate
,
Components
,
Period
,
Phase
,
Amp
,
BetaLove
,
EquilibriumAmp
,
SpectralFile
,
MyTitle
)
% Write an FVCOM spectral tidal elevation forcing file
function
write_FVCOM_spectide
(
ObcNodes
,
Components
,
Period
,
Phase
,
Amp
,
BetaLove
,
EquilibriumAmp
,
SpectralFile
,
MyTitle
)
% Write an FVCOM spectral tidal elevation forcing file
%
% function write_FVCOM_spectide(ObcNodes,Components,Period,Phase,Amp,BetaLove,EquilibriumAmp,SpectralFile,MyTitle)
%
...
...
@@ -9,9 +9,12 @@ function write_FVCOM_spectide(ObcNodes,StartDate,Components,Period,Phase,Amp,Bet
%
% INPUT:
% ObcNodes = list of open boundary nodes of size [nObcs]
% Components = list of component names (e.g. 'M2', 'N2' etc.) [nComponents]
% Period = list of periods in seconds of size [nComponents]
% Phase = list of phases in degrees of size [nObcs,nComponents]
% Amp = list of amplitudes (m) of size [nObcs,nComponents]
% BetaLove = list of beta Love numbers [nComponents]
% EquilibriumAmp = list of equilibrium tidal amplitudes [nComponents]
% SpectralFile = name of NetCDF file
% MyTitle = case title, written as global attribute of NetCDF file
%
...
...
@@ -19,22 +22,22 @@ function write_FVCOM_spectide(ObcNodes,StartDate,Components,Period,Phase,Amp,Bet
% SpectralFile, A NetCDF FVCOM spectral tide forcing file
%
% EXAMPLE USAGE
% write_FVCOM_spectide(ObcNodes,Period,Phase,Amp,SpectralFile,MyTitle)
% write_FVCOM_spectide(ObcNodes,Period,Phase,Amp,SpectralFile,MyTitle)
%
% Author(s):
% Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory)
%
%
% Revision history
% 2012-06-14 Ported NetCDF write to use MATLAB's native NetCDF support.
% Requires MATLAB v2010a or greater.
% 2012-08-02 Added beta (Love) number and equilibrium amplitude support
%
when writing output.
%
%
when writing output.
%
%==============================================================================
warning
off
global
ftbverbose
global
ftbverbose
report
=
false
;
if
(
ftbverbose
);
report
=
true
;
end
;
subname
=
'write_FVCOM_spectide'
;
...
...
@@ -75,7 +78,11 @@ netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),'type','FVCOM SPECTRAL ELEVATIO
netcdf
.
putAtt
(
nc
,
netcdf
.
getConstant
(
'NC_GLOBAL'
),
'title'
,
MyTitle
)
ComponentsOut
=
char
();
for
i
=
1
:
nComponents
ComponentsOut
=
[
ComponentsOut
,
Components
{
i
}];
if
i
==
1
ComponentsOut
=
Components
{
i
};
else
ComponentsOut
=
[
ComponentsOut
,
' '
,
Components
{
i
}];
end
end
netcdf
.
putAtt
(
nc
,
netcdf
.
getConstant
(
'NC_GLOBAL'
),
'components'
,
ComponentsOut
)
netcdf
.
putAtt
(
nc
,
netcdf
.
getConstant
(
'NC_GLOBAL'
),
'history'
,
'FILE CREATED using write_FVCOM_spectide'
)
...
...
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