# Returns the depth of boundary #i ( i >= 0 ) ################################################# function [ d ] = z( i ) global model nlayers if ( i == 0 ) d = 0.0; elseif ( i <= nlayers ) d = model(i,1); else d = model(nlayers,1); endif endfunction