% % Ed Hill % Mon Aug 2 23:43:41 EDT 2004 % matlab -nojvm -nodisplay clear all ; close all % Get the 1-yr list of days load ilist deltatT = 1200; % model time step size (s) tavefreq = 259200; % averaging period (s) startDate = datenum(1992,1,1); % model integration starting date for iy = 1992:2004 fid = fopen(sprintf('ilist_%d.txt',iy),'w'); for it = 1:length(ilist) iter = ilist(it); dv = datevec(startDate + (iter*deltatT-tavefreq/2)/60/60/24); newyear = dv(1); if newyear == iy a = sprintf('%10.10d %d',iter,dv(1)); fprintf(fid,'%s\n',a); end end fclose(fid); end clear all ; close all nlay = 50; ne = 510; Spat = 'Stave/data/Stave.%10.10d.data'; Tpat = 'Ttave/data/Ttave.%10.10d.data'; Upat = '_Veltave/data/uVeltave.%10.10d.data'; Vpat = '_Veltave/data/vVeltave.%10.10d.data'; load ilist calcUVBave(Spat, Tpat, Upat, Vpat, ilist, nlay, ne) #======= split into 4 nodes (3 each) ======= cat ilist_199[2-4].txt | awk '{print $1}' > ilist_92--94 cat ilist_199[5-7].txt | awk '{print $1}' > ilist_95--97 cat ilist_199[89].txt ilist_2000.txt | awk '{print $1}' > ilist_98--00 cat ilist_200[1-3].txt | awk '{print $1}' > ilist_01--03 wc -l ilist_??--?? scp ilist_??--?? ta54: #======= split into 6 nodes (2 each) ======= cat ilist_1992.txt ilist_1993.txt | awk '{print $1}' > ilist_40 cat ilist_1994.txt ilist_1995.txt | awk '{print $1}' > ilist_41 cat ilist_1996.txt ilist_1997.txt | awk '{print $1}' > ilist_42 cat ilist_1998.txt ilist_1999.txt | awk '{print $1}' > ilist_43 cat ilist_2000.txt ilist_2001.txt | awk '{print $1}' > ilist_44 cat ilist_2002.txt ilist_2003.txt | awk '{print $1}' > ilist_45 wc -l ilist_4[0-5] scp ilist_4[0-5] ta54: % /scratch/edhill/matlab_r13/bin/matlab -nojvm -nodisplay matlab -nojvm -nodisplay clear all ; close all nlay = 50; ne = 510; Spat = 'c5l/Stave/data/Stave.%10.10d.data'; Tpat = 'c5l/Ttave/data/Ttave.%10.10d.data'; Upat = 'c5l/_Veltave/data/uVeltave.%10.10d.data'; Vpat = 'c5l/_Veltave/data/vVeltave.%10.10d.data'; load ilist !/sbin/ifconfig eth0 | grep 'inet addr:' | sed -e 's|\.| |g' | awk '{print $5}' > myip load myip ips = [ myip 201 200 200 200 ] calcUVBave_ttcp(ips, Spat, Tpat, Upat, Vpat, ilist, nlay, ne) % Testing only matlab -nojvm clear all ; close all ufid = fopen('uVeltave.0000000432.data', 'r', 'ieee-be'); vfid = fopen('vVeltave.0000000432.data', 'r', 'ieee-be'); ne = 510; nps = 6 * ne*ne; tx = 85; ty = 85; nt = ne*ne*6/(tx*ty); ucube = unmangleJPL1( ... reshape(fread(ufid, nps, 'real*4'),tx*nt,ty), ne, tx ); vcube = unmangleJPL1( ... reshape(fread(vfid, nps, 'real*4'),tx*nt,ty), ne, tx ); % Fill the (ne+1)*(ne+1) grid with T,S,B values ni = ne; nip1 = ni + 1; nj = ne; njp1 = nj + 1; ucubep1 = zeros( [ nip1 njp1 6 ] ); vcubep1 = zeros( [ nip1 njp1 6 ] ); for icf = 1:6 ucubep1(2:nip1,2:njp1,icf) = ucube(:,:,icf); vcubep1(2:nip1,2:njp1,icf) = vcube(:,:,icf); end % Do the upwind-edge U,V exchanges ucubep1(1,2:njp1,1) = vcube(ni:-1:1,nj,5); % - surf(ucubep1(1:10,:,1)), shading interp, view(2) ucubep1(2:nip1,1,1) = ucube(1:ni,nj,6); % - surf(ucubep1(:,1:10,1)), shading interp, view(2) ucubep1(1,2:njp1,2) = ucube(ni,1:nj,1); % - surf(ucubep1(1:10,:,2)), shading interp, view(2) ucubep1(2:nip1,1,2) = -vcube(ni,nj:-1:1,6); % - surf(ucubep1(:,1:10,2)), shading interp, view(2) ucubep1(1,2:njp1,3) = ucube(ni:-1:1,nj,1); % - surf(ucubep1(1:10,:,3)), shading interp, view(2) ucubep1(2:nip1,1,3) = ones(size( ucube(1:ni,nj,2) )); ucubep1(2:nip1,1,3) = ucube(1:ni,nj,2); % - ?????? +++ surf(ucubep1(:,1:5,3)), shading interp, view(2) ucubep1(1,2:njp1,4) = ucube(ni,1:nj,3); % - surf(ucubep1(1:10,:,4)), shading interp, view(2) ucubep1(2:nip1,1,4) = -vcube(ni,nj:-1:1,2); % - surf(ucubep1(:,1:10,4)), shading interp, view(2) ucubep1(1,2:njp1,5) = vcube(ni:-1:1,nj,3); % - surf(ucubep1(1:10,:,5)), shading interp, view(2) ucubep1(2:nip1,1,5) = ucube(1:ni,nj,4); % - surf(ucubep1(:,1:10,5)), shading interp, view(2) ucubep1(1,2:njp1,6) = ucube(ni,1:nj,5); % - surf(ucubep1(1:10,:,6)), shading interp, view(2) ucubep1(2:nip1,1,6) = -vcube(ni,nj:-1:1,4); % - surf(ucubep1(:,1:10,6)), shading interp, view(2) vcubep1(1,2:njp1,1) = -ucube(ni:-1:1,nj,5); % - surf(vcubep1(1:10,:,1)), shading interp, view(2) vcubep1(2:nip1,1,1) = vcube(1:ni,nj,6); % - surf(vcubep1(:,1:10,1)), shading interp, view(2) vcubep1(1,2:njp1,2) = vcube(ni,1:nj,1); % - surf(vcubep1(1:10,:,2)), shading interp, view(2) vcubep1(2:nip1,1,2) = ucube(ni,nj:-1:1,6); % - surf(vcubep1(:,1:10,2)), shading interp, view(2) vcubep1(1,2:njp1,3) = -ucube(ni:-1:1,nj,1); % - ?????? +++ surf(vcubep1(1:4,:,3)), shading interp, view(2) vcubep1(2:nip1,1,3) = vcube(1:ni,nj,2); % - ?????? +++ surf(vcubep1(:,1:5,3)), shading interp, view(2) vcubep1(1,2:njp1,4) = vcube(ni,1:nj,3); % - surf(vcubep1(1:10,:,4)), shading interp, view(2) vcubep1(2:nip1,1,4) = ucube(ni,nj:-1:1,2); % - surf(vcubep1(:,1:10,4)), shading interp, view(2) vcubep1(1,2:njp1,5) = -ucube(ni:-1:1,nj,3); % - surf(vcubep1(1:10,:,5)), shading interp, view(2) vcubep1(2:nip1,1,5) = vcube(1:ni,nj,4); % - surf(vcubep1(:,1:10,5)), shading interp, view(2) vcubep1(1,2:njp1,6) = vcube(ni,1:nj,5); % - surf(vcubep1(1:10,:,6)), shading interp, view(2) vcubep1(2:nip1,1,6) = ucube(ni,nj:-1:1,4); % - surf(vcubep1(:,1:10,6)), shading interp, view(2) % Do the "n+1" U exchanges ucubep1(1,2:njp1,1) = vcube(ni:-1:1,nj,5); % - ucubep1(2:nip1,1,1) = ucube(1:ni,nj,6); % - ucubep1(1,2:njp1,2) = ucube(ni,1:nj,1); % - ucubep1(2:nip1,1,2) = -vcube(ni,nj:-1:1,6); % - ucubep1(1,2:njp1,3) = ucube(ni:-1:1,nj,1); % - ucubep1(2:nip1,1,3) = ucube(1:ni,nj,2); % - ?????? +++ ucubep1(1,2:njp1,4) = ucube(ni,1:nj,3); % - ucubep1(2:nip1,1,4) = -vcube(ni,nj:-1:1,2); % - ucubep1(1,2:njp1,5) = vcube(ni:-1:1,nj,3); % - ucubep1(2:nip1,1,5) = ucube(1:ni,nj,4); % - ucubep1(1,2:njp1,6) = ucube(ni,1:nj,5); % - ucubep1(2:nip1,1,6) = -vcube(ni,nj:-1:1,4); % - % Do the "n+1" V exchanges vcubep1(1,2:njp1,1) = -ucube(ni:-1:1,nj,5); % - vcubep1(2:nip1,1,1) = vcube(1:ni,nj,6); % - vcubep1(1,2:njp1,2) = vcube(ni,1:nj,1); % - vcubep1(2:nip1,1,2) = ucube(ni,nj:-1:1,6); % - vcubep1(1,2:njp1,3) = -ucube(ni:-1:1,nj,1); % - ?????? +++ vcubep1(2:nip1,1,3) = vcube(1:ni,nj,2); % - ?????? +++ vcubep1(1,2:njp1,4) = vcube(ni,1:nj,3); % - vcubep1(2:nip1,1,4) = ucube(ni,nj:-1:1,2); % - vcubep1(1,2:njp1,5) = -ucube(ni:-1:1,nj,3); % - vcubep1(2:nip1,1,5) = vcube(1:ni,nj,4); % - vcubep1(1,2:njp1,6) = vcube(ni,1:nj,5); % - vcubep1(2:nip1,1,6) = ucube(ni,nj:-1:1,4); % - matlab -nojvm clear all ; close all ufid = fopen('uVeltave.0000000432.data', 'r', 'ieee-be'); vfid = fopen('vVeltave.0000000432.data', 'r', 'ieee-be'); ne = 510; nps = 6 * ne*ne; tx = 85; ty = 85; nt = ne*ne*6/(tx*ty); ucube = unmangleJPL1( ... reshape(fread(ufid, nps, 'real*4'),tx*nt,ty), ne, tx ); vcube = unmangleJPL1( ... reshape(fread(vfid, nps, 'real*4'),tx*nt,ty), ne, tx ); fclose(ufid); fclose(vfid); % ucube(find(ucube == 0.0)) = NaN; % vcube(find(vcube == 0.0)) = NaN; % surf(ucube(:,:,1)), view(2), shading interp % ucn = ucube; % ucn(find(ucn == 0.0)) = NaN; % figure(1) % surf(ucn(:,:,1)), view(2), shading interp % figure(2) % surf(ucn(1:10,:,1)), view(2), shading interp % u = permute(ucn,[2,1,3]); % surf(u(:,:,1)), view(2), shading interp % Fill the (ne+1)*(ne+1) grid with U,V values ni = ne; nip1 = ni + 1; nj = ne; njp1 = nj + 1; ucubep1 = ones( [ nip1 nj 6 ] ); vcubep1 = ones( [ ni njp1 6 ] ); for icf = 1:6 ucubep1(1:ni,1:nj,icf) = ucube(:,:,icf); vcubep1(1:ni,1:nj,icf) = vcube(:,:,icf); end % Do the "n+1" U exchanges subplot(2,1,1), surf(ucubep1((nip1-10):nip1,:,1)), view(2), shading interp ucubep1(nip1,:,1) = ucube(1,:,2); % - subplot(2,1,2), surf(ucubep1((nip1-10):nip1,:,1)), view(2), shading interp subplot(2,1,1), surf(ucubep1((nip1-10):nip1,:,2)), view(2), shading interp ucubep1(nip1,:,2) = vcube(ne:-1:1,1,4); % - subplot(2,1,2), surf(ucubep1((nip1-10):nip1,:,2)), view(2), shading interp subplot(2,1,1), surf(ucubep1((nip1-10):nip1,:,3)), view(2), shading interp ucubep1(nip1,:,3) = ucube(1,:,4); % - subplot(2,1,2), surf(ucubep1((nip1-10):nip1,:,3)), view(2), shading interp subplot(2,1,1), surf(ucubep1((nip1-10):nip1,:,4)), view(2), shading interp ucubep1(nip1,:,4) = vcube(ne:-1:1,1,6); % - subplot(2,1,2), surf(ucubep1((nip1-10):nip1,:,4)), view(2), shading interp subplot(2,1,1), surf(ucubep1((nip1-10):nip1,:,5)), view(2), shading interp ucubep1(nip1,:,5) = ucube(1,:,6); % - subplot(2,1,2), surf(ucubep1((nip1-10):nip1,:,5)), view(2), shading interp subplot(2,1,1), surf(ucubep1((nip1-10):nip1,:,6)), view(2), shading interp ucubep1(nip1,:,6) = vcube(ne:-1:1,1,2); % - subplot(2,1,2), surf(ucubep1((nip1-10):nip1,:,6)), view(2), shading interp % Do the "n+1" V exchanges subplot(1,2,1), surf(vcubep1(:,(njp1-10):nip1,1)), view(2), shading interp vcubep1(:,nip1,1) = ucube(1,ne:-1:1,3); % - subplot(1,2,2), surf(vcubep1(:,(nip1-10):nip1,1)), view(2), shading interp subplot(1,2,1), surf(vcubep1(:,(nip1-10):nip1,2)), view(2), shading interp vcubep1(:,nip1,2) = vcube(1,:,3); % - subplot(1,2,2), surf(vcubep1(:,(nip1-10):nip1,2)), view(2), shading interp subplot(1,2,1), surf(vcubep1(:,(nip1-10):nip1,3)), view(2), shading interp vcubep1(:,nip1,3) = ucube(1,ne:-1:1,5); % - subplot(1,2,2), surf(vcubep1(:,(nip1-10):nip1,3)), view(2), shading interp subplot(1,2,1), surf(vcubep1(:,(nip1-10):nip1,4)), view(2), shading interp vcubep1(:,nip1,4) = vcube(:,1,5); % - subplot(1,2,2), surf(vcubep1(:,(nip1-10):nip1,4)), view(2), shading interp subplot(1,2,1), surf(vcubep1(:,(nip1-10):nip1,5)), view(2), shading interp vcubep1(:,nip1,5) = ucube(1,ne:-1:1,1); % - subplot(1,2,2), surf(vcubep1(:,(nip1-10):nip1,5)), view(2), shading interp subplot(1,2,1), surf(vcubep1(:,(nip1-10):nip1,6)), view(2), shading interp vcubep1(:,nip1,6) = vcube(:,1,1); % - subplot(1,2,2), surf(vcubep1(:,(nip1-10):nip1,6)), view(2), shading interp % Do the "n+1" U exchanges ucubep1(nip1,:,1) = ucube(1,:,2); % - ucubep1(nip1,:,2) = vcube(ne:-1:1,1,4); % - ucubep1(nip1,:,3) = ucube(1,:,4); % - ucubep1(nip1,:,4) = vcube(ne:-1:1,1,6); % - ucubep1(nip1,:,5) = ucube(1,:,6); % - ucubep1(nip1,:,6) = vcube(ne:-1:1,1,2); % - % Do the "n+1" V exchanges vcubep1(:,nip1,1) = ucube(1,ne:-1:1,3); % - vcubep1(:,nip1,2) = vcube(1,:,3); % - vcubep1(:,nip1,3) = ucube(1,ne:-1:1,5); % - vcubep1(:,nip1,4) = vcube(:,1,5); % - vcubep1(:,nip1,5) = ucube(1,ne:-1:1,1); % - vcubep1(:,nip1,6) = vcube(:,1,1); % - masku = 1.0 - abs(diff(double(ucubep1(:,:,:) == 0.0),1,1)); % surf(masku(:,:,1)), view(2), shading interp maskv = 1.0 - abs(diff(double(vcubep1(:,:,:) == 0.0),1,2)); % surf(maskv(:,:,1)), view(2), shading interp diffu = 0.5*diff(ucubep1(:,:,:),1,1); diffv = 0.5*diff(vcubep1(:,:,:),1,2); uont = ucube(:,:,:) + masku.*diffu; vont = vcube(:,:,:) + maskv.*diffv; surf(uont(:,:,1)), view(2), shading interp uontn = uont; uontn(find(uontn == 0.0)) = NaN; surf(uontn(:,:,1)), view(2), shading interp surf(vont(:,:,1)), view(2), shading interp vontn = vont; vontn(find(vontn == 0.0)) = NaN; surf(vontn(:,:,1)), view(2), shading interp matlab -nojvm -nodisplay clear all ; close all nlay = 50; ne = 510; Spat = 'Stave/data/Stave.%10.10d.data'; Tpat = 'Ttave/data/Ttave.%10.10d.data'; Upat = '_Veltave/data/uVeltave.%10.10d.data'; Vpat = '_Veltave/data/vVeltave.%10.10d.data'; load ilist calcUVB2_NFS(Spat, Tpat, Upat, Vpat, ilist, nlay, ne)