clear; close all; more off;

parameters = '0.2_0.3'; %change according to which ponds you are examining

dr = strcat('~/Documents/MATLAB/pond surfaces/pde_',parameters,'/'); % change this to your directory

files = dir([dr '*.mat']);

nf = length(files) %- 2 %seems to overcount number of files by 2

nmaps = 40; %number of recorded surfaces during a simulation for directory files

nx = 500;

zraw = NaN(nf,nmaps,500,500);

for ni = 1:nf
    
    disp(ni)
    
    if ni < 10
        num = strcat('0',int2str(ni)); %adds a 0 if a single digit for file load
    else
        num = int2str(ni);
    end
    
    matData = sprintf([dr strcat('surf_',parameters,'_',num,'.mat')], ni);
    surface = load(matData);
    zraw(ni,:,:,:) = surface.hout;
    
end