Ignore:
Timestamp:
07/24/20 14:31:10 (5 years ago)
Author:
jdquinn
Message:

CHG: Found really bad bug: scaling in WriteData was modifying model field values in some cases; changes to Python GIA tests; minor corrections/formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test2053.py

    r25290 r25300  
    1 #Test Name: GiaIvinsBenchmarksAB2dD1
     1#Test Name: GiaIvinsBenchmarksAB2dD
    22from socket import gethostname
    33
     
    1111
    1212
    13 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     13# Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.)
    1414md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
    1515md = setmask(md, '', '')
    1616md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1717
    18 #indicate what you want to compute
    19 md.gia.cross_section_shape = 2  # for square-edged x - section
     18# indicate what you want to compute
     19md.gia.cross_section_shape = 2  # for elliptical edge
    2020
    21 #define loading history
    22 md.timestepping.start_time = 0.3  # for t \approx 0 kyr : to get eleastic response!
    23 md.timestepping.final_time = 2500000  # 2, 500 kyr
    24 md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
    25                                   np.append(md.geometry.thickness / 2.0, 0.1),
    26                                   np.append(md.geometry.thickness, 0.2),
    27                                   np.append(md.geometry.thickness, md.timestepping.start_time)]).T
     21# evaluation time (termed start_time)
     22md.timestepping.start_time = 0.3  # for t \approx 0 kyr : to get elastic response!
     23md.timestepping.final_time = 2500000  # 2,500 kyr
    2824
    29 #solve for GIA deflection
     25# define loading history
     26md.geometry.thickness = np.array([
     27    np.append(md.geometry.thickness * 0.0, 0.0),
     28    np.append(md.geometry.thickness / 2.0, 0.1),
     29    np.append(md.geometry.thickness, 0.2),
     30    np.append(md.geometry.thickness, md.timestepping.start_time)
     31    ]).T
     32
     33# find out elements that have zero loads throughout the loading history
     34pos = np.where(np.abs(md.geometry.thickness[0:-2, :].sum(axis=1)) == 0)[0]
     35md.mask.ice_levelset[pos] = 1 # no ice
     36
    3037md.cluster = generic('name', gethostname(), 'np', 3)
    3138md.verbose = verbose('1111111')
     39
     40# solve for GIA deflection
    3241md = solve(md, 'Gia')
    3342
    34 #Fields and tolerances to track changes
    35 field_names = ['UGia', 'UGiaRate']
    36 field_tolerances = [1e-13, 1e-13]
    37 field_values = [md.results.GiaSolution.UGia, md.results.GiaSolution.UGiaRate]
     43# Test Name: GiaIvinsBenchmarksAB2dD1
     44U_AB2dD1 = md.results.GiaSolution.UGia
     45URate_AB2dD1 = md.results.GiaSolution.UGiaRate
     46
     47# Test Name: GiaIvinsBenchmarksAB2dD2
     48# different evaluation time # {{{
     49md.timestepping.start_time = 1000.3 # for t \approx 1 kyr
     50md.geometry.thickness[-1, -1] = md.timestepping.start_time
     51
     52md = solve(md, 'Gia')
     53
     54U_AB2dD2 = md.results.GiaSolution.UGia
     55URate_AB2dD2 = md.results.GiaSolution.UGiaRate
     56# }}}
     57
     58# Test Name: GiaIvinsBenchmarksAB2dD3
     59# different evaluation time # {{{
     60md.timestepping.start_time = 2400000 # for t \approx \infty
     61md.geometry.thickness[-1, -1] = md.timestepping.start_time
     62
     63md = solve(md, 'Gia')
     64
     65U_AB2dD3 = md.results.GiaSolution.UGia
     66URate_AB2dD3 = md.results.GiaSolution.UGiaRate
     67# }}}
     68
     69# Fields and tolerances to track changes
     70field_names = ['U_AB2dD1', 'URate_AB2dD1', 'U_AB2dD2', 'URate_AB2dD2', 'U_AB2dD3', 'URate_AB2dD3']
     71field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     72field_values = [U_AB2dD1, URate_AB2dD1, U_AB2dD2, URate_AB2dD2, U_AB2dD3, URate_AB2dD3]
     73
Note: See TracChangeset for help on using the changeset viewer.