displayparameters

PURPOSE ^

DISPLAYPARAMETERS - display parameters

SYNOPSIS ^

function displayparameters(md)

DESCRIPTION ^

DISPLAYPARAMETERS - display parameters

   To avoid clobbering display.m with every field from model md, 
   we create this routine that displays parameters from model md, 
   only if requested.

   Usage:
      displayparameters(md)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function displayparameters(md)
0002 %DISPLAYPARAMETERS - display parameters
0003 %
0004 %   To avoid clobbering display.m with every field from model md,
0005 %   we create this routine that displays parameters from model md,
0006 %   only if requested.
0007 %
0008 %   Usage:
0009 %      displayparameters(md)
0010 
0011 disp(sprintf('   Parameters:'));
0012 if isempty(md.surface), disp(sprintf('      surface: N/A')); else disp(sprintf('      surface [m]: (%i)',length(md.surface))); end
0013 if isempty(md.thickness), disp(sprintf('      thickness: N/A')); else disp(sprintf('      thickness [m]: (%i)',length(md.thickness))); end
0014 if isempty(md.new_thickness), disp(sprintf('      new_thickness: N/A')); else disp(sprintf('      new_thickness [m]: (%i)',length(md.new_thickness))); end
0015 if isempty(md.bed), disp(sprintf('      bed: N/A')); else disp(sprintf('      bed [m]: (%i)',length(md.bed))); end
0016 if isempty(md.firn_layer), disp(sprintf('      firn_layer: N/A')); else disp(sprintf('      firn_layer [m]: (%i)',length(md.firn_layer))); end
0017 disp(sprintf('      gridonboundary: (%i)',length(md.gridonboundary)));
0018 disp(sprintf('      elementoniceshelf: (%i)',length(md.elementoniceshelf)));
0019 disp(sprintf('      gridoniceshelf: (%i)',length(md.gridoniceshelf)));
0020 disp(sprintf('      elementonicesheet: (%i)',length(md.elementonicesheet)));
0021 disp(sprintf('      gridonicesheet: (%i)',length(md.gridonicesheet)));
0022 if strcmpi(md.type,'3d'), disp(sprintf('      elementonbed: (%i)',length(md.elementonbed))); end
0023 if strcmpi(md.type,'3d'), disp(sprintf('      elementonsurface: (%i)',length(md.elementonsurface))); end
0024 if strcmpi(md.type,'3d'), disp(sprintf('      gridonbed: (%i)',length(md.gridonbed))); end
0025 if strcmpi(md.type,'3d'), disp(sprintf('      gridonsurface: (%i)',length(md.gridonsurface))); end
0026 disp(sprintf('      g: %g [m/s^2]',md.g));
0027 disp(sprintf('      ''Friction parameters (Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p)'''));
0028 if isempty(md.drag), disp(sprintf('         drag: N/A')); else disp(sprintf('         drag: (%i)',length(md.drag))); end
0029 disp(sprintf('         drag_type: %i (0: none, 1:plastic, 2:viscous):',md.drag_type));
0030 if isempty(md.p), disp(sprintf('         p: N/A')); else disp(sprintf('         p: (%i)',length(md.p))); end
0031 if isempty(md.q), disp(sprintf('         q: N/A')); else disp(sprintf('         q: (%i)',length(md.q))); end

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