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
5eaf61ec
Commit
5eaf61ec
authored
Nov 08, 2012
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug whereby only the first time step was being used in the interpolation of the data
parent
061f3ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
fvcom_prepro/grid2fvcom.m
fvcom_prepro/grid2fvcom.m
+8
-1
No files found.
fvcom_prepro/grid2fvcom.m
View file @
5eaf61ec
...
...
@@ -21,6 +21,13 @@ function fvcom = grid2fvcom(Mobj,vars,data)
% fvcom - struct of the interpolated data values at the model nodes and
% element centres. Also includes any variables which were in the input
% struct but which have not been interpolated (e.g. time).
%
% NOTE:
% The shape of the returned arrays for rhum and slp (via
% get_NCEP_forcing.m) have sometimes differed from the other vairables
% (they appear to be projected onto a different grid). Unless you
% desperately need them, I would suggest omitting them from the
% interpolation here as this assumes the arrays are all the same size.
%
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
...
...
@@ -94,7 +101,7 @@ for vv=1:length(vars)
for
i
=
1
:
ntimes
fprintf
(
'interpolating %s, frame %d of %d\n'
,
vars
{
vv
},
i
,
ntimes
);
currvar
=
data
.
(
vars
{
vv
})
.
data
(:,
:,
1
);
currvar
=
data
.
(
vars
{
vv
})
.
data
(:,
:,
i
);
% griddata way (cubic interpolation)
%fvcom.(vars{vv}).node(:,i) = griddata(wind.x,wind.y,currvar,x,y,'cubic');
%fvcom.(vars{vv}).data(:,i) = griddata(wind.x,wind.y,currvar,xc,yc,'cubic');
...
...
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