Changeset 5516


Ignore:
Timestamp:
08/23/10 14:02:06 (15 years ago)
Author:
seroussi
Message:

ismip testc pattyn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/NightlyRun/test1105.m

    r5098 r5516  
    11%This test is a test from the ISMP-HOM Intercomparison project
    22%Pattyn and Payne 2006
     3printingflag=true;
    34
    45L_list={5000,10000,20000,40000,80000,160000};
    56results={};
     7minvx=[];
     8maxvx=[];
    69
    710for i=1:length(L_list),
    8         L=3*L_list{i};  %in m (3 times the desired lenght for BC problems) 
    9         nx=60; %number of nodes in x direction
    10         ny=60;
     11        L=L_list{i};  %in m (3 times the desired lenght for BC problems) 
     12        nx=30; %number of nodes in x direction
     13        ny=30;
    1114        md=model;
    1215        md=squaremesh(md,L,L,nx,ny);
    1316        md=geography(md,'',''); %ice sheet test
    1417        md=parameterize(md,'../Par/ISMIPC.par');
    15         md=extrude(md,6,1);
     18        md=extrude(md,10,1);
     19        md.verbose=4;
    1620
    1721        md=setelementstype(md,'pattyn','all');
    1822
    1923        %Create MPCs to have periodic boundary conditions
    20         %md.spcvelocity=zeros(md.numberofgrids,6);
     24        md.spcvelocity=zeros(md.numberofgrids,6);
    2125
    22         %posx=find(md.x==0);
    23         %posx2=find(md.x==L);
     26        posx=find(md.x==0 & md.y~=0 & md.y~=L);
     27        posx2=find(md.x==L & md.y~=0 & md.y~=L);
    2428
    25         %posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same grids two times
    26         %posy2=find(md.y==L & md.x~=0 & md.x~=L);
     29        posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same grids two times
     30        posy2=find(md.y==L & md.x~=0 & md.x~=L);
    2731
    28         %md.penalties=[posx,posx2;posy,posy2];
     32        md.penalties=[posx,posx2;posy,posy2];
     33
     34        %Add spc on the corners
     35        pos=find((md.x==0 | md.x==L) & (md.y==0 | md.y==L) & md.gridonbed);
     36        md.spcvelocity(pos,1:2)=1;
     37        if(L==5000),
     38                md.spcvelocity(pos,4)=15.66;
     39                md.spcvelocity(pos,5)=-0.1967;
     40        elseif(L==10000),
     41                md.spcvelocity(pos,4)=16.04;
     42                md.spcvelocity(pos,5)=-0.1977;
     43        elseif(L==20000),
     44                md.spcvelocity(pos,4)=16.53;
     45                md.spcvelocity(pos,5)=-1.27;
     46        elseif(L==40000),
     47                md.spcvelocity(pos,4)=17.23;
     48                md.spcvelocity(pos,5)=-3.17;
     49        elseif(L==80000),
     50                md.spcvelocity(pos,4)=16.68;
     51                md.spcvelocity(pos,5)=-2.69;
     52        elseif(L==160000),
     53                md.spcvelocity(pos,4)=16.03;
     54                md.spcvelocity(pos,5)=-1.27;
     55        end
     56       
     57        %Spc the bed at zero for vz
     58        pos=find(md.gridonbed);
     59        md.spcvelocity(pos,3)=1;
    2960
    3061        %Compute the diagnostic
     
    3667        vz=PatchToVec(md.results.DiagnosticSolution.Vz);
    3768        results{i}=md.results.DiagnosticSolution;
     69        minvx(i)=min(vx(end-md.numberofgrids2d+1:end));
     70        maxvx(i)=max(vx(end-md.numberofgrids2d+1:end));
    3871
    39         plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers)
     72        %Now plot vx, vy, vz and vx on a cross section
     73        plotmodel(md,'data',vx,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2)
     74        if printingflag,
     75                set(gcf,'Color','w')
     76                printmodel(['ismipcpattynvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
     77                system(['mv ismipcpattynvx' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']);
     78        end
     79        plotmodel(md,'data',vy,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
     80        if printingflag,
     81                set(gcf,'Color','w')
     82                printmodel(['ismipcpattynvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
     83                system(['mv ismipcpattynvy' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']);
     84        end
     85        plotmodel(md,'data',vz,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4)
     86        if printingflag,
     87                set(gcf,'Color','w')
     88                printmodel(['ismipcpattynvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
     89                system(['mv ismipcpattynvz' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']);
     90        end
     91
     92        if(L==5000),
     93                plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.numlayers,...
     94                        'resolution',[10 10],'ylim',[0 20],'xlim',[0 5000],'title','','xlabel','','figure',5)
     95        elseif(L==10000),
     96                plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.numlayers,...
     97                        'resolution',[10 10],'ylim',[13 18],'xlim',[0 10000],'title','','xlabel','')
     98        elseif(L==20000),
     99                plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.numlayers,...
     100                        'resolution',[10 10],'ylim',[14 22],'xlim',[0 20000],'title','','xlabel','')
     101        elseif(L==40000),
     102                plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.numlayers,...
     103                        'resolution',[10 10],'ylim',[10 40],'xlim',[0 40000],'title','','xlabel','')
     104        elseif(L==80000),
     105                plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.numlayers,...
     106                        'resolution',[10 10],'ylim',[0 80],'xlim',[0 80000],'title','','xlabel','')
     107        elseif(L==160000),
     108                plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.numlayers,...
     109                        'resolution',[10 10],'ylim',[0 200],'xlim',[0 160000],'title','','xlabel','')
     110        end
     111        if printingflag,
     112                set(gcf,'Color','w')
     113                printmodel(['ismipcpattynvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
     114                system(['mv ismipcpattynvxsec' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']);
     115        end
    40116end
    41117
     118%Now plot the min and max values of vx for each size of the square
     119plot([5 10 20 40 80 160],minvx);ylim([4 18])
     120if printingflag,
     121        set(gcf,'Color','w')
     122        printmodel('ismipcpattynminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
     123        system(['mv ismipcpattynminvx.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']);
     124end
     125plot([5 10 20 40 80 160],maxvx);ylim([0 200])
     126if printingflag,
     127        set(gcf,'Color','w')
     128        printmodel('ismipcpattynmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
     129        system(['mv ismipcpattynmaxvx.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']);
     130end
    42131%Fields and tolerances to track changes
    43132field_names     ={...
Note: See TracChangeset for help on using the changeset viewer.