% this works with Matlab 7.2 on csysl4.dmawi.de (Redhat 9) % uname -a % Linux csysl4 2.4.24 #4 SMP Thu Feb 19 09:31:43 CET 2004 i686 i686 i386 GNU/Linux %addpath ./bin bdir = '/net/ross/raid2/mlosch'; datapath = fullfile(bdir,'data_sources'); gridpath = fullfile(bdir,'MITgcm_contrib/eh3/llc/ecco-godae/input'); gridpath = fullfile(bdir,'llc2deg'); fnamegrid = 'llc_p90'; fnamepattern = [fnamegrid '_%d.nc']; % set the number of recursion levels here nfinepow=4; save DATAPATH datapath gridpath fnamepattern fnamegrid nfinepow setfmt vgrid % offsets for longitude and latitude % up to now the scripts work only for monotonically increasing lon s_lon = -37; % turns cube corners into land (mostly) s_lat = 0; % generate grid variables latlongrid % load topography and interpolate topo_s2004 % hydrography from levitus (takes some time) % levit % correct for annual cycle % annual %return % put together topography load DATAPATH load FMT load HN load ZN hntot = hn+hnz; % save it so a file % bottom topography fname = ['bathy_' fnamegrid]; % with shelfice fid=fopen([fname '.shice'],'w',Ieee); fwrite(fid,mdsiocompact(hntot),fmt); fclose(fid); % without shelfice regions fid=fopen([fname '.bin'],'w',Ieee); fwrite(fid,mdsiocompact(hn),fmt); fclose(fid); % shelfice topography fname = ['shicetopo_' fnamegrid]; fid=fopen([fname '.bin'],'w',Ieee); fwrite(fid,mdsiocompact(zn),fmt); fclose(fid);