cieloprognostic

PURPOSE ^

diagnostic solution for horizontal velocity

SYNOPSIS ^

function md=cieloprognostic(md)

DESCRIPTION ^

diagnostic solution for horizontal velocity

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function md=cieloprognostic(md)
0002 %diagnostic solution for horizontal velocity
0003 
0004     %timing
0005     t1=clock;
0006 
0007     analysis_p='prognostic';
0008     
0009     %configure, and initialise data model and parameter defaults:
0010     SetParameterDefaults;
0011 
0012     %Build model requested for prognostic simulation
0013     m=CreateFEMModel(md,analysis_p);
0014         
0015     % figure out number of dof: just for information purposes.
0016     md.dof=m.uset.fsize; 
0017 
0018     %Build partitioning vectors. We only need one partitioning for all our models, we made sure of it in Imp!
0019     indx=1:6:m.uset.gsize; indx=indx(tpart);
0020 
0021     %build some parameters needed in core solution.
0022     m.rifts=md.rifts;
0023 
0024     %compute depth averaged horizontal velocity in Matlab workspace partitioning
0025     u_g=zeros(m.uset.gsize,1); u_g(1:6:end)=md.vx/md.yts; u_g(2:6:end)=md.vy/md.yts;
0026     velocity_average=CieloHorizontalVelocityDepthAverage(md,u_g);
0027 
0028     %move surface and bed velocities to first lower layer, in workspace partitioning
0029     ws=ShiftLayers(md,md.vz/md.yts,md.numlayers,1);
0030     wb=ShiftLayers(md,md.vz/md.yts,1,1);
0031     melting=ShiftLayers(md,md.melting,1,1);
0032     accumulation=ShiftLayers(md,md.accumulation,md.numlayers,1);
0033 
0034     %plug into g set, with cluster partitioning
0035     ws_g=zeros(m.uset.gsize,1);ws_g(1:6:m.uset.gsize)=ws(part);
0036     wb_g=zeros(m.uset.gsize,1);wb_g(1:6:m.uset.gsize)=wb(part);
0037     melting_g=zeros(m.uset.gsize,1);melting_g(1:6:m.uset.gsize)=melting(part);
0038     accumulation_g=zeros(m.uset.gsize,1);accumulation_g(1:6:m.uset.gsize)=accumulation(part);
0039     
0040     %initialize thickness
0041     thickness=zeros(m.uset.gsize,1);thickness(1:6:end)=md.thickness(part);
0042 
0043     %prepare inputs strcuture
0044     inputs=struct('thickness',thickness,'melting',melting_g,'accumulation',accumulation_g,...
0045     'surface_vertical_velocity',ws_g,'basal_vertical_velocity',wb_g,'dt',md.dt,'velocity_average',velocity_average);
0046 
0047     %Run core solution
0048     h_g=cieloprognostic_core(m,m.params,inputs,analysis_p);
0049 
0050     %recover thickness and project onto every grid of the mesh
0051     md.new_thickness=project3d(md,project2d(md,h_g(indx),1),'node');

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003