/[MITgcm]/MITgcm_contrib/mlosch/interp_llc/doall.m
ViewVC logotype

Contents of /MITgcm_contrib/mlosch/interp_llc/doall.m

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


Revision 1.1 - (show annotations) (download)
Thu May 3 21:07:20 2007 UTC (18 years, 2 months ago) by mlosch
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
initial checkin of topography and hydrography interpolation scripts for
the llc-grid, based on old matlab scripts by Alistair Adcroft
Let's hope, they are useful.

1 % this works with Matlab 7.2 on csysl4.dmawi.de (Redhat 9)
2 % uname -a
3 % Linux csysl4 2.4.24 #4 SMP Thu Feb 19 09:31:43 CET 2004 i686 i686 i386 GNU/Linux
4
5 %addpath ./bin
6
7 bdir = '/net/ross/raid2/mlosch';
8 datapath = fullfile(bdir,'data_sources');
9 gridpath = fullfile(bdir,'MITgcm_contrib/eh3/llc/ecco-godae/input');
10 gridpath = fullfile(bdir,'llc2deg');
11 fnamegrid = 'llc_p90';
12 fnamepattern = [fnamegrid '_%d.nc'];
13
14 % set the number of recursion levels here
15 nfinepow=4;
16
17 save DATAPATH datapath gridpath fnamepattern fnamegrid nfinepow
18 setfmt
19 vgrid
20
21 % offsets for longitude and latitude
22 % up to now the scripts work only for monotonically increasing lon
23 s_lon = -37; % turns cube corners into land (mostly)
24 s_lat = 0;
25
26 % generate grid variables
27 latlongrid
28
29 % load topography and interpolate
30 topo_s2004
31
32 % hydrography from levitus (takes some time)
33 % levit
34 % correct for annual cycle
35 % annual
36
37 %return
38 % put together topography
39 load DATAPATH
40 load FMT
41 load HN
42 load ZN
43 hntot = hn+hnz;
44
45 % save it so a file
46 % bottom topography
47 fname = ['bathy_' fnamegrid];
48 % with shelfice
49 fid=fopen([fname '.shice'],'w',Ieee);
50 fwrite(fid,mdsiocompact(hntot),fmt);
51 fclose(fid);
52 % without shelfice regions
53 fid=fopen([fname '.bin'],'w',Ieee);
54 fwrite(fid,mdsiocompact(hn),fmt);
55 fclose(fid);
56 % shelfice topography
57 fname = ['shicetopo_' fnamegrid];
58 fid=fopen([fname '.bin'],'w',Ieee);
59 fwrite(fid,mdsiocompact(zn),fmt); fclose(fid);
60
61
62

  ViewVC Help
Powered by ViewVC 1.1.22