Commit c7319f15 authored by Pierre Cazenave's avatar Pierre Cazenave

Add slightly better help and fix incorrect usage of putVar with the actual supplied data array

parent 16e550e6
...@@ -7,7 +7,8 @@ function write_FVCOM_meanflow(Mobj, outfile, data) ...@@ -7,7 +7,8 @@ function write_FVCOM_meanflow(Mobj, outfile, data)
% Setup an FVCOM hydrographic open boundary mean flow forcing file. % Setup an FVCOM hydrographic open boundary mean flow forcing file.
% %
% INPUT: % INPUT:
% Mobj - MATLAB mesh object. % Mobj - MATLAB mesh object (with fields mf_time, siglay, siglev,
% nObcNodes and read_obc_nodes).
% outfile - Output file name. % outfile - Output file name.
% data - 2D array of mean flow along the open boundary (nobc, time). % data - 2D array of mean flow along the open boundary (nobc, time).
% %
...@@ -86,7 +87,7 @@ netcdf.putVar(nc, time_varid, 0, numel(Mobj.mf_times), Mobj.mf_times); ...@@ -86,7 +87,7 @@ netcdf.putVar(nc, time_varid, 0, numel(Mobj.mf_times), Mobj.mf_times);
netcdf.putVar(nc, itime_varid, floor(Mobj.mf_times)); netcdf.putVar(nc, itime_varid, floor(Mobj.mf_times));
netcdf.putVar(nc, itime2_varid, 0, numel(Mobj.mf_times), mod(Mobj.mf_times, 1) * 24 * 3600 * 1000); netcdf.putVar(nc, itime2_varid, 0, numel(Mobj.mf_times), mod(Mobj.mf_times, 1) * 24 * 3600 * 1000);
netcdf.putVar(nc, nmfcell_varid, Mobj.read_obc_nodes{1}); netcdf.putVar(nc, nmfcell_varid, Mobj.read_obc_nodes{1});
netcdf.putVar(nc, dmfqdis_varid, [0, 0], [numel(Mobj.mf_times), numel(Mobj.read_obc_nodes{1})], Mobj.velocity); netcdf.putVar(nc, dmfqdis_varid, [0, 0], [numel(Mobj.mf_times), numel(Mobj.read_obc_nodes{1})], data);
netcdf.close(nc); netcdf.close(nc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment