Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

Commit 3707bb5c authored by Pierre Cazenave's avatar Pierre Cazenave

Fix some of the descriptions of the preprocessing functions

parent 204917e8
function [Mobj] = add_stations_list(Mobj,Positions,Names,Dist)
% Add a set of stations at which FVCOM will output time series.
% Add a set of stations at which FVCOM will output time series.
%
% [Mobj] = add_stations_list(Mobj,Positions,Names,Dist)
%
......@@ -11,9 +11,14 @@ function [Mobj] = add_stations_list(Mobj,Positions,Names,Dist)
%
% INPUT
% Mobj = Matlab mesh object
% Positions = Array of the positions of the stations
% Positions = 2xn array of the XY positions of the stations
% Names = Cell array of the names of the stations defined in Positions
% Dist = Maximum distance away for a node to be included
% Dist = Maximum distance from a station for a node to be included
%
% Optionally supply positions as a 4xn array with spherical x and y and
% cartesian x and y in columns 1, 2, 3 and 4, respectively. The
% values in Mobj.nativecoords will be used for the distance check, so
% ensure Dist is in those units.
%
% OUTPUT:
% Mobj = Matlab mesh object with an additional cell array containing id,
......@@ -23,13 +28,13 @@ function [Mobj] = add_stations_list(Mobj,Positions,Names,Dist)
% Mobj = add_stations_list(Mobj, [-5.54, 50.103; -3.0865, 58.441], ...
% {'Newlyn', 'Wick'}, 0.25)
%
% Author(s):
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
%
%
% Revision history
% 2012-11-30 First version.
%
%
%==========================================================================
subname = 'add_stations_list';
global ftbverbose
......@@ -51,7 +56,7 @@ end
% For each site in the supplied positions, find the nearest node ID
%--------------------------------------------------------------------------
% Check for whether the input has both spherical and cartesian.
% Check for whether the input has both spherical and cartesian.
if size(Positions, 2) > 2
% Now check for which is the native coordinate system, and output the
% station positions in that coordinate system.
......@@ -73,7 +78,7 @@ inc = 1;
for s=1:nPos
[node, dist] = find_nearest_pt(Positions(s, cols(1)), Positions(s, cols(2)), Mobj);
if dist >= Dist
% Skip out for this station
if(ftbverbose)
......@@ -85,4 +90,4 @@ for s=1:nPos
inc = inc + 1;
end
Mobj.stations = out;
\ No newline at end of file
Mobj.stations = out;
function set_elevtide(Mobj,JulianTime,SurfaceElevation,ElevationFile,MyTitle)
% Setup spectral tides on the open boundary and dump a spectral file
% Setup surface elevation tides on the open boundary and dump an
% elevation time series file.
%
% functionset_elevtide(Mobj,JulianTime,SurfaceElevation,ElevationFile,MyTitle)
% function set_elevtide(Mobj,JulianTime,SurfaceElevation,ElevationFile,MyTitle)
%
% DESCRIPTION:
% Setup surface elevation tides on the open boundary and dump a NetCDF
......@@ -14,18 +15,18 @@ function set_elevtide(Mobj,JulianTime,SurfaceElevation,ElevationFile,MyTitle)
% Julian Time)
% ElevationFile = Output file name
% MyTitle = Title in resulting NetCDF file.
%
%
% OUTPUT:
%
% EXAMPLE USAGE
% set_elevtide(Mobj,JulianTime,SurfaceElevation,ElevationFile,MyTitle)
%
% Author(s):
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
%
% Revision history
% 2012-08-08 First version.
%
%
%==============================================================================
subname = 'set_spectide';
global ftbverbose;
......@@ -49,4 +50,4 @@ end
%------------------------------------------------------------------------------
write_FVCOM_elevtide(ObcNodes,JulianTime,SurfaceElevation,ElevationFile,MyTitle)
if(ftbverbose); fprintf(['end : ' subname '\n']); end
\ No newline at end of file
if(ftbverbose); fprintf(['end : ' subname '\n']); end
function write_FVCOM_tsobc(basename,time,nSiglay,in_temp,in_salt)
% example file for dumping a file to force temperature and salinity at the open b.
% Output uniform temperature and salinity to force open boundary inputs.
%
% function example_FVCOM_tsobc()
%
......
function write_FVCOM_wind_ts_speed(Mobj, WindFile, time, u10, v10)
% example file for FVCOM, time-varying/spatially constant wind forcing as speed
% Write out time-varying/spatially constant wind forcing as speed.
%
% function write_FVCOM_wind_ts_speed
%
......@@ -11,12 +11,12 @@ function write_FVCOM_wind_ts_speed(Mobj, WindFile, time, u10, v10)
% Mobj - MATLAB mesh object
% WindFile - output NetCDF filename (including path)
% time - time in MJD
% u10 - vector x component of wind field 10m above the surface.
% v10 - vector y component of wind field 10m above the surface.
%
% Note: the shape of u10 and v10 must match that of time since the
% u10 - vector x component of wind field 10m above the surface.
% v10 - vector y component of wind field 10m above the surface.
%
% Note: the shape of u10 and v10 must match that of time since this
% currently only outputs temporally varying wind (not spatially varying).
%
%
% OUTPUT:
% NetCDF WindFile
%
......@@ -27,7 +27,7 @@ function write_FVCOM_wind_ts_speed(Mobj, WindFile, time, u10, v10)
% time, ones(size(time)),...
% ones(size(time))*0.25);
%
% Author(s):
% Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory)
%
......@@ -37,7 +37,7 @@ function write_FVCOM_wind_ts_speed(Mobj, WindFile, time, u10, v10)
% need for the third party NetCDF library. Also added three additional
% arguments to the function call (time and u and v vectors). u and v
% vectors vary in time and space.
%
%
%==============================================================================
warning off
subname = 'example_FVCOM_wind_ts_speed';
......@@ -51,7 +51,7 @@ nElems = Mobj.nElems;
nNodes = Mobj.nVerts;
%------------------------------------------------------------------------------
% write output to time and spatially-varying FVCOM wind file
% write output to time and spatially-varying FVCOM wind file
%------------------------------------------------------------------------------
nc=netcdf.create(WindFile,'clobber');
......
function write_FVCOM_z0(z0,filename,mytitle)
function write_FVCOM_z0(z0,filename,mytitle)
% Dump spatially-variable bottom roughness (z0) to FVCOM forcing file
% Dump spatially-variable or uniform bottom roughness (z0) to FVCOM forcing
% file.
%
% function write_FVCOM_z0(z0,filename,mytitle)
%
% DESCRIPTION:
% Generate a NetCDF file containing spatially variable z0 for FVCOM
% Generate a NetCDF file containing spatially variable z0 for FVCOM
%
% INPUT
% z0 = user defined roughness field (m)
% INPUT
% z0 = user defined roughness field (m)
% roughness is defined on the elements
% filename = filename to dump to
% mytitle = title of the case (set as global attribute)
% mytitle = title of the case (set as global attribute)
%
% OUTPUT:
% NetCDF file: filename
......@@ -19,14 +20,14 @@ function write_FVCOM_z0(z0,filename,mytitle)
% EXAMPLE USAGE
% write_FVCOM_z0(z0field, 'tst_z0.nc', 'z0 tst domain')
%
% Author(s):
% Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory)
%
% Revision history
% 2012-06-15 Added support for native MATLAB NetCDF routines. Requires
% MATLAB 2010a or higher.
%
%
%==============================================================================
warning off
subname = 'write_FVCOM_z0';
......
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