Changeset 20743
- Timestamp:
- 06/15/16 17:56:54 (9 years ago)
- Location:
- issm/trunk-jpl/examples/IceBridge
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/examples/IceBridge/Greenland.par
r20532 r20743 26 26 md.geometry.thickness(pos0)=1; 27 27 md.geometry.surface=md.geometry.thickness+md.geometry.base; 28 29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%30 %Reading IceBridge data for Jakobshavn31 disp(' reading IceBridge Jakobshavn bedrock');32 fid = fopen('../Data/Jakobshavn_2008_2011_Composite_XYZGrid.txt');33 titles = fgets(fid); data = fscanf(fid,'%g,%g,%g,%g,%g',[5 266400])';34 fclose(fid);35 36 [xi,yi]= ll2xy(md.mesh.lat,md.mesh.long,+1,45,70);37 bed = flipud(reshape(data(:,5),[360 740])); bed(find(bed==-9999))=NaN;38 bedy = flipud(reshape(data(:,1),[360 740]));39 bedx = flipud(reshape(data(:,2),[360 740]));40 41 %Insert Icebridge bed and recalculate thickness42 bed_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),bed,xi,yi,NaN);43 in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,...44 './Jak_grounded.exp','node',1);45 bed_jks(~in)=NaN;46 pos=find(~isnan(bed_jks));47 md.geometry.base(pos)=bed_jks(pos);48 md.geometry.thickness=md.geometry.surface-md.geometry.base;49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%50 28 51 29 disp(' Interpolating velocities '); … … 80 58 disp(' Set other boundary conditions'); 81 59 md.mask.ice_levelset(md.mesh.vertexonboundary==1)=0; 60 md.basalforcings.floatingice_melting_rate = zeros(md.mesh.numberofvertices,1); 82 61 md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices,1); 83 md.basalforcings.floatingice_melting_rate = zeros(md.mesh.numberofvertices,1);84 62 md.thermal.spctemperature = [md.initialization.temperature;1]; %impose observed temperature on surface 85 63 md.masstransport.spcthickness = NaN*ones(md.mesh.numberofvertices,1); … … 91 69 md.initialization.pressure=md.materials.rho_ice*md.constants.g*md.geometry.thickness; 92 70 93 disp(' Single point constraint for continental model');94 % Set at least one vertex to velocity 0 so as to not get a singular problem (point on the wet peninsula)71 disp(' Single point constraints'); 72 %Initialize single point constraint arrarys 95 73 md.stressbalance.referential=NaN*ones(md.mesh.numberofvertices,6); 96 74 md.stressbalance.spcvx = NaN*ones(md.mesh.numberofvertices,1); 97 75 md.stressbalance.spcvy = NaN*ones(md.mesh.numberofvertices,1); 98 76 md.stressbalance.spcvz = NaN*ones(md.mesh.numberofvertices,1); 99 location = 1.0e+06 *[.32011 -2.2039];100 [dist pos]=min(sqrt((md.mesh.x - location(1)).^2 + (md.mesh.y - location(2)).^2));101 md.stressbalance.spcvx(pos) = 0;102 md.stressbalance.spcvy(pos) = 0;103 md.stressbalance.spcvz(pos) = 0;104 77 -
issm/trunk-jpl/examples/IceBridge/Greenland_cheatsheet.par
r20532 r20743 1 %Name and Coordinate system1 %Name and hemisphere 2 2 md.miscellaneous.name='SeaRISEgreenland'; 3 md.mesh.epsg=3413; 3 4 4 5 5 disp(' Loading SeaRISE data from NetCDF'); … … 44 44 surf_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),surf,xi,yi,NaN); 45 45 in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,... 46 ' ./Jak_grounded.exp','node',1);46 'Jak_grounded.exp','node',1); 47 47 bed_jks(~in)=NaN; 48 48 surf_jks(~in)=NaN; … … 66 66 67 67 disp(' Interpolating surface mass balance'); 68 md.s mb.mass_balance=InterpFromGridToMesh(x1,y1,smb,md.mesh.x,md.mesh.y,0);69 md.s mb.mass_balance=md.smb.mass_balance*md.materials.rho_water/md.materials.rho_ice;68 md.surfaceforcings.mass_balance=InterpFromGridToMesh(x1,y1,smb,md.mesh.x,md.mesh.y,0); 69 md.surfaceforcings.mass_balance=md.surfaceforcings.mass_balance*md.materials.rho_water/md.materials.rho_ice; 70 70 71 71 disp(' Construct basal friction parameters'); … … 84 84 disp(' Set other boundary conditions'); 85 85 md.mask.ice_levelset(md.mesh.vertexonboundary==1)=0; 86 md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices,1); 87 md.basalforcings.floatingice_melting_rate = zeros(md.mesh.numberofvertices,1); 86 md.basalforcings.melting_rate = zeros(md.mesh.numberofvertices,1); 88 87 md.thermal.spctemperature = [md.initialization.temperature;1]; %impose observed temperature on surface 89 88 md.masstransport.spcthickness = NaN*ones(md.mesh.numberofvertices,1); -
issm/trunk-jpl/examples/IceBridge/runme.m
r20532 r20743 1 1 clear all; 2 close all; 2 3 steps=[1]; 3 4 … … 21 22 22 23 %Mesh greenland without refinement in Jak basin 23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%24 24 md=bamg(md,'hmax',400000,'hmin',5000,'gradation',1.7,'field',vel,'err',8); 25 save ./Models/Greenland.Mesh_generation_old md;26 25 return; 27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 28 26 29 27 %Refine mesh in the region of Jakobshavn (resolution = 3000 m) 30 28 hmaxVertices=NaN*ones(md.mesh.numberofvertices,1); 31 29 in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,... 32 ' ./Jak_outline.exp','node',1);30 'Jak_outline.exp','node',1); 33 31 hmaxVertices(find(in))=3000; 34 32 md=bamg(md,'hmax',400000,'hmin',5000,'gradation',1.7,'field',vel,... … … 46 44 47 45 md = setmask(md,'',''); 48 md = parameterize(md,'./Greenland.par'); 49 %md = parameterize(md,'./Greenland_noOIB.par'); 46 md = parameterize(md,'Greenland.par'); 50 47 md = setflowequation(md,'SSA','all'); 51 48 … … 77 74 md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1); 78 75 in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,... 79 ' ./data_gaps.exp','node',1);76 'data_gaps.exp','node',1); 80 77 md.inversion.cost_functions_coefficients(find(in),1)=0.0; 81 78 md.inversion.cost_functions_coefficients(find(in),2)=0.0; … … 143 140 %Line Plots 144 141 figure 142 time_plot=md.results.TransientSolution(1).time:md.timestepping.time_step:md.timestepping.final_time; 145 143 146 144 %Plot surface mass balance 147 145 surfmb=[]; for i=1:100; surfmb=[surfmb ... 148 146 md.results.TransientSolution(i).SmbMassBalance]; end 149 subplot(3,1,1); plot( [0.2:0.2:20],mean(surfmb)); title('Mean Surface mass balance');147 subplot(3,1,1); plot(time_plot,mean(surfmb)); title('Mean Surface mass balance'); 150 148 151 149 %Plot velocity 152 150 vel=[]; for i=1:100; vel=[vel md.results.TransientSolution(i).Vel]; end 153 subplot(3,1,2); plot( [0.2:0.2:20],mean(vel)); title('Mean Velocity');151 subplot(3,1,2); plot(time_plot,mean(vel)); title('Mean Velocity'); 154 152 155 153 %Plot Volume 156 154 volume=[]; for i=1:100; volume=[volume md.results.TransientSolution(i).IceVolume]; end 157 subplot(3,1,3); plot( [0.2:0.2:20],volume); title('Ice Volume');155 subplot(3,1,3); plot(time_plot,volume); title('Ice Volume'); 158 156 xlabel('years') 159 157 end
Note:
See TracChangeset
for help on using the changeset viewer.