Changeset 1754
- Timestamp:
- 08/18/09 15:10:30 (16 years ago)
- Location:
- issm/trunk/src/m/utils
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/BC/SetIceSheetBC.m
r1747 r1754 9 9 %grid on Dirichlet 10 10 pos=find(md.gridonboundary); 11 md. gridondirichlet_diag=zeros(md.numberofgrids,1);12 md. gridondirichlet_diag(pos)=1;11 md.spcvelocity=zeros(md.numberofgrids,6); 12 md.spcvelocity(pos,1:3)=1; 13 13 14 14 %Dirichlet Values 15 md.dirichletvalues_diag=zeros(md.numberofgrids,2);16 15 if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids) 17 16 disp(' boundary conditions for diagnostic model: spc set as observed velocities'); 18 md. dirichletvalues_diag=[md.vx_obs md.vy_obs];17 md.spcvelocity(:,4:5)=[md.vx_obs md.vy_obs]; %vz is zero 19 18 else 20 19 disp(' boundary conditions for diagnostic model: spc set as zero'); … … 22 21 23 22 %segment on neumann (Ice Front) -> none 24 md.segmentonneumann_diag=zeros(0,3); 25 md.neumannvalues_diag=[]; 23 md.pressureload=zeros(0,3); 26 24 27 25 %Create zeros melting and accumulation if not specified … … 36 34 37 35 displaystring(md.debug,'%s',[' boundary conditions for prognostic model initialization']); 38 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 39 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 40 md.segmentonneumann_prog=[]; 41 md.neumannvalues_prog=[]; 36 md.spcthickness=zeros(md.numberofgrids,2); 42 37 43 38 if (length(md.observed_temperature)==md.numberofgrids), 44 39 displaystring(md.debug,'%s',[' boundary conditions for thermal model']); 45 md. gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature46 md. dirichletvalues_thermal=md.observed_temperature;40 md.spctemperature=ones(md.numberofgrids,2); %observed temperauture everywhere 41 md.spctemperature(:,2)=md.observed_temperature; %values of the spcs 47 42 if (length(md.geothermalflux)~=md.numberofgrids), 48 43 md.geothermalflux=50*10^-3*ones(md.numberofgrids,1); %50 mW/m^2 -
issm/trunk/src/m/utils/BC/SetIceShelfBC.m
r1275 r1754 21 21 gridonicefront=double(md.gridonboundary & gridinsideicefront); 22 22 pos=find(md.gridonboundary & ~gridonicefront); 23 md. gridondirichlet_diag=zeros(md.numberofgrids,1);24 md. gridondirichlet_diag(pos)=1;23 md.spcvelocity=zeros(md.numberofgrids,6); 24 md.spcvelocity(pos,1:3)=1; 25 25 26 26 %Dirichlet Values 27 md.dirichletvalues_diag=zeros(md.numberofgrids,2);28 27 if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids) 29 28 disp(' boundary conditions for diagnostic model: spc set as observed velocities'); 30 md. dirichletvalues_diag(pos,:)=[md.vx_obs(pos) md.vy_obs(pos)];29 md.spcvelocity(pos,4:5)=[md.vx_obs(pos) md.vy_obs(pos)]; %zeros for vz 31 30 else 32 31 disp(' boundary conditions for diagnostic model: spc set as zero'); 33 32 end 34 33 35 %segment on Neumann (Ice Front)34 %segment on Ice Front 36 35 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 37 md.segmentonneumann_diag=md.segments(pos,:); 38 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 36 md.pressureload=md.segments(pos,:); 39 37 40 38 %Create zeros melting and accumulation if not specified … … 49 47 50 48 displaystring(md.debug,'%s',[' boundary conditions for prognostic model initialization']); 51 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 52 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 53 md.segmentonneumann_prog=[]; 54 md.neumannvalues_prog=[]; 49 md.spcthickness=zeros(md.numberofgrids,1); 55 50 56 51 if (length(md.observed_temperature)==md.numberofgrids), 57 52 displaystring(md.debug,'%s',[' boundary conditions for thermal model']); 58 md. gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature59 md. dirichletvalues_thermal=md.observed_temperature;53 md.spctemperature=ones(md.numberofgrids,2); %surface temperature 54 md.spctemperature(:,2)=md.observed_temperature; %values of the spcs 60 55 if (length(md.geothermalflux)~=md.numberofgrids), 61 56 md.geothermalflux=zeros(md.numberofgrids,1); -
issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
r1275 r1754 33 33 error('SetMarineIceSheetBC error message: ice front all around the glacier, no dirichlet found. Set BC manually') 34 34 end 35 md. gridondirichlet_diag=zeros(md.numberofgrids,1);36 md. gridondirichlet_diag(pos)=1;35 md.spcvelocity=zeros(md.numberofgrids,6); 36 md.spcvelocity(pos,1:3)=1; 37 37 38 38 %Dirichlet Values 39 md.dirichletvalues_diag=zeros(md.numberofgrids,2);40 39 if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids) 41 40 disp(' boundary conditions for diagnostic model: spc set as observed velocities'); 42 md. dirichletvalues_diag(pos,:)=[md.vx_obs(pos) md.vy_obs(pos)];41 md.spcvelocity(pos,4:5)=[md.vx_obs(pos) md.vy_obs(pos)]; %zeros for vz 43 42 else 44 43 disp(' boundary conditions for diagnostic model: spc set as zero'); … … 47 46 %segment on Neumann (Ice Front) 48 47 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 49 md.segmentonneumann_diag=md.segments(pos,:); 50 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 48 md.pressureload=md.segments(pos,:); 51 49 52 50 %Create zeros melting and accumulation if not specified … … 61 59 62 60 displaystring(md.debug,'%s',[' boundary conditions for prognostic model initialization']); 63 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 64 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 65 md.segmentonneumann_prog=[]; 66 md.neumannvalues_prog=[]; 61 md.spcthickness=zeros(md.numberofgrids,2); 67 62 68 63 if (length(md.observed_temperature)==md.numberofgrids), 69 64 displaystring(md.debug,'%s',[' boundary conditions for thermal model']); 70 md. gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature71 md. dirichletvalues_thermal=md.observed_temperature;65 md.spctemperature=ones(md.numberofgrids,2); %surface temperature 66 md.spctemperature(:,2)=md.observed_temperature; %values of the spcs 72 67 if (length(md.geothermalflux)~=md.numberofgrids), 73 68 md.geothermalflux=zeros(md.numberofgrids,1); -
issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m
r1247 r1754 13 13 14 14 %retrieve elements on ice sheet front 15 segments=md. segmentonneumann_diag;15 segments=md.pressureload; 16 16 els=segments(:,3); 17 17 pos=find(md.elementonicesheet(els));
Note:
See TracChangeset
for help on using the changeset viewer.