time | calls | line |
---|
| 21 | 12 | if ~app.NoPlot
|
| | 13 | clf; set(figure(1), 'Position', [0, 800, 1200, 600]);
|
| | 14 |
|
| | 15 | subplot(2,1,1);
|
| | 16 | S_Plot = rho*DelS;
|
| | 17 | S_Plot(1:Nbcs) = NaN;
|
| | 18 | colormap(mk_colmap);
|
| | 19 | surf(XP*h/1e3, YP*h/1e3, S_Plot(NodeRho(2:app.Ny+1, 2:app.Nx+1)), 'LineStyle','none');
|
| | 20 | axis tight
|
| | 21 | view(2); caxis([0,DelS]); colorbar;
|
| | 22 | shading interp
|
| | 23 | TT(1) = xlabel('x(km)');
|
| | 24 | TT(2) = ylabel('z(km)');
|
| | 25 | TT(3) = zlabel('Salinity(psu)');
|
| | 26 | TT(4) = title(sprintf(...
|
| | 27 | 'Salinity Variation (unit: psu) (Nx=%g, Ny=%g, dt=%g, time=%3.3gh)',...
|
| | 28 | app.Nx, app.Ny, app.dt*h^2/nu_x, T*h^2/nu_x/3600));
|
| | 29 | formatplot([], gca, TT);
|
| | 30 |
|
| | 31 | subplot(2,1,2);
|
| | 32 | P_Plot = P*(nu_x/h)^2;
|
| | 33 | P_Plot(1:Nbcs) = NaN;
|
| | 34 | colormap(mk_colmap);
|
| | 35 | surf(XP*h/1e3, YP*h/1e3, P_Plot(NodeP(2:app.Ny+1, 2:app.Nx+1)), 'LineStyle','none');
|
| | 36 | axis tight
|
| | 37 | view(2); colorbar;
|
| | 38 | shading interp
|
| | 39 | TT(1) = xlabel('x(km)');
|
| | 40 | TT(2) = ylabel('z(km)');
|
| | 41 | TT(3) = zlabel('Normalized Pressure(Pa/(kg/m^3))');
|
| | 42 | TT(4) = title('Normalized Pressure(Pa/(kg/m^3)) (Without hydrostatic part)');
|
| | 43 | formatplot([], gca, TT);
|
| | 44 |
|
| | 45 | drawnow;
|
| | 46 |
|
| | 47 | set(figure(1), 'PaperPosition', [0, 0, 12, 6]);
|
| | 48 | print('-dpng', '-r400', sprintf('%s/%s/%03d', d0, app.saveimg, k/app.PlotIntrvl));
|
| | 49 | end;
|
| | 50 |
|
| | 51 | %% Save data
|
| | 52 |
|
32.49 | 21 | 53 | save(sprintf('%s/%s/%03d', d0, app.savemat, k/app.PlotIntrvl),'T','P','u','v','rho', ...
|
| | 54 | 'Pi','ui','vi','rhoi','Yi');
|
| | 55 |
|
| | 56 |
|
| | 57 | %% Display current progress
|
| | 58 |
|
| 21 | 59 | display(sprintf('%d time steps completed, %d time steps remaining.', k, Nt-k));
|
| 21 | 60 | toc;
|
< 0.01 | 21 | 61 | display(sprintf('Current time: %04d/%02d/%02d %02d:%02d:%02d\n', round(clock)));
|