Changeset 25136


Ignore:
Timestamp:
06/24/20 11:52:30 (5 years ago)
Author:
jdquinn
Message:

CHG: Cleanup

Location:
issm/trunk-jpl/src/m
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/clusters/generic.py

    r24602 r25136  
    163163                fid.write('\n gprof {}/kriging.exe gmon.out>{}.performance'.format(self.codepath, modelname))
    164164            else:
    165                 #Add - -    gen - suppressions = all to get suppression lines
     165                #Add --    gen - suppressions = all to get suppression lines
    166166                #fid.write('LD_PRELOAD={} \\\n'.format(self.valgrindlib))
    167167                fid.write('mpiexec -np {} {} --leak -check=full --suppressions={} {}/kriging.exe {}/{} {} 2 > {}.errlog > {}.outlog ' .format(self.np, self.valgrind, self.valgrindsup, self.codepath, self.executionpath, modelname, modelname, modelname, modelname))
  • issm/trunk-jpl/src/m/classes/giacaron.m

    r25056 r25136  
    11%GIA class definition for Caron model (Caron et al, Geophysical Journal International, 2017)
    22%
    3 %   Usage:
    4 %      giacaron=giacaron();
     3%       Usage:
     4%               giacaron=giacaron();
    55classdef giacaron
    66        properties (SetAccess=public)
    7        
    8         %Physical constants
    9         gravitational_constant= NaN;
    10         surface_radius = NaN;
     7               
     8                %Physical constants
     9                gravitational_constant= NaN;
     10                surface_radius = NaN;
    1111                core_mantle_boudary_radius= NaN;
    12         inner_core_boudary_radius= NaN;
    13         stress_norm= NaN;
    14         gravity_norm= NaN;
    15         radius_norm= NaN;
    16        
    17         %Numerical parameters
    18         allow_layer_deletion=NaN;
    19         verbose_mode=NaN;
    20        
    21         %GIA problem setup
    22         forcing_type=NaN;
    23         isincompressible=NaN;
    24         benchmark_mode=NaN;
    25         calculate_sea_level=NaN;
    26         calculate_rotational_feedback=NaN;
    27         subtract_present_day=NaN;
    28         ntime=NaN;
    29         nphi=NaN;
    30    
    31         %Earth model
    32         numlayers   = NaN;
     12                inner_core_boudary_radius= NaN;
     13                stress_norm= NaN;
     14                gravity_norm= NaN;
     15                radius_norm= NaN;
     16               
     17                %Numerical parameters
     18                allow_layer_deletion=NaN;
     19                verbose_mode=NaN;
     20               
     21                %GIA problem setup
     22                forcing_type=NaN;
     23                isincompressible=NaN;
     24                benchmark_mode=NaN;
     25                calculate_sea_level=NaN;
     26                calculate_rotational_feedback=NaN;
     27                subtract_present_day=NaN;
     28                ntime=NaN;
     29                nphi=NaN;
     30
     31                %Earth model
     32                numlayers   = NaN;
    3333                radius      = NaN;
    3434                lame_mu     = NaN;
     
    3939                isburger    = NaN;
    4040                transient_viscosity    = NaN;
    41                 transient_mu           = NaN;
    42        
    43         %Ice history
    44         ice_model_identifier=NaN;
    45         ice_model_ntime=NaN;
    46         nice_sheets=NaN;
    47        
     41                transient_mu               = NaN;
     42               
     43                %Ice history
     44                ice_model_identifier=NaN;
     45                ice_model_ntime=NaN;
     46                nice_sheets=NaN;
     47               
    4848        end
    4949        methods
     
    5858                                        if strcmpi(body,'earth'),
    5959                                                self.numlayers=getfieldvalue(options,'numlayers',5);
    60                         self.calculate_sea_level=true;
     60                                                self.calculate_sea_level=true;
    6161                                                %[self.radius,self.lame_mu, self.lame_lambda, self.issolid, self.density, ...
    6262                                                %self.viscosity, self.isburger, self.transient_viscosity, self.transient_mu]=...
     
    7070                end % }}}
    7171                function self = setdefaultparameters(self) % {{{
    72             %Physical constants
    73             gravitational_constant= 6.67259e-11;
    74             stress_norm= 1e12;
    75             gravity_norm= 10;
    76             radius_norm= 1.0;
    77 
    78             %Numerical parameters
    79             allow_layer_deletion=true;
    80             verbose_mode=false;
    81 
    82             %GIA problem setup
    83             forcing_type=11;
    84             isincompressible=false;
    85             benchmark_mode=false;
    86             calculate_sea_level=false;
    87             calculate_rotational_feedback=true;
    88             subtract_present_day=true;
    89 
    90             %Earth model
    91             isburger    = false(self.numlayers,1);
    92            
    93             %Ice history
    94             nice_sheets=1;
     72                        %Physical constants
     73                        gravitational_constant= 6.67259e-11;
     74                        stress_norm= 1e12;
     75                        gravity_norm= 10;
     76                        radius_norm= 1.0;
     77
     78                        %Numerical parameters
     79                        allow_layer_deletion=true;
     80                        verbose_mode=false;
     81
     82                        %GIA problem setup
     83                        forcing_type=11;
     84                        isincompressible=false;
     85                        benchmark_mode=false;
     86                        calculate_sea_level=false;
     87                        calculate_rotational_feedback=true;
     88                        subtract_present_day=true;
     89
     90                        %Earth model
     91                        isburger    = false(self.numlayers,1);
     92                       
     93                        %Ice history
     94                        nice_sheets=1;
    9595
    9696                end % }}}
     
    9898
    9999                        if ~ismember('GiaAnalysis',analyses), return; end
    100             % Physical constants                       
    101             md = checkfield(md,'fieldname','gia.gravitational_constant','NaN',1,'Inf',1,'numel',1,'>',0);
    102             md = checkfield(md,'fieldname','gia.surface_radius','NaN',1,'Inf',1,'numel',1,'>',0);
     100                        % Physical constants                   
     101                        md = checkfield(md,'fieldname','gia.gravitational_constant','NaN',1,'Inf',1,'numel',1,'>',0);
     102                        md = checkfield(md,'fieldname','gia.surface_radius','NaN',1,'Inf',1,'numel',1,'>',0);
    103103                        md = checkfield(md,'fieldname','gia.core_mantle_boundary_radius','Inf',1,'numel',1,'>',0);
    104104                        md = checkfield(md,'fieldname','gia.inner_core_boundary_radius','Inf',1,'numel',1,'>',0);
     
    107107                        md = checkfield(md,'fieldname','gia.gravity_norm','NaN',1,'Inf',1,'numel',1,'>',0);
    108108
    109             %Numerical parameters
    110                         md = checkfield(md,'fieldname','gia.allow_layer_deletion','values',[0 1]);
     109                        %Numerical parameters
     110                        md = checkfield(md,'fieldname','gia.allow_layer_deletion','values',[0 1]);
    111111                        md = checkfield(md,'fieldname','gia.verbose_mode','values',[0 1]);
    112112
    113             %GIA problem setup
    114             md = checkfield(md,'fieldname','gia.forcing_type','NaN',1,'Inf',1,'numel',1,'>',0, '<=', 12);
    115             md = checkfield(md,'fieldname','gia.isincompressible','values',[0 1]);
    116                         md = checkfield(md,'fieldname','gia.benchmark_mode','values',[0 1]);
    117                         md = checkfield(md,'fieldname','gia.calculate_sea_level','values',[0 1]);
    118                         md = checkfield(md,'fieldname','gia.calculate_rotational_feedback','values',[0 1]);
    119                         md = checkfield(md,'fieldname','gia.subtract_present_day','values',[0 1]);
    120                         md = checkfield(md,'fieldname','gia.ntime','NaN',1,'Inf',1,'numel',1,'>',0);
    121                         md = checkfield(md,'fieldname','gia.ntheta','NaN',1,'Inf',1,'numel',1,'>',0);
    122                         md = checkfield(md,'fieldname','gia.nphi','numel',1,'values', self.ntheta*2);
    123        
    124             %Ice history
    125             md = checkfield(md,'fieldname','gia.ice_model_identifier', 'stringrow', 1, 'size', [1 3]);
    126             md = checkfield(md,'fieldname','gia.ice_model_ntime', 'NaN', 1, 'Inf', 1, 'numel', 1);
    127             md = checkfield(md,'fieldname','gia.nice_sheets', 'NaN', 1, 'Inf', 1, '>', 0, 'numel', 1);
    128            
    129             %Earth parameters
     113                        %GIA problem setup
     114                        md = checkfield(md,'fieldname','gia.forcing_type','NaN',1,'Inf',1,'numel',1,'>',0, '<=', 12);
     115                        md = checkfield(md,'fieldname','gia.isincompressible','values',[0 1]);
     116                        md = checkfield(md,'fieldname','gia.benchmark_mode','values',[0 1]);
     117                        md = checkfield(md,'fieldname','gia.calculate_sea_level','values',[0 1]);
     118                        md = checkfield(md,'fieldname','gia.calculate_rotational_feedback','values',[0 1]);
     119                        md = checkfield(md,'fieldname','gia.subtract_present_day','values',[0 1]);
     120                        md = checkfield(md,'fieldname','gia.ntime','NaN',1,'Inf',1,'numel',1,'>',0);
     121                        md = checkfield(md,'fieldname','gia.ntheta','NaN',1,'Inf',1,'numel',1,'>',0);
     122                        md = checkfield(md,'fieldname','gia.nphi','numel',1,'values', self.ntheta*2);
     123               
     124                        %Ice history
     125                        md = checkfield(md,'fieldname','gia.ice_model_identifier', 'stringrow', 1, 'size', [1 3]);
     126                        md = checkfield(md,'fieldname','gia.ice_model_ntime', 'NaN', 1, 'Inf', 1, 'numel', 1);
     127                        md = checkfield(md,'fieldname','gia.nice_sheets', 'NaN', 1, 'Inf', 1, '>', 0, 'numel', 1);
     128                       
     129                        %Earth parameters
    130130                        md = checkfield(md,'fieldname','gia.numlayers','NaN',1,'Inf',1,'>',0,'numel',1);
    131131                        md = checkfield(md,'fieldname','gia.radius','NaN',1,'Inf',1,'size',[md.gia.numlayers 1],'>',0);
     
    141141                function disp(self) % {{{
    142142                        disp(sprintf('   giacaron parameters:'));
    143            
    144             % Physical constants                       
    145             fielddisplay(self,'gravitational_constant', 'Newton''s Gravitational constant, should be equal to approximately 6.67e-11 [m^3.kg^-1.s^-2]');
    146             fielddisplay(self,'surface_radius','NaN', 'Planet outer surface radius [m]');
     143                       
     144                        % Physical constants                   
     145                        fielddisplay(self,'gravitational_constant', 'Newton''s Gravitational constant, should be equal to approximately 6.67e-11 [m^3.kg^-1.s^-2]');
     146                        fielddisplay(self,'surface_radius','NaN', 'Planet outer surface radius [m]');
    147147                        fielddisplay(self,'core_mantle_boundary_radius', 'Planet core mantle boundary radius (optional) [m]');
    148148                        fielddisplay(self,'inner_core_boundary_radius','Planet inner core boundary radius (optional) [m]');
     
    151151                        fielddisplay(self,'gravity_norm', 'gravity normalization constant [m.s^-2] (default 10)');
    152152
    153             %Numerical parameters
    154                         fielddisplay(self,'allow_layer_deletion', 'boolean allowing the migration of the starting integration radius while increasing the spherical harmonic degree  (default true)');
     153                        %Numerical parameters
     154                        fielddisplay(self,'allow_layer_deletion', 'boolean allowing the migration of the starting integration radius while increasing the spherical harmonic degree  (default true)');
    155155                        fielddisplay(self,'verbose_mode', 'boolean allowing the program to write more details on terminal (default false)')
    156156
    157             %GIA problem setup
    158             fielddisplay(self,'forcing_type','integer indicating the nature and depth of the forcing for the Love number calculation: 1: ICB -- Volumic Potential,  2:  ICB -- Pressure,        3:  ICB -- Loading,    4:  ICB -- Tangential traction,  5:  CMB -- Volumic Potential,  6:  CMB -- Pressure      7:  CMB -- Loading,  8:  CMB -- Tangential traction,    9: SURF -- Volumic Potential, 10: SURF -- Pressure, 11: SURF -- Loading,  12: SURF -- Tangential traction (default 11)');
    159             fielddisplay(self,'isincompressible', 'boolean approximating the mantle rheology to an incompressible body, sets Lame_lambda to 5e14 Pa (default false)');
    160                         fielddisplay(self,'benchmark_mode', 'boolean to enter benchmark mode, writes a lot of outputs from the midst of the calculation (default false)');
    161                         fielddisplay(self,'calculate_sea_level', 'boolean allowing the sea level equation solving (default false)');
    162                         fielddisplay(self,'calculate_rotational_feedback', 'boolean allowing the calculation of rotational feedback (default true)');
    163                         fielddisplay(self,'subtract_present_day', 'boolean, subtracts the present day signal so the calculation is expressed as the difference with the present-day topography, geoid and sea level (default true)');
    164                         fielddisplay(self,'ntime', 'number of time steps')
    165                         fielddisplay(self,'ntheta', 'size of grid in latitude')
    166                         fielddisplay(self,'nphi', 'size of grid in longitude (should always be ntheta*2)');
    167        
    168             %Ice history
    169             fielddisplay(self,'ice_model_identifier', 'string identifier for the ice model (3 characters)')
    170             fielddisplay(self,'ice_model_ntime', 'number of time steps in the original ice model, is used to interpolate the model on the desired time')
    171             fielddisplay(self,'nice_sheets', 'number of ice regions to be scaled independently')
    172            
    173             %Earth parameters
     157                        %GIA problem setup
     158                        fielddisplay(self,'forcing_type','integer indicating the nature and depth of the forcing for the Love number calculation: 1: ICB -- Volumic Potential,  2:  ICB -- Pressure,    3:  ICB -- Loading,    4:  ICB -- Tangential traction,  5:  CMB -- Volumic Potential,  6:  CMB -- Pressure      7:  CMB -- Loading,  8:  CMB -- Tangential traction,    9: SURF -- Volumic Potential, 10: SURF -- Pressure, 11: SURF -- Loading,  12: SURF -- Tangential traction (default 11)');
     159                        fielddisplay(self,'isincompressible', 'boolean approximating the mantle rheology to an incompressible body, sets Lame_lambda to 5e14 Pa (default false)');
     160                        fielddisplay(self,'benchmark_mode', 'boolean to enter benchmark mode, writes a lot of outputs from the midst of the calculation (default false)');
     161                        fielddisplay(self,'calculate_sea_level', 'boolean allowing the sea level equation solving (default false)');
     162                        fielddisplay(self,'calculate_rotational_feedback', 'boolean allowing the calculation of rotational feedback (default true)');
     163                        fielddisplay(self,'subtract_present_day', 'boolean, subtracts the present day signal so the calculation is expressed as the difference with the present-day topography, geoid and sea level (default true)');
     164                        fielddisplay(self,'ntime', 'number of time steps')
     165                        fielddisplay(self,'ntheta', 'size of grid in latitude')
     166                        fielddisplay(self,'nphi', 'size of grid in longitude (should always be ntheta*2)');
     167
     168                        %Ice history
     169                        fielddisplay(self,'ice_model_identifier', 'string identifier for the ice model (3 characters)')
     170                        fielddisplay(self,'ice_model_ntime', 'number of time steps in the original ice model, is used to interpolate the model on the desired time')
     171                        fielddisplay(self,'nice_sheets', 'number of ice regions to be scaled independently')
     172
     173                        %Earth parameters
    174174                        fielddisplay(self,'numlayers','number of layers (default 5)');
    175175                        fielddisplay(self,'radius','array describing the radius for each interface (numlayers+1) [m]');
     
    189189                        WriteData(fid,prefix,'object',self,'fieldname','lithosphere_thickness','format','DoubleMat','mattype',1,'scale',10^3); %from km to m
    190190                        WriteData(fid,prefix,'object',self,'fieldname','cross_section_shape','format','Integer');
    191            
    192              %Physical constants
     191
     192                        %Physical constants
    193193                        WriteData(fid,prefix,'object',self,'fieldname','gravitational_constant','format','Double');
    194194                        WriteData(fid,prefix,'object',self,'fieldname','surface_radius ','format','Double');
     
    198198                        WriteData(fid,prefix,'object',self,'fieldname','gravity_norm','format','Double');
    199199                        WriteData(fid,prefix,'object',self,'fieldname','radius_norm','format','Double');
    200        
    201         %Numerical parameters
     200
     201                        %Numerical parameters
    202202                        WriteData(fid,prefix,'object',self,'fieldname','allow_layer_deletion','format','Boolean');
    203203                        WriteData(fid,prefix,'object',self,'fieldname','verbose_mode','format','Boolean');
    204        
    205         %GIA problem setup
     204               
     205                        %GIA problem setup
    206206                        WriteData(fid,prefix,'object',self,'fieldname','forcing_type','format','Integer');
    207207                        WriteData(fid,prefix,'object',self,'fieldname','isincompressible','format','Boolean');
     
    213213                        WriteData(fid,prefix,'object',self,'fieldname','ntheta','format','Integer');
    214214                        WriteData(fid,prefix,'object',self,'fieldname','nphi','format','Integer');
    215    
    216         %Earth model
     215
     216                        %Earth model
    217217                        WriteData(fid,prefix,'object',self,'fieldname','numlayers','format','Double');
    218218                        WriteData(fid,prefix,'object',self,'fieldname','radius','format','DoubleMat','mattype',1);
     
    225225                        WriteData(fid,prefix,'object',self,'fieldname','transient_viscosity','format','DoubleMat','mattype',1);
    226226                        WriteData(fid,prefix,'object',self,'fieldname','transient_mu','format','DoubleMat','mattype',1);
    227        
    228         %Inversion
    229 %         dataset_type_dentifier= NaN
     227               
     228                        %Inversion
     229%                       dataset_type_dentifier= NaN
    230230                        WriteData(fid,prefix,'object',self,'fieldname','ndata_std','format','Integer');
    231231                        WriteData(fid,prefix,'object',self,'fieldname','ndata_minimum_val ','format','Integer');
     
    235235                        WriteData(fid,prefix,'object',self,'fieldname','ice_coefficients_solving ','format','String');
    236236                        WriteData(fid,prefix,'object',self,'fieldname','ninverse_parameters','format','Integer');
    237        
    238         %Ice history
     237               
     238                        %Ice history
    239239                        WriteData(fid,prefix,'object',self,'fieldname','ice_model_identifier','format','String');
    240240                        WriteData(fid,prefix,'object',self,'fieldname','ice_model_ntime','format','Integer');
     
    243243                function savemodeljs(self,fid,modelname) % {{{
    244244               
    245 %Physical constants
     245                        %Physical constants
    246246                        writejsdouble(fid,[modelname '.gia.gravitational_constant'],self.gravitational_constant);
    247247                        writejsdouble(fid,[modelname '.gia.surface_radius'],self.surface_radius);
     
    251251                        writejsdouble(fid,[modelname '.gia.gravity_norm'],self.gravity_norm);
    252252                        writejsdouble(fid,[modelname '.gia.radius_norm'],self.radius_norm);
    253        
    254         %Numerical parameters
     253               
     254                        %Numerical parameters
    255255                        writejsdouble(fid,[modelname '.gia.allow_layer_deletion'],self.allow_layer_deletion);
    256256                        writejsdouble(fid,[modelname '.gia.verbose_mode'],self.verbose_mode);
    257        
    258         %GIA problem setup
     257               
     258                        %GIA problem setup
    259259                        writejsdouble(fid,[modelname '.gia.forcing_type'],self.forcing_type);
    260260                        writejsdouble(fid,[modelname '.gia.isincompressible'],self.isincompressible);
     
    266266                        writejsdouble(fid,[modelname '.gia.ntheta'],self.ntheta);
    267267                        writejsdouble(fid,[modelname '.gia.nphi'],self.nphi);
    268    
    269         %Earth model
     268
     269                        %Earth model
    270270                        writejsdouble(fid,[modelname '.gia.numlayers'],self.numlayers);
    271271                        writejsdouble(fid,[modelname '.gia.radius'],self.radius);
     
    278278                        writejsdouble(fid,[modelname '.gia.transient_viscosity'],self.transient_viscosity);
    279279                        writejsdouble(fid,[modelname '.gia.transient_mu'],self.transient_mu);
    280        
    281         %Inversion
    282 %        dataset_type_dentifier= NaN
     280               
     281                %Inversion
     282%                dataset_type_dentifier= NaN
    283283%                       writejsdouble(fid,[modelname '.gia.ndata_std'],self.ndata_std);
    284284%                       writejsdouble(fid,[modelname '.gia.ndata_minimum_val'],self.ndata_minimum_val);
     
    288288%                       writejsdouble(fid,[modelname '.gia.ice_coefficients_solving'],self.ice_coefficients_solving);
    289289%                       writejsdouble(fid,[modelname '.gia.ninverse_parameters'],self.ninverse_parameters);
    290        
    291         %Ice history
     290               
     291                        %Ice history
    292292                        writejsdouble(fid,[modelname '.gia.ice_model_identifier'],self.ice_model_identifier);
    293293                        writejsdouble(fid,[modelname '.gia.ice_model_ntime'],self.ice_model_ntime);
  • issm/trunk-jpl/src/m/classes/giaivins.py

    r25129 r25136  
    2929
    3030    def __repr__(self): #{{{
    31         s = '   giaivins solution parameters:'
    32         s += "{}\n".format(fielddisplay(self, 'mantle_viscosity', 'mantle viscosity constraints (NaN means no constraint) (Pa s)'))
    33         s += "{}\n".format(fielddisplay(self, 'lithosphere_thickness', 'lithosphere thickness constraints (NaN means no constraint) (m)'))
    34         s += "{}\n".format(fielddisplay(self, 'cross_section_shape', "1: square-edged, 2: elliptical-sedged surface"))
     31        s = '   giaivins parameters:\n'
     32        s += "{}\n".format(fielddisplay(self, 'mantle_viscosity', 'mantle viscosity [Pa s]'))
     33        s += "{}\n".format(fielddisplay(self, 'lithosphere_thickness', 'lithosphere thickness (km)'))
     34        s += "{}\n".format(fielddisplay(self, 'cross_section_shape', "1: square-edged (default). 2: elliptical. See iedge in GiaDeflectionCore"))
    3535
    3636        return s
  • issm/trunk-jpl/src/m/classes/model.py

    r25129 r25136  
    182182    def __repr__(obj):  #{{{
    183183        #print "Here %s the number: %d" % ("is", 37)
    184         string = "%19s: % - 22s - -  %s" % ("mesh", "[%s, %s]" % ("1x1", obj.mesh.__class__.__name__), "mesh properties")
    185         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("mask", "[%s, %s]" % ("1x1", obj.mask.__class__.__name__), "defines grounded and floating elements"))
    186         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("geometry", "[%s, %s]" % ("1x1", obj.geometry.__class__.__name__), "surface elevation, bedrock topography, ice thickness, ..."))
    187         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("constants", "[%s, %s]" % ("1x1", obj.constants.__class__.__name__), "physical constants"))
    188         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("smb", "[%s, %s]" % ("1x1", obj.smb.__class__.__name__), "surface mass balance"))
    189         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("basalforcings", "[%s, %s]" % ("1x1", obj.basalforcings.__class__.__name__), "bed forcings"))
    190         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("materials", "[%s, %s]" % ("1x1", obj.materials.__class__.__name__), "material properties"))
    191         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("damage", "[%s, %s]" % ("1x1", obj.damage.__class__.__name__), "damage propagation laws"))
    192         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("friction", "[%s, %s]" % ("1x1", obj.friction.__class__.__name__), "basal friction / drag properties"))
    193         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("flowequation", "[%s, %s]" % ("1x1", obj.flowequation.__class__.__name__), "flow equations"))
    194         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("timestepping", "[%s, %s]" % ("1x1", obj.timestepping.__class__.__name__), "time stepping for transient models"))
    195         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("initialization", "[%s, %s]" % ("1x1", obj.initialization.__class__.__name__), "initial guess / state"))
    196         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("rifts", "[%s, %s]" % ("1x1", obj.rifts.__class__.__name__), "rifts properties"))
    197         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("solidearth", "[%s, %s]" % ("1x1", obj.solidearth.__class__.__name__), "solid earth inputs and settings"))
    198         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("dsl", "[%s, %s]" % ("1x1", obj.dsl.__class__.__name__), "dynamic sea level"))
    199         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("debug", "[%s, %s]" % ("1x1", obj.debug.__class__.__name__), "debugging tools (valgrind, gprof)"))
    200         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("verbose", "[%s, %s]" % ("1x1", obj.verbose.__class__.__name__), "verbosity level in solve"))
    201         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("settings", "[%s, %s]" % ("1x1", obj.settings.__class__.__name__), "settings properties"))
    202         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("toolkits", "[%s, %s]" % ("1x1", obj.toolkits.__class__.__name__), "PETSc options for each solution"))
    203         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("cluster", "[%s, %s]" % ("1x1", obj.cluster.__class__.__name__), "cluster parameters (number of cpus...)"))
    204         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("balancethickness", "[%s, %s]" % ("1x1", obj.balancethickness.__class__.__name__), "parameters for balancethickness solution"))
    205         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("stressbalance", "[%s, %s]" % ("1x1", obj.stressbalance.__class__.__name__), "parameters for stressbalance solution"))
    206         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("groundingline", "[%s, %s]" % ("1x1", obj.groundingline.__class__.__name__), "parameters for groundingline solution"))
    207         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("hydrology", "[%s, %s]" % ("1x1", obj.hydrology.__class__.__name__), "parameters for hydrology solution"))
    208         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("masstransport", "[%s, %s]" % ("1x1", obj.masstransport.__class__.__name__), "parameters for masstransport solution"))
    209         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("thermal", "[%s, %s]" % ("1x1", obj.thermal.__class__.__name__), "parameters for thermal solution"))
    210         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("steadystate", "[%s, %s]" % ("1x1", obj.steadystate.__class__.__name__), "parameters for steadystate solution"))
    211         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("transient", "[%s, %s]" % ("1x1", obj.transient.__class__.__name__), "parameters for transient solution"))
    212         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("levelset", "[%s, %s]" % ("1x1", obj.levelset.__class__.__name__), "parameters for moving boundaries (level - set method)"))
    213         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("calving", "[%s, %s]" % ("1x1", obj.calving.__class__.__name__), "parameters for calving"))
    214         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("frontalforcings", "[%s, %s]" % ("1x1", obj.frontalforcings.__class__.__name__), "parameters for frontalforcings"))
    215         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("gia", "[%s, %s]" % ("1x1", obj.gia.__class__.__name__), "parameters for gia solution"))
    216         string = "%s\n%s" % (string, '%19s: % - 22s - -  %s' % ("love", "[%s, %s]" % ("1x1", obj.love.__class__.__name__), "parameters for love solution"))
    217         string = "%s\n%s" % (string, '%19s: % - 22s - -  %s' % ("esa", "[%s, %s]" % ("1x1", obj.esa.__class__.__name__), "parameters for elastic adjustment solution"))
    218         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("autodiff", "[%s, %s]" % ("1x1", obj.autodiff.__class__.__name__), "automatic differentiation parameters"))
    219         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("inversion", "[%s, %s]" % ("1x1", obj.inversion.__class__.__name__), "parameters for inverse methods"))
    220         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("qmu", "[%s, %s]" % ("1x1", obj.qmu.__class__.__name__), "dakota properties"))
    221         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("amr", "[%s, %s]" % ("1x1", obj.amr.__class__.__name__), "adaptive mesh refinement properties"))
    222         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("outputdefinition", "[%s, %s]" % ("1x1", obj.outputdefinition.__class__.__name__), "output definition"))
    223         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("results", "[%s, %s]" % ("1x1", obj.results.__class__.__name__), "model results"))
    224         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("radaroverlay", "[%s, %s]" % ("1x1", obj.radaroverlay.__class__.__name__), "radar image for plot overlay"))
    225         string = "%s\n%s" % (string, "%19s: % - 22s - -  %s" % ("miscellaneous", "[%s, %s]" % ("1x1", obj.miscellaneous.__class__.__name__), "miscellaneous fields"))
     184        string = "%19s: % - 22s --  %s" % ("mesh", "[%s, %s]" % ("1x1", obj.mesh.__class__.__name__), "mesh properties")
     185        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("mask", "[%s, %s]" % ("1x1", obj.mask.__class__.__name__), "defines grounded and floating elements"))
     186        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("geometry", "[%s, %s]" % ("1x1", obj.geometry.__class__.__name__), "surface elevation, bedrock topography, ice thickness, ..."))
     187        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("constants", "[%s, %s]" % ("1x1", obj.constants.__class__.__name__), "physical constants"))
     188        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("smb", "[%s, %s]" % ("1x1", obj.smb.__class__.__name__), "surface mass balance"))
     189        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("basalforcings", "[%s, %s]" % ("1x1", obj.basalforcings.__class__.__name__), "bed forcings"))
     190        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("materials", "[%s, %s]" % ("1x1", obj.materials.__class__.__name__), "material properties"))
     191        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("damage", "[%s, %s]" % ("1x1", obj.damage.__class__.__name__), "damage propagation laws"))
     192        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("friction", "[%s, %s]" % ("1x1", obj.friction.__class__.__name__), "basal friction / drag properties"))
     193        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("flowequation", "[%s, %s]" % ("1x1", obj.flowequation.__class__.__name__), "flow equations"))
     194        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("timestepping", "[%s, %s]" % ("1x1", obj.timestepping.__class__.__name__), "time stepping for transient models"))
     195        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("initialization", "[%s, %s]" % ("1x1", obj.initialization.__class__.__name__), "initial guess / state"))
     196        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("rifts", "[%s, %s]" % ("1x1", obj.rifts.__class__.__name__), "rifts properties"))
     197        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("solidearth", "[%s, %s]" % ("1x1", obj.solidearth.__class__.__name__), "solid earth inputs and settings"))
     198        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("dsl", "[%s, %s]" % ("1x1", obj.dsl.__class__.__name__), "dynamic sea level"))
     199        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("debug", "[%s, %s]" % ("1x1", obj.debug.__class__.__name__), "debugging tools (valgrind, gprof)"))
     200        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("verbose", "[%s, %s]" % ("1x1", obj.verbose.__class__.__name__), "verbosity level in solve"))
     201        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("settings", "[%s, %s]" % ("1x1", obj.settings.__class__.__name__), "settings properties"))
     202        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("toolkits", "[%s, %s]" % ("1x1", obj.toolkits.__class__.__name__), "PETSc options for each solution"))
     203        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("cluster", "[%s, %s]" % ("1x1", obj.cluster.__class__.__name__), "cluster parameters (number of cpus...)"))
     204        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("balancethickness", "[%s, %s]" % ("1x1", obj.balancethickness.__class__.__name__), "parameters for balancethickness solution"))
     205        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("stressbalance", "[%s, %s]" % ("1x1", obj.stressbalance.__class__.__name__), "parameters for stressbalance solution"))
     206        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("groundingline", "[%s, %s]" % ("1x1", obj.groundingline.__class__.__name__), "parameters for groundingline solution"))
     207        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("hydrology", "[%s, %s]" % ("1x1", obj.hydrology.__class__.__name__), "parameters for hydrology solution"))
     208        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("masstransport", "[%s, %s]" % ("1x1", obj.masstransport.__class__.__name__), "parameters for masstransport solution"))
     209        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("thermal", "[%s, %s]" % ("1x1", obj.thermal.__class__.__name__), "parameters for thermal solution"))
     210        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("steadystate", "[%s, %s]" % ("1x1", obj.steadystate.__class__.__name__), "parameters for steadystate solution"))
     211        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("transient", "[%s, %s]" % ("1x1", obj.transient.__class__.__name__), "parameters for transient solution"))
     212        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("levelset", "[%s, %s]" % ("1x1", obj.levelset.__class__.__name__), "parameters for moving boundaries (level - set method)"))
     213        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("calving", "[%s, %s]" % ("1x1", obj.calving.__class__.__name__), "parameters for calving"))
     214        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("frontalforcings", "[%s, %s]" % ("1x1", obj.frontalforcings.__class__.__name__), "parameters for frontalforcings"))
     215        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("gia", "[%s, %s]" % ("1x1", obj.gia.__class__.__name__), "parameters for gia solution"))
     216        string = "%s\n%s" % (string, '%19s: % - 22s --  %s' % ("love", "[%s, %s]" % ("1x1", obj.love.__class__.__name__), "parameters for love solution"))
     217        string = "%s\n%s" % (string, '%19s: % - 22s --  %s' % ("esa", "[%s, %s]" % ("1x1", obj.esa.__class__.__name__), "parameters for elastic adjustment solution"))
     218        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("autodiff", "[%s, %s]" % ("1x1", obj.autodiff.__class__.__name__), "automatic differentiation parameters"))
     219        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("inversion", "[%s, %s]" % ("1x1", obj.inversion.__class__.__name__), "parameters for inverse methods"))
     220        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("qmu", "[%s, %s]" % ("1x1", obj.qmu.__class__.__name__), "dakota properties"))
     221        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("amr", "[%s, %s]" % ("1x1", obj.amr.__class__.__name__), "adaptive mesh refinement properties"))
     222        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("outputdefinition", "[%s, %s]" % ("1x1", obj.outputdefinition.__class__.__name__), "output definition"))
     223        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("results", "[%s, %s]" % ("1x1", obj.results.__class__.__name__), "model results"))
     224        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("radaroverlay", "[%s, %s]" % ("1x1", obj.radaroverlay.__class__.__name__), "radar image for plot overlay"))
     225        string = "%s\n%s" % (string, "%19s: % - 22s --  %s" % ("miscellaneous", "[%s, %s]" % ("1x1", obj.miscellaneous.__class__.__name__), "miscellaneous fields"))
    226226        return string
    227227    # }}}
  • issm/trunk-jpl/src/m/classes/sealevelmodel.m

    r25125 r25136  
    308308                end % }}}
    309309                function addicecap(self,md) % {{{
    310                 if ~strcmpi(class(md),'model')
    311                         error('addicecap method only takes a ''model'' class object as input');
    312                 end
    313                 self.icecaps{end+1}=md;
     310                        if ~strcmpi(class(md),'model')
     311                                error('addicecap method only takes a ''model'' class object as input');
     312                        end
     313                        self.icecaps{end+1}=md;
    314314                end % }}}
    315315                function basinsplot3d(self,varargin) % {{{
    316                 for i=1:length(self.basins),
    317                         self.basins{i}.plot3d(varargin{:});
    318                 end
     316                        for i=1:length(self.basins),
     317                                self.basins{i}.plot3d(varargin{:});
     318                        end
    319319                end % }}}
    320320                function caticecaps(self,varargin) % {{{
  • issm/trunk-jpl/src/m/miscellaneous/fielddisplay.py

    r24255 r25136  
    121121    #take care of characterization
    122122    if m.strcmp(characterization, "''") or m.strcmp(characterization, '""') or m.strcmpi(characterization, 'nan'):
    123         characterization = "N / A"
     123        characterization = "N/A"
    124124
    125125    if len(characterization) > 15:
     
    131131    else:
    132132        if isinstance(comment, str):
    133             string = "%s% - 23s: % - 15s - - %s" % (offset, name, characterization, comment)
     133            string = "%s% - 23s: % - 15s -- %s" % (offset, name, characterization, comment)
    134134        elif isinstance(comment, list):
    135             string = "%s% - 23s: % - 15s - - %s" % (offset, name, characterization, comment[0])
     135            string = "%s% - 23s: % - 15s -- %s" % (offset, name, characterization, comment[0])
    136136            for commenti in comment:
    137137                string += "\n%s% - 23s  % - 15s    %s" % (offset, '', '', commenti)
Note: See TracChangeset for help on using the changeset viewer.