Changeset 22122


Ignore:
Timestamp:
09/26/17 11:59:15 (8 years ago)
Author:
kruegern
Message:

BUG: fixed several bugs: incorrect output streams, high error rates, and mistranslated lines. Added omega to constants.py from constants.m. Added esa to model.py.

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

Legend:

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

    r21049 r22122  
    1515                self.thickening_rate   = float('NaN')
    1616                self.stabilization     = 0
     17               
     18                self.omega             = float('NaN')
    1719
    1820                #set defaults
     
    4446                md = checkfield(md,'fieldname','balancethickness.thickening_rate','size',[md.mesh.numberofvertices],'NaN',1,'Inf',1)
    4547                md = checkfield(md,'fieldname','balancethickness.stabilization','size',[1],'values',[0,1,2,3])
    46 
     48                #md = checkfield(md,'fieldname','balancethickness.omega','size', [md.mesh.numberofvertices],'NaN',1,'Inf',1,'>=',0);
    4749                return md
    4850        # }}}
     
    5456                WriteData(fid,prefix,'object',self,'fieldname','thickening_rate','format','DoubleMat','mattype',1,'scale',1./yts)
    5557                WriteData(fid,prefix,'object',self,'fieldname','stabilization','format','Integer')
     58                WriteData(fid,prefix,'object',self,'fieldname','omega','format','DoubleMat','mattype',1);
    5659        # }}}
  • issm/trunk-jpl/src/m/classes/constants.py

    r21049 r22122  
    1313        def __init__(self): # {{{
    1414                self.g                    = 0
     15                self.omega                = 0
    1516                self.yts                  = 0
    1617                self.referencetemperature = 0
     
    2425
    2526                string="%s\n%s"%(string,fielddisplay(self,"g","gravitational acceleration [m/s^2]"))
     27                string="%s\n%s"%(string,fielddisplay(self,"omega","angular velocity of Earth [rad/s]"))
    2628                string="%s\n%s"%(string,fielddisplay(self,"yts","number of seconds in a year [s/yr]"))
    2729                string="%s\n%s"%(string,fielddisplay(self,"referencetemperature","reference temperature used in the enthalpy model [K]"))
     
    3335                #acceleration due to gravity (m/s^2)
    3436                self.g=9.81
     37
     38                #Earth's rotation speed
     39                self.omega = 7.292*1e-5;
    3540
    3641                #converstion from year to seconds
     
    4550
    4651                md = checkfield(md,'fieldname','constants.g','>',0,'size',[1])
     52                md = checkfield(md,'fieldname','constants.omega','>=',0,'size',[1])
    4753                md = checkfield(md,'fieldname','constants.yts','>',0,'size',[1])
    4854                md = checkfield(md,'fieldname','constants.referencetemperature','size',[1])
  • issm/trunk-jpl/src/m/classes/esa.py

    r21650 r22122  
    1515       
    1616        def __init__(self): # {{{
    17                 self.deltathickness    = np.nan
     17                self.deltathickness    = float('NaN')
    1818                self.love_h            = 0 #provided by PREM model()
    1919                self.love_l            = 0 #ideam
  • issm/trunk-jpl/src/m/classes/fourierlove.py

    r22004 r22122  
    6868            self.g0=10 # m/s^2
    6969            self.r0=6378*1e3 #m
    70             self.mu0=10^11 # Pa
     70            self.mu0=1e11 # Pa
    7171            self.allow_layer_deletion=1
    7272            self.forcing_type = 11
  • issm/trunk-jpl/src/m/classes/model.py

    r22057 r22122  
    4848from transient import transient
    4949from giaivins import giaivins
     50from esa import esa
    5051from autodiff import autodiff
    5152from inversion import inversion
     
    111112                self.love             = fourierlove()
    112113                self.gia              = giaivins()
     114                self.esa              = esa()
    113115
    114116                self.autodiff         = autodiff()
     
    155157                        'calving',
    156158                                                'gia',
     159                                                'esa',
    157160                                                'love',
    158161                        'autodiff',
     
    197200                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("levelset","[%s,%s]" % ("1x1",obj.levelset.__class__.__name__),"parameters for moving boundaries (level-set method)"))
    198201                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("calving","[%s,%s]" % ("1x1",obj.calving.__class__.__name__),"parameters for calving"))
     202                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("gia","[%s,%s]" % ("1x1",obj.gia.__class__.__name__),"parameters for gia solution"))
    199203                string="%s\n%s" % (string,'%19s: %-22s -- %s' % ("love","[%s,%s]" % ("1x1",obj.love.__class__.__name__),"parameters for love solution"))
     204                string="%s\n%s" % (string,'%19s: %-22s -- %s' % ("esa","[%s,%s]" % ("1x1",obj.esa.__class__.__name__),"parameters for elastic adjustment solution"))
    200205                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("autodiff","[%s,%s]" % ("1x1",obj.autodiff.__class__.__name__),"automatic differentiation parameters"))
    201206                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
  • issm/trunk-jpl/src/m/classes/slr.py

    r22107 r22122  
    4444                        string='   slr parameters:'
    4545                        string="%s\n%s"%(string,fielddisplay(self,'deltathickness','thickness change (main loading of the slr solution core [m]'))
     46                        string="%s\n%s"%(string,fielddisplay(self,'sealevel','current sea level (prior to computation) [m]'))
    4647                        string="%s\n%s"%(string,fielddisplay(self,'reltol','sea level rise relative convergence criterion, (NaN: not applied)'))
    4748                        string="%s\n%s"%(string,fielddisplay(self,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied'))
     
    6061                        string="%s\n%s"%(string,fielddisplay(self,'rotation','earth rotational potential perturbation'))
    6162                        string="%s\n%s"%(string,fielddisplay(self,'ocean_area_scaling','correction for model representation of ocean area [default: No correction]'))
     63                        string="%s\n%s"%(string,fielddisplay(self,'steric_rate','rate of steric ocean expansion (in mm/yr)'))
    6264                        string="%s\n%s"%(string,fielddisplay(self,'degacc','accuracy (default .01 deg) for numerical discretization of the Green''s functions'))
    6365                        string="%s\n%s"%(string,fielddisplay(self,'transitions','indices into parts of the mesh that will be icecaps'))
Note: See TracChangeset for help on using the changeset viewer.