clear all format long %%%%%%%%%% geo.m %%%%%%%%%%%%%%%%%%% load('pressure.mat'); m=size(p,2); % this establishes the density value and coriolis parameter (which we %% will assume to be constant) %% the dx and dy are used to establish the uniform gridpoint distance rho=1.2; f=4e-5; dy=10000; dx=10000; %%%% This is a loop to deal with our standard issues at the boundaries %%%% of the problem for m=1:51 u(1,m)=-(1/(f*rho))*(p(2,m)-p(1,m))/dy; u(51,m)=-(1/(f*rho))*(p(51,m)-p(50,m))/dy; v(m,1)=(1/(f*rho))*(p(m,2)-p(m,1))/dx; v(m,51)=(1/(f*rho))*(p(m,51)-p(m,50))/dx; end %%% This creates the domain of x and y elements in the form of arrays for i=1:51 for j=1:51 x(i,j)=dx*j; y(i,j)=dy*i; end end %%% Here is where your theoretical and computational prowess will shine %%% develop a finite difference code based on the geostrophic equations %%%% that create horizontal velocity components for the given pressure %%% field from the spreadsheet for i=2:50 for j=2:50 end end