Changeset 25158


Ignore:
Timestamp:
06/25/20 14:50:08 (5 years ago)
Author:
jdquinn
Message:

CHG: Translated Love numbers support from MATLAB to Python

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

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/boundaryconditions/getlovenumbers.m

    r25143 r25158  
    11function series=getlovenumbers(varargin)
    2 %LOVE_NUMBERS: provide love numbers
    3 %       retrieved from: http://www.srosat.com/iag-jsg/loveNb.php
    4 %       in a chosen reference frame
    5 
     2%GETLOVENUMBERS: provide love numbers retrieved from:
     3%http://www.srosat.com/iag-jsg/loveNb.php in a chosen reference frame
     4%
    65%       Usage:
    7 %       series = love_numbers('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',1001)
     6%               series = getlovenumbers('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',1000)
    87%
    9 %       - type = one of 'loadingverticaldisplacement', 'loadinggravitationalpotential', 'loadinghorizontaldisplacement',  ...
    10 %                    'tidalverticaldisplacement', 'tidalgravitationalpotential', 'tidalhorizontaldisplacement'
     8%       - type = one of 'loadingverticaldisplacement',
     9%       'loadinggravitationalpotential', 'loadinghorizontaldisplacement',
     10%       'tidalverticaldisplacement', 'tidalgravitationalpotential',
     11%       'tidalhorizontaldisplacement'
    1112%       - reference_frame = one of 'CM' (default) and 'CF'.
    12 %   - maxdeg = default 1001
     13%   - maxdeg = default 1000
    1314%
    1415%       Example: 
    15 %       h=love_number('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',maxdeg);
    16 %       k=love_number('type','loadinggravitationalpotential','referenceframe','CM','maxdeg',maxdeg);
    17 %       l=love_number('type','loadinghorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg);
    18 %       th=love_number('type','tidalverticaldisplacement','referenceframe','CM','maxdeg',maxdeg);
    19 %       tk=love_number('type','tidalgravitationalpotential','referenceframe','CM','maxdeg',maxdeg);
    20 %       tl=love_number('type','tidalhorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg);
     16%               h=getlovenumbers('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',maxdeg);
     17%               k=getlovenumbers('type','loadinggravitationalpotential','referenceframe','CM','maxdeg',maxdeg);
     18%               l=getlovenumbers('type','loadinghorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg);
     19%               th=getlovenumbers('type','tidalverticaldisplacement','referenceframe','CM','maxdeg',maxdeg);
     20%               tk=getlovenumbers('type','tidalgravitationalpotential','referenceframe','CM','maxdeg',maxdeg);
     21%               tl=getlovenumbers('type','tidalhorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg);
    2122
    2223%recover options:
     
    3637
    3738        love_numbers=[...
    38      0           0          0          0          0          0          0 
    39         -1.28740059     -1.00000000     -0.89858519 1.28740059 0.42519882 0.89858519 0.00000000
     39     0           0          0          0          0          0          0
     40        -1.28740059 -1.00000000 -0.89858519 1.28740059 0.42519882 0.89858519 0.00000000
    4041        -1.00025365 -0.30922675 0.02060926 1.69102690 0.46358648 0.67016399 0.61829668;
    4142        -1.06243501 -0.19927948 0.06801636 1.86315553 0.55741597 0.73270416 0.56270589;
     
    1005510056                series=love_numbers(:,6);
    1005610057        else
    10057                 error(['love_numbers error message: unknow type:' type]);
     10058                error(['love_numbers error message: unknown type:' type]);
    1005810059        end
    1005910060
     
    1007010071                end
    1007110072        else
    10072                 error(['love_numbers error message: unknow reference frame:' frame]);
     10073                error(['love_numbers error message: unknown reference frame:' frame]);
    1007310074        end
    1007410075
  • TabularUnified issm/trunk-jpl/src/m/classes/giaivins.py

    r25157 r25158  
    3939    def setdefaultparameters(self): #{{{
    4040        self.cross_section_shape = 1
    41 
    42         return self
    4341    #}}}
    4442
  • TabularUnified issm/trunk-jpl/src/m/classes/giamme.py

    r25157 r25158  
    3838
    3939    def setdefaultparameters(self): # {{{
    40         return self
     40        return
    4141    #}}}
    4242
  • TabularUnified issm/trunk-jpl/src/m/classes/linearbasalforcings.py

    r25125 r25158  
    6666        self.upperwater_melting_rate = 0.0
    6767        self.upperwater_elevation = -400.0
    68 
    69         return self
    7068    #}}}
    7169    def checkconsistency(self, md, solution, analyses):  # {{{
  • TabularUnified issm/trunk-jpl/src/m/classes/lovenumbers.py

    r25157 r25158  
    33from checkfield import checkfield
    44from fielddisplay import fielddisplay
     5from getlovenumbers import getlovenumbers
     6from pairoptions import pairoptions
    57from WriteData import WriteData
    68
    79
    8 class lovenumbers(object):
     10class lovenumbers(object): #{{{
    911    '''
    1012    LOVENUMBERS numbers class definition
     
    1517    '''
    1618
    17     def __init__(self, *args):  #{{{
     19    def __init__(self, *args): #{{{
    1820        #regular love numbers:
    1921        self.h = []  #provided by PREM model
     
    2527        self.tk = []
    2628        self.tl = []
    27         self.tk2secular = 0  #deg 2 secular number.
     29        self.tk2secular = 0 #deg 2 secular number.
     30
     31        options = pairoptions(*args)
     32        maxdeg = options.getfieldvalue('maxdeg', 1000)
     33        referenceframe = options.getfieldvalue('referenceframe', 'CM')
     34        self.setdefaultparameters(maxdeg, referenceframe)
    2835    #}}}
    2936
  • TabularUnified issm/trunk-jpl/src/m/classes/materials.py

    r25125 r25158  
    11import numpy as np
     2
     3from checkfield import checkfield
    24from fielddisplay import fielddisplay
    35from project3d import project3d
    4 from checkfield import checkfield
    56from WriteData import WriteData
    67
     8
    79class materials(object):
    8     """
     10    '''
    911    MATERIALS class definition
    1012
    1113       Usage:
    1214          materials = materials()
    13     """
    14 
    15     def __init__(self, *args):  # {{{
     15    '''
     16
     17    def __init__(self, *args): #{{{
    1618        self.nature = []
    1719        if not len(args):
     
    5759                setattr(self, 'rho_ice', 0)
    5860                setattr(self, 'rho_water', 0)
     61                setattr(self, 'rho_freshwater', 0)
    5962                setattr(self, 'earth_density', 0)
    6063            else:
     
    6568    #}}}
    6669
    67     def setdefaultparameters(self):  # {{{
    68         for i in range(len(self.nature)):
    69             nat = self.nature[i]
    70             if nat == 'ice':
    71                 #ice density (kg / m^3)
     70    def setdefaultparameters(self): #{{{
     71        for i in range(len(self.nature)):
     72            nat = self.nature[i]
     73            if nat == 'ice':
     74                #ice density (kg/m^3)
    7275                self.rho_ice = 917.
    73                 #ocean water density (kg / m^3)
     76                #ocean water density (kg/m^3)
    7477                self.rho_water = 1023.
    75                 #fresh water density (kg / m^3)
     78                #fresh water density (kg/m^3)
    7679                self.rho_freshwater = 1000.
    77                 #water viscosity (N.s / m^2)
     80                #water viscosity (N.s/m^2)
    7881                self.mu_water = 0.001787
    79                 #ice heat capacity cp (J / kg / K)
     82                #ice heat capacity cp (J/kg/K)
    8083                self.heatcapacity = 2093.
    8184                #ice latent heat of fusion L (J / kg)
    8285                self.latentheat = 3.34e5
    83                 #ice thermal conductivity (W / m / K)
     86                #ice thermal conductivity (W/m/K)
    8487                self.thermalconductivity = 2.4
    85                 #wet ice thermal conductivity (W / m / K)
     88                #wet ice thermal conductivity (W/m/K)
    8689                self.temperateiceconductivity = 0.24
    8790                #the melting point of ice at 1 atmosphere of pressure in K
    8891                self.meltingpoint = 273.15
    89                 #rate of change of melting point with pressure (K / Pa)
     92                #rate of change of melting point with pressure (K/Pa)
    9093                self.beta = 9.8e-8
    91                 #mixed layer (ice-water interface) heat capacity (J / kg / K)
     94                #mixed layer (ice-water interface) heat capacity (J/kg/K)
    9295                self.mixed_layer_capacity = 3974.
    93                 #thermal exchange velocity (ice-water interface) (m / s)
     96                #thermal exchange velocity (ice-water interface) (m/s)
    9497                self.thermal_exchange_velocity = 1.00e-4
    9598                #Rheology law: what is the temperature dependence of B with T
     
    108111                self.burgers_mu = [np.nan, np.nan]
    109112                self.isburgers = [0, 0]
    110                 self.density = [5.51e3, 5.50e3]  # (Pa)  #mantle and lithosphere density [kg / m^3]
     113                self.density = [5.51e3, 5.50e3]  # (Pa)  #mantle and lithosphere density [kg/m^3]
    111114                self.issolid = [1, 1]  # is layer solid or liquid.
    112115            elif nat == 'hydro':
    113                 #ice density (kg / m^3)
     116                #ice density (kg/m^3)
    114117                self.rho_ice = 917.
    115                 #ocean water density (kg / m^3)
     118                #ocean water density (kg/m^3)
    116119                self.rho_water = 1023.
    117                 #average density of the Earth (kg / m^3)
     120                #average density of the Earth (kg/m^3)
    118121                self.earth_density = 5512
     122                #fresh water density (kg/m^3)
     123                self.rho_freshwater = 1000.
    119124            else:
    120125                raise RuntimeError("materials setdefaultparameters error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
    121 
    122         return self
    123     #}}}
    124 
    125     def __repr__(self):  # {{{
     126    #}}}
     127
     128    def __repr__(self): #{{{
    126129        string = "   Materials:"
    127130        for i in range(len(self.nature)):
     
    129132            if nat == 'ice':
    130133                string = "%s\n%s" % (string, 'Ice:')
    131                 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg / m^3]"))
    132                 string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg / m^3]"))
    133                 string = "%s\n%s" % (string, fielddisplay(self, "rho_freshwater", "fresh water density [kg / m^3]"))
    134                 string = "%s\n%s" % (string, fielddisplay(self, "mu_water", "water viscosity [N s / m^2]"))
    135                 string = "%s\n%s" % (string, fielddisplay(self, "heatcapacity", "heat capacity [J / kg / K]"))
    136                 string = "%s\n%s" % (string, fielddisplay(self, "thermalconductivity", "ice thermal conductivity [W / m / K]"))
    137                 string = "%s\n%s" % (string, fielddisplay(self, "temperateiceconductivity", "temperate ice thermal conductivity [W / m / K]"))
     134                string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg/m^3]"))
     135                string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg/m^3]"))
     136                string = "%s\n%s" % (string, fielddisplay(self, "rho_freshwater", "fresh water density [kg/m^3]"))
     137                string = "%s\n%s" % (string, fielddisplay(self, "mu_water", "water viscosity [N s/m^2]"))
     138                string = "%s\n%s" % (string, fielddisplay(self, "heatcapacity", "heat capacity [J/kg/K]"))
     139                string = "%s\n%s" % (string, fielddisplay(self, "thermalconductivity", "ice thermal conductivity [W/m/K]"))
     140                string = "%s\n%s" % (string, fielddisplay(self, "temperateiceconductivity", "temperate ice thermal conductivity [W/m/K]"))
    138141                string = "%s\n%s" % (string, fielddisplay(self, "meltingpoint", "melting point of ice at 1atm in K"))
    139                 string = "%s\n%s" % (string, fielddisplay(self, "latentheat", "latent heat of fusion [J / m^3]"))
    140                 string = "%s\n%s" % (string, fielddisplay(self, "beta", "rate of change of melting point with pressure [K / Pa]"))
    141                 string = "%s\n%s" % (string, fielddisplay(self, "mixed_layer_capacity", "mixed layer capacity [W / kg / K]"))
    142                 string = "%s\n%s" % (string, fielddisplay(self, "thermal_exchange_velocity", "thermal exchange velocity [m / s]"))
    143                 string = "%s\n%s" % (string, fielddisplay(self, "rheology_B", "flow law parameter [Pa s^(1 / n)]"))
     142                string = "%s\n%s" % (string, fielddisplay(self, "latentheat", "latent heat of fusion [J/m^3]"))
     143                string = "%s\n%s" % (string, fielddisplay(self, "beta", "rate of change of melting point with pressure [K/Pa]"))
     144                string = "%s\n%s" % (string, fielddisplay(self, "mixed_layer_capacity", "mixed layer capacity [W/kg/K]"))
     145                string = "%s\n%s" % (string, fielddisplay(self, "thermal_exchange_velocity", "thermal exchange velocity [m/s]"))
     146                string = "%s\n%s" % (string, fielddisplay(self, "rheology_B", "flow law parameter [Pa s^(1/n)]"))
    144147                string = "%s\n%s" % (string, fielddisplay(self, "rheology_n", "Glen's flow law exponent"))
    145148                string = "%s\n%s" % (string, fielddisplay(self, "rheology_law", "law for the temperature dependance of the rheology: 'None', 'BuddJacka', 'Cuffey', 'CuffeyTemperate', 'Paterson', 'Arrhenius', 'LliboutryDuval', 'NyeCO2', or 'NyeH2O'"))
     
    154157                string = "%s\n%s" % (string, fielddisplay(self, 'burgers_mu', 'array describing each layer''s transient shear modulus, only for Burgers rheologies  (numlayers) [Pa]'))
    155158                string = "%s\n%s" % (string, fielddisplay(self, 'isburgers', 'array describing whether we adopt a MaxWell (0) or Burgers (1) rheology (default 0)'))
    156                 string = "%s\n%s" % (string, fielddisplay(self, 'density', 'array describing each layer''s density (numlayers) [kg / m^3]'))
     159                string = "%s\n%s" % (string, fielddisplay(self, 'density', 'array describing each layer''s density (numlayers) [kg/m^3]'))
    157160                string = "%s\n%s" % (string, fielddisplay(self, 'issolid', 'array describing whether the layer is solid or liquid (default 1) (numlayers)'))
    158161            elif nat == 'hydro':
    159162                string = "%s\n%s" % (string, 'Hydro:')
    160                 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg / m^3]"))
    161                 string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg / m^3]"))
    162                 string = "%s\n%s" % (string, fielddisplay(self, "earth_density", "mantle density [kg / m^3]"))
     163                string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg/m^3]"))
     164                string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg/m^3]"))
     165                string = "%s\n%s" % (string, fielddisplay(self, "earth_density", "mantle density [kg/m^3]"))
     166                string = "%s\n%s" % (string, fielddisplay(self, "rho_freshwater", "fresh water density [kg/m^3]"))
     167
    163168            else:
    164169                raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
     
    167172    #}}}
    168173
    169     def checkconsistency(self, md, solution, analyses):  # {{{
     174    def checkconsistency(self, md, solution, analyses): #{{{
    170175        for i in range(len(self.nature)):
    171176            nat = self.nature[i]
     
    207212                md = checkfield(md, 'fieldname', 'materials.rho_water', '>', 0)
    208213                md = checkfield(md, 'fieldname', 'materials.earth_density', '>', 0, 'numel', [1])
     214                md = checkfield(md, 'fieldname', 'materials.rho_freshwater', '>', 0)
    209215            else:
    210216                raise RuntimeError("materials checkconsistency error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
    211217
    212218        return md
    213     # }}}
    214 
    215     def marshall(self, prefix, md, fid):  # {{{
     219    #}}}
     220
     221    def marshall(self, prefix, md, fid): #{{{
    216222        #1: MatdamageiceEnum 2: MatestarEnum 3: MaticeEnum 4: MatenhancediceEnum 5: MaterialsEnum
    217223        WriteData(fid, prefix, 'name', 'md.materials.nature', 'data', naturetointeger(self.nature), 'format', 'IntMat', 'mattype', 3)
     
    252258                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rho_water', 'format', 'Double')
    253259                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'earth_density', 'format', 'Double')
    254             else:
    255                 raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
    256     # }}}
    257 
    258     def extrude(self, md):  # {{{
     260                WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rho_freshwater', 'format', 'Double')
     261            else:
     262                raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
     263    #}}}
     264
     265    def extrude(self, md): #{{{
    259266        for i in range(len(self.nature)):
    260267            nat = self.nature[i]
     
    265272    #}}}
    266273
    267 def naturetointeger(strnat): #{{{
    268     intnat = np.zeros(len(strnat))
    269 
    270     for i in range(len(intnat)):
    271         if strnat[i] == 'damageice':
    272             intnat[i] = 1
    273         elif strnat[i] == 'estar':
    274             intnat[i] = 2
    275         elif strnat[i] == 'ice':
    276             intnat[i] = 3
    277         elif strnat[i] == 'enhancedice':
    278             intnat[i] = 4
    279         # elif strnat[i] == 'materials':
    280         #     intnat[i] = 5 #this case will never happen, kept to ensure equivalent of codes between IoCodeToMeterialsEnum and IoCodeToNatureEnum
    281         elif strnat[i] == 'litho':
    282             intnat[i] = 6
    283         elif strnat[i] == 'hydro':
    284             intnat[i] = 7
    285         else:
    286             raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
    287 
    288     return intnat
    289 # }}}
     274    def naturetointeger(strnat): #{{{
     275        intnat = np.zeros(len(strnat))
     276
     277        for i in range(len(intnat)):
     278            if strnat[i] == 'damageice':
     279                intnat[i] = 1
     280            elif strnat[i] == 'estar':
     281                intnat[i] = 2
     282            elif strnat[i] == 'ice':
     283                intnat[i] = 3
     284            elif strnat[i] == 'enhancedice':
     285                intnat[i] = 4
     286            # elif strnat[i] == 'materials':
     287            #     intnat[i] = 5 #this case will never happen, kept to ensure equivalent of codes between IoCodeToMeterialsEnum and IoCodeToNatureEnum
     288            elif strnat[i] == 'litho':
     289                intnat[i] = 6
     290            elif strnat[i] == 'hydro':
     291                intnat[i] = 7
     292            else:
     293                raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")
     294
     295        return intnat
     296    #}}}
  • TabularUnified issm/trunk-jpl/src/m/classes/mesh3dsurface.py

    r25157 r25158  
    9494        #test/NightlyRun/runme.py.
    9595        self.average_vertex_connectivity = 25
    96 
    97         return self
    9896    # }}}
    9997
  • TabularUnified issm/trunk-jpl/src/m/classes/model.py

    r25136 r25158  
    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__), "solidearth 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' % ("esa", "[%s, %s]" % ("1x1", obj.esa.__class__.__name__), "parameters for elastic adjustment solution"))
     217        string = "%s\n%s" % (string, '%19s: % - 22s - -  %s' % ("love", "[%s, %s]" % ("1x1", obj.love.__class__.__name__), "parameters for love 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    # }}}
     
    665665        md.smb.extrude(md)
    666666        md.initialization.extrude(md)
     667
    667668        md.flowequation.extrude(md)
    668 
    669669        md.stressbalance.extrude(md)
    670670        md.thermal.extrude(md)
    671671        md.masstransport.extrude(md)
    672 
    673         # Calving variables
    674         md.hydrology.extrude(md)
    675672        md.levelset.extrude(md)
    676673        md.calving.extrude(md)
    677674        md.frontalforcings.extrude(md)
     675        md.hydrology.extrude(md)
     676        md.solidearth.extrude(md)
     677        md.dsl.extrude(md)
    678678
    679679        #connectivity
     
    690690        if md.damage.isdamage == 1:
    691691            md.damage.extrude(md)
    692         md.gia.extrude(md)
    693692        md.mask.extrude(md)
    694693        md.qmu.extrude(md)
  • TabularUnified issm/trunk-jpl/src/m/classes/rotational.py

    r25157 r25158  
    4343        #mean rotational velocity of earth
    4444        self.angularvelocity = 7.2921e-5 # [s^-1]
    45 
    46         return self
    4745    #}}}
    4846
  • TabularUnified issm/trunk-jpl/src/m/classes/sealevelmodel.py

    r25125 r25158  
    4343
    4444        # Create a default object
    45         self = self.setdefaultparameters()
     45        self.setdefaultparameters()
    4646
    4747        if len(args):
  • TabularUnified issm/trunk-jpl/src/m/classes/solidearth.py

    r25157 r25158  
    2424        self.settings = solidearthsettings()
    2525        self.surfaceload = surfaceload()
    26         self.lovenumbers = lovenumbers()
     26        self.love = lovenumbers()
    2727        self.rotational = rotational()
    2828        self.planetradius = planetradius('earth')
     
    5353
    5454    def setdefaultparameters(self):  # {{{
    55         return self
     55        return
    5656    #}}}
    5757
  • TabularUnified issm/trunk-jpl/src/m/classes/solidearthsettings.py

    r25157 r25158  
    6161        #horizontal displacemnet? (not by default)
    6262        self.horiz = 0
    63 
    64         return self
    6563    #}}}
    6664
    6765    def checkconsistency(self, md, solution, analyses): # {{{
    68         if ('SealevelriseAnalysis' not in analyses) or (solution == 'TransientSolution' and md.transient.issolidearthsettings == 0):
     66        if ('SealevelriseAnalysis' not in analyses) or (solution == 'TransientSolution' and md.transient.isslr == 0):
    6967            return md
    7068
  • TabularUnified issm/trunk-jpl/src/m/classes/surfaceload.py

    r25157 r25158  
    3737
    3838    def setdefaultparameters(self): # {{{
    39         return self
     39        return
    4040    #}}}
    4141
  • TabularUnified issm/trunk-jpl/src/m/solve/marshall.py

    r25137 r25158  
    33
    44def marshall(md):
    5     """
     5    '''
    66    MARSHALL - outputs a compatible binary file from @model md, for certain solution type.
    77
     
    1111       Usage:
    1212          marshall(md)
    13     """
     13    '''
    1414    if md.verbose.solution:
    1515        print(("marshalling file '%s.bin'." % md.miscellaneous.name))
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2002.py

    r25131 r25158  
    44from gmshplanet import *
    55from gmtmask import *
    6 from love_numbers import *
     6from lovenumbers import *
    77from materials import *
    88from model import *
     
    1414#mesh earth:
    1515md = model()
    16 md.mesh = gmshplanet('radius', 6.371012 * 10**3, 'resolution', 700.) #500 km resolution mesh
     16md.mesh = gmshplanet('radius', 6.371012e3, 'resolution', 700.) #500 km resolution mesh
    1717
    1818#parameterize solidearth solution:
    1919#solidearth loading:
    20 md.solidearth.deltathickness = np.zeros((md.mesh.numberofelements))
    21 md.solidearth.sealevel = np.zeros((md.mesh.numberofvertices))
    22 md.dsl.global_average_thermosteric_sea_level_change=np.zeros((2, ))
    23 md.dsl.sea_surface_height_change_above_geoid=np.zeros((md.mesh.numberofvertices+1, ))
    24 md.dsl.sea_water_pressure_change_at_sea_floor=np.zeros((md.mesh.numberofvertices+1, ))
    25 
     20md.solidearth.surfaceload.icethicknesschange = np.zeros(md.mesh.numberofelements)
     21md.solidearth.sealevel = np.zeros(md.mesh.numberofvertices)
     22md.dsl.global_average_thermosteric_sea_level_change = np.zeros((1, 1))
     23md.dsl.sea_surface_height_change_above_geoid = np.zeros(md.mesh.numberofvertices + 1)
     24md.dsl.sea_water_pressure_change_at_sea_floor = np.zeros(md.mesh.numberofvertices + 1)
    2625
    2726#antarctica
    2827late = np.sum(md.mesh.lat[md.mesh.elements - 1], axis=1) / 3
    2928longe = np.sum(md.mesh.long[md.mesh.elements - 1], axis=1) / 3
    30 pos = np.where(late < -80)
    31 md.solidearth.deltathickness[pos] = -100
     29pos = np.where(late < -80)[0]
     30md.solidearth.surfaceload.icethicknesschange[pos] = -100
     31
    3232#greenland
    33 pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30)))
    34 md.solidearth.deltathickness[pos] = -100
     33pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30)))[0]
     34md.solidearth.surfaceload.icethicknesschange[pos] = -100
    3535
    3636#elastic loading from love numbers:
    37 nlov = 101
    38 md.solidearth.love_h = love_numbers('h')[:nlov]
    39 md.solidearth.love_k = love_numbers('k')[:nlov]
    40 md.solidearth.love_l = love_numbers('l')[:nlov]
     37md.solidearth.lovenumbers = lovenumbers('maxdeg', 100)
     38print(md.solidearth.lovenumbers.h)
    4139
    4240#mask:
     
    5553
    5654#make sure that the elements that have loads are fully grounded:
    57 pos = np.nonzero(md.solidearth.deltathickness)[0]
     55pos = np.nonzero(md.solidearth.surfaceload.icethicknesschange)[0]
    5856md.mask.ocean_levelset[md.mesh.elements[pos, :] - 1] = 1
    5957
    6058#make sure wherever there is an ice load, that the mask is set to ice:
    61 icemask[md.mesh.elements[pos, :] - 1] = -1
    62 md.mask.ice_levelset = icemask
     59#pos = np.nonzero(md.solidearth.surfaceload.icethicknesschange)[0] # Do we need to do this twice?
     60md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = 1
    6361
    64 md.solidearth.ocean_area_scaling = 0
     62md.solidearth.settings.ocean_area_scaling = 0
    6563
    6664#geometry for the bed, arbitrary
    67 md.geometry.thickness = np.ones((md.mesh.numberofvertices))
    68 md.geometry.surface = np.zeros((md.mesh.numberofvertices))
    69 md.geometry.base = md.geometry.surface - md.geometry.thickness
    70 md.geometry.bed = md.geometry.base
     65md.geometry.bed = -np.ones(md.mesh.numberofvertices)
    7166
    7267#materials
    7368md.materials=materials('hydro')
    74 
    75 #New stuff
    76 md.solidearth.spcthickness = np.nan * np.ones((md.mesh.numberofvertices, ))
    77 md.solidearth.Ngia = np.zeros((md.mesh.numberofvertices, ))
    78 md.solidearth.Ugia = np.zeros((md.mesh.numberofvertices, ))
    79 md.solidearth.hydro_rate = np.zeros((md.mesh.numberofvertices, ))
    8069
    8170#Miscellaneous
     
    8372
    8473#Solution parameters
    85 md.solidearth.reltol = np.nan
    86 md.solidearth.abstol = 1e-3
    87 md.solidearth.geodetic = 1
     74md.solidearth.settings.reltol = np.nan
     75md.solidearth.settings.abstol = 1e-3
     76md.solidearth.settings.computesealevelchange = 1
    8877
    8978#max number of iteration reverted back to 10 (i.e., the original default value)
    90 md.solidearth.maxiter = 10
     79md.solidearth.settings.maxiter = 10
    9180
    9281#eustatic run:
    93 md.solidearth.rigid = 0
    94 md.solidearth.elastic = 0
    95 md.solidearth.rotation = 0
     82md.solidearth.settings.rigid = 0
     83md.solidearth.settings.elastic = 0
     84md.solidearth.settings.rotation = 0
    9685md = solve(md, 'Sealevelrise')
    9786Seustatic = md.results.SealevelriseSolution.Sealevel
    9887
    9988#eustatic + rigid run:
    100 md.solidearth.rigid = 1
    101 md.solidearth.elastic = 0
    102 md.solidearth.rotation = 0
     89md.solidearth.settings.rigid = 1
     90md.solidearth.settings.elastic = 0
     91md.solidearth.settings.rotation = 0
    10392md = solve(md, 'Sealevelrise')
    10493Srigid = md.results.SealevelriseSolution.Sealevel
    10594
    10695#eustatic + rigid + elastic run:
    107 md.solidearth.rigid = 1
    108 md.solidearth.elastic = 1
    109 md.solidearth.rotation = 0
     96md.solidearth.settings.rigid = 1
     97md.solidearth.settings.elastic = 1
     98md.solidearth.settings.rotation = 0
    11099md = solve(md, 'Sealevelrise')
    111100Selastic = md.results.SealevelriseSolution.Sealevel
    112101
    113102#eustatic + rigid + elastic + rotation run:
    114 md.solidearth.rigid = 1
    115 md.solidearth.elastic = 1
    116 md.solidearth.rotation = 1
     103md.solidearth.settings.rigid = 1
     104md.solidearth.settings.elastic = 1
     105md.solidearth.settings.rotation = 1
    117106md = solve(md, 'Sealevelrise')
    118107Srotation = md.results.SealevelriseSolution.Sealevel
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2003.py

    r25125 r25158  
    11#Test Name: EarthSolidearth_rotationalFeedback
    22import numpy as np
     3
     4from socket import gethostname
     5
     6from gmshplanet import *
     7from gmtmask import *
     8from lovenumbers import *
    39from model import *
    4 from socket import gethostname
     10from paterson import *
    511from solve import *
    6 from gmshplanet import *
    7 from love_numbers import *
    8 from paterson import *
    9 from gmtmask import *
     12
    1013
    1114#mesh earth:
     
    2124md.dsl.sea_water_pressure_change_at_sea_floor=np.zeros((md.mesh.numberofvertices+1, ))
    2225
    23 
    2426#antarctica
    2527#Access every element in lat using the indices in elements
     
    3133
    3234#elastic loading from love numbers:
    33 nlov = 1000
    34 md.solidearth.love_h = np.array(love_numbers('h'))
    35 md.solidearth.love_h = np.resize(md.solidearth.love_h, nlov + 1)
    36 md.solidearth.love_k = np.array(love_numbers('k'))
    37 md.solidearth.love_k = np.resize(md.solidearth.love_k, nlov + 1)
    38 md.solidearth.love_l = np.array(love_numbers('l'))
    39 md.solidearth.love_l = np.resize(md.solidearth.love_l, nlov + 1)
     35md.solidearth.lovenumbers = lovenumbers('maxdeg', 1000)
    4036#}}}
    4137
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2010.py

    r25125 r25158  
    11#Test Name: MomentOfIntertia
     2from socket import gethostname
     3
    24import numpy as np
     5
     6from gmshplanet import *
     7from gmtmask import *
     8from lovenumbers import *
    39from model import *
    4 from socket import gethostname
     10from paterson import *
    511from solve import *
    6 from gmshplanet import *
    7 from love_numbers import *
    8 from paterson import *
    9 from gmtmask import *
     12
    1013
    1114#mesh earth:
     
    3235
    3336#elastic loading from love numbers:
    34 nlov = 1000
    35 md.solidearth.love_h = np.array(love_numbers('h'))
    36 md.solidearth.love_h = np.resize(md.solidearth.love_h, nlov + 1)
    37 md.solidearth.love_k = np.array(love_numbers('k'))
    38 md.solidearth.love_k = np.resize(md.solidearth.love_k, nlov + 1)
    39 md.solidearth.love_l = np.array(love_numbers('l'))
    40 md.solidearth.love_l = np.resize(md.solidearth.love_l, nlov + 1)
     37md.solidearth.lovenumbers = lovenumbers('maxdeg', 1000)
    4138
    4239#}}}
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2101.py

    r24912 r25158  
    11#Test Name: EarthEsa
    22#Elastostatic adjustment for an elemental ice unloading
     3from socket import gethostname
    34
    45import numpy as np
     6
     7from gmshplanet import *
     8from gmtmask import *
     9from lovenumbers import *
    510from model import *
    6 from socket import gethostname
     11from paterson import *
    712from solve import *
    8 from gmshplanet import *
    9 from love_numbers import *
    10 from paterson import *
    11 from gmtmask import *
     13
    1214
    1315#mesh earth:
     
    2123
    2224#love numbers:
    23 nlov = 10000
    24 md.esa.love_h = np.array(love_numbers('h'))  #Originally had CM arg
    25 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    26 md.esa.love_l = np.array(love_numbers('l'))  #Originally had CM arg
    27 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
     25md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000)
    2826
    2927#mask:  {{{
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2110.py

    r24862 r25158  
    11#Test Name: Esa2Dsurface
    22#Elastostatic adjustment for an elemental ice unloading
     3from socket import gethostname
    34
    45import numpy as np
     6
     7from lovenumbers import *
    58from model import *
    6 from socket import gethostname
     9from paterson import *
     10from roundmesh import *
    711from solve import *
    8 from roundmesh import *
    9 from love_numbers import *
    10 from paterson import *
     12
    1113
    1214#mesh earth:
     
    2426
    2527#love numbers:
    26 nlov = 10000  # horizontal displacements do not work for low degree truncation, e.g., 101
    27 md.esa.love_h = np.array(love_numbers('h'))
    28 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    29 md.esa.love_l = np.array(love_numbers('l'))
    30 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
     28md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000)
    3129
    3230#mask:  {{{
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2111.py

    r24862 r25158  
    11#Test Name: Esa2Dsurface
    22#AIS - -     southern hemisphere example for north - south, east - west components of horiz motion
     3from socket import gethostname
    34
    45import numpy as np
     6
     7from lovenumbers import *
    58from model import *
    6 from socket import gethostname
     9from paterson import *
     10from roundmesh import *
    711from solve import *
    8 from roundmesh import *
    9 from love_numbers import *
    10 from paterson import *
     12
    1113
    1214#mesh ais: {{{
     
    2426# }}}
    2527#love numbers: {{{
    26 nlov = 10000  # horizontal displacements do not work for low degree truncation, e.g., 101
    27 md.esa.love_h = np.array(love_numbers('h', 'CF'))
    28 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    29 md.esa.love_l = np.array(love_numbers('l', 'CF'))
    30 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
     28md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000, 'referenceframe', 'CF')
    3129# }}}
    3230#mask:  {{{
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2112.py

    r24862 r25158  
    11#Test Name: Esa2Dsurface
    22#AIS 2 - -     load centered at the south pole!
     3from socket import gethostname
     4
    35import numpy as np
     6
     7from lovenumbers import *
    48from model import *
    5 from socket import gethostname
     9from paterson import *
     10from roundmesh import *
    611from solve import *
    7 from roundmesh import *
    8 from love_numbers import *
    9 from paterson import *
     12
    1013
    1114#mesh ais: {{{
     
    2326# }}}
    2427#love numbers: {{{
    25 nlov = 10000  # horizontal displacements do not work for low degree truncation, e.g., 101
    26 md.esa.love_h = np.array(love_numbers('h', 'CF'))
    27 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    28 md.esa.love_l = np.array(love_numbers('l', 'CF'))
    29 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
     28md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000, 'referenceframe', 'CF')
    3029# }}}
    3130#mask:  {{{
  • TabularUnified issm/trunk-jpl/test/NightlyRun/test2113.py

    r24862 r25158  
    22#Northern hemisphere example for north - south, east - west components of horiz motion
    33#Same as test2111.m except that AIS is assumed to have located in Northern Hemisphere
     4from socket import gethostname
    45
    56import numpy as np
     7
     8from lovenumbers import *
    69from model import *
    7 from socket import gethostname
     10from paterson import *
     11from roundmesh import *
    812from solve import *
    9 from roundmesh import *
    10 from love_numbers import *
    11 from paterson import *
     13
    1214
    1315#mesh ais: {{{
     
    2527# }}}
    2628#love numbers: {{{
    27 nlov = 10000  # horizontal displacements do not work for low degree truncation, e.g., 101
    28 md.esa.love_h = np.array(love_numbers('h', 'CF'))
    29 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    30 md.esa.love_l = np.array(love_numbers('l', 'CF'))
    31 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
     29md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000, 'referenceframe', 'CF')
    3230# }}}
    3331#mask:  {{{
Note: See TracChangeset for help on using the changeset viewer.