% input_dir: path for the folder containing the files
input_dir = './Data/';
% filelist
filelist = dir(fullfile(input_dir,'data_chirps*.nc'));
% output filename
output_fn = 'Merged_Output.nc';
% name of the demension to be merged.
merge_dim_name = 'time';
% compatibility_mode:
% compatibility_mode = 1: write netCDF in 'CLOBBER'; Compression would be disabled.
% compatibility_mode = 0: write netCDF in 'NETCDF4'.
compatibility_mode = 0;
strvcat( filelist(:).name )
FUN_nc_merge( input_dir, filelist, output_fn, merge_dim_name, compatibility_mode )