Changeset 26928


Ignore:
Timestamp:
03/11/22 01:19:12 (3 years ago)
Author:
bdef
Message:

CHG: some syntax fix and export gmsh py translation

Location:
issm/trunk-jpl
Files:
1 added
6 edited

Legend:

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

    r26359 r26928  
    5757        s += '{}\n'.format(fielddisplay(self, 'rheology_law', 'law for the temperature dependance of the rheology: \'None\', \'BuddJacka\', \'Cuffey\', \'CuffeyTemperate\', \'Paterson\', \'Arrhenius\' or \'LliboutryDuval\''))
    5858        s += '{}\n'.format(fielddisplay(self, 'earth_density', 'Mantle density [kg m^-3]'))
    59         return string
     59        return s
    6060    #}}}
    6161
     
    9393        # Thermal exchange velocity (ice-water interface) (m/s)
    9494        self.thermal_exchange_velocity = 1.00e-4
    95         # Rheology law: what is the temperature dependence of B with T 
     95        # Rheology law: what is the temperature dependence of B with T
    9696        # available: none, paterson and arrhenius
    9797        self.rheology_law = 'Paterson'
  • issm/trunk-jpl/src/m/classes/materials.py

    r26840 r26928  
    11import numpy as np
    2 
    32from checkfield import checkfield
    43from fielddisplay import fielddisplay
     
    173172                self.rheology_n = 3
    174173            elif nat == 'litho':
    175                 # We default to a configuration that enables running GIA 
     174                # We default to a configuration that enables running GIA
    176175                # solutions using giacaron and/or giaivins
    177176                self.numlayers = 2
    178177
    179                 # Center of the earth (approximation, must not be 0), then the 
     178                # Center of the earth (approximation, must not be 0), then the
    180179                # lab (lithosphere/asthenosphere boundary) then the surface
    181180                # (with 1d3 to avoid numerical singularities)
     
    295294                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'density', 'format', 'DoubleMat', 'mattype', 3)
    296295                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'viscosity', 'format', 'DoubleMat', 'mattype', 3)
    297                 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rheologymodel', 'format', 'DoubleMat', 'mattype', 3) 
     296                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rheologymodel', 'format', 'DoubleMat', 'mattype', 3)
    298297                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'burgers_viscosity', 'format', 'DoubleMat', 'mattype', 3)
    299298                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'burgers_mu', 'format', 'DoubleMat', 'mattype', 3)
  • issm/trunk-jpl/src/m/classes/model.py

    r26573 r26928  
    823823            md.inversion.max_parameters = project2d(md, md.inversion.max_parameters, md.mesh.numberoflayers)
    824824        if md.smb.__class__.__name__ == 'SMBforcing' and not np.isnan(md.smb.mass_balance).all():
    825                 md.smb.mass_balance = project2d(md, md.smb.mass_balance, md.mesh.numberoflayers)
     825            md.smb.mass_balance = project2d(md, md.smb.mass_balance, md.mesh.numberoflayers)
    826826        elif md.smb.__class__.__name__ == 'SMBhenning' and not np.isnan(md.smb.smbref).all():
    827                 md.smb.smbref = project2d(md, md.smb.smbref, md.mesh.numberoflayers)
     827            md.smb.smbref = project2d(md, md.smb.smbref, md.mesh.numberoflayers)
    828828
    829829        # Results
  • issm/trunk-jpl/src/m/classes/solidearth.py

    r26358 r26928  
    11import numpy as np
    2 
    32from checkfield import checkfield
    43from fielddisplay import fielddisplay
     
    65from MatlabFuncs import *
    76from planetradius import planetradius
    8 from project3d import project3d
    97from rotational import rotational
    108from solidearthsettings import solidearthsettings
     
    2523
    2624    def __init__(self, *args):  # {{{
    27         self.settings           = solidearthsettings()
    28         self.external           = None
    29         self.lovenumbers        = lovenumbers()
    30         self.rotational         = rotational()
    31         self.planetradius       = planetradius('earth')
    32         self.requested_outputs  = []
    33         self.transitions        = []
    34         self.partitionice       = []
    35         self.partitionhydro     = []
    36         self.partitionocean     = []
     25        self.settings  = solidearthsettings()
     26        self.external  = None
     27        self.lovenumbers = lovenumbers()
     28        self.rotational = rotational()
     29        self.planetradius = planetradius('earth')
     30        self.requested_outputs = []
     31        self.transitions = []
     32        self.partitionice = []
     33        self.partitionhydro = []
     34        self.partitionocean = []
    3735
    3836        nargs = len(args)
     
    4442            raise Exception('solidearth constructor error message: zero or one argument only!')
    4543    # }}}
     44
    4645    def __repr__(self):  # {{{
    4746        s = '   solidearthinputs, forcings and settings:\n'
     
    5756        print(self.lovenumbers)
    5857        print(self.rotational)
    59         if len(self.external):
     58        try:
    6059            print(self.external)
     60        except TypeError:
     61            pass
    6162        return s
    6263    # }}}
     64
    6365    def setdefaultparameters(self, planet):  # {{{
    6466        # Output default
     
    7981        self.planetradius = planetradius(planet)
    8082    # }}}
     83
    8184    def checkconsistency(self, md, solution, analyses):  # {{{
    8285        if ('SealevelchangeAnalysis' not in analyses) or (solution == 'TransientSolution' and not md.transient.isslc):
     
    9497        return md
    9598    # }}}
     99
    96100    def defaultoutputs(self, md):  # {{{
    97101        return ['Sealevel']
    98102    # }}}
     103
    99104    def marshall(self, prefix, md, fid):  # {{{
    100105        WriteData(fid, prefix, 'object', self, 'fieldname', 'planetradius', 'format', 'Double')
     
    140145        WriteData(fid, prefix, 'data', outputs, 'name', 'md.solidearth.requested_outputs', 'format', 'StringArray')
    141146    # }}}
     147
    142148    def extrude(self, md):  # {{{
    143149        return self
  • issm/trunk-jpl/src/m/plot/applyoptions.py

    r25125 r26928  
    5353    #title font
    5454        titlefont = font.copy()
    55         titlefont['size'] = titlefontsize
    56         titlefont['weight'] = titlefontweight
     55        titlefont['fontsize'] = titlefontsize
     56        titlefont['fontweight'] = titlefontweight
    5757        ax.set_title(title, **titlefont)
    5858    # }}}
  • issm/trunk-jpl/test/NightlyRun/runme.m

    r26857 r26928  
    218218                        end
    219219
    220                 %CHECK for memory leaks?
     220                %PRODUCE nc files?
    221221                elseif strcmpi(procedure,'ncExport'),
    222222                        export_netCDF(md, ['test' num2str(id) 'ma.nc'])
Note: See TracChangeset for help on using the changeset viewer.