/[MITgcm]/MITgcm_contrib/timour_matlab/mscripts/getmudge.m
ViewVC logotype

Contents of /MITgcm_contrib/timour_matlab/mscripts/getmudge.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Sep 3 21:22:22 2003 UTC (21 years, 10 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
initial checkin of Timour's MatLAB scripts

1 clear
2 clear path
3
4 global Nx Ny Nz
5 global lat long dz dm mdep
6 global delt_su su_its t_su delt
7 global descriptor this_path
8 global f deltaf Q beta r_expt r_heat H
9 global time rots it
10 global g Cp rho_bar alpha
11 global u v t w
12 global iterations
13
14
15 param_file_name = ...
16 input(' Please enter the name of the m-file with the parameters for this run : ','s') ;
17 feval(param_file_name) ;
18
19 iterations
20
21 it = input(' Please enter iteration : ','s')
22
23 path = this_path
24 cmdstr=['cd ' path ];
25 eval(cmdstr);
26 path=pwd
27
28 mufilename=(['mudgeu.' it ]);
29 mvfilename=(['mudgev.' it ]);
30 ufilename=(['U.' it ]);
31 vfilename=(['V.' it ]);
32 udfilename=(['Udsk.' it ]);
33 vdfilename=(['Vdsk.' it ]);
34 uspinfilename=(['Uspin3d.' it ]);
35 vspinfilename=(['Vspin3d.' it ]);
36 mudgeu=rdmeta(mufilename,'b');
37 mudgev=rdmeta(mvfilename,'b');
38 v=rdmeta(vfilename,'b');
39 u=rdmeta(ufilename,'b');
40 vdsk=rdmeta(vdfilename,'b');
41 udsk=rdmeta(udfilename,'b');
42 vspin=rdmeta(vspinfilename,'b');
43 uspin=rdmeta(uspinfilename,'b');
44
45 w=zeros(Nx,Ny,Nz+1);
46 dx=dm;
47 dy=dm;
48
49 for k=Nz:-1:1,
50 w(1:Nx-1,1:Ny-1,k)= w(1:Nx-1,1:Ny-1,k+1)...
51 -u(2:Nx,1:Ny-1,k)*dz(k)/dx +u(1:Nx-1,1:Ny-1,k)*dz(k)/dx ...
52 -v(1:Nx-1,2:Ny,k)*dz(k)/dy +v(1:Nx-1,1:Ny-1,k)*dz(k)/dy ;
53 end

  ViewVC Help
Powered by ViewVC 1.1.22