Changeset 6134


Ignore:
Timestamp:
10/04/10 08:47:19 (14 years ago)
Author:
Eric.Larour
Message:

some improvements to transient plot, minor

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  
    118118                case 'transient_results',
    119119                        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);
    122123                        return;
    123124
  • issm/trunk/src/m/model/plot/plot_transient_field.m

    r5088 r6134  
    88
    99%Check that they are transient results
    10 if ~isfield(md.results,'transient'),
     10if (~isfield(md.results,'Transient2DSolution') && ~isfield(md.results,'Transient3DSolution')),
    1111        error('plot_transient_field error message: no transient results in the model');
    1212end
    1313
     14if md.dim==2,
     15        transient=md.results.Transient2DSolution;
     16else
     17        transient=md.results.Transient3DSolution;
     18end
     19
    1420%Figure out the iterations to plot and check if it is possible
    15 steps=getfieldvalue(options,'steps');
    16 maxiteration=size(md.results.transient,2);
     21maxiteration=size(transient,2);
     22steps=getfieldvalue(options,'steps',1:1:maxiteration);
     23
    1724if max(steps)>maxiteration | min(steps)<1,
    1825        error(['plot_transient_field error message: problem with the steps requested, must be an interger between 0 and ' num2str(maxiteration)]);
     
    2128
    2229%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
     31field=getfieldvalue(options,'field','Vel');
    4432
    4533%process mes only once
     
    5038
    5139        %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']);
    5442
    5543        %create plot of step i
  • issm/trunk/src/m/model/plot/plotdoc.m

    r5818 r6134  
    4040disp('                  - ''transient_vel'': this will display the velocity for the time steps requested in ''steps'' of a transient run');
    4141disp('                  - ''transient_vel'': vel can be by any field of the transient results (vx, vy, vz, vel, temperature, melting, pressure, bed, thickness, surface)');
     42disp('                  - ''transient_field'': dynamic plot of results. specify ''steps'' option, as fell as ''field'' (defaults are all steps, for ''Vel'' field)');
    4243disp('                  - ''transient_movie'': this will display the time steps of a given field of a transient run');
    4344disp('                  - ''transient_movie_field'': field to be displayed when doing  transient_movie data display');
Note: See TracChangeset for help on using the changeset viewer.