Changeset 14102
- Timestamp:
- 12/05/12 14:35:11 (12 years ago)
- 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 11 11 test418 needs Dakota 12 12 test420 needs Dakota 13 test1401 roundoff error in metric causes different meshes from matlab 14 test1402 roundoff error in metric causes different meshes from matlab -
issm/trunk-jpl/test/NightlyRun/test1301.m
r13671 r14102 10 10 md=parameterize(md,'../Par/SquareThermal.par'); 11 11 md=extrude(md,3,2.); 12 md=setflowequation(md,' Pattyn','all');12 md=setflowequation(md,'pattyn','all'); 13 13 14 14 %Some conditions specific to melting test … … 24 24 melting=md.basalforcings.geothermalflux/(md.materials.rho_ice*md.materials.latentheat)*md.constants.yts; 25 25 26 %modeled 26 %modeled results 27 27 md.cluster=generic('name',oshostname(),'np',2); 28 28 md=solve(md,ThermalSolutionEnum()); … … 30 30 %plot results 31 31 comp_melting=md.results.ThermalSolution.BasalforcingsMeltingRate; 32 relative=abs((comp_melting-melting)./melting)*100 ;33 relative(find(comp_melting==melting))=0 ;32 relative=abs((comp_melting-melting)./melting)*100.; 33 relative(find(comp_melting==melting))=0.; 34 34 plotmodel(md,'data',comp_melting,'title','Modeled melting','data',melting,'title','Analytical melting',... 35 35 'data',comp_melting-melting,'title','Absolute error','data',relative,'title','Relative error [%]',... 36 36 'layer#all',1,'caxis#2',[1.02964 1.02966]*10^-4,'FontSize#all',20,'figposition','mathieu') 37 if printingflag, 37 if printingflag, 38 38 set(gcf,'Color','w') 39 39 printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); … … 41 41 end 42 42 43 44 43 %Fields and tolerances to track changes 45 44 field_names ={'BasalMelting'}; -
issm/trunk-jpl/test/NightlyRun/test1302.m
r13671 r14102 9 9 md=parameterize(md,'../Par/SquareThermal.par'); 10 10 md=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');11 md=setflowequation(md,'pattyn','all'); 12 12 13 13 %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 ;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.; 16 16 md.initialization.vz=0.1*ones(md.mesh.numberofvertices,1); 17 17 md.initialization.vel=sqrt( md.initialization.vx.^2+ md.initialization.vy.^2+ md.initialization.vz.^2); … … 22 22 %d2T/dz2-w*rho_ice*c/k*dT/dz=0 T(surface)=0 T(bed)=10 => T=A exp(alpha z)+B 23 23 alpha=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)=1024 A=10./(exp(alpha*(-1000.))-1.); %A=T(bed)/(exp(alpha*bed)-1) with bed=-1000 T(bed)=10 25 25 B=-A; 26 26 md.initialization.temperature=A*exp(alpha*md.mesh.z)+B; 27 27 28 %modeled 28 %modeled results 29 29 md.cluster=generic('name',oshostname(),'np',2); 30 30 md=solve(md,ThermalSolutionEnum()); … … 32 32 %plot results 33 33 comp_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 ;34 relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100.; 35 relative(find(comp_temp==md.initialization.temperature))=0.; 36 36 plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,... 37 37 'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,... 38 38 'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,... 39 39 'figposition','mathieu','FontSize#all',20) 40 if printingflag, 40 if printingflag, 41 41 set(gcf,'Color','w') 42 42 printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); -
issm/trunk-jpl/test/NightlyRun/test1303.m
r13671 r14102 10 10 md=parameterize(md,'../Par/SquareThermal.par'); 11 11 md=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; 12 md=setflowequation(md,'pattyn','all'); 13 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.; 15 16 md.initialization.pressure=zeros(md.mesh.numberofvertices,1); 16 17 … … 18 19 %d2T/dz2=0 T(bed)=10 T(surface)=0 => T=0*(z-bed)/thickness+10*(surface-z)/thickness 19 20 %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;21 md.initialization.temperature=10.*(md.geometry.surface-md.mesh.z)./md.geometry.thickness; 21 22 22 %modeled 23 %modeled results 23 24 md.cluster=generic('name',oshostname(),'np',2); 24 25 md=solve(md,ThermalSolutionEnum()); … … 26 27 %plot results 27 28 comp_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 ;29 relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100.; 30 relative(find(comp_temp==md.initialization.temperature))=0.; 30 31 plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,... 31 32 'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,... 32 33 'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,... 33 34 'figposition','mathieu','FontSize#all',20) 34 if printingflag, 35 if printingflag, 35 36 set(gcf,'Color','w') 36 37 printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); -
issm/trunk-jpl/test/NightlyRun/test1304.m
r13671 r14102 10 10 md=parameterize(md,'../Par/SquareThermal.par'); 11 11 md=extrude(md,11,1.); 12 md=setflowequation(md,' Pattyn','all');12 md=setflowequation(md,'pattyn','all'); 13 13 14 pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0 ;14 pos2=find(md.mesh.elementonsurface); md.thermal.spctemperature(md.mesh.elements(pos2,4:6))=0.; 15 15 md.initialization.pressure=zeros(md.mesh.numberofvertices,1); 16 16 md.basalforcings.geothermalflux(:)=0.1; %100mW/m^2 … … 21 21 md.initialization.temperature=-0.1/md.materials.thermalconductivity*(md.mesh.z-md.geometry.surface); %G=0.1 W/m2 22 22 23 %modeled 23 %modeled results 24 24 md.cluster=generic('name',oshostname(),'np',2); 25 25 md=solve(md,ThermalSolutionEnum()); … … 27 27 %plot results 28 28 comp_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 ;29 relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100.; 30 relative(find(comp_temp==md.initialization.temperature))=0.; 31 31 plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,... 32 32 'title','Analytical temperature','view',3,'data',comp_temp-md.initialization.temperature,... 33 33 'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,... 34 34 'figposition','mathieu','FontSize#all',20) 35 if printingflag, 35 if printingflag, 36 36 set(gcf,'Color','w') 37 37 printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); -
issm/trunk-jpl/test/NightlyRun/test1401.m
r13669 r14102 1 1 %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.; 3 3 printingflag=false; 4 4 5 5 %create square mesh 6 L=1 ; %in m6 L=1.; %in m 7 7 nx=70; %numberof nodes in x direction 8 8 ny=70; … … 11 11 %mesh adaptation loop YAMS 12 12 md=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;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.; 14 14 plotmodel(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, 15 if printingflag, 16 16 set(gcf,'Color','w') 17 17 printmodel('mesh1_yams1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 19 19 end 20 20 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;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.; 23 23 plotmodel(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, 24 if printingflag, 25 25 set(gcf,'Color','w') 26 26 printmodel('mesh1_yams2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 29 29 30 30 md=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;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.; 32 32 plotmodel(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, 33 if printingflag, 34 34 set(gcf,'Color','w') 35 35 printmodel('mesh1_yams3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 41 41 %mesh adaptation loop BAMG 42 42 md=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;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.; 44 44 plotmodel(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, 45 if printingflag, 46 46 set(gcf,'Color','w') 47 47 printmodel('mesh1_bamg1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 50 50 51 51 md.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;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.; 54 54 plotmodel(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, 55 if printingflag, 56 56 set(gcf,'Color','w') 57 57 printmodel('mesh1_bamg2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 61 61 md.private.bamg=NaN; 62 62 md=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;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.; 64 64 plotmodel(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, 65 if printingflag, 66 66 set(gcf,'Color','w') 67 67 printmodel('mesh1_bamg3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); -
issm/trunk-jpl/test/NightlyRun/test1402.m
r13669 r14102 3 3 4 4 %create square mesh 5 L=1 ; %in m5 L=1.; %in m 6 6 nx=30; %numberof nodes in x direction 7 7 ny=30; … … 10 10 %mesh adaptation loop YAMS 11 11 md=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));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)); 16 16 plotmodel(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, 17 if printingflag, 18 18 set(gcf,'Color','w') 19 19 printmodel('mesh2_yams1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 21 21 end 22 22 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));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)); 28 28 plotmodel(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, 29 if printingflag, 30 30 set(gcf,'Color','w') 31 31 printmodel('mesh2_yams2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 34 34 35 35 md=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));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)); 40 40 plotmodel(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, 41 if printingflag, 42 42 set(gcf,'Color','w') 43 43 printmodel('mesh2_yams3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 49 49 %mesh adaptation loop BAMG 50 50 md=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));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)); 55 55 plotmodel(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, 56 if printingflag, 57 57 set(gcf,'Color','w') 58 58 printmodel('mesh2_bamg1','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 61 61 62 62 md.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));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)); 68 68 plotmodel(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, 69 if printingflag, 70 70 set(gcf,'Color','w') 71 71 printmodel('mesh2_bamg2','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 75 75 md.private.bamg=NaN; 76 76 md=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));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)); 81 81 plotmodel(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, 82 if printingflag, 83 83 set(gcf,'Color','w') 84 84 printmodel('mesh2_bamg3','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); … … 88 88 md.private.bamg=NaN; 89 89 md=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));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)); 94 94 plotmodel(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, 95 if printingflag, 96 96 set(gcf,'Color','w') 97 97 printmodel('mesh2_bamgiso','png','margin','on','marginsize',25,'frame','off','resolution',1,'hardcopy','off'); -
issm/trunk-jpl/test/Par/Pig.py
r13471 r14102 48 48 md.prognostic.stabilization=1. 49 49 md.verbose=verbose(0) 50 md.settings.waitonlock=30 .50 md.settings.waitonlock=30 51 51 md.timestepping.time_step=1. 52 52 md.timestepping.final_time=2. -
issm/trunk-jpl/test/Par/SquareSheetConstrained.py
r13676 r14102 51 51 md.thermal.stabilization=1. 52 52 md.verbose=verbose(0) 53 md.settings.waitonlock=30 .53 md.settings.waitonlock=30 54 54 md.diagnostic.restol=0.05 55 55 md.steadystate.reltol=0.05 -
issm/trunk-jpl/test/Par/SquareSheetShelf.py
r13678 r14102 57 57 md.thermal.stabilization=1 58 58 md.verbose=verbose(0) 59 md.settings.waitonlock=30 .59 md.settings.waitonlock=30 60 60 md.diagnostic.restol=0.05 61 61 md.steadystate.reltol=0.05 -
issm/trunk-jpl/test/Par/SquareShelf.py
r13466 r14102 70 70 md.prognostic.stabilization = 1. 71 71 md.thermal.stabilization = 1. 72 md.settings.waitonlock = 30 .72 md.settings.waitonlock = 30 73 73 md.verbose=verbose() 74 74 md.diagnostic.restol = 0.10 -
issm/trunk-jpl/test/Par/SquareShelfConstrained.py
r13641 r14102 55 55 md.thermal.stabilization=1. 56 56 md.verbose = verbose(0) 57 md.settings.waitonlock=30 .57 md.settings.waitonlock=30 58 58 md.diagnostic.restol=0.05 59 59 md.diagnostic.reltol=0.05 -
issm/trunk-jpl/test/Par/SquareThermal.par
r13137 r14102 4 4 5 5 disp(' creating thickness'); 6 h=1000 ;6 h=1000.; 7 7 md.geometry.thickness=h*ones(md.mesh.numberofvertices,1); 8 md.geometry.bed=-1000 *ones(md.mesh.numberofvertices,1);8 md.geometry.bed=-1000.*ones(md.mesh.numberofvertices,1); 9 9 md.geometry.surface=md.geometry.bed+md.geometry.thickness; 10 10 … … 15 15 16 16 disp(' creating drag'); 17 md.friction.coefficient=200 *ones(md.mesh.numberofvertices,1); %q=1.17 md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1. 18 18 %Take care of iceshelves: no basal drag 19 19 pos=find(md.mask.elementonfloatingice); 20 md.friction.coefficient(md.mesh.elements(pos,:))=0 ;20 md.friction.coefficient(md.mesh.elements(pos,:))=0.; 21 21 md.friction.p=ones(md.mesh.numberofelements,1); 22 22 md.friction.q=ones(md.mesh.numberofelements,1); 23 23 24 24 disp(' creating temperatures'); 25 md.initialization.temperature=(273 -20)*ones(md.mesh.numberofvertices,1);25 md.initialization.temperature=(273.-20.)*ones(md.mesh.numberofvertices,1); 26 26 27 disp(' creating flow law param ter');27 disp(' creating flow law parameter'); 28 28 md.materials.rheology_B=paterson(md.initialization.temperature); 29 md.materials.rheology_n=3 *ones(md.mesh.numberofelements,1);29 md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1); 30 30 31 31 disp(' creating surface mass balance'); 32 32 md.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/a33 md.basalforcings.melting_rate=0.*ones(md.mesh.numberofvertices,1)/md.constants.yts; %1m/a 34 34 35 35 %Deal with boundary conditions: … … 41 41 md.thermal.spctemperature(:)=md.initialization.temperature; 42 42 md.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^243 pos=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.