Changeset 24260


Ignore:
Timestamp:
10/18/19 16:10:28 (5 years ago)
Author:
jdquinn
Message:

BUG: Extraneous spaces and other fixes (will continue with this tonight and over the weekend, as needed)

Location:
issm/trunk-jpl/src/m
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/boundaryconditions/PattynSMB.py

    r24256 r24260  
    3232    # Here, -0.012 is the atmospheric Lapse rate from sea level in deg / m.
    3333    # It is multiplied by surface elevation from sea level
    34     Tma = - 15.15 - 0.012 * md.geometry.surface
     34    Tma = -15.15 - 0.012 * md.geometry.surface
    3535
    3636    # Calculate summer temperature, Eqn (12)
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.py

    r24213 r24260  
    3131        print("      boundary conditions for stressbalance model: spc set as zero")
    3232
    33     #No ice front - > do nothing
     33    #No ice front -> do nothing
    3434
    3535    #Create zeros basalforcings and smb
     
    5151            md.thermal.spctemperature[pos] = md.initialization.temperature[pos]  #impose observed temperature on surface
    5252        if not isinstance(md.basalforcings.geothermalflux, np.ndarray) or not np.size(md.basalforcings.geothermalflux) == md.mesh.numberofvertices:
    53             md.basalforcings.geothermalflux = 50. * 10**- 3 * np.ones((md.mesh.numberofvertices))  #50 mW / m^2
     53            md.basalforcings.geothermalflux = 50. * 10**-3 * np.ones((md.mesh.numberofvertices))  #50 mW / m^2
    5454    else:
    5555        print("      no thermal boundary conditions created: no observed temperature found")
  • issm/trunk-jpl/src/m/boundaryconditions/love_numbers.py

    r24256 r24260  
    44def love_numbers(value, * varargin):
    55    '''LOVE_NUMBERS: provide love numbers (value 'h', 'k', 'l', 'gamma' and 'lambda'
    6              retrieved from: http: / / www.srosat.com / iag - jsg / loveNb.php
     6             retrieved from: http://www.srosat.com/iag-jsg/loveNb.php
    77    Usage:   series = love_numbers(value)
    88           series = love_numbers(value, reference_frame)
     
    1005410054    if frame == 'CF':  # from Blewitt, 2003, JGR
    1005510055        if value == 'h':
    10056             series[1] = - 0.269
     10056            series[1] = -0.269
    1005710057        elif value == 'k':
    1005810058            series[1] = 0.021
  • issm/trunk-jpl/src/m/inversions/parametercontroldrag.py

    r24213 r24260  
    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', 10^-4, 'optscal', [10^7 10^8])
    2121
    2222    See also PARAMETERCONTROLB
  • issm/trunk-jpl/src/m/materials/cuffey.py

    r24256 r24260  
    2626
    2727    rigidity = np.zeros_like(T)
    28     pos = np.nonzero(T <= - 45)
     28    pos = np.nonzero(T <= -45)
    2929    if len(pos):
    3030        rigidity[pos] = 10**8 * (-0.000396645116301 * (T[pos] + 50)**3 + 0.013345579471334 * (T[pos] + 50)**2 - 0.356868703259105 * (T[pos] + 50) + 7.272363035371383)
  • issm/trunk-jpl/src/m/materials/nye.py

    r24256 r24260  
    3232        warnings.warn('H2O ICE - GUARANTEED MELTING. Some temperature values are beyond 273.15K.')
    3333
    34     Rg = 8.3144598  # J mol^ - 1 K^ - 1
     34    Rg = 8.3144598  # J mol^-1 K^-1
    3535
    3636    if ice_type == 1:  # CO2 ice
    37         A_const = 10**(10.8)  # s^ - 1 MPa
    38         Q = 63000.  # J mol^ - 1
     37        A_const = 10**(10.8)  # s^-1 MPa
     38        Q = 63000.  # J mol^-1
    3939        n = 7.  # Glen's exponent
    4040    elif ice_type == 2:  # H2O ice
    41         A_const = 9 * 10**4  # s^ - 1 MPa
    42         Q = 60000.  #  J mol^ - 1
     41        A_const = 9 * 10**4  # s^-1 MPa
     42        Q = 60000.  #  J mol^-1
    4343        n = 3.  # Glen's exponent
    4444    else:
     
    4646
    4747    # Arrhenius Law
    48     A = A_const * np.exp(-1 * Q / (T * Rg))  # s^ - 1 MPa
     48    A = A_const * np.exp(-1 * Q / (T * Rg))  # s^-1 MPa
    4949    rigidity = A**(-1 / n) * 10**6  # s^(1 / n) Pa
    5050
  • issm/trunk-jpl/src/m/materials/paterson.py

    r24256 r24260  
    2828    # n = 3; T = temperature-273
    2929    # %From paterson,
    30     # 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)
     30    # 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)
    3333    # %Convert into rigidity B
    3434    # B = A.^(-1 / n) * 10^3; %s^(1 / 3)Pa
     
    3838
    3939    rigidity = np.zeros_like(T)
    40     pos1 = np.nonzero(T <= - 45)[0]
     40    pos1 = np.nonzero(T <= -45)[0]
    4141    if len(pos1):
    4242        rigidity[pos1] = 10**8 * (-0.000292866376675 * (T[pos1] + 50)**3 + 0.011672640664130 * (T[pos1] + 50)**2 - 0.325004442485481 * (T[pos1] + 50) + 6.524779401948101)
  • issm/trunk-jpl/src/m/mech/thomasparams.py

    r24256 r24260  
    127127
    128128    # a < -1 in areas of strong lateral compression or longitudinal compression and
    129     # theta flips sign at a = - 2
     129    # theta flips sign at a = -2
    130130    pos = np.nonzero(np.abs((np.abs(a) - 2.)) < 1.e-3)
    131131    if len(pos) > 0:
  • issm/trunk-jpl/src/m/mesh/ComputeMetric.py

    r24256 r24260  
    1111
    1212       Example:
    13           metric = ComputeMetric(hessian, 2 / 9, 10^ - 1, 100, 10^5, [])
     13          metric = ComputeMetric(hessian, 2 / 9, 10^-1, 100, 10^5, [])
    1414    """
    1515
     
    4141    v2y[pos3] = 1.
    4242
    43     #Compute new metric (for each node M = V * Lambda * V^ - 1)
     43    #Compute new metric (for each node M = V * Lambda * V^-1)
    4444
    4545    metric = np.vstack((((v1x * v2y - v1y * v2x)**(-1) * (lambda1 * v2y * v1x - lambda2 * v1y * v2x)).reshape(-1, ),
  • issm/trunk-jpl/src/m/mesh/bamg.py

    r24256 r24260  
    1919    BAMG - mesh generation
    2020
    21     Available options (for more details see ISSM website http: / /  issm.jpl.nasa.gov / ):
     21    Available options (for more details see ISSM website http://issm.jpl.nasa.gov/):
    2222
    2323    - domain :            followed by an ARGUS file that prescribes the domain outline
     
    3333
    3434    - anisomax :          maximum ratio between the smallest and largest edges (default is 10^30)
    35     - coeff :             coefficient applied to the metric (2 - > twice as many elements, default is 1)
     35    - 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
    3737    - err :               error used to generate the metric from a field
     
    4040                                   to apply several fields, use one column per field
    4141    - gradation :         maximum ratio between two adjacent edges
    42     - Hessiantype :       0 - > use double P2 projection (default)
    43                             1 - > use Green formula
     42    - Hessiantype :       0 -> use double P2 projection (default)
     43                            1 -> use Green formula
    4444    - KeepVertices :      try to keep initial vertices when adaptation is done on an existing mesh (default 1)
    4545    - maxnbv :            maximum number of vertices used to allocate memory (default is 10^6)
    4646    - maxsubdiv :         maximum subdivision of exisiting elements (default is 10)
    4747    - metric :            matrix (numberofnodes x 3) used as a metric
    48     - Metrictype :        1 - > absolute error          c / (err coeff^2) * Abs(H)        (default)
    49                                    2 - > relative error          c / (err coeff^2) * Abs(H) / max(s, cutoff * max(s))
    50                                    3 - > rescaled absolute error c / (err coeff^2) * Abs(H) / (smax - smin)
     48    - Metrictype :        1 -> absolute error          c / (err coeff^2) * Abs(H)        (default)
     49                                   2 -> relative error          c / (err coeff^2) * Abs(H) / max(s, cutoff * max(s))
     50                                   3 -> rescaled absolute error c / (err coeff^2) * Abs(H) / (smax - smin)
    5151    - nbjacoby :          correction used by Hessiantype = 1 (default is 1)
    5252    - nbsmooth :          number of metric smoothing procedure (default is 3)
     
    378378    bamg_options['anisomax'] = options.getfieldvalue('anisomax', 10.**18)
    379379    bamg_options['coeff'] = options.getfieldvalue('coeff', 1.)
    380     bamg_options['cutoff'] = options.getfieldvalue('cutoff', 10.**- 5)
     380    bamg_options['cutoff'] = options.getfieldvalue('cutoff', 10.**-5)
    381381    bamg_options['err'] = options.getfieldvalue('err', np.array([[0.01]]))
    382382    bamg_options['errg'] = options.getfieldvalue('errg', 0.1)
     
    384384    bamg_options['gradation'] = options.getfieldvalue('gradation', 1.5)
    385385    bamg_options['Hessiantype'] = options.getfieldvalue('Hessiantype', 0)
    386     bamg_options['hmin'] = options.getfieldvalue('hmin', 10.**- 100)
     386    bamg_options['hmin'] = options.getfieldvalue('hmin', 10.**-100)
    387387    bamg_options['hmax'] = options.getfieldvalue('hmax', 10.**100)
    388388    bamg_options['hminVertices'] = options.getfieldvalue('hminVertices', np.empty((0, 1)))
  • issm/trunk-jpl/src/m/mesh/bamgflowband.py

    r24213 r24260  
    1818
    1919    Example:
    20         x =np.arrange(1, 3001, 100)
     20        x = np.arrange(1, 3001, 100)
    2121        h = linspace(1000, 300, numel(x))
    22         b= - 917 / 1023 * h
     22        b= -917 / 1023 * h
    2323        md = bamgflowband(model, b + h, b, 'hmax', 80, 'vertical', 1, 'Markers', m)
    2424    """
  • issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py

    r24255 r24260  
    5959
    6060    #Get time and step
    61         if loadres['step'] != - 9999.:
     61        if loadres['step'] != -9999.:
    6262            saveres[index].__dict__['step'] = loadres['step']
    63         if loadres['time'] != - 9999.:
     63        if loadres['time'] != -9999.:
    6464            saveres[index].__dict__['time'] = loadres['time']
    6565
     
    200200            field = field * yts
    201201        elif fieldname == 'TotalFloatingBmb':
    202             field = field / 10.**12 * yts  #(GigaTon / year)
     202            field = field / 10.**12 * yts  #(GigaTon/year)
    203203        elif fieldname == 'TotalFloatingBmbScaled':
    204             field = field / 10.**12 * yts  #(GigaTon / year)
     204            field = field / 10.**12 * yts  #(GigaTon/year)
    205205        elif fieldname == 'TotalGroundedBmb':
    206             field = field / 10.**12 * yts  #(GigaTon / year)
     206            field = field / 10.**12 * yts  #(GigaTon/year)
    207207        elif fieldname == 'TotalGroundedBmbScaled':
    208             field = field / 10.**12 * yts  #(GigaTon / year)
     208            field = field / 10.**12 * yts  #(GigaTon/year)
    209209        elif fieldname == 'TotalSmb':
    210             field = field / 10.**12 * yts  #(GigaTon / year)
     210            field = field / 10.**12 * yts  #(GigaTon/year)
    211211        elif fieldname == 'TotalSmbScaled':
    212             field = field / 10.**12 * yts  #(GigaTon / year)
     212            field = field / 10.**12 * yts  #(GigaTon/year)
    213213        elif fieldname == 'GroundinglineMassFlux':
    214             field = field / 10.**12 * yts  #(GigaTon / year)
     214            field = field / 10.**12 * yts  #(GigaTon/year)
    215215        elif fieldname == 'IcefrontMassFlux':
    216             field = field / 10.**12 * yts  #(GigaTon / year)
     216            field = field / 10.**12 * yts  #(GigaTon/year)
    217217        elif fieldname == 'IcefrontMassFluxLevelset':
    218             field = field / 10.**12 * yts  #(GigaTon / year)
     218            field = field / 10.**12 * yts  #(GigaTon/year)
    219219        elif fieldname == 'SmbMassBalance':
    220220            field = field * yts
     
    255255            field = temp_field
    256256
    257         if time != - 9999:
     257        if time != -9999:
    258258            time = time / yts
    259259
Note: See TracChangeset for help on using the changeset viewer.