function zuv2netcf(filename, zuv)
nc_create_empty(filename)
%nc_dump(filename)
nc_add_dimension(filename, 'time', 0)
varstruct.Name='dayno';
varstruct.Nctype=nc_double;
varstruct.Dimension={'time'};
nc_addvar(filename, varstruct)
%nc_dump(filename)
varstruct.Name='totalwaterlev';
varstruct.Nctype=nc_double;
varstruct.Dimension={'time'};
nc_addvar(filename, varstruct)
varstruct.Name='uvelocity';
varstruct.Nctype=nc_double;
varstruct.Dimension={'time'};
nc_addvar(filename, varstruct)
varstruct.Name='vvelocity';
varstruct.Nctype=nc_double;
varstruct.Dimension={'time'};
nc_addvar(filename, varstruct)
%nc_dump(filename)
nc_varput(filename,'dayno',zuv.dayno,0,length(zuv.dayno))
nc_varput(filename,'totalwaterlev',zuv.totalwaterlev,0,length(zuv.totalwaterlev))
nc_varput(filename,'uvelocity',zuv.uvelocity,0,length(zuv.uvelocity))
nc_varput(filename,'vvelocity',zuv.vvelocity,0,length(zuv.vvelocity))
nc_attput(filename,'dayno','units','days')
nc_attput(filename,'totalwaterlev','units','meters')
nc_attput(filename,'uvelocity','units','m/s')
nc_attput(filename,'vvelocity','units','m/s')
nc_dump(filename)


end






