Changeset 6134
- Timestamp:
- 10/04/10 08:47:19 (14 years ago)
- Location:
- issm/trunk/src/m/model/plot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/plot/plot_manager.m
r5867 r6134 118 118 case 'transient_results', 119 119 plot_transient_results(md,options,subplotwidth,i); 120 case {'transient_thickness','transient_bed','transient_surface','transient_temperature','transient_melting','transient_vel','transient_vx','transient_vy','transient_vz','transient_pressure'} 121 plot_transient_field(md,options,subplotwidth,i,data); 120 121 case 'transient_field', 122 plot_transient_field(md,options,subplotwidth,i); 122 123 return; 123 124 -
issm/trunk/src/m/model/plot/plot_transient_field.m
r5088 r6134 8 8 9 9 %Check that they are transient results 10 if ~isfield(md.results,'transient'),10 if (~isfield(md.results,'Transient2DSolution') && ~isfield(md.results,'Transient3DSolution')), 11 11 error('plot_transient_field error message: no transient results in the model'); 12 12 end 13 13 14 if md.dim==2, 15 transient=md.results.Transient2DSolution; 16 else 17 transient=md.results.Transient3DSolution; 18 end 19 14 20 %Figure out the iterations to plot and check if it is possible 15 steps=getfieldvalue(options,'steps'); 16 maxiteration=size(md.results.transient,2); 21 maxiteration=size(transient,2); 22 steps=getfieldvalue(options,'steps',1:1:maxiteration); 23 17 24 if max(steps)>maxiteration | min(steps)<1, 18 25 error(['plot_transient_field error message: problem with the steps requested, must be an interger between 0 and ' num2str(maxiteration)]); … … 21 28 22 29 %Figure out the field to plot 23 if strncmpi(fliplr(data),fliplr('vx'),2), 24 field='vx'; 25 elseif strncmpi(fliplr(data),fliplr('vy'),2), 26 field='vy'; 27 elseif strncmpi(fliplr(data),fliplr('vz'),2), 28 field='vz'; 29 elseif strncmpi(fliplr(data),fliplr('vel'),3), 30 field='vel'; 31 elseif strncmpi(fliplr(data),fliplr('pressure'),8), 32 field='pressure'; 33 elseif strncmpi(fliplr(data),fliplr('melting'),6), 34 field='melting'; 35 elseif strncmpi(fliplr(data),fliplr('temperature'),11), 36 field='temperature'; 37 elseif strncmpi(fliplr(data),fliplr('bed'),3), 38 field='bed'; 39 elseif strncmpi(fliplr(data),fliplr('thickness'),9), 40 field='thickness'; 41 elseif strncmpi(fliplr(data),fliplr('surface'),7), 42 field='surface'; 43 end 30 31 field=getfieldvalue(options,'field','Vel'); 44 32 45 33 %process mes only once … … 50 38 51 39 %process data and change title if needed 52 [data datatype]=processdata(md, md.results.transient(steps(i)).(field),options);53 options=changefieldvalue(options,'title',[field ' at time ' num2str( md.results.transient(steps(i)).time) ' a']);40 [data datatype]=processdata(md,transient(steps(i)).(field),options); 41 options=changefieldvalue(options,'title',[field ' at time ' num2str(transient(steps(i)).time/md.yts) ' a']); 54 42 55 43 %create plot of step i -
issm/trunk/src/m/model/plot/plotdoc.m
r5818 r6134 40 40 disp(' - ''transient_vel'': this will display the velocity for the time steps requested in ''steps'' of a transient run'); 41 41 disp(' - ''transient_vel'': vel can be by any field of the transient results (vx, vy, vz, vel, temperature, melting, pressure, bed, thickness, surface)'); 42 disp(' - ''transient_field'': dynamic plot of results. specify ''steps'' option, as fell as ''field'' (defaults are all steps, for ''Vel'' field)'); 42 43 disp(' - ''transient_movie'': this will display the time steps of a given field of a transient run'); 43 44 disp(' - ''transient_movie_field'': field to be displayed when doing transient_movie data display');
Note:
See TracChangeset
for help on using the changeset viewer.