Changeset 10129


Ignore:
Timestamp:
10/06/11 12:15:03 (13 years ago)
Author:
schlegel
Message:

Extract regional transient for forcing velocity at boundaries

Location:
issm/trunk/src/m/model
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/model/plot/plot_BC.m

    r9734 r10129  
    77
    88%plot dirichlets
    9 h1=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvx))),md.mesh.y(find(~isnan(md.diagnostic.spcvx))),'ro','MarkerSize',14,'MarkerFaceColor','r');
    10 h2=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvy))),md.mesh.y(find(~isnan(md.diagnostic.spcvy))),'bo','MarkerSize',10,'MarkerFaceColor','b');
    11 h3=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvz))),md.mesh.y(find(~isnan(md.diagnostic.spcvz))),'yo','MarkerSize',6 ,'MarkerFaceColor','y');
     9h1=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvx(1:md.mesh.numberofvertices,1)))),md.mesh.y(find(~isnan(md.diagnostic.spcvx(1:md.mesh.numberofvertices,1)))),'ro','MarkerSize',14,'MarkerFaceColor','r');
     10h2=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvy(1:md.mesh.numberofvertices,1)))),md.mesh.y(find(~isnan(md.diagnostic.spcvy(1:md.mesh.numberofvertices,1)))),'bo','MarkerSize',10,'MarkerFaceColor','b');
     11h3=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvz(1:md.mesh.numberofvertices,1)))),md.mesh.y(find(~isnan(md.diagnostic.spcvz(1:md.mesh.numberofvertices,1)))),'yo','MarkerSize',6 ,'MarkerFaceColor','y');
    1212
    1313%update legend
  • issm/trunk/src/m/model/plot/plot_transient_movie.m

    r9597 r10129  
    1616        end
    1717
     18        results=md.results.TransientSolution;
    1819        %loop over the time steps
     20        if exist(options,'transient_movie_limit'),
     21                limit=getfieldvalue(options,'transient_movie_limit');
     22                steps=[limit(1):limit(end)];
     23        else
     24                steps=1:length(results);
     25        end
    1926        results=md.results.TransientSolution;
    20         for i=1:length(results)
     27        nstep=1;
     28        for i=steps
    2129
    22                 %process data
    23                 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
    24                 [data datatype]=processdata(md,results(i).(field),options);
     30                if ~isempty(results(i).(field)),
     31                        %process data
     32                        [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
     33                        [data datatype]=processdata(md,results(i).(field),options);
    2534
    26                 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'];
    27                 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
    28                 apply_options_movie(md,options,titlestring);
    29                
    30                 if exist(options,'transient_movie_output'),
    31                         set(gcf,'Renderer','zbuffer','color','white'); %fixes a bug on Mac OS X (not needed in future Matlab version)
    32                         if i==1,
    33                                 %initialize images and frame
    34                                 frame=getframe(gcf);
    35                                 [images,map]=rgb2ind(frame.cdata,256,'nodither');
    36                                 images(1,1,1,length(results))=0;
     35                        titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'];
     36                        plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
     37                        apply_options_movie(md,options,titlestring);
     38
     39                        if exist(options,'transient_movie_output'),
     40                                set(gcf,'Renderer','zbuffer','color','white'); %fixes a bug on Mac OS X (not needed in future Matlab version)
     41                                if nstep==1,
     42                                        %initialize images and frame
     43                                        frame=getframe(gcf);
     44                                        [images,map]=rgb2ind(frame.cdata,256,'nodither');
     45                                        images(1,1,1,length(steps))=0;
     46                                else
     47                                        frame=getframe(gcf);
     48                                        images(:,:,1,nstep) = rgb2ind(frame.cdata,map,'nodither');
     49                                end
    3750                        else
    38                                 frame=getframe(gcf);
    39                                 images(:,:,1,i) = rgb2ind(frame.cdata,map,'nodither');
     51                                pause(0.1)
    4052                        end
    41                 else
    42                         pause(0.1)
     53                        nstep=nstep+1;
    4354                end
    4455        end
  • issm/trunk/src/m/model/plot/plotmodel.m

    r7824 r10129  
    3838                set(F,'Visible','Off');
    3939        else
    40                 figure(figurenumber),clf;
     40                figure(figurenumber);clf;
    4141        end
    4242
Note: See TracChangeset for help on using the changeset viewer.