Changeset 14102


Ignore:
Timestamp:
12/05/12 14:35:11 (12 years ago)
Author:
jschierm
Message:

NEW: Working python tests 1301-1304 (plus cosmetic changes).

Location:
issm/trunk-jpl/test
Files:
5 added
4 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/python_skipped_tests.txt

    r13858 r14102  
    1111test418    needs Dakota
    1212test420    needs Dakota
     13test1401    roundoff error in metric causes different meshes from matlab
     14test1402    roundoff error in metric causes different meshes from matlab
  • issm/trunk-jpl/test/NightlyRun/test1301.m

    r13671 r14102  
    1010md=parameterize(md,'../Par/SquareThermal.par');
    1111md=extrude(md,3,2.);
    12 md=setflowequation(md,'Pattyn','all');
     12md=setflowequation(md,'pattyn','all');
    1313
    1414%Some conditions specific to melting test
     
    2424melting=md.basalforcings.geothermalflux/(md.materials.rho_ice*md.materials.latentheat)*md.constants.yts;
    2525
    26 %modeled  results
     26%modeled results
    2727md.cluster=generic('name',oshostname(),'np',2);
    2828md=solve(md,ThermalSolutionEnum());
     
    3030%plot results
    3131comp_melting=md.results.ThermalSolution.BasalforcingsMeltingRate;
    32 relative=abs((comp_melting-melting)./melting)*100;
    33 relative(find(comp_melting==melting))=0;
     32relative=abs((comp_melting-melting)./melting)*100.;
     33relative(find(comp_melting==melting))=0.;
    3434plotmodel(md,'data',comp_melting,'title','Modeled melting','data',melting,'title','Analytical melting',...
    3535        'data',comp_melting-melting,'title','Absolute error','data',relative,'title','Relative error [%]',...
    3636        'layer#all',1,'caxis#2',[1.02964 1.02966]*10^-4,'FontSize#all',20,'figposition','mathieu')
    37 if printingflag, 
     37if printingflag,
    3838        set(gcf,'Color','w')
    3939        printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
     
    4141end
    4242
    43 
    4443%Fields and tolerances to track changes
    4544field_names     ={'BasalMelting'};
  • issm/trunk-jpl/test/NightlyRun/test1302.m

    r13671 r14102  
    99md=parameterize(md,'../Par/SquareThermal.par');
    1010md=extrude(md,30,1.);   %NB: the more one extrudes, the better (10-> relative~0.35%, 20->0.1%, 30->0.05%)
    11 md=setflowequation(md,'Pattyn','all');
     11md=setflowequation(md,'pattyn','all');
    1212
    1313%Thermal boundary conditions
    14 pos1=find(md.mesh.elementonbed);     md.thermal.spctemperature(md.mesh.elements(pos1,1:3))=10;
    15 pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0;
     14pos1=find(md.mesh.elementonbed);     md.thermal.spctemperature(md.mesh.elements(pos1,1:3))=10.;
     15pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0.;
    1616md.initialization.vz=0.1*ones(md.mesh.numberofvertices,1);
    1717md.initialization.vel=sqrt( md.initialization.vx.^2+ md.initialization.vy.^2+ md.initialization.vz.^2);
     
    2222%d2T/dz2-w*rho_ice*c/k*dT/dz=0   T(surface)=0  T(bed)=10   => T=A exp(alpha z)+B
    2323alpha=0.1/md.constants.yts*md.materials.rho_ice*md.materials.heatcapacity/md.materials.thermalconductivity;   %alpha=w rho_ice c /k  and w=0.1m/an
    24 A=10/(exp(alpha*(-1000))-1);    %A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
     24A=10./(exp(alpha*(-1000.))-1.);    %A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
    2525B=-A;
    2626md.initialization.temperature=A*exp(alpha*md.mesh.z)+B;
    2727
    28 %modeled  results
     28%modeled results
    2929md.cluster=generic('name',oshostname(),'np',2);
    3030md=solve(md,ThermalSolutionEnum());
     
    3232%plot results
    3333comp_temp=md.results.ThermalSolution.Temperature;
    34 relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
    35 relative(find(comp_temp==md.initialization.temperature))=0;
     34relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100.;
     35relative(find(comp_temp==md.initialization.temperature))=0.;
    3636plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
    3737        'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
    3838        'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    3939        'figposition','mathieu','FontSize#all',20)
    40 if printingflag, 
     40if printingflag,
    4141        set(gcf,'Color','w')
    4242        printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
  • issm/trunk-jpl/test/NightlyRun/test1303.m

    r13671 r14102  
    1010md=parameterize(md,'../Par/SquareThermal.par');
    1111md=extrude(md,11,2.);
    12 md=setflowequation(md,'Pattyn','all');
    13 pos1=find(md.mesh.elementonbed);     md.thermal.spctemperature(md.mesh.elements(pos1,1:3))=10;
    14 pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0;
     12md=setflowequation(md,'pattyn','all');
     13
     14pos1=find(md.mesh.elementonbed);     md.thermal.spctemperature(md.mesh.elements(pos1,1:3))=10.;
     15pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0.;
    1516md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
    1617
     
    1819%d2T/dz2=0 T(bed)=10 T(surface)=0  => T=0*(z-bed)/thickness+10*(surface-z)/thickness
    1920%each layer of the 3d mesh must have a constant value
    20 md.initialization.temperature=10*(md.geometry.surface-md.mesh.z)./md.geometry.thickness;
     21md.initialization.temperature=10.*(md.geometry.surface-md.mesh.z)./md.geometry.thickness;
    2122
    22 %modeled  results
     23%modeled results
    2324md.cluster=generic('name',oshostname(),'np',2);
    2425md=solve(md,ThermalSolutionEnum());
     
    2627%plot results
    2728comp_temp=md.results.ThermalSolution.Temperature;
    28 relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
    29 relative(find(comp_temp==md.initialization.temperature))=0;
     29relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100.;
     30relative(find(comp_temp==md.initialization.temperature))=0.;
    3031plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
    3132        'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
    3233        'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    3334        'figposition','mathieu','FontSize#all',20)
    34 if printingflag, 
     35if printingflag,
    3536        set(gcf,'Color','w')
    3637        printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
  • issm/trunk-jpl/test/NightlyRun/test1304.m

    r13671 r14102  
    1010md=parameterize(md,'../Par/SquareThermal.par');
    1111md=extrude(md,11,1.);
    12 md=setflowequation(md,'Pattyn','all');
     12md=setflowequation(md,'pattyn','all');
    1313
    14 pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0;
     14pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0.;
    1515md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
    1616md.basalforcings.geothermalflux(:)=0.1; %100mW/m^2
     
    2121md.initialization.temperature=-0.1/md.materials.thermalconductivity*(md.mesh.z-md.geometry.surface); %G=0.1 W/m2
    2222
    23 %modeled  results
     23%modeled results
    2424md.cluster=generic('name',oshostname(),'np',2);
    2525md=solve(md,ThermalSolutionEnum());
     
    2727%plot results
    2828comp_temp=md.results.ThermalSolution.Temperature;
    29 relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
    30 relative(find(comp_temp==md.initialization.temperature))=0;
     29relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100.;
     30relative(find(comp_temp==md.initialization.temperature))=0.;
    3131plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
    3232        'title','Analytical temperature','view',3,'data',comp_temp-md.initialization.temperature,...
    3333        'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    3434        'figposition','mathieu','FontSize#all',20)
    35 if printingflag, 
     35if printingflag,
    3636        set(gcf,'Color','w')
    3737        printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
  • issm/trunk-jpl/test/NightlyRun/test1401.m

    r13669 r14102  
    11%test the anisotropic mesh adaptation
    2 %function to capture = exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     2%function to capture = exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    33printingflag=false;
    44
    55%create square mesh
    6 L=1; %in m
     6L=1.; %in m
    77nx=70; %numberof nodes in x direction
    88ny=70;
     
    1111%mesh adaptation loop YAMS
    1212md=squaremesh(md,L,L,nx,ny);
    13 md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     13md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    1414plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    15 if printingflag, 
     15if printingflag,
    1616        set(gcf,'Color','w')
    1717        printmodel('mesh1_yams1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    1919end
    2020
    21 md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,1.3,10^-4);
    22 md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     21md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,1.3,10.^-4);
     22md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    2323plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    24 if printingflag, 
     24if printingflag,
    2525        set(gcf,'Color','w')
    2626        printmodel('mesh1_yams2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    2929
    3030md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,2.5,0.008);
    31 md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     31md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    3232plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    33 if printingflag, 
     33if printingflag,
    3434        set(gcf,'Color','w')
    3535        printmodel('mesh1_yams3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    4141%mesh adaptation loop BAMG
    4242md=squaremesh(md,L,L,nx,ny);
    43 md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     43md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    4444plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    45 if printingflag, 
     45if printingflag,
    4646        set(gcf,'Color','w')
    4747        printmodel('mesh1_bamg1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    5050
    5151md.private.bamg=NaN;
    52 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',1.3,'err',10^-4);
    53 md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     52md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',1.3,'err',10.^-4);
     53md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    5454plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    55 if printingflag, 
     55if printingflag,
    5656        set(gcf,'Color','w')
    5757        printmodel('mesh1_bamg2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    6161md.private.bamg=NaN;
    6262md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',2.5,'err',0.008);
    63 md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
     63md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10.^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2.;
    6464plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    65 if printingflag, 
     65if printingflag,
    6666        set(gcf,'Color','w')
    6767        printmodel('mesh1_bamg3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
  • issm/trunk-jpl/test/NightlyRun/test1402.m

    r13669 r14102  
    33
    44%create square mesh
    5 L=1; %in m
     5L=1.; %in m
    66nx=30; %numberof nodes in x direction
    77ny=30;
     
    1010%mesh adaptation loop YAMS
    1111md=squaremesh(md,L,L,nx,ny);
    12 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    13 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    14         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    15         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     12u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     13md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     14        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     15        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    1616plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    17 if printingflag, 
     17if printingflag,
    1818        set(gcf,'Color','w')
    1919        printmodel('mesh2_yams1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    2121end
    2222
    23 md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,2.3,10^-2);
    24 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    25 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    26         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    27         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     23md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,2.3,10.^2);
     24u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     25md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     26        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     27        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    2828plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    29 if printingflag, 
     29if printingflag,
    3030        set(gcf,'Color','w')
    3131        printmodel('mesh2_yams2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    3434
    3535md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,3,0.005);
    36 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    37 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    38         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    39         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     36u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     37md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     38        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     39        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    4040plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    41 if printingflag, 
     41if printingflag,
    4242        set(gcf,'Color','w')
    4343        printmodel('mesh2_yams3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    4949%mesh adaptation loop BAMG
    5050md=squaremesh(md,L,L,nx,ny);
    51 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    52 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    53         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    54         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     51u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     52md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     53        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     54        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    5555plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    56 if printingflag, 
     56if printingflag,
    5757        set(gcf,'Color','w')
    5858        printmodel('mesh2_bamg1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    6161
    6262md.private.bamg=NaN;
    63 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',2.3,'err',10^-2);
    64 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    65 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    66         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    67         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     63md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',2.3,'err',10.^2);
     64u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     65md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     66        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     67        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    6868plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    69 if printingflag, 
     69if printingflag,
    7070        set(gcf,'Color','w')
    7171        printmodel('mesh2_bamg2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    7575md.private.bamg=NaN;
    7676md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',3,'err',0.005);
    77 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    78 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    79         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    80         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     77u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     78md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     79        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     80        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    8181plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    82 if printingflag, 
     82if printingflag,
    8383        set(gcf,'Color','w')
    8484        printmodel('mesh2_bamg3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
     
    8888md.private.bamg=NaN;
    8989md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',1.5,'err',0.003,'anisomax',1);
    90 u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    91 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    92         +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
    93         +tanh(30*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u+0.75).^2+(v+0.75).^2-0.25)) ;
     90u=4.*md.mesh.x-2.; v=4.*md.mesh.y-2.;
     91md.inversion.vel_obs=tanh(30.*(u.^2+v.^2-0.25)) ...
     92        +tanh(30.*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     93        +tanh(30.*((u+0.75).^2+(v-0.75).^2-0.25)) +tanh(30.*((u+0.75).^2+(v+0.75).^2-0.25));
    9494plotmodel(md,'data',md.inversion.vel_obs,'data',md.inversion.vel_obs,'nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    95 if printingflag, 
     95if printingflag,
    9696        set(gcf,'Color','w')
    9797        printmodel('mesh2_bamgiso','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off');
  • issm/trunk-jpl/test/Par/Pig.py

    r13471 r14102  
    4848md.prognostic.stabilization=1.
    4949md.verbose=verbose(0)
    50 md.settings.waitonlock=30.
     50md.settings.waitonlock=30
    5151md.timestepping.time_step=1.
    5252md.timestepping.final_time=2.
  • issm/trunk-jpl/test/Par/SquareSheetConstrained.py

    r13676 r14102  
    5151md.thermal.stabilization=1.
    5252md.verbose=verbose(0)
    53 md.settings.waitonlock=30.
     53md.settings.waitonlock=30
    5454md.diagnostic.restol=0.05
    5555md.steadystate.reltol=0.05
  • issm/trunk-jpl/test/Par/SquareSheetShelf.py

    r13678 r14102  
    5757md.thermal.stabilization=1
    5858md.verbose=verbose(0)
    59 md.settings.waitonlock=30.
     59md.settings.waitonlock=30
    6060md.diagnostic.restol=0.05
    6161md.steadystate.reltol=0.05
  • issm/trunk-jpl/test/Par/SquareShelf.py

    r13466 r14102  
    7070md.prognostic.stabilization = 1.
    7171md.thermal.stabilization = 1.
    72 md.settings.waitonlock = 30.
     72md.settings.waitonlock = 30
    7373md.verbose=verbose()
    7474md.diagnostic.restol = 0.10
  • issm/trunk-jpl/test/Par/SquareShelfConstrained.py

    r13641 r14102  
    5555md.thermal.stabilization=1.
    5656md.verbose = verbose(0)
    57 md.settings.waitonlock=30.
     57md.settings.waitonlock=30
    5858md.diagnostic.restol=0.05
    5959md.diagnostic.reltol=0.05
  • issm/trunk-jpl/test/Par/SquareThermal.par

    r13137 r14102  
    44
    55disp('      creating thickness');
    6 h=1000;
     6h=1000.;
    77md.geometry.thickness=h*ones(md.mesh.numberofvertices,1);
    8 md.geometry.bed=-1000*ones(md.mesh.numberofvertices,1);
     8md.geometry.bed=-1000.*ones(md.mesh.numberofvertices,1);
    99md.geometry.surface=md.geometry.bed+md.geometry.thickness;
    1010
     
    1515
    1616disp('      creating drag');
    17 md.friction.coefficient=200*ones(md.mesh.numberofvertices,1); %q=1.
     17md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1.
    1818%Take care of iceshelves: no basal drag
    1919pos=find(md.mask.elementonfloatingice);
    20 md.friction.coefficient(md.mesh.elements(pos,:))=0;
     20md.friction.coefficient(md.mesh.elements(pos,:))=0.;
    2121md.friction.p=ones(md.mesh.numberofelements,1);
    2222md.friction.q=ones(md.mesh.numberofelements,1);
    2323
    2424disp('      creating temperatures');
    25 md.initialization.temperature=(273-20)*ones(md.mesh.numberofvertices,1);
     25md.initialization.temperature=(273.-20.)*ones(md.mesh.numberofvertices,1);
    2626
    27 disp('      creating flow law paramter');
     27disp('      creating flow law parameter');
    2828md.materials.rheology_B=paterson(md.initialization.temperature);
    29 md.materials.rheology_n=3*ones(md.mesh.numberofelements,1);
     29md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1);
    3030
    3131disp('      creating surface mass balance');
    3232md.surfaceforcings.mass_balance=ones(md.mesh.numberofvertices,1)/md.constants.yts; %1m/a
    33 md.basalforcings.melting_rate=0*ones(md.mesh.numberofvertices,1)/md.constants.yts; %1m/a
     33md.basalforcings.melting_rate=0.*ones(md.mesh.numberofvertices,1)/md.constants.yts; %1m/a
    3434
    3535%Deal with boundary conditions:
     
    4141md.thermal.spctemperature(:)=md.initialization.temperature;
    4242md.basalforcings.geothermalflux=zeros(md.mesh.numberofvertices,1);
    43 pos=find(md.mask.elementongroundedice);md.basalforcings.geothermalflux(md.mesh.elements(pos,:))=1*10^-3; %1 mW/m^2
     43pos=find(md.mask.elementongroundedice);md.basalforcings.geothermalflux(md.mesh.elements(pos,:))=1.*10^-3; %1 mW/m^2
Note: See TracChangeset for help on using the changeset viewer.