Changeset 24261


Ignore:
Timestamp:
10/21/19 02:53:16 (5 years ago)
Author:
bdef
Message:

BUG: still some space fix

Location:
issm/trunk-jpl
Files:
125 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/scripts/translateToPy.py

    r24212 r24261  
    220220
    221221            for il in importList:
    222                 if line.find(il) != - 1:
     222                if line.find(il) != -1:
    223223                    output("from %s import * " % (il))
    224224                    importList.remove(il)    # already got it
  • issm/trunk-jpl/src/m/archive/arch.py

    r24256 r24261  
    178178    """
    179179    Procedure to read a field and return a results list with the following attributes:
    180     result['field_name']     - > the name of the variable that was just read
    181     result['size']             - > size (dimensions) of the variable just read
    182     result['data_type']     - > the type of data that was just read
    183     result['data']             - > the actual data
     180    result['field_name']     -> the name of the variable that was just read
     181    result['size']             -> size (dimensions) of the variable just read
     182    result['data_type']     -> the type of data that was just read
     183    result['data']             -> the actual data
    184184    """
    185185
     
    207207            for i in range(rows):
    208208                raw_data[i, :] = struct.unpack('>{}d'.format(cols), fid.read(cols * struct.calcsize('>d')))
    209                 # The matrix will be struct.upacked in order and will be filled left - > right by column
     209                # The matrix will be struct.upacked in order and will be filled left -> right by column
    210210                # We need to reshape and transpose the matrix so it can be read correctly
    211211            data = raw_data.reshape(raw_data.shape[::-1]).T
  • issm/trunk-jpl/src/m/array/MatlabArray.py

    r24213 r24261  
    177177    (a[4] == 5; counted as [1, 4, 2, 5, 3, 6] linearly in matlab)
    178178
    179     x = string_dim(a, 4) - > '[1, 1]'
     179    x = string_dim(a, 4) -> '[1, 1]'
    180180
    181181    a[x] == a[4] == a[1, 1] == 5
    182182
    183     example use: exec('print a' + string_dim(a, 4)) - > print a[1, 1]
     183    example use: exec('print a' + string_dim(a, 4)) -> print a[1, 1]
    184184    '''
    185185
  • issm/trunk-jpl/src/m/classes/SMBpddSicopolis.py

    r24240 r24261  
    8383    def setdefaultparameters(self):  # {{{
    8484        self.isfirnwarming = 1
    85         self.desfac = - np.log(2.0) / 1000
     85        self.desfac = -np.log(2.0) / 1000
    8686        self.rlaps = 7.4
    8787
  • issm/trunk-jpl/src/m/classes/dependent.py

    r24256 r24261  
    2121        self.exp = ''
    2222        self.segments = []
    23         self.index = - 1
     23        self.index = -1
    2424        self.nods = 0
    2525
  • issm/trunk-jpl/src/m/classes/fourierlove.py

    r24213 r24261  
    3434        string = "%s\n%s" % (string, fielddisplay(self, 'sh_nmin', 'minimum spherical harmonic degree (default 1)'))
    3535        string = "%s\n%s" % (string, fielddisplay(self, 'g0', 'adimensioning constant for gravity (default 10) [m / s^2]'))
    36         string = "%s\n%s" % (string, fielddisplay(self, 'r0', 'adimensioning constant for radius (default 6378 * 10^3) [m]'))
    37         string = "%s\n%s" % (string, fielddisplay(self, 'mu0', 'adimensioning constant for stress (default 10^11) [Pa]'))
     36        string = "%s\n%s" % (string, fielddisplay(self, 'r0', 'adimensioning constant for radius (default 6378 * 1.0e3) [m]'))
     37        string = "%s\n%s" % (string, fielddisplay(self, 'mu0', 'adimensioning constant for stress (default 1.0e11) [Pa]'))
    3838        string = "%s\n%s" % (string, fielddisplay(self, 'allow_layer_deletion', 'allow for migration of the integration boundary with increasing spherical harmonics degree (default 1)'))
    3939        string = "%s\n%s" % (string, fielddisplay(self, 'love_kernels', 'compute love numbers at depth? (default 0)'))
  • issm/trunk-jpl/src/m/classes/geometry.py

    r24213 r24261  
    5858            md = checkfield(md, 'fieldname', 'geometry.base', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
    5959            md = checkfield(md, 'fieldname', 'geometry.thickness', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices], '>', 0, 'timeseries', 1)
    60             if any(abs(self.thickness - self.surface + self.base) > 10**- 9):
     60            if any(abs(self.thickness - self.surface + self.base) > 10**-9):
    6161                md.checkmessage("equality thickness = surface-base violated")
    6262            if solution == 'TransientSolution' and md.transient.isgroundingline:
    6363                md = checkfield(md, 'fieldname', 'geometry.bed', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
    64                 if np.any(self.bed - self.base > 10**- 12):
     64                if np.any(self.bed - self.base > 10**-12):
    6565                    md.checkmessage('base < bed on one or more vertex')
    6666                pos = np.where(md.mask.groundedice_levelset > 0)
    67                 if np.any(np.abs(self.bed[pos] - self.base[pos]) > 10**- 9):
     67                if np.any(np.abs(self.bed[pos] - self.base[pos]) > 10**-9):
    6868                    md.checkmessage('equality base = bed on grounded ice violated')
    6969                md = checkfield(md, 'fieldname', 'geometry.bed', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
  • issm/trunk-jpl/src/m/classes/groundingline.py

    r24213 r24261  
    5353                md.checkmessage("requesting grounding line migration, but bathymetry is absent!")
    5454            pos = np.nonzero(md.mask.groundedice_levelset > 0.)[0]
    55             if any(np.abs(md.geometry.base[pos] - md.geometry.bed[pos]) > 10**- 10):
     55            if any(np.abs(md.geometry.base[pos] - md.geometry.bed[pos]) > 10**-10):
    5656                md.checkmessage("base not equal to bed on grounded ice!")
    57             if any(md.geometry.bed - md.geometry.base > 10**- 9):
     57            if any(md.geometry.bed - md.geometry.base > 10**-9):
    5858                md.checkmessage("bed superior to base on floating ice!")
    5959
  • issm/trunk-jpl/src/m/classes/inversion.py

    r24213 r24261  
    103103        #new_par = old_par + gradient_scaling(n) * C * gradient with C in [0 1]
    104104        #usually the gradient_scaling must be of the order of magnitude of the
    105         #inversed parameter (10^8 for B, 50 for drag) and can be decreased
     105        #inversed parameter (1.0e8 for B, 50 for drag) and can be decreased
    106106        #after the first iterations
    107107        self.gradient_scaling = 50 * np.ones((self.nsteps, 1))
  • issm/trunk-jpl/src/m/classes/linearbasalforcings.py

    r24240 r24261  
    6262    def setdefaultparameters(self):  # {{{
    6363        self.deepwater_melting_rate = 50.0
    64         self.deepwater_elevation = - 800.0
     64        self.deepwater_elevation = -800.0
    6565        self.upperwater_melting_rate = 0.0
    66         self.upperwater_elevation = - 400.0
     66        self.upperwater_elevation = -400.0
    6767
    6868        return self
  • issm/trunk-jpl/src/m/classes/masstransport.py

    r24213 r24261  
    5252        #Type of stabilization to use 0:nothing 1:artificial_diffusivity 3:Discontinuous Galerkin
    5353        self.stabilization = 1
    54         #Factor applied to compute the penalties kappa = max(stiffness matrix) * 10^penalty_factor
     54        #Factor applied to compute the penalties kappa = max(stiffness matrix) * 1.0**penalty_factor
    5555        self.penalty_factor = 3
    5656        #Minimum ice thickness that can be used
  • issm/trunk-jpl/src/m/classes/matenhancedice.py

    r24213 r24261  
    9999        self.meltingpoint = 273.15
    100100        #rate of change of melting point with pressure (K / Pa)
    101         self.beta = 9.8 * 10**- 8
     101        self.beta = 9.8 * 10**-8
    102102        #mixed layer (ice-water interface) heat capacity (J / kg / K)
    103103        self.mixed_layer_capacity = 3974.
    104104        #thermal exchange velocity (ice-water interface) (m / s)
    105         self.thermal_exchange_velocity = 1.00 * 10**- 4
     105        self.thermal_exchange_velocity = 1.00 * 10**-4
    106106        #Rheology law: what is the temperature dependence of B with T
    107107        #available: none, paterson and arrhenius
  • issm/trunk-jpl/src/m/classes/mismipbasalforcings.py

    r24213 r24261  
    5454        self.meltrate_factor = 0.2
    5555        self.threshold_thickness = 75.
    56         self.upperdepth_melt = - 100.
     56        self.upperdepth_melt = -100.
    5757        return self
    5858    #}}}
  • issm/trunk-jpl/src/m/classes/model.py

    r24256 r24261  
    376376            if np.ndim(md2.mesh.edges) > 1 and np.size(md2.mesh.edges, axis=1) > 1:  #do not use ~isnan because there are some np.nans...
    377377                #renumber first two columns
    378                 pos = np.nonzero(md2.mesh.edges[:, 3] != - 1)[0]
     378                pos = np.nonzero(md2.mesh.edges[:, 3] != -1)[0]
    379379                md2.mesh.edges[:, 0] = Pnode[md2.mesh.edges[:, 0] - 1]
    380380                md2.mesh.edges[:, 1] = Pnode[md2.mesh.edges[:, 1] - 1]
     
    385385                #Replace all zeros by - 1 in the last two columns
    386386                pos = np.nonzero(md2.mesh.edges[:, 2] == 0)[0]
    387                 md2.mesh.edges[pos, 2] = - 1
     387                md2.mesh.edges[pos, 2] = -1
    388388                pos = np.nonzero(md2.mesh.edges[:, 3] == 0)[0]
    389                 md2.mesh.edges[pos, 3] = - 1
     389                md2.mesh.edges[pos, 3] = -1
    390390                #Invert - 1 on the third column with last column (Also invert first two columns!!)
    391                 pos = np.nonzero(md2.mesh.edges[:, 2] == - 1)[0]
     391                pos = np.nonzero(md2.mesh.edges[:, 2] == -1)[0]
    392392                md2.mesh.edges[pos, 2] = md2.mesh.edges[pos, 3]
    393                 md2.mesh.edges[pos, 3] = - 1
     393                md2.mesh.edges[pos, 3] = -1
    394394                values = md2.mesh.edges[pos, 1]
    395395                md2.mesh.edges[pos, 1] = md2.mesh.edges[pos, 0]
    396396                md2.mesh.edges[pos, 0] = values
    397397                #Finally remove edges that do not belong to any element
    398                 pos = np.nonzero(np.logical_and(md2.mesh.edges[:, 1] == - 1, md2.mesh.edges[:, 2] == - 1))[0]
     398                pos = np.nonzero(np.logical_and(md2.mesh.edges[:, 1] == -1, md2.mesh.edges[:, 2] == -1))[0]
    399399                md2.mesh.edges = np.delete(md2.mesh.edges, pos, axis=0)
    400400
  • issm/trunk-jpl/src/m/classes/organizer.py

    r24213 r24261  
    123123                raise IOError("Could find neither '%s' nor '%s'" % (path1, path2))
    124124            else:
    125                 print((" - - > Branching '%s' from trunk '%s'" % (self.prefix, self.trunkprefix)))
     125                print(("--> Branching '%s' from trunk '%s'" % (self.prefix, self.trunkprefix)))
    126126                md = loadmodel(path2)
    127127                return md
  • issm/trunk-jpl/src/m/classes/plumebasalforcings.py

    r24213 r24261  
    8080        self.crustthickness = 30000
    8181        self.uppercrustthickness = 14000
    82         self.uppercrustheat = 1.7 * 10**- 6
    83         self.lowercrustheat = 0.4 * 10**- 6
     82        self.uppercrustheat = 1.7 * 10**-6
     83        self.lowercrustheat = 0.4 * 10**-6
    8484        return self
    8585    #}}}
  • issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dakota_method.py

    r24213 r24261  
    402402                    dm.params.show_misc_options = False
    403403                    dm.params.misc_options = []
    404                     dm.params.solution_accuracy = - np.inf
     404                    dm.params.solution_accuracy = -np.inf
    405405                    dm.params.stochastic = False
    406406                    dm.params.seed = False
  • issm/trunk-jpl/src/m/classes/qmu/continuous_design.py

    r24256 r24261  
    2828        self.descriptor = ''
    2929        self.initpt = 0.
    30         self.lower = - np.inf
     30        self.lower = -np.inf
    3131        self.upper = np.inf
    3232        self.scale_type = 'none'
  • issm/trunk-jpl/src/m/classes/qmu/continuous_state.py

    r24256 r24261  
    2626        self.descriptor = ''
    2727        self.initst = 0.
    28         self.lower = - np.inf
     28        self.lower = -np.inf
    2929        self.upper = np.inf
    3030
  • issm/trunk-jpl/src/m/classes/qmu/linear_inequality_constraint.py

    r24256 r24261  
    2525    def __init__(self):
    2626        self.matrix = np.array([[float('NaN')]])
    27         self.lower = - np.Inf
     27        self.lower = -np.Inf
    2828        self.upper = 0.
    2929        self.scale_type = 'none'
  • issm/trunk-jpl/src/m/classes/qmu/nonlinear_inequality_constraint.py

    r24256 r24261  
    2525    def __init__(self):
    2626        self.descriptor = ''
    27         self.lower = - np.inf
     27        self.lower = -np.inf
    2828        self.upper = 0.
    2929        self.scale_type = 'none'
  • issm/trunk-jpl/src/m/classes/qmu/normal_uncertain.py

    r24256 r24261  
    2626        self.mean = float('NaN')
    2727        self.stddev = float('NaN')
    28         self.lower = - np.Inf
     28        self.lower = -np.Inf
    2929        self.upper = np.Inf
    3030
  • issm/trunk-jpl/src/m/classes/qmu/uniform_uncertain.py

    r24256 r24261  
    2323    def __init__(self):
    2424        self.descriptor = ''
    25         self.lower = - np.Inf
     25        self.lower = -np.Inf
    2626        self.upper = np.Inf
    2727
  • issm/trunk-jpl/src/m/classes/stressbalance.py

    r24213 r24261  
    6161
    6262        string = "%s\n%s" % (string, '\n      Penalty options:')
    63         string = "%s\n%s" % (string, fielddisplay(self, 'penalty_factor', 'offset used by penalties: penalty = Kmax * 10^offset'))
     63        string = "%s\n%s" % (string, fielddisplay(self, 'penalty_factor', 'offset used by penalties: penalty = Kmax * 1.0**offset'))
    6464        string = "%s\n%s" % (string, fielddisplay(self, 'vertex_pairing', 'pairs of vertices that are penalized'))
    6565
     
    8888        self.maxiter = 100
    8989        #Convergence criterion: absolute, relative and residual
    90         self.restol = 10**- 4
     90        self.restol = 10**-4
    9191        self.reltol = 0.01
    9292        self.abstol = 10
    9393        self.FSreconditioning = 10**13
    9494        self.shelf_dampening = 0
    95         #Penalty factor applied kappa = max(stiffness matrix) * 10^penalty_factor
     95        #Penalty factor applied kappa = max(stiffness matrix) * 1.0**penalty_factor
    9696        self.penalty_factor = 3
    9797        #Stop the iterations of rift if below a threshold
  • issm/trunk-jpl/src/m/classes/thermal.py

    r24256 r24261  
    7676        #Maximum number of iterations
    7777        self.maxiter = 100
    78         #factor used to compute the values of the penalties: kappa = max(stiffness matrix) * 10^penalty_factor
     78        #factor used to compute the values of the penalties: kappa = max(stiffness matrix) * 1.0**penalty_factor
    7979        self.penalty_factor = 3
    8080        #Should we use cold ice (default) or enthalpy formulation
  • issm/trunk-jpl/src/m/consistency/checkfield.py

    r24255 r24261  
    1919 - NaN: 1 if check that there is no NaN
    2020 - size: [lines cols], NaN for non checked dimensions, or 'universal' for any input type (nodal, element, time series, etc)
    21  - > :  greater than provided value
    22  - >= : greater or equal to provided value
     21 -> :  greater than provided value
     22 ->= : greater or equal to provided value
    2323 - < :  smallerthan provided value
    2424 - <=: smaller or equal to provided value
  • issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py

    r24256 r24261  
    293293    #paraview does not like NaN, replacing
    294294    if np.isnan(Val):
    295         CleanVal = - 9999.999
     295        CleanVal = -9999.999
    296296    #also checking for very small value that mess up
    297297    elif (abs(Val) < 1.0e-20):
  • issm/trunk-jpl/src/m/contrib/morlighem/bamg/YamsCall.py

    r24213 r24261  
    2323
    2424       Example:
    25           md = YamsCall(md, md.inversion.vel_obs, 1500, 10^8, 1.3, 0.9)
     25          md = YamsCall(md, md.inversion.vel_obs, 1500, 1.0e8, 1.3, 0.9)
    2626    """
    2727
  • issm/trunk-jpl/src/m/inversions/parametercontroldrag.py

    r24260 r24261  
    1818      md = parametercontroldrag(md, 'nsteps', 20, 'cm_responses', 0)
    1919      md = parametercontroldrag(md, 'cm_min', 1, 'cm_max', 150, 'cm_jump', 0.99, 'maxiter', 20)
    20       md = parametercontroldrag(md, eps_cm', 10^-4, 'optscal', [10^7 10^8])
     20      md = parametercontroldrag(md, eps_cm', 1.0e-4, 'optscal', [1.0e7 1.0e8])
    2121
    2222    See also PARAMETERCONTROLB
  • issm/trunk-jpl/src/m/materials/paterson.py

    r24260 r24261  
    2929    # %From paterson,
    3030    # Temp = [0; -2; -5; -10; -15; -20; -25; -30; -35; -40; -45; -50]
    31     # A = [6.8 * 10^-15;2.4 * 10^-15;1.6 * 10^-15;4.9 * 10^-16;2.9 * 10^-16;1.7 * 10^-16;9.4 *
    32     # 10^-17;5.1 * 10^-17;2.7 * 10^-17;1.4 * 10^-17;7.3 * 10^-18;3.6 * 10^-18];;%s - 1(kPa - 3)
     31    # A = [6.8 * 1.0e-15;2.4 * 1.0e-15;1.6 * 1.0e-15;4.9 * 1.0e-16;2.9 * 1.0e-16;1.7 * 1.0e-16;9.4 *
     32    # 1.0e-17;5.1 * 1.0e-17;2.7 * 1.0e-17;1.4 * 1.0e-17;7.3 * 1.0e-18;3.6 * 1.0e-18];;%s - 1(kPa - 3)
    3333    # %Convert into rigidity B
    34     # B = A.^(-1 / n) * 10^3; %s^(1 / 3)Pa
     34    # B = A.^(-1 / n) * 1.0e3; %s^(1 / 3)Pa
    3535    # %Now, do a cubic fit between Temp and B:
    3636    # fittedmodel = fit(Temp, B, 'cubicspline')
  • issm/trunk-jpl/src/m/mesh/ComputeMetric.py

    r24260 r24261  
    1111
    1212       Example:
    13           metric = ComputeMetric(hessian, 2 / 9, 10^-1, 100, 10^5, [])
     13          metric = ComputeMetric(hessian, 2 / 9, 1.0e-1, 100, 1.0e5, [])
    1414    """
    1515
  • issm/trunk-jpl/src/m/mesh/bamg.py

    r24260 r24261  
    2626                        subdomains (that need to be inside domain)
    2727
    28     - hmin :              minimum edge length (default is 10^ - 100)
    29     - hmax :              maximum edge length (default is 10^100)
     28    - hmin :              minimum edge length (default is 1.0e - 100)
     29    - hmax :              maximum edge length (default is 1.0e100)
    3030    - hVertices :         imposed edge length for each vertex (geometry or mesh)
    3131    - hminVertices :      minimum edge length for each vertex (mesh)
    3232    - hmaxVertices :      maximum edge length for each vertex (mesh)
    3333
    34     - anisomax :          maximum ratio between the smallest and largest edges (default is 10^30)
     34    - anisomax :          maximum ratio between the smallest and largest edges (default is 1.0e30)
    3535    - coeff :             coefficient applied to the metric (2 -> twice as many elements, default is 1)
    3636    - cutoff :            scalar used to compute the metric when metric type 2 or 3 are applied
     
    4343                            1 -> use Green formula
    4444    - KeepVertices :      try to keep initial vertices when adaptation is done on an existing mesh (default 1)
    45     - maxnbv :            maximum number of vertices used to allocate memory (default is 10^6)
     45    - maxnbv :            maximum number of vertices used to allocate memory (default is 1.0e6)
    4646    - maxsubdiv :         maximum subdivision of exisiting elements (default is 10)
    4747    - metric :            matrix (numberofnodes x 3) used as a metric
  • issm/trunk-jpl/src/m/miscellaneous/prctile_issm.py

    r24213 r24261  
    1616
    1717        # presumably at least 1 input value has been given
    18         #    np.shape(integer) - > (), must be at least (1, )
     18        #    np.shape(integer) -> (), must be at least (1, )
    1919        psize = np.shape(p) or (1, )
    2020        if len(psize) > 1 and np.size(p, 1) > 1:
  • issm/trunk-jpl/src/m/parameterization/setflowequation.py

    r24256 r24261  
    150150            SSAflag[pos[pos1]] = True
    151151            SSAHOflag[pos[pos1]] = False
    152             pos2 = np.where(elist == - 1)[0]
     152            pos2 = np.where(elist == -1)[0]
    153153            HOflag[pos[pos2]] = True
    154154            SSAHOflag[pos[pos2]] = False
     
    182182            FSflag[pos[pos1]] = True
    183183            HOFSflag[pos[pos1]] = False
    184             pos2 = np.where(elist == - 1)[0]
     184            pos2 = np.where(elist == -1)[0]
    185185            HOflag[pos[pos2]] = True
    186186            HOFSflag[pos[pos2]] = False
     
    213213            SSAflag[pos[pos1]] = True
    214214            SSAFSflag[pos[pos1]] = False
    215             pos2 = np.where(elist == - 1)[0]
     215            pos2 = np.where(elist == -1)[0]
    216216            FSflag[pos[pos2]] = True
    217217            SSAFSflag[pos[pos2]] = False
  • issm/trunk-jpl/src/m/parameterization/setmask.py

    r24213 r24261  
    5656
    5757    #level sets
    58     md.mask.groundedice_levelset = - 1. * np.ones(md.mesh.numberofvertices)
     58    md.mask.groundedice_levelset = -1. * np.ones(md.mesh.numberofvertices)
    5959    md.mask.groundedice_levelset[md.mesh.elements[np.nonzero(elementongroundedice), :] - 1] = 1.
    6060
     
    6666    #use contourtomesh to set ice values inside ice domain
    6767        vertexinsideicedomain, elementinsideicedomain = ContourToMesh(elements, x, y, icedomainfile, 'node', 1)
    68         md.mask.ice_levelset[np.nonzero(vertexinsideicedomain)[0]] = - 1.
     68        md.mask.ice_levelset[np.nonzero(vertexinsideicedomain)[0]] = -1.
    6969    else:
    70         md.mask.ice_levelset = - 1. * np.ones(md.mesh.numberofvertices)
     70        md.mask.ice_levelset = -1. * np.ones(md.mesh.numberofvertices)
    7171
    7272    return md
  • issm/trunk-jpl/src/m/plot/checkplotoptions.py

    r24213 r24261  
    1717    if options.exist('unit'):
    1818        if 'km' in options.getfieldvalue('unit', 'km'):
    19             options.changefieldvalue('unit', 10**- 3)
     19            options.changefieldvalue('unit', 10**-3)
    2020        elif '100km' in options.getfieldvalue('unit', '100km'):
    21             options.changefieldvalue('unit', 10**- 5)
     21            options.changefieldvalue('unit', 10**-5)
    2222    # }}}
    2323    # {{{ density
  • issm/trunk-jpl/src/m/plot/colormaps/demmap.py

    r24256 r24261  
    6161            interval = landint
    6262
    63         cmn = - nsea * interval * (1 + 1e-9)  # zero values treated as land
     63        cmn = -nsea * interval * (1 + 1e-9)  # zero values treated as land
    6464        cmx = nland * interval
    6565
  • issm/trunk-jpl/src/m/plot/processdata.py

    r24256 r24261  
    66    PROCESSDATA - process data to be plotted
    77
    8     datatype = 1 - > elements
    9     datatype = 2 - > nodes
    10     datatype = 3 - > node quivers
    11     datatype = 4 - > patch
     8    datatype = 1 -> elements
     9    datatype = 2 -> nodes
     10    datatype = 3 -> node quivers
     11    datatype = 4 -> patch
    1212
    1313    Usage:
  • issm/trunk-jpl/src/m/plot/writejsfile.py

    r24213 r24261  
    2020    fid.write('model["initialZoomFactor"]={0};\n'.format(model.initialZoomFactor))
    2121    #write index:
    22     fid.write(' < ! - -  model["index"]{{{ - - > \n')
    23     fid.write('model["index"] = [')
     22    fid.write('<!-- model["index"]{{{-->\n')
     23    fid.write('model["index"]=[')
    2424    for i in range(0, nel - 1):
    25         fid.write('[{0}, {1}, {2}], '.format(model.index[i][0], model.index[i][1], model.index[i][2]))
    26     fid.write('[{0}, {1}, {2}]];\n'.format(model.index[-1][0], model.index[-1][1], model.index[-1][2]))
    27     fid.write(' < ! - - }}} - - > \n')
     25        fid.write('[{0},{1},{2}], '.format(model.index[i][0], model.index[i][1], model.index[i][2]))
     26    fid.write('[{0},{1},{2}]];\n'.format(model.index[-1][0], model.index[-1][1], model.index[-1][2]))
     27    fid.write('<!--}}}-->\n')
    2828    print('writing model coordinates')
    2929    writejsfield(fid, 'model["x"]', model.x, nods)
     
    4545        fid.write('result={};\n')
    4646        writejsfield(fid, 'result["data"]', results[i].data, nods)
    47         fid.write(' < ! - - {{{ - - > \n')
    48         fid.write('result["caxis"] = [{0}, {1}];\n'.format(results[i].caxis[0], results[i].caxis[1]))
    49         fid.write('result["label"] = "{0}";\n'.format(results[i].label))
    50         fid.write('result["shortlabel"] = "{0}";\n'.format(results[i].shortlabel))
    51         fid.write('result["unit"] = "{0}";\n'.format(results[i].unit))
     47        fid.write('<!--{{{-->\n')
     48        fid.write('result["caxis"]=[{0},{1}];\n'.format(results[i].caxis[0], results[i].caxis[1]))
     49        fid.write('result["label"]="{0}";\n'.format(results[i].label))
     50        fid.write('result["shortlabel"]="{0}";\n'.format(results[i].shortlabel))
     51        fid.write('result["unit"]="{0}";\n'.format(results[i].unit))
    5252        if type(results[i].data) == np.float64:
    53             fid.write('result["time_range"] = [{0}, {1}];\n'.format(results[i].time_range[0], results[i].time_range[1]))
    54         fid.write('results["{0}"] = result;\n'.format(i))
    55         fid.write(' < ! - - }}} - - > \n')
    56     fid.write('model.results = results;\n')
    57     fid.write('models["{0}"] = model;\n'.format(keyname))
     53            fid.write('result["time_range"]=[{0},{1}];\n'.format(results[i].time_range[0], results[i].time_range[1]))
     54        fid.write('results["{0}"]=result;\n'.format(i))
     55        fid.write('<!--}}}-->\n')
     56    fid.write('model.results=results;\n')
     57    fid.write('models["{0}"]=model;\n'.format(keyname))
    5858
    5959    fid.close()
  • issm/trunk-jpl/test/NightlyRun/GetIds.py

    r24226 r24261  
    5050
    5151            # many inputs of both ids and test names
    52             # ids_names[0] - > ids_names by id
    53             # ids_names[1] - > ids_names by test name
     52            # ids_names[0] -> ids_names by id
     53            # ids_names[1] -> ids_names by test name
    5454    if type(ids_names) == list and len(ids_names) == 2:
    5555        if type(ids_names[0]) == list and len(ids_names[0]) > 0 and type(ids_names[0][0]) == int:
     
    6262            # no recognizable ids or id formats
    6363    if np.size(ids) == 0 and not np.all(np.equal(ids_names, None)):
    64         raise RuntimeError('runme.py: GetIds.py: include and exclude options (-i / --id; -in / --include_name; - e / --exclude; - en / --exclude_name) options must follow GetIds usage format:\n' + GetIds.__doc__)
     64        raise RuntimeError('runme.py: GetIds.py: include and exclude options (-i/--id; -in/--include_name; -e/--exclude; -en/--exclude_name) options must follow GetIds usage format:\n' + GetIds.__doc__)
    6565
    6666    return np.array(ids).astype(int)
  • issm/trunk-jpl/test/NightlyRun/test1101.py

    r24214 r24261  
    6363
    6464#Now plot vx, vy, vz and vx on a cross section
    65 #   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km')
     65#   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km')
    6666    if printingflag:
    6767        pass
     
    6969#           printmodel(['ismipaHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    7070#           shutil.move("ismipaHOvx%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestA')
    71 #   plotmodel(md, 'data', vy, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km')
     71#   plotmodel(md, 'data', vy, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km')
    7272    if printingflag:
    7373        pass
     
    7575#           printmodel(['ismipaHOvy' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    7676#           shutil.move("ismipaHOvy%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestA')
    77 #   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km')
     77#   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km')
    7878    if printingflag:
    7979        pass
  • issm/trunk-jpl/test/NightlyRun/test1102.py

    r24214 r24261  
    6262
    6363    #Now plot vx, vy, vz and vx on a cross section
    64     #   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 2)
     64    #   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 2)
    6565    if printingflag:
    6666        pass
     
    6868    #           printmodel(['ismipaFSvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    6969    #           shutil.move("ismipaFSvx%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestA')
    70     #   plotmodel(md, 'data', vy, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 3)
     70    #   plotmodel(md, 'data', vy, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 3)
    7171    if printingflag:
    7272        pass
     
    7474    #           printmodel(['ismipaFSvy' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    7575    #           shutil.move("ismipaFSvy%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestA')
    76     #   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 4)
     76    #   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 4)
    7777    if printingflag:
    7878        pass
  • issm/trunk-jpl/test/NightlyRun/test1103.py

    r24214 r24261  
    6262
    6363#Now plot vx, vy, vz and vx on a cross section
    64 #   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km')
     64#   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km')
    6565    if printingflag:
    6666        pass
     
    6868#           printmodel(['ismipbHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    6969#           shutil.move("ismipbHOvx%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestB')
    70 #   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km')
     70#   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km')
    7171    if printingflag:
    7272        pass
  • issm/trunk-jpl/test/NightlyRun/test1105.py

    r24214 r24261  
    5151    if (L == 5000.):
    5252        md.stressbalance.spcvx[pos] = 15.66
    53         md.stressbalance.spcvy[pos] = - 0.1967
     53        md.stressbalance.spcvy[pos] = -0.1967
    5454    elif (L == 10000.):
    5555        md.stressbalance.spcvx[pos] = 16.04
    56         md.stressbalance.spcvy[pos] = - 0.1977
     56        md.stressbalance.spcvy[pos] = -0.1977
    5757    elif (L == 20000.):
    5858        md.stressbalance.spcvx[pos] = 16.53
    59         md.stressbalance.spcvy[pos] = - 1.27
     59        md.stressbalance.spcvy[pos] = -1.27
    6060    elif (L == 40000.):
    6161        md.stressbalance.spcvx[pos] = 17.23
    62         md.stressbalance.spcvy[pos] = - 3.17
     62        md.stressbalance.spcvy[pos] = -3.17
    6363    elif (L == 80000.):
    6464        md.stressbalance.spcvx[pos] = 16.68
    65         md.stressbalance.spcvy[pos] = - 2.69
     65        md.stressbalance.spcvy[pos] = -2.69
    6666    elif (L == 160000.):
    6767        md.stressbalance.spcvx[pos] = 16.03
    68         md.stressbalance.spcvy[pos] = - 1.27
     68        md.stressbalance.spcvy[pos] = -1.27
    6969
    7070#Spc the bed at zero for vz
     
    8585
    8686#Now plot vx, vy, vz and vx on a cross section
    87 #   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 2)
     87#   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 2)
    8888    if printingflag:
    8989        pass
     
    9191#           printmodel(['ismipcHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    9292#           shutil.move("ismipcHOvx%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestC')
    93 #   plotmodel(md, 'data', vy, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 3)
     93#   plotmodel(md, 'data', vy, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 3)
    9494    if printingflag:
    9595        pass
     
    9797#           printmodel(['ismipcHOvy' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    9898#           shutil.move("ismipcHOvy%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestC')
    99 #   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 4)
     99#   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 4)
    100100    if printingflag:
    101101        pass
  • issm/trunk-jpl/test/NightlyRun/test1106.py

    r24214 r24261  
    3030    if (L == 5000.):
    3131        md.stressbalance.spcvx[pos] = 15.66
    32         md.stressbalance.spcvy[pos] = - 0.1967
     32        md.stressbalance.spcvy[pos] = -0.1967
    3333    elif (L == 10000.):
    3434        md.stressbalance.spcvx[pos] = 16.04
    35         md.stressbalance.spcvy[pos] = - 0.1977
     35        md.stressbalance.spcvy[pos] = -0.1977
    3636    elif (L == 20000.):
    3737        md.stressbalance.spcvx[pos] = 16.53
    38         md.stressbalance.spcvy[pos] = - 1.27
     38        md.stressbalance.spcvy[pos] = -1.27
    3939    elif (L == 40000.):
    4040        md.stressbalance.spcvx[pos] = 17.23
    41         md.stressbalance.spcvy[pos] = - 3.17
     41        md.stressbalance.spcvy[pos] = -3.17
    4242    elif (L == 80000.):
    4343        md.stressbalance.spcvx[pos] = 16.68
    44         md.stressbalance.spcvy[pos] = - 2.69
     44        md.stressbalance.spcvy[pos] = -2.69
    4545    elif (L == 160000.):
    4646        md.stressbalance.spcvx[pos] = 16.03
    47         md.stressbalance.spcvy[pos] = - 1.27
     47        md.stressbalance.spcvy[pos] = -1.27
    4848
    4949    md = setflowequation(md, 'FS', 'all')
  • issm/trunk-jpl/test/NightlyRun/test1107.py

    r24214 r24261  
    8282
    8383#Now plot vx, vy, vz and vx on a cross section
    84 #   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 2)
     84#   plotmodel(md, 'data', vx, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 2)
    8585    if printingflag:
    8686        pass
     
    8888#           printmodel(['ismipdHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
    8989#           shutil.move("ismipdHOvx%d.png" % L, ISSM_DIR + '/website/doc_pdf/validation/Images/ISMIP/TestD')
    90 #   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 10^3], 'ylim', [0 L / 10^3], 'unit', 'km', 'figure', 3)
     90#   plotmodel(md, 'data', vz, 'layer  #all', md.mesh.numberoflayers, 'xlim', [0 L / 1.0e3], 'ylim', [0 L / 1.0e3], 'unit', 'km', 'figure', 3)
    9191    if printingflag:
    9292        pass
  • issm/trunk-jpl/test/NightlyRun/test1201.py

    r24214 r24261  
    2828    print("      initial velocity")
    2929    md.initialization.vx = np.zeros((md.mesh.numberofvertices))
    30     md.initialization.vy = - 400. * np.ones((md.mesh.numberofvertices))
     30    md.initialization.vy = -400. * np.ones((md.mesh.numberofvertices))
    3131
    3232#Stabilization
  • issm/trunk-jpl/test/NightlyRun/test1202.py

    r24256 r24261  
    3838#       system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    3939
    40 #plotmodel(md, 'data', vy, 'contourlevels', { - 100, -200, -300, -400, -500, -600, -700, -800, -900, -1000}, ...
     40#plotmodel(md, 'data', vy, 'contourlevels', { -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000}, ...
    4141#       'contourcolor', 'k')
    4242if printingflag:
  • issm/trunk-jpl/test/NightlyRun/test1203.py

    r24256 r24261  
    4545#       printmodel('eismintdiag2vx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
    4646#       system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    47 #plotmodel(md, 'data', vy, 'contourlevels', { - 100, -200, -300, -400, -500, -600, -700, -800, -900, -1000}, ...
     47#plotmodel(md, 'data', vy, 'contourlevels', { -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000}, ...
    4848#       'contourcolor', 'k')
    4949if printingflag:
  • issm/trunk-jpl/test/NightlyRun/test1301.py

    r24214 r24261  
    4949#plotmodel(md, 'data', comp_melting, 'title', 'Modeled melting', 'data', melting, 'title', 'Analytical melting', ...
    5050#       'data', comp_melting - melting, 'title', 'Absolute error', 'data', relative, 'title', 'Relative error [%]', ...
    51 #       'layer  #all', 1, 'caxis  #2', [1.02964 1.02966] * 10^ - 4, 'FontSize  #all', 20, 'figposition', 'mathieu')
     51#       'layer  #all', 1, 'caxis  #2', [1.02964 1.02966] * 1.0e - 4, 'FontSize  #all', 20, 'figposition', 'mathieu')
    5252if printingflag:
    5353    pass
  • issm/trunk-jpl/test/NightlyRun/test1302.py

    r24256 r24261  
    2222md = setmask(md, '', '')
    2323md = parameterize(md, '../Par/SquareThermal.py')
    24 md.extrude(30, 1.)  #NB: the more one extrudes, the better (10 - > relative~0.35%, 20 - > 0.1%, 30 - > 0.05%)
     24md.extrude(30, 1.)  #NB: the more one extrudes, the better (10 -> relative~0.35%, 20 -> 0.1%, 30 -> 0.05%)
    2525md = setflowequation(md, 'HO', 'all')
    2626
     
    3838#d2T / dz2 - w * rho_ice * c / k * dT / dz = 0   T(surface)=0  T(bed)=10 = > T = A exp(alpha z) + B
    3939alpha = 0.1 / md.constants.yts * md.materials.rho_ice * md.materials.heatcapacity / md.materials.thermalconductivity  #alpha = w rho_ice c / k  and w = 0.1m / an
    40 A = 10. / (np.exp(alpha * (-1000.)) - 1.)  #A = T(bed) / (exp(alpha * bed) - 1)  with bed= - 1000 T(bed)=10
    41 B = - A
     40A = 10. / (np.exp(alpha * (-1000.)) - 1.)  #A = T(bed) / (exp(alpha * bed) - 1)  with bed= -1000 T(bed)=10
     41B = -A
    4242md.initialization.temperature = A * np.exp(alpha * md.mesh.z) + B
    4343
  • issm/trunk-jpl/test/NightlyRun/test1304.py

    r24214 r24261  
    3333#analytical results
    3434#the result is linear with depth and is equal to 0 on the upper surface (See BC)
    35 #d2T / dz2 = 0 - k * dT / dz(bed)=G  T(surface)=0 = > T= - G / k * (z - surface)
    36 md.initialization.temperature = - 0.1 / md.materials.thermalconductivity * (md.mesh.z - md.geometry.surface)  #G = 0.1 W / m2
     35#d2T / dz2 = 0 - k * dT / dz(bed)=G  T(surface)=0 = > T= -G / k * (z - surface)
     36md.initialization.temperature = -0.1 / md.materials.thermalconductivity * (md.mesh.z - md.geometry.surface)  #G = 0.1 W / m2
    3737
    3838#modeled results
  • issm/trunk-jpl/test/NightlyRun/test2002.py

    r24256 r24261  
    2424longe = np.sum(md.mesh.long[md.mesh.elements - 1], axis=1) / 3
    2525pos = np.where(late < -80)
    26 md.slr.deltathickness[pos] = - 100
     26md.slr.deltathickness[pos] = -100
    2727#greenland
    2828pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30)))
    29 md.slr.deltathickness[pos] = - 100
     29md.slr.deltathickness[pos] = -100
    3030
    3131#elastic loading from love numbers:
     
    4141icemask = np.ones((md.mesh.numberofvertices))
    4242pos = np.where(mask == 0)[0]
    43 icemask[pos] = - 1
     43icemask[pos] = -1
    4444pos = np.where(np.sum(mask[md.mesh.elements.astype(int) - 1], axis=1) < 3)[0]
    45 icemask[md.mesh.elements[pos, :].astype(int) - 1] = - 1
     45icemask[md.mesh.elements[pos, :].astype(int) - 1] = -1
    4646md.mask.ice_levelset = icemask
    4747md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices))
     
    5151#make sure that the ice level set is all inclusive:
    5252md.mask.land_levelset = np.zeros((md.mesh.numberofvertices))
    53 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices))
     53md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices))
    5454
    5555#make sure that the elements that have loads are fully grounded:
     
    5858
    5959#make sure wherever there is an ice load, that the mask is set to ice:
    60 icemask[md.mesh.elements[pos, :] - 1] = - 1
     60icemask[md.mesh.elements[pos, :] - 1] = -1
    6161md.mask.ice_levelset = icemask
    6262
  • issm/trunk-jpl/test/NightlyRun/test2003.py

    r24256 r24261  
    2626longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 3
    2727pos = np.intersect1d(np.array(np.where(late < -75)), np.array(np.where(longe < 0)))
    28 md.slr.deltathickness[pos] = - 1
     28md.slr.deltathickness[pos] = -1
    2929
    3030#elastic loading from love numbers:
     
    4545pos = np.where(mask == 0)
    4646#pos[0] because np.where(mask = 0) returns a 2d array, the latter parts of which are all array / s of 0s
    47 icemask[pos[0]] = - 1
     47icemask[pos[0]] = -1
    4848pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3)
    49 icemask[md.mesh.elements[pos, :] - 1] = - 1
     49icemask[md.mesh.elements[pos, :] - 1] = -1
    5050md.mask.ice_levelset = icemask
    5151md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices, ))
     
    5555#make sure that the ice level set is all inclusive:
    5656md.mask.land_levelset = np.zeros((md.mesh.numberofvertices, ))
    57 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     57md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    5858
    5959#make sure that the elements that have loads are fully grounded:
     
    6262
    6363#make sure wherever there is an ice load, that the mask is set to ice:
    64 icemask[md.mesh.elements[pos, :] - 1] = - 1
     64icemask[md.mesh.elements[pos, :] - 1] = -1
    6565md.mask.ice_levelset = icemask
    6666# }}}
  • issm/trunk-jpl/test/NightlyRun/test2010.py

    r24256 r24261  
    2222md.slr.deltathickness = np.zeros((md.mesh.numberofelements, ))
    2323pos = np.intersect1d(np.array(np.where(late < -75)), np.array(np.where(longe > 0)))
    24 #python does not include last element in array slices, (6:7) - > [5:7]
    25 md.slr.deltathickness[pos[5:7]] = - 1
     24#python does not include last element in array slices, (6:7) -> [5:7]
     25md.slr.deltathickness[pos[5:7]] = -1
    2626
    2727md.slr.sealevel = np.zeros((md.mesh.numberofvertices, ))
     
    4545icemask = np.ones((md.mesh.numberofvertices, ))
    4646pos = np.where(mask == 0)
    47 icemask[pos[0]] = - 1
     47icemask[pos[0]] = -1
    4848pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3)
    49 icemask[md.mesh.elements[pos, :] - 1] = - 1
     49icemask[md.mesh.elements[pos, :] - 1] = -1
    5050md.mask.ice_levelset = icemask
    5151md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices, ))
     
    5555#make sure that the ice level set is all inclusive:
    5656md.mask.land_levelset = np.zeros((md.mesh.numberofvertices, ))
    57 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     57md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    5858
    5959#make sure that the elements that have loads are fully grounded:
     
    6262
    6363#make sure wherever there is an ice load, that the mask is set to ice:
    64 icemask[md.mesh.elements[pos, :] - 1] = - 1
     64icemask[md.mesh.elements[pos, :] - 1] = -1
    6565md.mask.ice_levelset = icemask
    6666# }}}
  • issm/trunk-jpl/test/NightlyRun/test2101.py

    r24214 r24261  
    1919md.esa.deltathickness = np.zeros((md.mesh.numberofelements, ))
    2020pos = 449
    21 md.esa.deltathickness[pos] = - 100  # this is the only "icy" element
     21md.esa.deltathickness[pos] = -100  # this is the only "icy" element
    2222
    2323#love numbers:
     
    3535md.mask.ice_levelset = np.ones((md.mesh.numberofvertices, ))
    3636pos = np.where(md.esa.deltathickness)
    37 md.mask.ice_levelset[md.mesh.elements[pos, :]] = - 1
     37md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1
    3838
    3939#is ice grounded?
    40 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     40md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    4141pos = np.where(md.mask.ice_levelset <= 0)
    4242md.mask.groundedice_levelset[pos] = 1
  • issm/trunk-jpl/test/NightlyRun/test2110.py

    r24214 r24261  
    2121y_element = np.mean(md.mesh.y[index - 1], 1)
    2222rad_dist = np.sqrt(x_element**2 + y_element**2) / 1000  # radial distance in km
    23 md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = - 1  # 1 m water withdrawl
     23md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = -1  # 1 m water withdrawl
    2424
    2525#love numbers:
     
    3434md.mask.ice_levelset = np.ones((md.mesh.numberofvertices, ))
    3535pos = np.where(md.esa.deltathickness)
    36 md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = - 1
     36md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = -1
    3737
    3838#is ice grounded?
    39 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     39md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    4040pos = np.where(md.mask.ice_levelset <= 0)
    4141md.mask.groundedice_levelset[pos] = 1
  • issm/trunk-jpl/test/NightlyRun/test2111.py

    r24214 r24261  
    2121y_element = np.mean(md.mesh.y[index - 1], 1) - 1.0e6
    2222rad_dist = np.sqrt(x_element**2 + y_element**2) / 1000  # radial distance in km
    23 md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = - 1  # 1 m water withdrawl
     23md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = -1  # 1 m water withdrawl
    2424# }}}
    2525#love numbers: {{{
     
    3434md.mask.ice_levelset = np.ones((md.mesh.numberofvertices, ))
    3535pos = np.where(md.esa.deltathickness)
    36 md.mask.ice_levelset[md.mesh.elements[pos, :]] = - 1
     36md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1
    3737
    3838#is ice grounded?
    39 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     39md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    4040pos = np.where(md.mask.ice_levelset <= 0)
    4141md.mask.groundedice_levelset[pos] = 1
     
    5656md.miscellaneous.name = 'test2111'
    5757md.esa.degacc = 0.01
    58 md.esa.hemisphere = - 1
     58md.esa.hemisphere = -1
    5959# }}}
    6060
  • issm/trunk-jpl/test/NightlyRun/test2112.py

    r24214 r24261  
    2020y_element = np.mean(md.mesh.y[index - 1], 1)
    2121rad_dist = np.sqrt(x_element**2 + y_element**2) / 1000  # radial distance in km
    22 md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = - 1  # 1 m water withdrawl
     22md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = -1  # 1 m water withdrawl
    2323# }}}
    2424#love numbers: {{{
     
    3333md.mask.ice_levelset = np.ones((md.mesh.numberofvertices, ))
    3434pos = np.where(md.esa.deltathickness)
    35 md.mask.ice_levelset[md.mesh.elements[pos, :]] = - 1
     35md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1
    3636
    3737#is ice grounded?
    38 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     38md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    3939pos = np.where(md.mask.ice_levelset <= 0)
    4040md.mask.groundedice_levelset[pos] = 1
     
    5555md.miscellaneous.name = 'test2112'
    5656md.esa.degacc = 0.01
    57 md.esa.hemisphere = - 1
     57md.esa.hemisphere = -1
    5858# }}}
    5959
  • issm/trunk-jpl/test/NightlyRun/test2113.py

    r24214 r24261  
    2222y_element = np.mean(md.mesh.y[index - 1], 1) + 1.0e6
    2323rad_dist = np.sqrt(x_element**2 + y_element**2) / 1000  # radial distance in km
    24 md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = - 1  # 1 m water withdrawl
     24md.esa.deltathickness[np.where(rad_dist <= disc_radius)] = -1  # 1 m water withdrawl
    2525# }}}
    2626#love numbers: {{{
     
    3535md.mask.ice_levelset = np.ones((md.mesh.numberofvertices, ))
    3636pos = np.where(md.esa.deltathickness)
    37 md.mask.ice_levelset[md.mesh.elements[pos, :]] = - 1
     37md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1
    3838
    3939#is ice grounded?
    40 md.mask.groundedice_levelset = - np.ones((md.mesh.numberofvertices, ))
     40md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices, ))
    4141pos = np.where(md.mask.ice_levelset <= 0)
    4242md.mask.groundedice_levelset[pos] = 1
  • issm/trunk-jpl/test/NightlyRun/test217.py

    r24214 r24261  
    3434h = 1000.
    3535md.geometry.thickness = h * np.ones((md.mesh.numberofvertices))
    36 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     36md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    3737md.geometry.surface = md.geometry.base + md.geometry.thickness
    3838
     
    6767pos = np.where(md.mesh.y == ymax)
    6868nodeonicefront[pos] = 1
    69 md.mask.ice_levelset = - 1 + nodeonicefront
     69md.mask.ice_levelset = -1 + nodeonicefront
    7070
    7171md = solve(md, 'Stressbalance')
  • issm/trunk-jpl/test/NightlyRun/test218.py

    r24256 r24261  
    4242h = 1000.
    4343md.geometry.thickness = h * np.ones((md.mesh.numberofvertices, ))
    44 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     44md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    4545md.geometry.surface = md.geometry.base + md.geometry.thickness
    4646
     
    8080#dakota version
    8181version = IssmConfig('_DAKOTA_VERSION_')
    82 # returns tuple "(u'6.2', )" - > unicode string '6.2', convert to float
     82# returns tuple "(u'6.2', )" -> unicode string '6.2', convert to float
    8383version = float(version[0])
    8484
     
    106106
    107107#imperative!
    108 md.stressbalance.reltol = 10**- 10  #tighten for qmu analysis
     108md.stressbalance.reltol = 10**-10  #tighten for qmu analysis
    109109md.qmu.isdakota = 1
    110110
  • issm/trunk-jpl/test/NightlyRun/test234.py

    r24214 r24261  
    8181    md.qmu.params.evaluation_concurrency = 1
    8282
    83 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     83md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8484md.transient.requested_outputs = ['IceVolume']
    8585
  • issm/trunk-jpl/test/NightlyRun/test235.py

    r24214 r24261  
    7777    md.qmu.params.evaluation_concurrency = 1
    7878
    79 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     79md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8080md.transient.requested_outputs = ['IceVolume']
    8181
  • issm/trunk-jpl/test/NightlyRun/test236.py

    r24256 r24261  
    5252md.smb.precipitations_lgm = np.zeros((md.mesh.numberofvertices + 1, 12))
    5353for imonth in range(0, 12):
    54     md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     54    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    5555    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    56     md.smb.precipitations_lgm[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     56    md.smb.precipitations_lgm[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    5757    md.smb.precipitations_lgm[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    5858
  • issm/trunk-jpl/test/NightlyRun/test237.py

    r24256 r24261  
    5050md.smb.precipitations_lgm = np.zeros((md.mesh.numberofvertices + 1, 12))
    5151for imonth in range(0, 12):
    52     md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     52    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    5353    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    54     md.smb.precipitations_lgm[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     54    md.smb.precipitations_lgm[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    5555    md.smb.precipitations_lgm[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    5656
  • issm/trunk-jpl/test/NightlyRun/test238.py

    r24256 r24261  
    4141md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
    4242for imonth in range(0, 12):
    43     md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     43    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    4444    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = (float(imonth) / 12.)
    4545
  • issm/trunk-jpl/test/NightlyRun/test239.py

    r24256 r24261  
    4141md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
    4242for imonth in range(0, 12):
    43     md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     43    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    4444    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    4545
  • issm/trunk-jpl/test/NightlyRun/test240.py

    r24256 r24261  
    4141md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
    4242for imonth in range(0, 12):
    43     md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = - 0.4 * 10**(-6) * md.mesh.y + 0.5
     43    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
    4444    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    4545
  • issm/trunk-jpl/test/NightlyRun/test2424.py

    r24256 r24261  
    1818md.smb.mass_balance[:] = 0.
    1919
    20 md.geometry.base = - 700. - np.abs(md.mesh.y - 500000.) / 1000.
    21 md.geometry.bed = - 700. - np.abs(md.mesh.y - 500000.) / 1000.
     20md.geometry.base = -700. - np.abs(md.mesh.y - 500000.) / 1000.
     21md.geometry.bed = -700. - np.abs(md.mesh.y - 500000.) / 1000.
    2222md.geometry.thickness[:] = 1000.
    2323md.geometry.surface = md.geometry.base + md.geometry.thickness
  • issm/trunk-jpl/test/NightlyRun/test2425.py

    r24214 r24261  
    1515md.initialization.vx[:] = 0.
    1616md.initialization.vy[:] = 0.
    17 md.geometry.base = - 700. - (md.mesh.y - 500000.) / 1000.
    18 md.geometry.bed = - 700. - (md.mesh.y - 500000.) / 1000.
     17md.geometry.base = -700. - (md.mesh.y - 500000.) / 1000.
     18md.geometry.bed = -700. - (md.mesh.y - 500000.) / 1000.
    1919md.geometry.thickness[:] = 1300.
    2020md.geometry.surface = md.geometry.base + md.geometry.thickness
     
    3131
    3232#get same results with offset in bed and sea level:
    33 md.geometry.base = - 700. - (md.mesh.y - 500000.) / 1000.
    34 md.geometry.bed = - 700. - (md.mesh.y - 500000.) / 1000.
     33md.geometry.base = -700. - (md.mesh.y - 500000.) / 1000.
     34md.geometry.bed = -700. - (md.mesh.y - 500000.) / 1000.
    3535md.geometry.thickness[:] = 1300.
    3636md.geometry.surface = md.geometry.base + md.geometry.thickness
  • issm/trunk-jpl/test/NightlyRun/test244.py

    r24255 r24261  
    8484    mint_on_partition[pa] = max(mint / telms[0, vi])
    8585
    86 mint_on_partition[np.where(np.isnan(mint_on_partition))] = 10**- 10
     86mint_on_partition[np.where(np.isnan(mint_on_partition))] = 10**-10
    8787md.qmu.variables.surface_mass_balanceTa = uniform_uncertain.uniform_uncertain('scaled_SmbTa', 1, 0.05)
    8888md.qmu.variables.surface_mass_balanceTa[0].lower = 0.95
     
    117117
    118118
    119 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     119md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    120120md.transient.requested_outputs = ['IceVolume', 'TotalSmb', 'IceMass']
    121121
  • issm/trunk-jpl/test/NightlyRun/test245.py

    r24256 r24261  
    2525md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices + 1, 12))
    2626md.smb.precipitation = np.empty((md.mesh.numberofvertices + 1, 12))
    27 temp_ma_present = - 10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000.
     27temp_ma_present = -10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000.
    2828temp_mj_present = 10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000.
    2929precipitation = 5. * np.ones((md.mesh.numberofvertices, ))
  • issm/trunk-jpl/test/NightlyRun/test250.py

    r24214 r24261  
    7979    md.qmu.params.evaluation_concurrency = 1
    8080
    81 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     81md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8282md.transient.requested_outputs = ['IceVolume']
    8383
  • issm/trunk-jpl/test/NightlyRun/test251.py

    r24214 r24261  
    7676    md.qmu.params.evaluation_concurrency = 1
    7777
    78 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     78md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    7979md.transient.requested_outputs = ['IceVolume']
    8080
  • issm/trunk-jpl/test/NightlyRun/test272.py

    r24214 r24261  
    2525md.inversion.iscontrol = 1
    2626md.inversion.control_parameters = ['DamageDbar']
    27 md.inversion.min_parameters = 10**- 13 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     27md.inversion.min_parameters = 10**-13 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
    2828md.inversion.max_parameters = np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
    2929md.inversion.nsteps = 2
  • issm/trunk-jpl/test/NightlyRun/test3015.py

    r24214 r24261  
    4949md.autodiff.isautodiff = False
    5050md.geometry.thickness[index] = h0
    51 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     51md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    5252md.geometry.surface = md.geometry.base + md.geometry.thickness
    5353md = SetIceShelfBC(md)
     
    6060md.autodiff.isautodiff = False
    6161md.geometry.thickness[index] = h2
    62 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     62md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    6363md.geometry.surface = md.geometry.base + md.geometry.thickness
    6464md = SetIceShelfBC(md)
     
    7474md.autodiff.isautodiff = True
    7575md.geometry.thickness[index] = h1
    76 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     76md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    7777md.geometry.surface = md.geometry.base + md.geometry.thickness
    7878md = SetIceShelfBC(md)
  • issm/trunk-jpl/test/NightlyRun/test3020.py

    r24214 r24261  
    5151md.autodiff.isautodiff = False
    5252md.geometry.thickness[index] = h0
    53 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     53md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    5454md.geometry.surface = md.geometry.base + md.geometry.thickness
    5555md = SetIceShelfBC(md)
     
    6363md.autodiff.isautodiff = False
    6464md.geometry.thickness[index] = h2
    65 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     65md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    6666md.geometry.surface = md.geometry.base + md.geometry.thickness
    6767md = SetIceShelfBC(md)
     
    7979md.autodiff.isautodiff = True
    8080md.geometry.thickness[index] = h1
    81 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     81md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    8282md.geometry.surface = md.geometry.base + md.geometry.thickness
    8383md = SetIceShelfBC(md)
  • issm/trunk-jpl/test/NightlyRun/test319.py

    r24214 r24261  
    2424md.inversion.cost_functions = [103, 501]
    2525md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    26 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2727md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2828md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
  • issm/trunk-jpl/test/NightlyRun/test320.py

    r24214 r24261  
    2424md.inversion.cost_functions = [103, 501]
    2525md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    26 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2727md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2828md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
  • issm/trunk-jpl/test/NightlyRun/test321.py

    r24214 r24261  
    2424md.inversion.cost_functions = [102, 501]
    2525md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    26 md.inversion.cost_functions_coefficients[:, 1] = 2 * 10**- 7
     26md.inversion.cost_functions_coefficients[:, 1] = 2 * 10**-7
    2727md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2828md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
  • issm/trunk-jpl/test/NightlyRun/test322.py

    r24214 r24261  
    2424md.inversion.cost_functions = [104, 501]
    2525md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    26 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2727md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2828md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
  • issm/trunk-jpl/test/NightlyRun/test328.py

    r24214 r24261  
    1414md = setflowequation(md, 'SSA', 'all')
    1515md.smb = SMBgradients()
    16 md.smb.b_pos = - 100. + 0.00005 * md.mesh.x - 0.0001 * md.mesh.y
     16md.smb.b_pos = -100. + 0.00005 * md.mesh.x - 0.0001 * md.mesh.y
    1717md.smb.b_neg = 250. + 0.000051 * md.mesh.x - 0.00011 * md.mesh.y
    1818md.transient.requested_outputs = ['default', 'TotalSmb']
  • issm/trunk-jpl/test/NightlyRun/test329.py

    r23793 r24261  
    1515md = setflowequation(md, 'HO', 'all')
    1616md.smb = SMBgradients()
    17 md.smb.b_pos = - 100. + 0.00005 * md.mesh.x - 0.0001 * md.mesh.y
     17md.smb.b_pos = -100. + 0.00005 * md.mesh.x - 0.0001 * md.mesh.y
    1818md.smb.b_neg = 250. + 0.000051 * md.mesh.x - 0.00011 * md.mesh.y
    1919md.smb.href = copy.deepcopy(md.geometry.surface)
  • issm/trunk-jpl/test/NightlyRun/test330.py

    r24240 r24261  
    3838md.hydrology.sediment_transmitivity = (1.0e-3 * md.hydrology.sediment_thickness) * np.ones((md.mesh.numberofvertices))
    3939#init
    40 md.initialization.sediment_head = - 5.0 * np.ones((md.mesh.numberofvertices))
     40md.initialization.sediment_head = -5.0 * np.ones((md.mesh.numberofvertices))
    4141#BC
    4242md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
  • issm/trunk-jpl/test/NightlyRun/test3300.py

    r24240 r24261  
    5050md.basalforcings.groundedice_melting_rate = np.zeros((md.mesh.numberofvertices + 1, len(times)))
    5151
    52 md.basalforcings.groundedice_melting_rate[:, np.where(times <= 6.0)] = - 0.2
     52md.basalforcings.groundedice_melting_rate[:, np.where(times <= 6.0)] = -0.2
    5353md.basalforcings.groundedice_melting_rate[:, np.where(times <= 1.0)] = 1.0
    5454md.basalforcings.groundedice_melting_rate[-1, :] = times
  • issm/trunk-jpl/test/NightlyRun/test341.py

    r24214 r24261  
    2727md.inversion.cost_functions = [102, 501]
    2828md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    29 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     29md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    3030md.inversion.vx_obs = md.initialization.vx
    3131md.inversion.vy_obs = md.initialization.vy
  • issm/trunk-jpl/test/NightlyRun/test343.py

    r24214 r24261  
    1919md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices + 1, ))
    2020md.smb.b_max = 4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1, ))
    21 md.smb.b_min = - 4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1, ))
     21md.smb.b_min = -4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1, ))
    2222
    2323#Change geometry
  • issm/trunk-jpl/test/NightlyRun/test344.py

    r24214 r24261  
    2525md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices + 1, ))
    2626md.smb.b_max = 4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1, ))
    27 md.smb.b_min = - 4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1, ))
     27md.smb.b_min = -4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1, ))
    2828
    2929
  • issm/trunk-jpl/test/NightlyRun/test350.py

    r24256 r24261  
    3030
    3131#Change geometry
    32 md.geometry.base = - .02 * md.mesh.x + 20.
     32md.geometry.base = -.02 * md.mesh.x + 20.
    3333md.geometry.thickness = 300. * np.ones((md.mesh.numberofvertices, ))
    3434md.geometry.bed = md.geometry.base
  • issm/trunk-jpl/test/NightlyRun/test412.py

    r24214 r24261  
    5353
    5454#imperative!
    55 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     55md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    5656
    5757#solve
  • issm/trunk-jpl/test/NightlyRun/test413.py

    r24214 r24261  
    5151
    5252#imperative!
    53 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     53md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    5454md.qmu.isdakota = 1
    5555
  • issm/trunk-jpl/test/NightlyRun/test414.py

    r24214 r24261  
    6060md.qmu.params.interval_type = 'forward'
    6161md.qmu.isdakota = 1
    62 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     62md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    6363
    6464if version >= 6:
  • issm/trunk-jpl/test/NightlyRun/test415.py

    r24214 r24261  
    2424md.inversion.cost_functions = [103, 501]
    2525md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    26 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2727md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2828md.inversion.maxiter_per_step = 2 * np.ones((md.inversion.nsteps))
  • issm/trunk-jpl/test/NightlyRun/test416.py

    r24214 r24261  
    2424md.inversion.cost_functions = [102, 501]
    2525md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    26 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2727md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2828md.inversion.maxiter_per_step = 2 * np.ones((md.inversion.nsteps))
  • issm/trunk-jpl/test/NightlyRun/test417.py

    r24214 r24261  
    7676md.qmu.isdakota = 1
    7777
    78 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     78md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    7979
    8080#solve
  • issm/trunk-jpl/test/NightlyRun/test420.py

    r24214 r24261  
    5050
    5151#imperative!
    52 md.stressbalance.reltol = 10**- 5  #tighten for qmu analysese
     52md.stressbalance.reltol = 10**-5  #tighten for qmu analysese
    5353
    5454#solve
  • issm/trunk-jpl/test/NightlyRun/test424.py

    r24214 r24261  
    1414md.initialization.vx[:] = 0.
    1515md.initialization.vy[:] = 0.
    16 md.geometry.base = - 700. - abs(md.mesh.y - 500000.) / 1000.
    17 md.geometry.bed = - 700. - abs(md.mesh.y - 500000.) / 1000.
     16md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     17md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
    1818md.geometry.thickness[:] = 1000.
    1919md.geometry.surface = md.geometry.base + md.geometry.thickness
  • issm/trunk-jpl/test/NightlyRun/test425.py

    r24214 r24261  
    1414md.initialization.vx[:] = 0.
    1515md.initialization.vy[:] = 0.
    16 md.geometry.base = - 700. - abs(md.mesh.y - 500000.) / 1000.
    17 md.geometry.bed = - 700. - abs(md.mesh.y - 500000.) / 1000.
     16md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     17md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
    1818md.geometry.thickness[:] = 1300.
    1919md.geometry.surface = md.geometry.base + md.geometry.thickness
    20 md.smb.mass_balance[:] = - 150.
     20md.smb.mass_balance[:] = -150.
    2121md.transient.isstressbalance = False
    2222md.transient.isgroundingline = True
  • issm/trunk-jpl/test/NightlyRun/test426.py

    r24214 r24261  
    1313md.initialization.vx[:] = 0.
    1414md.initialization.vy[:] = 0.
    15 md.geometry.base = - 700. - abs(md.mesh.y - 500000.) / 1000.
    16 md.geometry.bed = - 700. - abs(md.mesh.y - 500000.) / 1000.
     15md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     16md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
    1717md.geometry.thickness[:] = 1000.
    1818md.geometry.surface = md.geometry.base + md.geometry.thickness
  • issm/trunk-jpl/test/NightlyRun/test427.py

    r24214 r24261  
    1313md.initialization.vx[:] = 0.
    1414md.initialization.vy[:] = 0.
    15 md.geometry.base = - 700. - abs(md.mesh.y - 500000.) / 1000.
    16 md.geometry.bed = - 700. - abs(md.mesh.y - 500000.) / 1000.
     15md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     16md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
    1717md.geometry.thickness[:] = 1300
    1818md.geometry.surface = md.geometry.base + md.geometry.thickness
     
    2020md.extrude(3, 1.)
    2121
    22 md.smb.mass_balance[:] = - 150
     22md.smb.mass_balance[:] = -150
    2323md.transient.isstressbalance = False
    2424md.transient.isgroundingline = True
  • issm/trunk-jpl/test/NightlyRun/test430.py

    r24256 r24261  
    1515md.initialization.vy[:] = 1.
    1616md.geometry.thickness[:] = 500. - md.mesh.x / 10000.
    17 md.geometry.bed = - 100. - md.mesh.x / 1000.
    18 md.geometry.base = - md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
     17md.geometry.bed = -100. - md.mesh.x / 1000.
     18md.geometry.base = -md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
    1919md.mask.groundedice_levelset = md.geometry.thickness + md.materials.rho_water / md.materials.rho_ice * md.geometry.bed
    2020pos = np.where(md.mask.groundedice_levelset >= 0.)
     
    2424
    2525#Boundary conditions:
    26 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices, ))
     26md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices, ))
    2727md.mask.ice_levelset[np.where(md.mesh.x == max(md.mesh.x))] = 0.
    2828md.stressbalance.spcvx[:] = float('NaN')
     
    3737md.stressbalance.spcvy[pos2] = 0.
    3838
    39 md.materials.rheology_B = 1. / ((10**- 25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
     39md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
    4040md.materials.rheology_law = 'None'
    4141md.friction.coefficient[:] = np.sqrt(10**7) * np.ones((md.mesh.numberofvertices, ))
  • issm/trunk-jpl/test/NightlyRun/test435.py

    r24256 r24261  
    1515md.initialization.vy[:] = 1.
    1616md.geometry.thickness[:] = 500. - md.mesh.x / 10000.
    17 md.geometry.bed = - 100. - md.mesh.x / 1000.
    18 md.geometry.base = - md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
     17md.geometry.bed = -100. - md.mesh.x / 1000.
     18md.geometry.base = -md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
    1919md.mask.groundedice_levelset = md.geometry.thickness + md.materials.rho_water / md.materials.rho_ice * md.geometry.bed
    2020pos = np.where(md.mask.groundedice_levelset >= 0)
     
    2525
    2626#Boundary conditions:
    27 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices, ))
     27md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices, ))
    2828md.mask.ice_levelset[np.where(md.mesh.x == max(md.mesh.x))] = 0.
    2929md.stressbalance.spcvx[:] = float('Nan')
     
    3838md.stressbalance.spcvy[pos2] = 0.
    3939
    40 md.materials.rheology_B = 1. / ((10**- 25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
     40md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
    4141md.materials.rheology_law = 'None'
    4242md.friction.coefficient[:] = np.sqrt(1e7) * np.ones((md.mesh.numberofvertices, ))
  • issm/trunk-jpl/test/NightlyRun/test437.py

    r24214 r24261  
    1515h = 100.
    1616md.geometry.thickness = h * np.ones((md.mesh.numberofvertices, ))
    17 md.geometry.base = - h * np.ones((md.mesh.numberofvertices, ))
     17md.geometry.base = -h * np.ones((md.mesh.numberofvertices, ))
    1818md.geometry.surface = md.geometry.base + md.geometry.thickness
    1919
  • issm/trunk-jpl/test/NightlyRun/test440.py

    r24214 r24261  
    5151
    5252#imperative!
    53 md.stressbalance.reltol = 10**- 5  #tighten for qmu analysese
     53md.stressbalance.reltol = 10**-5  #tighten for qmu analysese
    5454
    5555#solve
  • issm/trunk-jpl/test/NightlyRun/test441.py

    r24256 r24261  
    1515md.initialization.vy[:] = 1.
    1616md.geometry.thickness[:] = 500. - md.mesh.x / 10000.
    17 md.geometry.bed = - 100. - md.mesh.x / 1000.
    18 md.geometry.base = - md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
     17md.geometry.bed = -100. - md.mesh.x / 1000.
     18md.geometry.base = -md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
    1919md.mask.groundedice_levelset = md.geometry.thickness + md.materials.rho_water / md.materials.rho_ice * md.geometry.bed
    2020pos = np.array(np.where(md.mask.groundedice_levelset >= 0.))
     
    2424
    2525#Boundary conditions:
    26 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices, ))
     26md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices, ))
    2727md.mask.ice_levelset[np.where(md.mesh.x == max(md.mesh.x))] = 0.
    2828md.stressbalance.spcvx[:] = float('Nan')
     
    3737md.stressbalance.spcvy[pos2] = 0.
    3838
    39 md.materials.rheology_B = 1. / ((10**- 25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
     39md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
    4040md.materials.rheology_law = 'None'
    4141md.friction.coefficient[:] = np.sqrt(1e7) * np.ones((md.mesh.numberofvertices, ))
  • issm/trunk-jpl/test/NightlyRun/test442.py

    r24256 r24261  
    1515md.initialization.vy[:] = 1.
    1616md.geometry.thickness[:] = 500. - md.mesh.x / 10000.
    17 md.geometry.bed = - 100. - md.mesh.x / 1000.
    18 md.geometry.base = - md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
     17md.geometry.bed = -100. - md.mesh.x / 1000.
     18md.geometry.base = -md.geometry.thickness * md.materials.rho_ice / md.materials.rho_water
    1919md.mask.groundedice_levelset = md.geometry.thickness + md.materials.rho_water / md.materials.rho_ice * md.geometry.bed
    2020pos = np.where(md.mask.groundedice_levelset >= 0.)
     
    2525
    2626#Boundary conditions:
    27 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices, ))
     27md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices, ))
    2828md.mask.ice_levelset[np.where(md.mesh.x == max(md.mesh.x))] = 0.
    2929md.stressbalance.spcvx[:] = float('Nan')
     
    3838md.stressbalance.spcvy[pos2] = 0.
    3939
    40 md.materials.rheology_B = 1. / ((10**- 25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
     40md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices, ))
    4141md.materials.rheology_law = 'None'
    4242md.friction.coefficient[:] = np.sqrt(1e7) * np.ones((md.mesh.numberofvertices, ))
  • issm/trunk-jpl/test/NightlyRun/test444.py

    r24214 r24261  
    104104md.qmu.isdakota = 1
    105105
    106 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     106md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    107107
    108108#solve
  • issm/trunk-jpl/test/NightlyRun/test445.py

    r24214 r24261  
    7575md.qmu.isdakota = 1
    7676
    77 md.stressbalance.reltol = 10**- 5  #tighten for qmu analyses
     77md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    7878
    7979
  • issm/trunk-jpl/test/NightlyRun/test511.py

    r24214 r24261  
    1414
    1515#impose hydrostatic equilibrium (required by Stokes)
    16 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     16md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    1717md.geometry.surface = md.geometry.base + md.geometry.thickness
    1818md.extrude(3, 1.)
  • issm/trunk-jpl/test/NightlyRun/test512.py

    r24214 r24261  
    2525md.inversion.cost_functions = [103, 501]
    2626md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    27 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     27md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2828md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2929md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
  • issm/trunk-jpl/test/NightlyRun/test513.py

    r24214 r24261  
    2323md.inversion.cost_functions = [103, 501]
    2424md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
    25 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**- 7
     25md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
    2626md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
    2727md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
  • issm/trunk-jpl/test/NightlyRun/test611.py

    r24214 r24261  
    2020md.inversion.control_parameters = ['BalancethicknessThickeningRate']
    2121md.inversion.thickness_obs = md.geometry.thickness
    22 md.inversion.min_parameters = - 50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.min_parameters = -50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
    2323md.inversion.max_parameters = 50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
    2424md.inversion.cost_functions = [201]
  • issm/trunk-jpl/test/NightlyRun/test701.py

    r24214 r24261  
    99x = np.arange(1, 3001, 100).T
    1010h = np.linspace(1000, 300, np.size(x)).T
    11 b = - 917. / 1023. * h
     11b = -917. / 1023. * h
    1212
    1313md = bamgflowband(model(), x, b + h, b, 'hmax', 80.)
     
    2121
    2222#mask
    23 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices, ))
     23md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices, ))
    2424md.mask.ice_levelset[np.where(md.mesh.vertexflags(2))] = 0.
    2525md.mask.groundedice_levelset = np.zeros((md.mesh.numberofvertices, )) - 0.5
     
    5151md = setflowequation(md, 'FS', 'all')
    5252md.stressbalance.abstol = np.nan
    53 #md.stressbalance.reltol = 10**- 16
     53#md.stressbalance.reltol = 10**-16
    5454md.stressbalance.FSreconditioning = 1.
    5555md.stressbalance.maxiter = 20
  • issm/trunk-jpl/test/NightlyRun/test702.py

    r24256 r24261  
    2525
    2626#mask
    27 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices, ))
     27md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices, ))
    2828md.mask.ice_levelset[np.where(md.mesh.vertexflags(2))] = 0
    29 md.mask.groundedice_levelset = - 0.5 * np.ones((md.mesh.numberofvertices))
     29md.mask.groundedice_levelset = -0.5 * np.ones((md.mesh.numberofvertices))
    3030md.mask.groundedice_levelset[np.where(md.mesh.x < 0)] = 0.5
    3131
  • issm/trunk-jpl/test/NightlyRun/test703.py

    r24256 r24261  
    3838
    3939#mask
    40 md.mask.ice_levelset = - np.ones((md.mesh.numberofvertices))
     40md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices))
    4141md.mask.ice_levelset[np.where(md.mesh.vertexflags(2))] = 0
    42 md.mask.groundedice_levelset = - 0.5 * np.ones((md.mesh.numberofvertices))
     42md.mask.groundedice_levelset = -0.5 * np.ones((md.mesh.numberofvertices))
    4343md.mask.groundedice_levelset[np.where(md.mesh.x < 0)] = 0.5
    4444
  • issm/trunk-jpl/test/NightlyRun/test808.py

    r24214 r24261  
    2424Lx = (xmax - xmin)
    2525alpha = 2. / 3.
    26 md.mask.ice_levelset = - 1 + 2 * (md.mesh.y > 9e5)
     26md.mask.ice_levelset = -1 + 2 * (md.mesh.y > 9e5)
    2727
    2828md.timestepping.time_step = 1
  • issm/trunk-jpl/test/Par/ISMIPF.py

    r24256 r24261  
    1212
    1313print("      creating drag")
    14 md.friction.coefficient = np.sqrt(md.constants.yts / (2.140373 * 10**- 7 * 1000.)) * np.ones((md.mesh.numberofvertices))
     14md.friction.coefficient = np.sqrt(md.constants.yts / (2.140373 * 10**-7 * 1000.)) * np.ones((md.mesh.numberofvertices))
    1515md.friction.p = np.ones((md.mesh.numberofelements))
    1616md.friction.q = np.zeros((md.mesh.numberofelements))
  • issm/trunk-jpl/test/Par/RoundSheetEISMINT.py

    r24214 r24261  
    1515print("      creating temperatures")
    1616tmin = 238.15  #K
    17 st = 1.67 * 10**- 2 / 1000.  #k / m
     17st = 1.67 * 10**-2 / 1000.  #k / m
    1818radius = numpy.sqrt((md.mesh.x)**2 + (md.mesh.y)**2)
    1919md.initialization.temperature = tmin + st * radius
    20 md.basalforcings.geothermalflux = 4.2 * 10**- 2 * numpy.ones((md.mesh.numberofvertices))
     20md.basalforcings.geothermalflux = 4.2 * 10**-2 * numpy.ones((md.mesh.numberofvertices))
    2121
    2222print("      creating flow law parameter")
     
    2626print("      creating surface mass balance")
    2727smb_max = 0.5  #m / yr
    28 sb = 10**- 2 / 1000.  #m / yr / m
     28sb = 10**-2 / 1000.  #m / yr / m
    2929rel = 450. * 1000.  #m
    3030md.smb.mass_balance = numpy.minimum(smb_max * numpy.ones_like(radius), sb * (rel - radius))
     
    6060md.materials.thermalconductivity = 2.1
    6161md.materials.latentheat = 3.35 * 10**5
    62 md.materials.beta = 8.66 * 10**- 4 / (md.materials.rho_ice * md.constants.g)  #conversion from K / m to K / Pa
     62md.materials.beta = 8.66 * 10**-4 / (md.materials.rho_ice * md.constants.g)  #conversion from K / m to K / Pa
    6363md.constants.yts = 31556926.
  • issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.par

    r19527 r24261  
    2222
    2323disp('      creating flow law parameter');
    24 md.materials.rheology_B=6.81*10^7*ones(md.mesh.numberofvertices,1); %to have the same B as the analytical solution 
     24md.materials.rheology_B=6.81*10^7*ones(md.mesh.numberofvertices,1); %to have the same B as the analytical solution
    2525md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1);
    2626
  • issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.py

    r24214 r24261  
    77radius = numpy.sqrt((md.mesh.x)**2 + (md.mesh.y)**2)
    88radiusmax = numpy.max(radius)
    9 radius[numpy.nonzero(radius > (1. - 10**- 9) * radiusmax)] = radiusmax  #eliminate roundoff issues in next statement
     9radius[numpy.nonzero(radius > (1. - 10**-9) * radiusmax)] = radiusmax  #eliminate roundoff issues in next statement
    1010md.geometry.thickness = hmin * numpy.ones((numpy.size(md.mesh.x))) + hmax * (4. * ((1. / 2.)**(4. / 3.) * numpy.ones((numpy.size(md.mesh.x))) - ((radius) / (2. * radiusmax))**(4. / 3.)))**(3. / 8.)
    1111md.geometry.base = 0. * md.geometry.thickness
     
    2020print("      creating temperatures")
    2121tmin = 238.15  #K
    22 st = 1.67 * 10**- 2 / 1000.  #k / m
     22st = 1.67 * 10**-2 / 1000.  #k / m
    2323md.initialization.temperature = tmin + st * radius
    24 md.basalforcings.geothermalflux = 4.2 * 10**- 2 * numpy.ones((md.mesh.numberofvertices))
     24md.basalforcings.geothermalflux = 4.2 * 10**-2 * numpy.ones((md.mesh.numberofvertices))
    2525
    2626print("      creating flow law parameter")
     
    3030print("      creating surface mass balance")
    3131smb_max = 0.5  #m / yr
    32 sb = 10**- 2 / 1000.  #m / yr / m
     32sb = 10**-2 / 1000.  #m / yr / m
    3333rel = 450. * 1000.  #m
    3434md.smb.mass_balance = numpy.minimum(smb_max * numpy.ones_like(radius), sb * (rel - radius))
  • issm/trunk-jpl/test/Par/SquareSheetConstrainedCO2.py

    r24214 r24261  
    1616CO2_heatCapacity = 700.
    1717CO2_thermalCond = 0.5
    18 CO2_dynViscosity = 13.72 * 10**- 6
     18CO2_dynViscosity = 13.72 * 10**-6
    1919CO2_rhoLiquidZeroDeg = 929.
    2020md.materials.rho_ice = CO2_rhoIce
     
    3434xmax = max(md.mesh.x)
    3535md.geometry.thickness = hmax + (hmin - hmax) * (md.mesh.y - ymin) / (ymax - ymin) + 0.1 * (hmin - hmax) * (md.mesh.x - xmin) / (xmax - xmin)
    36 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness + 20.
     36md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness + 20.
    3737md.geometry.surface = md.geometry.base + md.geometry.thickness
    3838
  • issm/trunk-jpl/test/Par/SquareSheetShelf.py

    r24214 r24261  
    1818xmax = max(md.mesh.x)
    1919md.geometry.thickness = hmax + (hmin - hmax) * (md.mesh.y - ymin) / (ymax - ymin) + 0.1 * (hmin - hmax) * (md.mesh.x - xmin) / (xmax - xmin)
    20 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    21 bed_sheet = - md.materials.rho_ice / md.materials.rho_water * (hmax + (hmin - hmax) * (ymax / 2 - ymin) / (ymax - ymin))
     20md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     21bed_sheet = -md.materials.rho_ice / md.materials.rho_water * (hmax + (hmin - hmax) * (ymax / 2 - ymin) / (ymax - ymin))
    2222pos = np.nonzero(md.mesh.y <= ymax / 2.)
    2323md.geometry.base[pos] = bed_sheet
  • issm/trunk-jpl/test/Par/SquareShelfConstrained.py

    r24214 r24261  
    1717xmax = max(md.mesh.x)
    1818md.geometry.thickness = hmax + (hmin - hmax) * (md.mesh.y - ymin) / (ymax - ymin) + 0.1 * (hmin - hmax) * (md.mesh.x - xmin) / (xmax - xmin)
    19 md.geometry.base = - md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     19md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
    2020md.geometry.surface = md.geometry.base + md.geometry.thickness
    2121md.geometry.bed = md.geometry.base - 10
  • issm/trunk-jpl/test/Par/SquareThermal.py

    r24214 r24261  
    1111h = 1000.
    1212md.geometry.thickness = h * np.ones((md.mesh.numberofvertices))
    13 md.geometry.base = - 1000. * np.ones((md.mesh.numberofvertices))
     13md.geometry.base = -1000. * np.ones((md.mesh.numberofvertices))
    1414md.geometry.surface = md.geometry.base + md.geometry.thickness
    1515
     
    4949md.thermal.spctemperature[:] = md.initialization.temperature
    5050md.basalforcings.geothermalflux = np.zeros((md.mesh.numberofvertices))
    51 md.basalforcings.geothermalflux[np.nonzero(md.mask.groundedice_levelset > 0.)[0]] = 1. * 10**- 3  #1 mW / m^2
     51md.basalforcings.geothermalflux[np.nonzero(md.mask.groundedice_levelset > 0.)[0]] = 1. * 10**-3  #1 mW / m^2
Note: See TracChangeset for help on using the changeset viewer.