function FLNTU = rd_FLNTU(filename)
%IMPORTFILE Import data from a text file
%  FLNTU99920260127000000 = IMPORTFILE(FILENAME) reads data from text
%  file FILENAME for the default selection.  Returns the data as a table.
%
%  FLNTU99920260127000000 = IMPORTFILE(FILE, DATALINES) reads data for
%  the specified row interval(s) of text file FILENAME. Specify
%  DATALINES as a positive scalar integer or a N-by-2 array of positive
%  scalar integers for dis-contiguous row intervals.
%
%  Example:
%  FLNTU99920260127000000 = importfile("/Volumes/Boss_SSD/Perseverance/raw/FLNTU999/FLNTU999_20260127_000000.csv", [2, Inf]);
%
%  See also READTABLE.
%
% Auto-generated by MATLAB on 28-Jan-2026 08:32:54

%% Input handling

% If dataLines is not specified, define defaults
if nargin < 2
    dataLines = [2, Inf];
end

%% Set up the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 5);

% Specify range and delimiter
opts.DataLines = dataLines;
opts.Delimiter = ",";

% Specify column names and types
opts.VariableNames = ["dt", "lat", "lon", "FLNTU_Chla", "FLNTU_Turb"];
opts.VariableTypes = ["string", "double", "double", "double", "double"];

% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";

% Specify variable properties
opts = setvaropts(opts, "dt", "WhitespaceRule", "preserve");
opts = setvaropts(opts, "dt", "EmptyFieldRule", "auto");

% Import the data
FLNTU = readtable(filename, opts);

end