source: issm/oecreview/Archive/24684-25833/ISSM-25171-25172.diff

Last change on this file was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 11.8 KB
  • ../trunk-jpl/test/Par/GiaIvinsBenchmarksAB.py

     
    1414rad = 600000.
    1515nv = md.mesh.numberofvertices
    1616if (np.isnan(md.geometry.thickness)):
    17     md.geometry.thickness = np.zeros((md.mesh.numberofvertices, ))
     17    md.geometry.thickness = np.zeros((md.mesh.numberofvertices, 1))
    1818for i in range(nv):
    1919    dist = np.sqrt(md.mesh.x[i]**2 + md.mesh.y[i]**2)
    2020    if (dist <= rad):
    2121        md.geometry.thickness[i] = 2000.0
    2222    else:
    23         md.geometry.thickness[i] = 1.0  # non - zero thickness
     23        md.geometry.thickness[i] = 1.0  # non-zero thickness
    2424
    2525md.geometry.thickness = md.geometry.thickness.reshape(-1, 1)
    26 md.geometry.base = np.zeros((md.mesh.numberofvertices, ))
     26md.geometry.base = np.zeros((md.mesh.numberofvertices, 1))
    2727md.geometry.surface = md.geometry.thickness + md.geometry.base.reshape(-1, 1)  #would otherwise create a 91x91 matrix
    2828
    29 #Ice density used for benchmarking, not 917 kg / m^3
    30 md.materials.rho_ice = 1000  #kg m^3
     29#Ice density used for benchmarking, not 917 kg/m^3
     30md.materials.rho_ice = 1000  #kg/m^3
    3131
    32 #GIA parameters specific to Experiments A  and B
     32#GIA parameters specific to Experiments A and B
    3333md.gia=giaivins();
    34 md.gia.mantle_viscosity = 1e21 * np.ones((md.mesh.numberofvertices, ))  #in Pa.s
    35 md.gia.lithosphere_thickness = 100 * np.ones((md.mesh.numberofvertices, ))  #in km
     34md.gia.mantle_viscosity = 1e21 * np.ones((md.mesh.numberofvertices, 1))  #in Pa.s
     35md.gia.lithosphere_thickness = 100 * np.ones((md.mesh.numberofvertices, 1))  #in km
    3636md.materials.lithosphere_shear_modulus = 6.7 * 1e10  #in Pa
    37 md.materials.lithosphere_density = 3.36  #in g / cm^3
     37md.materials.lithosphere_density = 3.36  #in g/cm^3
    3838md.materials.mantle_shear_modulus = 1.45 * 1e11  #in Pa
    39 md.materials.mantle_density = 3.38  #in g / cm^3
     39md.materials.mantle_density = 3.38  #in g/cm^3
    4040
    4141#Initial velocity
    4242x = archread('../Data/SquareSheetConstrained.arch', 'x')
     
    5252x = None
    5353y = None
    5454index = None
    55 md.initialization.vz = np.zeros((md.mesh.numberofvertices, ))
    56 md.initialization.pressure = np.zeros((md.mesh.numberofvertices, ))
     55md.initialization.vz = np.zeros((md.mesh.numberofvertices, 1))
     56md.initialization.pressure = np.zeros((md.mesh.numberofvertices, 1))
    5757
    5858#Materials
    59 md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices, ))
     59md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices, 1))
    6060md.materials.rheology_B = paterson(md.initialization.temperature)
    61 md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements, ))
     61md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements, 1))
    6262
    6363#Friction
    64 md.friction.coefficient = 20. * np.ones((md.mesh.numberofvertices, ))
     64md.friction.coefficient = 20. * np.ones((md.mesh.numberofvertices, 1))
    6565md.friction.coefficient[np.where(md.mask.ocean_levelset < 0.)] = 0.
    66 md.friction.p = np.ones((md.mesh.numberofelements, ))
    67 md.friction.q = np.ones((md.mesh.numberofelements, ))
     66md.friction.p = np.ones((md.mesh.numberofelements, 1))
     67md.friction.q = np.ones((md.mesh.numberofelements, 1))
    6868
    6969#Numerical parameters
    7070md.groundingline.migration = 'None'
     
    7575md.stressbalance.restol = 0.05
    7676md.steadystate.reltol = 0.05
    7777md.stressbalance.reltol = 0.05
    78 md.stressbalance.abstol = float('NaN')
     78md.stressbalance.abstol = np.nan
    7979md.timestepping.time_step = 1.
    8080md.timestepping.final_time = 3.
    8181
  • ../trunk-jpl/test/Par/GiaIvinsBenchmarksCD.py

     
    11#Geometry specific to Experiments C and D
    22
     3import inspect
    34import os.path
    4 import inspect
     5
    56import numpy as np
     7
    68from arch import *
     9from giaivins import giaivins
    710from InterpFromMeshToMesh2d import *
    811from paterson import *
    912from verbose import *
    1013from SetIceSheetBC import *
    1114
     15
    1216rad = 800000
    1317nv = md.mesh.numberofvertices
    1418if (np.isnan(md.geometry.thickness)):
    15     md.geometry.thickness = np.zeros((md.mesh.numberofvertices, ))
     19    md.geometry.thickness = np.zeros((md.mesh.numberofvertices, 1))
    1620for i in range(nv):
    1721    dist = np.sqrt(md.mesh.x[i]**2 + md.mesh.y[i]**2)
    1822    if (dist <= rad):
     
    2125        md.geometry.thickness[i] = 1.0  # non - zero thickness
    2226
    2327md.geometry.thickness = md.geometry.thickness.reshape(-1, 1)
    24 md.geometry.base = np.zeros((md.mesh.numberofvertices, ))
     28md.geometry.base = np.zeros((md.mesh.numberofvertices, 1))
    2529md.geometry.surface = md.geometry.thickness + md.geometry.base.reshape(-1, 1)  #would otherwise create a 91x91 matrix
    2630
    2731#Ice density used for benchmarking, not 917 kg / m^3
    28 md.materials.rho_ice = 1000  #kg m^3
     32md.materials.rho_ice = 1000 #kg m^3
    2933
    30 #GIA parameters specific to Experiments A  and B
    31 md.gia.mantle_viscosity = 1e21 * np.ones((md.mesh.numberofvertices, ))  #in Pa.s
    32 md.gia.lithosphere_thickness = 100 * np.ones((md.mesh.numberofvertices, ))  #in km
     34#GIA parameters specific to Experiments A and B
     35md.gia=giaivins();
     36md.gia.mantle_viscosity = 1e21 * np.ones((md.mesh.numberofvertices, 1))  #in Pa.s
     37md.gia.lithosphere_thickness = 100 * np.ones((md.mesh.numberofvertices, 1))  #in km
    3338md.materials.lithosphere_shear_modulus = 6.7e10  #in Pa
    3439md.materials.lithosphere_density = 3.32  #in g / cm^3
    3540md.materials.mantle_shear_modulus = 1.45e11  #in Pa
     
    4954x = None
    5055y = None
    5156index = None
    52 md.initialization.vz = np.zeros((md.mesh.numberofvertices, ))
    53 md.initialization.pressure = np.zeros((md.mesh.numberofvertices, ))
     57md.initialization.vz = np.zeros((md.mesh.numberofvertices, 1))
     58md.initialization.pressure = np.zeros((md.mesh.numberofvertices, 1))
    5459
    5560#Materials
    56 md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices, ))
     61md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices, 1))
    5762md.materials.rheology_B = paterson(md.initialization.temperature)
    58 md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements, ))
     63md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements, 1))
    5964
    6065#Friction
    61 md.friction.coefficient = 20. * np.ones((md.mesh.numberofvertices, ))
     66md.friction.coefficient = 20. * np.ones((md.mesh.numberofvertices, 1))
    6267md.friction.coefficient[np.where(md.mask.ocean_levelset < 0.)] = 0.
    63 md.friction.p = np.ones((md.mesh.numberofelements, ))
    64 md.friction.q = np.ones((md.mesh.numberofelements, ))
     68md.friction.p = np.ones((md.mesh.numberofelements, 1))
     69md.friction.q = np.ones((md.mesh.numberofelements, 1))
    6570
    6671#Numerical parameters
    6772md.groundingline.migration = 'None'
     
    7277md.stressbalance.restol = 0.05
    7378md.steadystate.reltol = 0.05
    7479md.stressbalance.reltol = 0.05
    75 md.stressbalance.abstol = float('NaN')
     80md.stressbalance.abstol = np.nan
    7681md.timestepping.time_step = 1.
    7782md.timestepping.final_time = 3.
    7883
  • ../trunk-jpl/test/NightlyRun/test2071.py

     
    1616md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1717
    1818#indicate what you want to compute
    19 md.gia.cross_section_shape = 1  # for square-edged x - section
     19md.gia.cross_section_shape = 1  # for square-edged x-section
    2020
    2121#define loading history
    2222md.timestepping.start_time = 0.3  # for t \approx 0 kyr : to get eleastic response!
    23 md.timestepping.final_time = 2500000  # 2, 500 kyr
     23md.timestepping.final_time = 2500000  # 2,500 kyr
    2424md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
    2525                                  np.append(md.geometry.thickness / 2.0, 0.1),
    2626                                  np.append(md.geometry.thickness, 0.2),
  • ../trunk-jpl/src/m/classes/model.m

     
    12631263                        md.calving          = calving();
    12641264                        md.frontalforcings  = frontalforcings();
    12651265                        md.gia              = giamme();
    1266                         md.esa              = esa();
    12671266                        md.love             = fourierlove();
    12681267                        md.esa              = esa();
    12691268                        md.autodiff         = autodiff();
  • ../trunk-jpl/src/m/classes/model.py

     
    8686        '''
    8787        self.mesh = mesh2d()
    8888        self.mask = mask()
     89        self.constants = constants()
    8990        self.geometry = geometry()
    90         self.constants = constants()
     91        self.initialization = initialization()
    9192        self.smb = SMBforcing()
    9293        self.basalforcings = basalforcings()
     94        self.friction = friction()
     95        self.rifts = rifts()
     96        self.solidearth = solidearth()
     97        self.dsl = dsl()
     98        self.timestepping = timestepping()
     99        self.groundingline = groundingline()
    93100        self.materials = matice()
    94101        self.damage = damage()
    95         self.friction = friction()
    96102        self.flowequation = flowequation()
    97         self.timestepping = timestepping()
    98         self.initialization = initialization()
    99         self.rifts = rifts()
    100         self.dsl = dsl()
    101         self.solidearth = solidearth()
    102 
    103103        self.debug = debug()
    104104        self.verbose = verbose()
    105105        self.settings = issmsettings()
    106106        self.toolkits = toolkits()
    107107        self.cluster = generic()
    108 
    109108        self.balancethickness = balancethickness()
    110109        self.stressbalance = stressbalance()
    111         self.groundingline = groundingline()
    112110        self.hydrology = hydrologyshreve()
    113111        self.masstransport = masstransport()
    114112        self.thermal = thermal()
     
    124122        self.inversion = inversion()
    125123        self.qmu = qmu()
    126124        self.amr = amr()
    127 
     125        self.radaroverlay = radaroverlay()
    128126        self.results = results()
    129127        self.outputdefinition = outputdefinition()
    130         self.radaroverlay = radaroverlay()
    131128        self.miscellaneous = miscellaneous()
    132129        self.private = private()
    133130    #}}}
     
    136133        # ordered list of properties since vars(self) is random
    137134        return ['mesh',
    138135                'mask',
     136                'constants',
    139137                'geometry',
    140                 'constants',
     138                'initialization',
    141139                'smb',
    142140                'basalforcings',
     141                'friction',
     142                'rifts',
     143                'solidearth',
     144                'dsl',
     145                'timestepping',
     146                'groundingline',
    143147                'materials',
    144148                'damage',
    145                 'friction',
    146149                'flowequation',
    147                 'timestepping',
    148                 'initialization',
    149                 'rifts',
    150                 'dsl',
    151                 'solidearth',
    152150                'debug',
    153151                'verbose',
    154152                'settings',
     
    156154                'cluster',
    157155                'balancethickness',
    158156                'stressbalance',
    159                 'groundingline',
    160157                'hydrology',
    161158                'masstransport',
    162159                'thermal',
     
    165162                'levelset',
    166163                'calving',
    167164                'frontalforcings',
     165                'gia',
    168166                'love',
    169                 'gia',
    170167                'esa',
    171168                'autodiff',
    172169                'inversion',
    173170                'qmu',
    174171                'amr',
     172                'radaroverlay',
     173                'results',
    175174                'outputdefinition',
    176                 'results',
    177                 'radaroverlay',
    178175                'miscellaneous',
    179176                'private']
    180177    # }}}
Note: See TracBrowser for help on using the repository browser.