function OK = delft3d_io_mdf_test
%delft3d_io_mdf_test test for delft3d_io_mdf
%
%See also: delft3d_io_mdf

OK = [];

D = delft3d_io_mdf('new')

delft3d_io_mdf('write','newsaved.mdf'       ,D.keywords);
delft3d_io_mdf('write','newsavednostamp.mdf',D.keywords,'stamp',[]);

D2 = delft3d_io_mdf('read','newsaved.mdf');

flds  = fieldnames(D.keywords);
flds2 = fieldnames(D2.keywords);
OK(end+1)=isequalwithequalnans(flds,flds2)

% isequaln(D.keywords,D2.keywords)
OK(end+1) = 1;
for i=1:length(flds)
    fld = flds{i};
    if ~isequal(D.keywords.(fld),D2.keywords.(fld))
        if ~strcmpi(fld,'secchi') % float, not exact
        OK(end) = 0;
        end
    end
end


%D.keywords
%D2.keywords