Global Index (short | long) | Local contents | Local Index (short | long)
a = print_clim;
This should print a list of ccm2nc commands for the oi_82_98 run (specific). This will print into a file called: /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/data_oi/clim3.txt This should be immediately followed by the following series of commands (in the UNIX shell): cat clim1.txt > clim cat clim3.txt >> clim cat clim2.txt >> clim chmod u+x clim This creates an executable that, when executed, will create a climatology for this run.
function a = print_clim; cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/data_oi a = []; s1 = ['ccm2nc $CCMOPTS $SRCDIR/19']; s2 = [' 19']; s3 = ['.nc']; for i = 82:85 for j = 1:12 if j < 10 a = [a; s1 num2str(i) '-0' num2str(j) s2 num2str(i) '-0' num2str(j) s3]; else a = [a; s1 num2str(i) '-' num2str(j) s2 num2str(i) '-' num2str(j) s3]; end end end [m,n] = size(a); a(m,:) = ['ccm2nc $CCMOPTS $SRCDIR/1985x12 1985-12.nc']; for i = 86:97 for j = 1:12 if j < 10 a = [a; s1 num2str(i) 'x0' num2str(j) s2 num2str(i) '-0' num2str(j) s3]; else a = [a; s1 num2str(i) 'x' num2str(j) s2 num2str(i) '-' num2str(j) s3]; end end end for j = 1:6 a = [a; 'ccm2nc $CCMOPTS $SRCDIR/1998x0' num2str(j) ' 1998-0' num2str(j) s3]; end [m,n] = size(a); fname = ['clim3.txt'] form = ['%' int2str(n) 's\n']; for i = 1:m fid=fopen(fname,'a'); fprintf(fid,form,a(i,:)); fclose(fid); end