source: issm/trunk/src/m/classes/public/modeldefault/defaultparams.m@ 2216

Last change on this file since 2216 was 2216, checked in by Mathieu Morlighem, 15 years ago

Added modeldefault

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Some hardcoded parameters for this deck%%%%%%%%%%
2
3%some parameterization for this parameter file :)
4thicknesspath=options.thicknesspath;
5firnpath=options.firnpath;
6surfacepath=options.surfacepath;
7mosaicpath=options.mosaicpath;
8temperaturepath=options.temperaturepath;
9heatfluxpath=options.heatfluxpath;
10
11%Solution parameters
12
13 %parallelization
14 md.cluster=oshostname();
15 md.np=8;
16 md.time=60;
17
18%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
20 disp(' reading bedmap thicknesses');
21 md.thickness=InterpFromFile(md.x,md.y,thicknesspath,10);
22
23 disp(' reading firn layer');
24 md.firn_layer=InterpFromFile(md.x,md.y,firnpath,0);
25
26 disp(' reading Bamber dem');
27 md.surface=InterpFromFile(md.x,md.y,surfacepath,10);
28
29 %correct the surface by taking into account the firn layer
30 rho_ice=917;
31 rho_firn=830;
32 firn_layer_correction=md.firn_layer*(1-rho_firn/rho_ice);
33 md.surface=md.surface-firn_layer_correction;
34
35 %Correct thickness by assuming hydrostatic equilibrium 10km down the grounding line
36 md=ThicknessCorrection(md);
37
38 %some corrections
39 minsurf=1;
40 pos=find(isnan(md.surface) | (md.surface<=0));
41 md.surface(pos)=minsurf;
42 pos=find(isnan(md.thickness) | (md.thickness<=0));
43 md.thickness(pos)=minsurf/(1-md.rho_ice/md.rho_water);
44 md.bed=md.surface-md.thickness;
45
46 disp(' reading velocities from Rignot');
47 md=plugvelocities(md,mosaicpath,0);
48
49 %drag md.drag or stress
50 md.drag_type=2; %0 none 1 plastic 2 viscous
51 md.drag=300*ones(md.numberofgrids,1); %q=1.
52
53 %zones of high md.drag
54 %[rhighmd.drag]=ArgusContourToMesh(md.elements,md.x,md.y,expread('HighDrag.exp',1),'node');
55 %pos=find(highmd.drag);md.drag(pos)=10^3;
56
57 %Take care of iceshelves: no drag md.drag
58 pos=find(md.elementoniceshelf);
59 md.drag(md.elements(pos,:))=0;
60 md.p=ones(md.numberofelements,1);
61 md.q=ones(md.numberofelements,1);
62
63 %Load md.temperature from Giovinetto:
64 disp(' loading temperature');
65 md.temperature=InterpFromFile(md.x,md.y,temperaturepath,253);
66 while ~isempty(find(isnan(md.temperature))),
67 pos=find(isnan(md.temperature));
68 if ((pos+1)<=length(md.temperature)),
69 md.temperature(pos)=md.temperature(pos+1);
70 else
71 md.temperature(pos)=md.temperature(pos-1);
72 end
73 end
74
75 %flow law
76 disp(' creating flow law paramters');
77 md.n=3*ones(md.numberofelements,1);
78 md.B=paterson(md.temperature);
79
80 %zones of shear margin softening
81 %[rweakb]=ArgusContourToMesh(md.elements,md.x,md.y,expread('Weakmd.BPIG.exp',1),'node');
82 %pos=find(weakb);md.B(pos)=.3*md.B(pos);
83
84 %rifts: none for now.
85 %if isstruct(rifts), %we have rifts, choose whether they are full of water or air.
86 % for i=1:length(rifts),
87 % rifts(i).fill='water'; %choice:'air','water','ice'
88 % rifts(i).friction=10^11;
89 % end
90 %end
91
92 disp(' creating accumulation rates');
93 md.accumulation=ones(md.numberofgrids,1); %1m/a
94
95 %Deal with boundary conditions:
96
97 disp(' thermal model');
98 md.melting=zeros(md.numberofgrids,1);
99 md.observed_temperature=md.temperature;
100
101 disp(' reading geothermal flux');
102 load(heatfluxpath);
103 md.geothermalflux=InterpFromGrid(x_m,y_m,heatflux_Antarctica,md.x,md.y,80);
104 pos=find(md.geothermalflux==0);md.geothermalflux(pos)=80;
105 md.geothermalflux=md.geothermalflux/1000; %map is given in mW/m^2, we need it in W/m^2
106
107 disp(' boundary conditions');
108 md=SetMarineIceSheetBC(md);
109
110
111%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112
113md.counter=3;
Note: See TracBrowser for help on using the repository browser.