[21337] | 1 | Index: ../trunk-jpl/examples/IceBridge/Greenland_cheatsheet.par
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/examples/IceBridge/Greenland_cheatsheet.par (revision 20742)
|
---|
| 4 | +++ ../trunk-jpl/examples/IceBridge/Greenland_cheatsheet.par (revision 20743)
|
---|
| 5 | @@ -1,7 +1,7 @@
|
---|
| 6 | -%Name and Coordinate system
|
---|
| 7 | +%Name and hemisphere
|
---|
| 8 | md.miscellaneous.name='SeaRISEgreenland';
|
---|
| 9 | -md.mesh.epsg=3413;
|
---|
| 10 |
|
---|
| 11 | +
|
---|
| 12 | disp(' Loading SeaRISE data from NetCDF');
|
---|
| 13 | ncdata='../Data/Greenland_5km_dev1.2.nc';
|
---|
| 14 | x1 = ncread(ncdata,'x1');
|
---|
| 15 | @@ -43,7 +43,7 @@
|
---|
| 16 | bed_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),bed,xi,yi,NaN);
|
---|
| 17 | surf_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),surf,xi,yi,NaN);
|
---|
| 18 | in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,...
|
---|
| 19 | - './Jak_grounded.exp','node',1);
|
---|
| 20 | + 'Jak_grounded.exp','node',1);
|
---|
| 21 | bed_jks(~in)=NaN;
|
---|
| 22 | surf_jks(~in)=NaN;
|
---|
| 23 | pos=find(~isnan(bed_jks));
|
---|
| 24 | @@ -65,8 +65,8 @@
|
---|
| 25 | md.initialization.temperature=InterpFromGridToMesh(x1,y1,temp,md.mesh.x,md.mesh.y,0)+273.15;
|
---|
| 26 |
|
---|
| 27 | disp(' Interpolating surface mass balance');
|
---|
| 28 | -md.smb.mass_balance=InterpFromGridToMesh(x1,y1,smb,md.mesh.x,md.mesh.y,0);
|
---|
| 29 | -md.smb.mass_balance=md.smb.mass_balance*md.materials.rho_water/md.materials.rho_ice;
|
---|
| 30 | +md.surfaceforcings.mass_balance=InterpFromGridToMesh(x1,y1,smb,md.mesh.x,md.mesh.y,0);
|
---|
| 31 | +md.surfaceforcings.mass_balance=md.surfaceforcings.mass_balance*md.materials.rho_water/md.materials.rho_ice;
|
---|
| 32 |
|
---|
| 33 | disp(' Construct basal friction parameters');
|
---|
| 34 | md.friction.coefficient=30*ones(md.mesh.numberofvertices,1);
|
---|
| 35 | @@ -83,8 +83,7 @@
|
---|
| 36 |
|
---|
| 37 | disp(' Set other boundary conditions');
|
---|
| 38 | md.mask.ice_levelset(md.mesh.vertexonboundary==1)=0;
|
---|
| 39 | -md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 40 | -md.basalforcings.floatingice_melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 41 | +md.basalforcings.melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 42 | md.thermal.spctemperature = [md.initialization.temperature;1]; %impose observed temperature on surface
|
---|
| 43 | md.masstransport.spcthickness = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 44 |
|
---|
| 45 | Index: ../trunk-jpl/examples/IceBridge/Greenland.par
|
---|
| 46 | ===================================================================
|
---|
| 47 | --- ../trunk-jpl/examples/IceBridge/Greenland.par (revision 20742)
|
---|
| 48 | +++ ../trunk-jpl/examples/IceBridge/Greenland.par (revision 20743)
|
---|
| 49 | @@ -26,28 +26,6 @@
|
---|
| 50 | md.geometry.thickness(pos0)=1;
|
---|
| 51 | md.geometry.surface=md.geometry.thickness+md.geometry.base;
|
---|
| 52 |
|
---|
| 53 | -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
| 54 | -%Reading IceBridge data for Jakobshavn
|
---|
| 55 | -disp(' reading IceBridge Jakobshavn bedrock');
|
---|
| 56 | -fid = fopen('../Data/Jakobshavn_2008_2011_Composite_XYZGrid.txt');
|
---|
| 57 | -titles = fgets(fid); data = fscanf(fid,'%g,%g,%g,%g,%g',[5 266400])';
|
---|
| 58 | -fclose(fid);
|
---|
| 59 | -
|
---|
| 60 | -[xi,yi]= ll2xy(md.mesh.lat,md.mesh.long,+1,45,70);
|
---|
| 61 | -bed = flipud(reshape(data(:,5),[360 740])); bed(find(bed==-9999))=NaN;
|
---|
| 62 | -bedy = flipud(reshape(data(:,1),[360 740]));
|
---|
| 63 | -bedx = flipud(reshape(data(:,2),[360 740]));
|
---|
| 64 | -
|
---|
| 65 | -%Insert Icebridge bed and recalculate thickness
|
---|
| 66 | -bed_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),bed,xi,yi,NaN);
|
---|
| 67 | -in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,...
|
---|
| 68 | - './Jak_grounded.exp','node',1);
|
---|
| 69 | -bed_jks(~in)=NaN;
|
---|
| 70 | -pos=find(~isnan(bed_jks));
|
---|
| 71 | -md.geometry.base(pos)=bed_jks(pos);
|
---|
| 72 | -md.geometry.thickness=md.geometry.surface-md.geometry.base;
|
---|
| 73 | -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
| 74 | -
|
---|
| 75 | disp(' Interpolating velocities ');
|
---|
| 76 | md.inversion.vx_obs = InterpFromGridToMesh(x1,y1,velx,md.mesh.x,md.mesh.y,0);
|
---|
| 77 | md.inversion.vy_obs = InterpFromGridToMesh(x1,y1,vely,md.mesh.x,md.mesh.y,0);
|
---|
| 78 | @@ -79,8 +57,8 @@
|
---|
| 79 |
|
---|
| 80 | disp(' Set other boundary conditions');
|
---|
| 81 | md.mask.ice_levelset(md.mesh.vertexonboundary==1)=0;
|
---|
| 82 | -md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 83 | md.basalforcings.floatingice_melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 84 | +md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 85 | md.thermal.spctemperature = [md.initialization.temperature;1]; %impose observed temperature on surface
|
---|
| 86 | md.masstransport.spcthickness = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 87 |
|
---|
| 88 | @@ -90,15 +68,10 @@
|
---|
| 89 | disp(' Set Pressure');
|
---|
| 90 | md.initialization.pressure=md.materials.rho_ice*md.constants.g*md.geometry.thickness;
|
---|
| 91 |
|
---|
| 92 | -disp(' Single point constraint for continental model');
|
---|
| 93 | -%Set at least one vertex to velocity 0 so as to not get a singular problem (point on the wet peninsula)
|
---|
| 94 | +disp(' Single point constraints');
|
---|
| 95 | +%Initialize single point constraint arrarys
|
---|
| 96 | md.stressbalance.referential=NaN*ones(md.mesh.numberofvertices,6);
|
---|
| 97 | md.stressbalance.spcvx = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 98 | md.stressbalance.spcvy = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 99 | md.stressbalance.spcvz = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 100 | -location = 1.0e+06 *[.32011 -2.2039];
|
---|
| 101 | -[dist pos]=min(sqrt((md.mesh.x - location(1)).^2 + (md.mesh.y - location(2)).^2));
|
---|
| 102 | -md.stressbalance.spcvx(pos) = 0;
|
---|
| 103 | -md.stressbalance.spcvy(pos) = 0;
|
---|
| 104 | -md.stressbalance.spcvz(pos) = 0;
|
---|
| 105 |
|
---|
| 106 | Index: ../trunk-jpl/examples/IceBridge/runme.m
|
---|
| 107 | ===================================================================
|
---|
| 108 | --- ../trunk-jpl/examples/IceBridge/runme.m (revision 20742)
|
---|
| 109 | +++ ../trunk-jpl/examples/IceBridge/runme.m (revision 20743)
|
---|
| 110 | @@ -1,4 +1,5 @@
|
---|
| 111 | clear all;
|
---|
| 112 | +close all;
|
---|
| 113 | steps=[1];
|
---|
| 114 |
|
---|
| 115 | %Location of SeaRISE dataset
|
---|
| 116 | @@ -20,16 +21,13 @@
|
---|
| 117 | vel = sqrt(vx.^2+vy.^2);
|
---|
| 118 |
|
---|
| 119 | %Mesh greenland without refinement in Jak basin
|
---|
| 120 | - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
| 121 | md=bamg(md,'hmax',400000,'hmin',5000,'gradation',1.7,'field',vel,'err',8);
|
---|
| 122 | - save ./Models/Greenland.Mesh_generation_old md;
|
---|
| 123 | return;
|
---|
| 124 | - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
| 125 | -
|
---|
| 126 | +
|
---|
| 127 | %Refine mesh in the region of Jakobshavn (resolution = 3000 m)
|
---|
| 128 | hmaxVertices=NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 129 | in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,...
|
---|
| 130 | - './Jak_outline.exp','node',1);
|
---|
| 131 | + 'Jak_outline.exp','node',1);
|
---|
| 132 | hmaxVertices(find(in))=3000;
|
---|
| 133 | md=bamg(md,'hmax',400000,'hmin',5000,'gradation',1.7,'field',vel,...
|
---|
| 134 | 'err',8,'hmaxVertices',hmaxVertices);
|
---|
| 135 | @@ -45,8 +43,7 @@
|
---|
| 136 | md = loadmodel('./Models/Greenland.Mesh_generation');
|
---|
| 137 |
|
---|
| 138 | md = setmask(md,'','');
|
---|
| 139 | - md = parameterize(md,'./Greenland.par');
|
---|
| 140 | - %md = parameterize(md,'./Greenland_noOIB.par');
|
---|
| 141 | + md = parameterize(md,'Greenland.par');
|
---|
| 142 | md = setflowequation(md,'SSA','all');
|
---|
| 143 |
|
---|
| 144 | save ./Models/Greenland.Parameterization2 md;
|
---|
| 145 | @@ -76,7 +73,7 @@
|
---|
| 146 | md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
|
---|
| 147 | md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
|
---|
| 148 | in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,...
|
---|
| 149 | - './data_gaps.exp','node',1);
|
---|
| 150 | + 'data_gaps.exp','node',1);
|
---|
| 151 | md.inversion.cost_functions_coefficients(find(in),1)=0.0;
|
---|
| 152 | md.inversion.cost_functions_coefficients(find(in),2)=0.0;
|
---|
| 153 |
|
---|
| 154 | @@ -142,18 +139,19 @@
|
---|
| 155 |
|
---|
| 156 | %Line Plots
|
---|
| 157 | figure
|
---|
| 158 | + time_plot=md.results.TransientSolution(1).time:md.timestepping.time_step:md.timestepping.final_time;
|
---|
| 159 |
|
---|
| 160 | %Plot surface mass balance
|
---|
| 161 | surfmb=[]; for i=1:100; surfmb=[surfmb ...
|
---|
| 162 | md.results.TransientSolution(i).SmbMassBalance]; end
|
---|
| 163 | - subplot(3,1,1); plot([0.2:0.2:20],mean(surfmb)); title('Mean Surface mass balance');
|
---|
| 164 | + subplot(3,1,1); plot(time_plot,mean(surfmb)); title('Mean Surface mass balance');
|
---|
| 165 |
|
---|
| 166 | %Plot velocity
|
---|
| 167 | vel=[]; for i=1:100; vel=[vel md.results.TransientSolution(i).Vel]; end
|
---|
| 168 | - subplot(3,1,2); plot([0.2:0.2:20],mean(vel)); title('Mean Velocity');
|
---|
| 169 | + subplot(3,1,2); plot(time_plot,mean(vel)); title('Mean Velocity');
|
---|
| 170 |
|
---|
| 171 | %Plot Volume
|
---|
| 172 | volume=[]; for i=1:100; volume=[volume md.results.TransientSolution(i).IceVolume]; end
|
---|
| 173 | - subplot(3,1,3); plot([0.2:0.2:20],volume); title('Ice Volume');
|
---|
| 174 | + subplot(3,1,3); plot(time_plot,volume); title('Ice Volume');
|
---|
| 175 | xlabel('years')
|
---|
| 176 | end
|
---|
| 177 | Index: ../trunk-jpl/examples/IceBridge/Greenland_solution.par
|
---|
| 178 | ===================================================================
|
---|
| 179 | --- ../trunk-jpl/examples/IceBridge/Greenland_solution.par (revision 0)
|
---|
| 180 | +++ ../trunk-jpl/examples/IceBridge/Greenland_solution.par (revision 20743)
|
---|
| 181 | @@ -0,0 +1,107 @@
|
---|
| 182 | +%Name and hemisphere
|
---|
| 183 | +md.miscellaneous.name='SeaRISEgreenland';
|
---|
| 184 | +
|
---|
| 185 | +
|
---|
| 186 | +disp(' Loading SeaRISE data from NetCDF');
|
---|
| 187 | +ncdata='../Data/Greenland_5km_dev1.2.nc';
|
---|
| 188 | +x1 = ncread(ncdata,'x1');
|
---|
| 189 | +y1 = ncread(ncdata,'y1');
|
---|
| 190 | +usrf = ncread(ncdata,'usrf')';
|
---|
| 191 | +topg = ncread(ncdata,'topg')';
|
---|
| 192 | +velx = ncread(ncdata,'surfvelx')';
|
---|
| 193 | +vely = ncread(ncdata,'surfvely')';
|
---|
| 194 | +temp = ncread(ncdata,'airtemp2m')';
|
---|
| 195 | +smb = ncread(ncdata,'smb')';
|
---|
| 196 | +gflux = ncread(ncdata,'bheatflx')';
|
---|
| 197 | +
|
---|
| 198 | +disp(' Interpolating surface and bedrock');
|
---|
| 199 | +md.geometry.base = InterpFromGridToMesh(x1,y1,topg,md.mesh.x,md.mesh.y,0);
|
---|
| 200 | +md.geometry.surface = InterpFromGridToMesh(x1,y1,usrf,md.mesh.x,md.mesh.y,0);
|
---|
| 201 | +
|
---|
| 202 | +disp(' Constructing thickness');
|
---|
| 203 | +md.geometry.thickness=md.geometry.surface-md.geometry.base;
|
---|
| 204 | +
|
---|
| 205 | +%Set min thickness to 1 meter
|
---|
| 206 | +pos0=find(md.geometry.thickness<=0);
|
---|
| 207 | +md.geometry.thickness(pos0)=1;
|
---|
| 208 | +md.geometry.surface=md.geometry.thickness+md.geometry.base;
|
---|
| 209 | +
|
---|
| 210 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
| 211 | +%Reading IceBridge data for Jakobshavn
|
---|
| 212 | +disp(' reading IceBridge Jakobshavn bedrock');
|
---|
| 213 | +fid = fopen('../Data/Jakobshavn_2008_2011_Composite_XYZGrid.txt');
|
---|
| 214 | +titles = fgets(fid); data = fscanf(fid,'%g,%g,%g,%g,%g',[5 266400])';
|
---|
| 215 | +fclose(fid);
|
---|
| 216 | +
|
---|
| 217 | +[xi,yi]= ll2xy(md.mesh.lat,md.mesh.long,+1,45,70);
|
---|
| 218 | +bed = flipud(reshape(data(:,5),[360 740])); bed(find(bed==-9999))=NaN;
|
---|
| 219 | +surf = flipud(reshape(data(:,4),[360 740])); surf(find(surf==-9999))=NaN;
|
---|
| 220 | +bedy = flipud(reshape(data(:,1),[360 740]));
|
---|
| 221 | +bedx = flipud(reshape(data(:,2),[360 740]));
|
---|
| 222 | +
|
---|
| 223 | +%Insert Icebridge bed and recalculate thickness
|
---|
| 224 | +bed_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),bed,xi,yi,NaN);
|
---|
| 225 | +surf_jks=InterpFromGridToMesh(bedx(1,:)',bedy(:,1),surf,xi,yi,NaN);
|
---|
| 226 | +in=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,...
|
---|
| 227 | + 'Jak_grounded.exp','node',1);
|
---|
| 228 | +bed_jks(~in)=NaN;
|
---|
| 229 | +surf_jks(~in)=NaN;
|
---|
| 230 | +pos=find(~isnan(bed_jks));
|
---|
| 231 | +md.geometry.base(pos)=bed_jks(pos);
|
---|
| 232 | +md.geometry.surface(pos)=surf_jks(pos);
|
---|
| 233 | +md.geometry.thickness=md.geometry.surface-md.geometry.base;
|
---|
| 234 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
| 235 | +
|
---|
| 236 | +disp(' Interpolating velocities ');
|
---|
| 237 | +md.inversion.vx_obs = InterpFromGridToMesh(x1,y1,velx,md.mesh.x,md.mesh.y,0);
|
---|
| 238 | +md.inversion.vy_obs = InterpFromGridToMesh(x1,y1,vely,md.mesh.x,md.mesh.y,0);
|
---|
| 239 | +md.inversion.vel_obs = sqrt(md.inversion.vx_obs.^2+md.inversion.vy_obs.^2);
|
---|
| 240 | +md.initialization.vx = md.inversion.vx_obs;
|
---|
| 241 | +md.initialization.vy = md.inversion.vy_obs;
|
---|
| 242 | +md.initialization.vz = zeros(md.mesh.numberofvertices,1);
|
---|
| 243 | +md.initialization.vel= md.inversion.vel_obs;
|
---|
| 244 | +
|
---|
| 245 | +disp(' Interpolating temperatures');
|
---|
| 246 | +md.initialization.temperature=InterpFromGridToMesh(x1,y1,temp,md.mesh.x,md.mesh.y,0)+273.15;
|
---|
| 247 | +
|
---|
| 248 | +disp(' Interpolating surface mass balance');
|
---|
| 249 | +md.surfaceforcings.mass_balance=InterpFromGridToMesh(x1,y1,smb,md.mesh.x,md.mesh.y,0);
|
---|
| 250 | +md.surfaceforcings.mass_balance=md.surfaceforcings.mass_balance*md.materials.rho_water/md.materials.rho_ice;
|
---|
| 251 | +
|
---|
| 252 | +disp(' Construct basal friction parameters');
|
---|
| 253 | +md.friction.coefficient=30*ones(md.mesh.numberofvertices,1);
|
---|
| 254 | +pos=find(md.mask.groundedice_levelset<0);
|
---|
| 255 | +md.friction.coefficient(pos)=0; %no friction applied on floating ice
|
---|
| 256 | +md.friction.p=ones(md.mesh.numberofelements,1);
|
---|
| 257 | +md.friction.q=ones(md.mesh.numberofelements,1);
|
---|
| 258 | +
|
---|
| 259 | +disp(' Construct ice rheological properties');
|
---|
| 260 | +md.materials.rheology_n=3*ones(md.mesh.numberofelements,1);
|
---|
| 261 | +md.materials.rheology_B=paterson(md.initialization.temperature);
|
---|
| 262 | +md.friction.q=ones(md.mesh.numberofelements,1);
|
---|
| 263 | +md.friction.p=ones(md.mesh.numberofelements,1);
|
---|
| 264 | +
|
---|
| 265 | +disp(' Set other boundary conditions');
|
---|
| 266 | +md.mask.ice_levelset(md.mesh.vertexonboundary==1)=0;
|
---|
| 267 | +md.basalforcings.melting_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 268 | +md.thermal.spctemperature = [md.initialization.temperature;1]; %impose observed temperature on surface
|
---|
| 269 | +md.masstransport.spcthickness = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 270 | +
|
---|
| 271 | +disp(' Set geothermal heat flux');
|
---|
| 272 | +md.basalforcings.geothermalflux=InterpFromGridToMesh(x1,y1,gflux,md.mesh.x,md.mesh.y,0);
|
---|
| 273 | +
|
---|
| 274 | +disp(' Set Pressure');
|
---|
| 275 | +md.initialization.pressure=md.materials.rho_ice*md.constants.g*md.geometry.thickness;
|
---|
| 276 | +
|
---|
| 277 | +disp(' Single point constraint for continental model');
|
---|
| 278 | +%Set at least one vertex to velocity 0 so as to not get a singular problem (point on the wet peninsula)
|
---|
| 279 | +md.stressbalance.referential=NaN*ones(md.mesh.numberofvertices,6);
|
---|
| 280 | +md.stressbalance.spcvx = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 281 | +md.stressbalance.spcvy = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 282 | +md.stressbalance.spcvz = NaN*ones(md.mesh.numberofvertices,1);
|
---|
| 283 | +location = 1.0e+06 *[.32011 -2.2039];
|
---|
| 284 | +[dist pos]=min(sqrt((md.mesh.x - location(1)).^2 + (md.mesh.y - location(2)).^2));
|
---|
| 285 | +md.stressbalance.spcvx(pos) = 0;
|
---|
| 286 | +md.stressbalance.spcvy(pos) = 0;
|
---|
| 287 | +md.stressbalance.spcvz(pos) = 0;
|
---|
| 288 | +
|
---|
| 289 |
|
---|
| 290 | Property changes on: ../trunk-jpl/examples/IceBridge/Greenland_solution.par
|
---|
| 291 | ___________________________________________________________________
|
---|
| 292 | Added: svn:executable
|
---|
| 293 | + *
|
---|
| 294 |
|
---|