Changeset 13139


Ignore:
Timestamp:
08/22/12 16:02:51 (13 years ago)
Author:
Mathieu Morlighem
Message:

CHG: sync python with matlab code

Location:
issm/trunk-jpl/src/m/classes
Files:
1 edited
1 moved

Legend:

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

    r13128 r13139  
    66from WriteData import *
    77
    8 class materials(object):
     8class matice(object):
    99        """
    1010        MATERIALS class definition
    1111
    1212           Usage:
    13               materials=materials();
     13              matice=matice();
    1414        """
    1515
     
    9797
    9898        def checkconsistency(self,md,solution,analyses):    # {{{
    99                 md = checkfield(md,'materials.rho_ice','>',0)
    100                 md = checkfield(md,'materials.rho_water','>',0)
    101                 md = checkfield(md,'materials.rho_freshwater','>',0)
    102                 md = checkfield(md,'materials.mu_water','>',0)
    103                 md = checkfield(md,'materials.rheology_B','>',0,'size',[md.mesh.numberofvertices])
    104                 md = checkfield(md,'materials.rheology_n','>',0,'size',[md.mesh.numberofelements])
    105                 md = checkfield(md,'materials.rheology_law','values',['None','Paterson','Arrhenius'])
     99                md = checkfield(md,'matice.rho_ice','>',0)
     100                md = checkfield(md,'matice.rho_water','>',0)
     101                md = checkfield(md,'matice.rho_freshwater','>',0)
     102                md = checkfield(md,'matice.mu_water','>',0)
     103                md = checkfield(md,'matice.rheology_B','>',0,'size',[md.mesh.numberofvertices])
     104                md = checkfield(md,'matice.rheology_n','>',0,'size',[md.mesh.numberofelements])
     105                md = checkfield(md,'matice.rheology_law','values',['None','Paterson','Arrhenius'])
    106106                return md
    107107        # }}}
    108108
    109109        def marshall(self,fid):    # {{{
    110                 WriteData(fid,'object',self,'fieldname','rho_ice','format','Double')
    111                 WriteData(fid,'object',self,'fieldname','rho_water','format','Double')
    112                 WriteData(fid,'object',self,'fieldname','rho_freshwater','format','Double')
    113                 WriteData(fid,'object',self,'fieldname','mu_water','format','Double')
    114                 WriteData(fid,'object',self,'fieldname','heatcapacity','format','Double')
    115                 WriteData(fid,'object',self,'fieldname','latentheat','format','Double')
    116                 WriteData(fid,'object',self,'fieldname','thermalconductivity','format','Double')
    117                 WriteData(fid,'object',self,'fieldname','meltingpoint','format','Double')
    118                 WriteData(fid,'object',self,'fieldname','beta','format','Double')
    119                 WriteData(fid,'object',self,'fieldname','mixed_layer_capacity','format','Double')
    120                 WriteData(fid,'object',self,'fieldname','thermal_exchange_velocity','format','Double')
    121                 WriteData(fid,'object',self,'fieldname','rheology_B','format','DoubleMat','mattype',1)
    122                 WriteData(fid,'object',self,'fieldname','rheology_n','format','DoubleMat','mattype',2)
     110                WriteData(fid,'enum',MaterialsEnum(),'data',MaticeEnum(),'format','Integer');
     111                WriteData(fid,'object',self,'class','materials','fieldname','rho_ice','format','Double')
     112                WriteData(fid,'object',self,'class','materials','fieldname','rho_water','format','Double')
     113                WriteData(fid,'object',self,'class','materials','fieldname','rho_freshwater','format','Double')
     114                WriteData(fid,'object',self,'class','materials','fieldname','mu_water','format','Double')
     115                WriteData(fid,'object',self,'class','materials','fieldname','heatcapacity','format','Double')
     116                WriteData(fid,'object',self,'class','materials','fieldname','latentheat','format','Double')
     117                WriteData(fid,'object',self,'class','materials','fieldname','thermalconductivity','format','Double')
     118                WriteData(fid,'object',self,'class','materials','fieldname','meltingpoint','format','Double')
     119                WriteData(fid,'object',self,'class','materials','fieldname','beta','format','Double')
     120                WriteData(fid,'object',self,'class','materials','fieldname','mixed_layer_capacity','format','Double')
     121                WriteData(fid,'object',self,'class','materials','fieldname','thermal_exchange_velocity','format','Double')
     122                WriteData(fid,'object',self,'class','materials','fieldname','rheology_B','format','DoubleMat','mattype',1)
     123                WriteData(fid,'object',self,'class','materials','fieldname','rheology_n','format','DoubleMat','mattype',2)
    123124                WriteData(fid,'data',StringToEnum(self.rheology_law)[0],'enum',MaterialsRheologyLawEnum(),'format','Integer')
    124125        # }}}
  • issm/trunk-jpl/src/m/classes/model/model.py

    r13116 r13139  
    66from surfaceforcings import surfaceforcings
    77from basalforcings import basalforcings
    8 from materials import materials
     8from matice import matice
    99from friction import friction
    1010from flowequation import flowequation
     
    4949                self.surfaceforcings  = surfaceforcings()
    5050                self.basalforcings    = basalforcings()
    51                 self.materials        = materials()
     51                self.materials        = matice()
    5252                self.friction         = friction()
    5353                self.flowequation     = flowequation()
Note: See TracChangeset for help on using the changeset viewer.