Changeset 23793


Ignore:
Timestamp:
03/13/19 03:17:46 (6 years ago)
Author:
bdef
Message:

pep8 compliance of NTs

Location:
issm/trunk-jpl/test/NightlyRun
Files:
299 edited

Legend:

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

    r23176 r23793  
    44import numpy as np
    55
     6
    67def GetIds(ids_names):
    7         """
    8         GetIds - output ids from a given array of IDs and test names
     8    """
     9     GetIds - output ids from a given array of IDs and test names
    910
    10                 the test names can be any string or sub-string present
    11                 in the test's name (first line of corresponding file)
     11              the test names can be any string or sub-string present
     12              in the test's name (first line of corresponding file)
    1213
    13                  test names are case sensitive
    14  
    15             Usage:
    16                 ids=GetIds(101)
    17                 ids=GetIds('Dakota')
    18                 ids=GetIds([101,102...])
    19                 ids=GetIds([\'Dakota\',\'Slr\'...])
    20                 ids=GetIds([[101,102...],[\'Dakota\',\'Slr\'...]])
    21         """
     14              test names are case sensitive
    2215
    23         ids = []
     16         Usage:
     17             ids = GetIds(101)
     18             ids = GetIds('Dakota')
     19             ids = GetIds([101, 102...])
     20             ids = GetIds([\'Dakota\',\'Slr\'...])
     21             ids = GetIds([[101, 102...],[\'Dakota\',\'Slr\'...]])
     22    """
    2423
    25         # 1 input, either an id or a test name
    26         if type(ids_names) == str:
    27                 ids = IdFromString(ids_names)
    28                 if len(ids) == 0:
    29                         # fail silently
    30                         return []
    31                         #raise RuntimeError('runme.py: GetIds.py: No tests with names matching "'+ids_names+'" were found. Note that name checking is case sensitive. Test names are in the first line of a given test eg: "Square" would include test101.py: "SquareShelfConstrainedStressSSA2d"')
     24    ids = []
    3225
    33         if type(ids_names) == int:
    34                 ids = [ids_names]
    35                 if len(ids) == 0:
    36                         # fail silently
    37                         return []
    38                         #raise RuntimeError('runme.py: GetIds.py: No tests with ids matching "'+ids_names+'" were found. Check that there is a test file named "test'+str(ids_names)+'.py"')
     26    # 1 input, either an id or a test name
     27    if type(ids_names) == str:
     28        ids = IdFromString(ids_names)
     29        if len(ids) == 0:
     30            # fail silently
     31            return []
     32        #raise RuntimeError('runme.py: GetIds.py: No tests with names matching "'+ids_names+'" were found. Note that name checking is case sensitive. Test names are in the first line of a given test eg: "Square" would include test101.py: "SquareShelfConstrainedStressSSA2d"')
    3933
    40         # many inputs of either ids or test names
    41         if type(ids_names) == list and len(ids_names) > 0:
    42                 # is everything a string or int?
    43                 if np.array([type(i) == int for i in ids_names]).all():
    44                         ids = ids_names
    45                 elif np.array([type(i) == str for i in ids_names]).all():
    46                         ids = np.concatenate([IdFromString(i) for i in ids_names])
    47                         if len(ids) == 0:
    48                                 raise RuntimeError('runme.py: GetIds.py: No tests with names matching "'+ids_names+'" were found. Note that name checking is case sensitive.')
     34    if type(ids_names) == int:
     35        ids = [ids_names]
     36        if len(ids) == 0:
     37            # fail silently
     38            return []
     39        #raise RuntimeError('runme.py: GetIds.py: No tests with ids matching "'+ids_names+'" were found. Check that there is a test file named "test'+str(ids_names)+'.py"')
    4940
    50         # many inputs of both ids and test names
    51         # ids_names[0] -> ids_names by id
    52         # ids_names[1] -> ids_names by test name
    53         if type(ids_names) == list and len(ids_names) == 2:
    54                 if type(ids_names[0]) == list and len(ids_names[0]) > 0 and type(ids_names[0][0]) == int:
    55                         ids = np.concatenate([ids,ids_names[0]])
    56                 if type(ids_names[1]) == list and len(ids_names[1]) > 0 and type(ids_names[1][0]) == str:
    57                         ids = np.concatenate([ids,np.concatenate([IdFromString(i) for i in ids_names[1]])])
    58                         if len(ids) == 0:
    59                                 raise RuntimeError('runme.py: GetIds.py: No tests with names matching "'+ids_names+'" were found. Note that name checking is case sensitive.')
     41    # many inputs of either ids or test names
     42    if type(ids_names) == list and len(ids_names) > 0:
     43        # is everything a string or int?
     44        if np.array([type(i) == int for i in ids_names]).all():
     45            ids = ids_names
     46        elif np.array([type(i) == str for i in ids_names]).all():
     47            ids = np.concatenate([IdFromString(i) for i in ids_names])
     48            if len(ids) == 0:
     49                raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive.')
    6050
    61         # no recognizable ids or id formats
    62         if np.size(ids) == 0 and not np.all(np.equal(ids_names,None)):
    63                 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__)
     51    # 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
     54    if type(ids_names) == list and len(ids_names) == 2:
     55        if type(ids_names[0]) == list and len(ids_names[0]) > 0 and type(ids_names[0][0]) == int:
     56            ids = np.concatenate([ids, ids_names[0]])
     57        if type(ids_names[1]) == list and len(ids_names[1]) > 0 and type(ids_names[1][0]) == str:
     58            ids = np.concatenate([ids, np.concatenate([IdFromString(i) for i in ids_names[1]])])
     59            if len(ids) == 0:
     60                raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive.')
    6461
    65         return np.array(ids).astype(int)
     62    # no recognizable ids or id formats
     63    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__)
    6665
     66    return np.array(ids).astype(int)
  • issm/trunk-jpl/test/NightlyRun/IdFromString.py

    r23707 r23793  
    33import os
    44
    5 # use verbose=False to print output when this is called by command line
    6 def IdFromString(string,verbose=False):
    7         """
    8         IDFROMSTRING - output ids from a given string
    9  
    10             Usage:
    11                 ids=IdFromString(string)
    12  
    13             Examples:
    14                 ids=IdFromString('Parallel')
    15                 ids=IdFromString('79North')
    16                 ids=IdFromString('*')
    17         """
     5# use verbose = False to print output when this is called by command line
    186
    19         #Check input
    20         if not isinstance(string,str):
    21                 raise TypeError('IdFromString error message: input argument is not a string.')
    22         string = string.replace("'",'')
    23         string = string.replace('"','')
    247
    25         #Get the test ids and names and scan for matches
     8def IdFromString(string, verbose=False):
     9    """
     10    IDFROMSTRING - output ids from a given string
     11        Usage:
     12            ids = IdFromString(string)
     13        Examples:
     14            ids = IdFromString('Parallel')
     15            ids = IdFromString('79North')
     16            ids = IdFromString('*')
     17    """
    2618
    27         ids = []
    28         idnames = []
    29         for f in os.listdir('.'):
    30                 if f.endswith('.py') and f.startswith('test'):
    31                         # all tests look like: "testwxyz.py" so 5th to 3rd to last is always the full id
    32                         s = int(f[4:-3])
    33                         name = IdToName(s)
    34                         if (string == '*') or (name != None and string in name):
    35                                 ids.append(s)
    36                                 idnames.append(name)
     19    #Check input
     20    if not isinstance(string, str):
     21        raise TypeError('IdFromString error message: input argument is not a string.')
     22    string = string.replace("'", '')
     23    string = string.replace('"', '')
    3724
    38         #Return if no test found
    39         if not ids:
    40                 print("No test matches '%s'." % string)
    41                 return ids
     25    #Get the test ids and names and scan for matches
    4226
    43         #Display names
    44         if verbose:
    45                 idnames = [i for _,i in sorted(zip(ids,idnames), key=lambda pair: pair[0])]
     27    ids = []
     28    idnames = []
     29    for f in os.listdir('.'):
     30        if f.endswith('.py') and f.startswith('test'):
     31            # all tests look like: "testwxyz.py" so 5th to 3rd to last is always the full id
     32            s = int(f[4:-3])
     33            name = IdToName(s)
     34            if (string == '*') or (name is not None and string in name):
     35                ids.append(s)
     36                idnames.append(name)
    4637
    47         ids.sort()
     38    #Return if no test found
     39    if not ids:
     40        print("No test matches '%s'." % string)
     41        return ids
    4842
    49         if verbose:
    50                 print("%s tests match '%s':" % (len(ids),string))
    51                 for i in range(len(ids)):
    52                         print("   %s : %s" % (ids[i],idnames[i]))
    53         #else:
    54                 #print ids
     43    #Display names
     44    if verbose:
     45        idnames = [i for _, i in sorted(zip(ids, idnames), key=lambda pair: pair[0])]
    5546
    56         return ids
     47    ids.sort()
    5748
     49    if verbose:
     50        print("{} tests match '{}':".format(len(ids), string))
     51        for i in range(len(ids)):
     52            print("   {} : {}".format(ids[i], idnames[i]))
     53    return ids
  • issm/trunk-jpl/test/NightlyRun/IdToName.py

    r23153 r23793  
    11#! /usr/bin/env python
    22
     3
    34def IdToName(test_id):
    4         """
    5         IDTONAME- return name of test
    6  
    7             Usage:
    8                name=IdToName(test_id)
    9         """
    10         infile = open('test' + str(test_id) + '.py','r')
    11         file_text = infile.readline()
     5    """
     6        IDTONAME- return name of test
    127
    13         string = '#Test Name:'
    14         name = file_text[len(string)+1:-1]
    15         return name
     8            Usage:
     9               name = IdToName(test_id)
     10        """
     11    infile = open('test' + str(test_id) + '.py', 'r')
     12    file_text = infile.readline()
     13
     14    string = '#Test Name:'
     15    name = file_text[len(string) + 1:-1]
     16    return name
  • issm/trunk-jpl/test/NightlyRun/runme.py

    r23733 r23793  
    11#!/usr/bin/env python
    22import os
     3import argparse
    34import numpy as np
    45from traceback import format_exc
    56from sys import float_info
    67from glob import glob
    7 from socket import gethostname
    88from GetIds import *
    99try:
    10         from parallelrange import parallelrange
    11 except ImportError: #we don't have issm code in path, just get it
    12         import devpath
    13         from parallelrange import parallelrange
     10    from parallelrange import parallelrange
     11except ModuleNotFoundError: #we don't have issm code in path, just get it
     12    import devpath
     13    from parallelrange import parallelrange
    1414from IdToName import IdToName
    1515from arch import archread
    1616from arch import archwrite
    17 from arch import archdisp
    18 
    19 def runme(id=None,exclude=None,benchmark='nightly',procedure='check',output='none',rank=1,numprocs=1):
    20         """
    21         RUNME - test deck for ISSM nightly runs
    22 
    23             In a test deck directory (tests/Vertification/NightlyRun for example)
    24             The following command will launch all the existing tests:
    25             >> runme()
    26             To run the tests 101 and 102:
    27             >> runme(id=[101,102])
    28             etc...
    29 
    30             Available options:
    31                'id'            followed by the list of ids or (parts of) test names requested
    32                                 Note: runs all tests by default
    33 
    34                'exclude'       ids or (parts of) test names to be excluded (same format as id)
    35                                 Note: exclude does nothing if 'id' is specified with different values
    36 
    37                'benchmark'     'all' (all of the tests)
    38                           'nightly' (nightly run/ daily run)
    39                           'ismip'  : validation of ismip-hom tests
    40                           'eismint': validation of eismint tests
    41                           'thermal': validation of thermal tests
    42                           'mesh'   : validation of mesh tests
    43                           'adolc'  : validation of adolc tests
    44                           'slr'    : validation of slr tests
    45 
    46                'procedure'     'check' : run the test (default)
    47                                'update': update the archive
    48 
    49             Usage:
    50                runme(varargin)
    51 
    52             Examples:
    53                runme()
    54                runme(101)
    55                runme('SquareShelf')
    56                runme(exclude=2001)
    57                runme(exclude='Dakota',benchmark='all')
    58                runme(id=[[101,102],['Dakota','Slr']])
    59         """
    60 
    61         #Get ISSM_DIR variable
    62         ISSM_DIR=os.environ['ISSM_DIR']
    63 
    64         #Process options
    65         #GET benchmark {{{
    66         if not benchmark in ['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing','adolc','slr','referential']:
    67                 print(("runme warning: benchmark '{}' not supported, defaulting to test 'nightly'.".format(benchmark)))
    68                 benchmark='nightly'
    69         # }}}
    70         #GET procedure {{{
    71         if not procedure in ['check','update']:
    72                 print(("runme warning: procedure '{}' not supported, defaulting to test 'check'.".format(procedure)))
    73                 procedure='check'
    74         # }}}
    75         #GET output {{{
    76         if not output in ['nightly','none']:
    77                 print(("runme warning: output '{}' not supported, defaulting to test 'none'.".format(output)))
    78                 output='none'
    79         # }}}
    80         #GET RANK and NUMPROCS for multithreaded runs {{{
    81         if (numprocs<rank):
    82                 numprocs=1
    83         # }}}
    84         #GET ids  {{{
    85         flist=glob('test*.py')    #File name must start with 'test' and must end by '.py' and must be different than 'test.py'
    86         list_ids=[int(file[4:-3]) for file in flist if not file == 'test.py']    #Keep test id only (skip 'test' and '.py')
    87 
    88         i1,i2=parallelrange(rank,numprocs,len(list_ids))    #Get tests for this cpu only
    89         list_ids=list_ids[i1:i2+1]
    90 
    91         if np.size(id) > 0 and not id==None:
    92                 test_ids = set(GetIds(id)).intersection(set(list_ids))
    93                 benchmark = None
    94         else:
    95                 # if no tests are specifically provided, do them all
    96                 test_ids = set(list_ids)
    97 
    98         # }}}
    99         #GET exclude {{{
    100         exclude_ids = GetIds(exclude)
    101 
    102         test_ids=test_ids.difference(exclude_ids)
    103         # }}}
    104         #Process Ids according to benchmarks {{{
    105         if benchmark=='nightly':
    106                 test_ids=test_ids.intersection(set(range(1,1000)))
    107         elif benchmark=='validation':
    108                 test_ids=test_ids.intersection(set(range(1001,2000)))
    109         elif benchmark=='ismip':
    110                 test_ids=test_ids.intersection(set(range(1101,1200)))
    111         elif benchmark=='eismint':
    112                 test_ids=test_ids.intersection(set(range(1201,1300)))
    113         elif benchmark=='thermal':
    114                 test_ids=test_ids.intersection(set(range(1301,1400)))
    115         elif benchmark=='mesh':
    116                 test_ids=test_ids.intersection(set(range(1401,1500)))
    117         elif benchmark=='tranforcing':
    118                 test_ids=test_ids.intersection(set(range(1501,1503)))
    119         elif benchmark=='referential':
    120                 test_ids=test_ids.intersection(set(range(1601,1603)))
    121         elif benchmark=='slr':
    122                 test_ids=test_ids.intersection(set(range(2001,2500)))
    123         elif benchmark=='adolc':
    124                 test_ids=test_ids.intersection(set(range(3001,3200)))
    125         test_ids=list(test_ids)
    126         test_ids.sort()
    127         # }}}
    128 
    129         #Loop over tests and launch sequence
    130         root=os.getcwd()
    131         for id in test_ids:
    132                 print(("----------------starting:{}-----------------------".format(id)))
    133                 try:
    134 
    135                         #Execute test
    136                         os.chdir(root)
    137                         id_string=IdToName(id)
    138                         exec(compile(open('test'+str(id)+'.py').read(), 'test'+str(id)+'.py', 'exec'),globals())
    139 
    140                         #UPDATE ARCHIVE?
    141                         archive_name='Archive'+str(id)
    142                         if procedure=='update':
    143                                 archive_file=os.path.join('..','Archives',archive_name+'.arch')
    144                                 if os.path.isfile(archive_file):
    145                                         os.remove(archive_file)
    146                                 for k,fieldname in enumerate(field_names):
    147                                         field=np.array(field_values[k],dtype=float)
    148                                         if len(field.shape) == 1:
    149                                                 if np.size(field):
    150                                                         field=field.reshape(np.size(field),1)
    151                                                 else:
    152                                                         field=field.reshape(0,0)
    153                                         elif len(field.shape) == 0:
    154                                                 field=field.reshape(1,1)
    155                                         # Matlab uses base 1, so use base 1 in labels
    156                                         archwrite(archive_file,archive_name+'_field'+str(k+1),field)
    157                                 print(("File {} saved. \n".format(os.path.join('..','Archives',archive_name+'.arch'))))
    158 
    159                         #ELSE: CHECK TEST
    160                         else:
    161 
    162                                 #load archive
    163                                 if os.path.exists(os.path.join('..','Archives',archive_name+'.arch')):
    164                                         archive_file=os.path.join('..','Archives',archive_name+'.arch')
    165                                 else:
    166                                         raise IOError("Archive file '"+os.path.join('..','Archives',archive_name+'.arch')+"' does not exist.")
    167 
    168                                 for k,fieldname in enumerate(field_names):
    169                                         try:
    170                                                 #Get field and tolerance
    171                                                 field=np.array(field_values[k])
    172                                                 if len(field.shape) == 1:
    173                                                         if np.size(field):
    174                                                                 field=field.reshape(np.size(field),1)
    175                                                         else:
    176                                                                 field=field.reshape(0,0)
    177                                                 tolerance=field_tolerances[k]
    178 
    179                                                 #compare to archive
    180                                                 # Matlab uses base 1, so use base 1 in labels
    181                                                 archive=np.array(archread(archive_file,archive_name+'_field'+str(k+1)))
    182                                                 #Because np.array is weird (str(np.array(None)) becomes 'None' but np.array(None) is never equal to None, it basically becomes a type of string in an array):
    183                                                 if str(archive) == 'None':
    184                                                         raise NameError("Field name '"+archive_name+'_field'+str(k+1)+"' does not exist in archive file.")
    185                                                 if np.shape(field) != np.shape(archive) and not np.shape(field) in [(1,1),(0,0),(1,0),(0,1)]:
    186                                                         field = field.T
    187                                                         if np.shape(field) != np.shape(archive):
    188                                                                 raise RuntimeError("Field '"+archive_name+"' from test is malformed; shape is "+str(np.shape(field.T))+", should be "+str(np.shape(archive))+" (or "+str(np.shape(archive.T))+").")
    189 
    190                                                 error_diff=np.amax(np.abs(archive-field),axis=0)/(np.amax(np.abs(archive),axis=0)+float_info.epsilon)
    191                                                 if not np.isscalar(error_diff):
    192                                                         error_diff=error_diff[0]
    193 
    194                                                 #disp test result
    195                                                 if (np.any(error_diff>tolerance) or np.isnan(error_diff)):
    196                                                         print(('ERROR   difference: {} > {} test id: {} test name: {} field: {}'.format(error_diff,tolerance,id,id_string,fieldname)))
    197                                                 else:
    198                                                         print(('SUCCESS difference: {} < {} test id: {} test name: {} field: {}'.format(error_diff,tolerance,id,id_string,fieldname)))
    199 
    200                                         except Exception as message:
    201 
    202                                                 #something went wrong, print failure message:
    203                                                 print((format_exc()))
    204                                                 directory=os.getcwd().split('/')    #  not used?
    205                                                 if output=='nightly':
    206                                                         fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a')
    207                                                         fid.write('%s' % message)
    208                                                         fid.write('\n------------------------------------------------------------------\n')
    209                                                         fid.close()
    210                                                         print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id,id_string,fieldname)))
    211                                                 else:
    212                                                         print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id,id_string,fieldname)))
    213                                                         raise RuntimeError(message)
    214 
    215 
    216                 except Exception as message:
    217 
    218                         #something went wrong, print failure message:
    219                         print((format_exc()))
    220                         directory=os.getcwd().split('/')    #  not used?
    221                         if output=='nightly':
    222                                 fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a')
    223                                 fid.write('%s' % message)
    224                                 fid.write('\n------------------------------------------------------------------\n')
    225                                 fid.close()
    226                                 print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id,id_string,'N/A')))
    227                         else:
    228                                 print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id,id_string,'N/A')))
    229                                 raise RuntimeError(message)
    230 
    231                 print(("----------------finished:{}-----------------------".format(id)))
    232         return
    233 
    234 import argparse
     17
     18
     19def runme(id=None, exclude=None, benchmark='nightly', procedure='check', output='none', rank=1, numprocs=1):
     20
     21    """
     22    RUNME - test deck for ISSM nightly runs
     23
     24        In a test deck directory (tests/Vertification/NightlyRun for example)
     25        The following command will launch all the existing tests:
     26        >> runme()
     27        To run the tests 101 and 102:
     28        >> runme(id = [101, 102])
     29        etc...
     30
     31        Available options:
     32            'id'            followed by the list of ids or (parts of) test names requested
     33                            Note: runs all tests by default
     34
     35            'exclude'       ids or (parts of) test names to be excluded (same format as id)
     36                            Note: exclude does nothing if 'id' is specified with different values
     37
     38            'benchmark'     'all' (all of the tests)
     39                            'nightly' (nightly run/ daily run)
     40                            'ismip'  : validation of ismip-hom tests
     41                            'eismint': validation of eismint tests
     42                            'thermal': validation of thermal tests
     43                            'mesh'   : validation of mesh tests
     44                            'adolc'  : validation of adolc tests
     45                            'slr'    : validation of slr tests
     46
     47            'procedure'     'check' : run the test (default)
     48                            'update': update the archive
     49
     50        Usage:
     51            runme(varargin)
     52
     53        Examples:
     54            runme()
     55            runme(101)
     56            runme('SquareShelf')
     57            runme(exclude = 2001)
     58            runme(exclude='Dakota', benchmark='all')
     59            runme(id = [[101, 102],['Dakota', 'Slr']])
     60        """
     61    #Get ISSM_DIR variable
     62    ISSM_DIR = os.environ['ISSM_DIR']
     63
     64    #Process options
     65    #GET benchmark {{{
     66    if benchmark not in ['all', 'nightly', 'ismip', 'eismint',
     67                         'thermal', 'mesh', 'validation', 'tranforcing',
     68                         'adolc', 'slr', 'referential']:
     69        print(("runme warning: benchmark '{}' not supported, defaulting to test 'nightly'.".format(benchmark)))
     70        benchmark = 'nightly'
     71    # }}}
     72    #GET procedure {{{
     73    if procedure not in ['check', 'update']:
     74        print(("runme warning: procedure '{}' not supported, defaulting to test 'check'.".format(procedure)))
     75        procedure = 'check'
     76    # }}}
     77    #GET output {{{
     78    if output not in ['nightly', 'none']:
     79        print(("runme warning: output '{}' not supported, defaulting to test 'none'.".format(output)))
     80        output = 'none'
     81    # }}}
     82    #GET RANK and NUMPROCS for multithreaded runs {{{
     83    if (numprocs < rank):
     84        numprocs = 1
     85    # }}}
     86    #GET ids  {{{
     87    flist = glob('test*.py')    #File name must start with 'test' and must end by '.py' and must be different than 'test.py'
     88    list_ids = [int(file[4:-3]) for file in flist if not file == 'test.py']    #Keep test id only (skip 'test' and '.py')
     89
     90    i1, i2 = parallelrange(rank, numprocs, len(list_ids))    #Get tests for this cpu only
     91    list_ids = list_ids[i1:i2 + 1]
     92
     93    if np.size(id) > 0 and id is not None:
     94        test_ids = set(GetIds(id)).intersection(set(list_ids))
     95        benchmark = None
     96    else:
     97        # if no tests are specifically provided, do them all
     98        test_ids = set(list_ids)
     99
     100    # }}}
     101    #GET exclude {{{
     102    exclude_ids = GetIds(exclude)
     103
     104    test_ids = test_ids.difference(exclude_ids)
     105    # }}}
     106    #Process Ids according to benchmarks {{{
     107    if benchmark == 'nightly':
     108        test_ids = test_ids.intersection(set(range(1, 1000)))
     109    elif benchmark == 'validation':
     110        test_ids = test_ids.intersection(set(range(1001, 2000)))
     111    elif benchmark == 'ismip':
     112        test_ids = test_ids.intersection(set(range(1101, 1200)))
     113    elif benchmark == 'eismint':
     114        test_ids = test_ids.intersection(set(range(1201, 1300)))
     115    elif benchmark == 'thermal':
     116        test_ids = test_ids.intersection(set(range(1301, 1400)))
     117    elif benchmark == 'mesh':
     118        test_ids = test_ids.intersection(set(range(1401, 1500)))
     119    elif benchmark == 'tranforcing':
     120        test_ids = test_ids.intersection(set(range(1501, 1503)))
     121    elif benchmark == 'referential':
     122        test_ids = test_ids.intersection(set(range(1601, 1603)))
     123    elif benchmark == 'slr':
     124        test_ids = test_ids.intersection(set(range(2001, 2500)))
     125    elif benchmark == 'adolc':
     126        test_ids = test_ids.intersection(set(range(3001, 3200)))
     127    test_ids = list(test_ids)
     128    test_ids.sort()
     129    # }}}
     130
     131    #Loop over tests and launch sequence
     132    root = os.getcwd()
     133    for id in test_ids:
     134        print(("----------------starting:{}-----------------------".format(id)))
     135        try:
     136            #Execute test
     137            os.chdir(root)
     138            id_string = IdToName(id)
     139            exec(compile(open('test{}.py'.format(id)).read(), 'test{}.py'.format(id), 'exec'), globals())
     140
     141            #UPDATE ARCHIVE?
     142            archive_name = 'Archive' + str(id)
     143            if procedure == 'update':
     144                archive_file = os.path.join('..', 'Archives', archive_name + '.arch')
     145                if os.path.isfile(archive_file):
     146                    os.remove(archive_file)
     147                    for k, fieldname in enumerate(field_names):
     148                        field = np.array(field_values[k], dtype=float)
     149                        if len(field.shape) == 1:
     150                            if np.size(field):
     151                                field = field.reshape(np.size(field), 1)
     152                            else:
     153                                field = field.reshape(0, 0)
     154                        elif len(field.shape) == 0:
     155                            field = field.reshape(1, 1)
     156                        # Matlab uses base 1, so use base 1 in labels
     157                        archwrite(archive_file, archive_name + '_field' + str(k + 1), field)
     158                    print(("File {} saved. \n".format(os.path.join('..', 'Archives', archive_name + '.arch'))))
     159
     160            #ELSE: CHECK TEST
     161            else:
     162                #load archive
     163                if os.path.exists(os.path.join('..', 'Archives', archive_name + '.arch')):
     164                    archive_file = os.path.join('..', 'Archives', archive_name + '.arch')
     165                else:
     166                    raise IOError("Archive file '../Archives/{}.arch' does not exist.".format(archive_name))
     167
     168                for k, fieldname in enumerate(field_names):
     169                    try:
     170                        #Get field and tolerance
     171                        field = np.array(field_values[k])
     172                        if len(field.shape) == 1:
     173                            if np.size(field):
     174                                field = field.reshape(np.size(field), 1)
     175                            else:
     176                                field = field.reshape(0, 0)
     177                        tolerance = field_tolerances[k]
     178
     179                        #compare to archive
     180                        # Matlab uses base 1, so use base 1 in labels
     181                        archive = np.array(archread(archive_file, archive_name + '_field' + str(k + 1)))
     182                        #Because np.array is weird (str(np.array(None)) becomes 'None' but np.array(None) is never equal to None, it basically becomes a type of string in an array):
     183                        if str(archive) == 'None':
     184                            raise NameError("Field name '" + archive_name + '_field' + str(k + 1) + "' does not exist in archive file.")
     185                        if np.shape(field) != np.shape(archive) and not np.shape(field) in [(1, 1), (0, 0), (1, 0), (0, 1)]:
     186                            field = field.T
     187                            if np.shape(field) != np.shape(archive):
     188                                raise RuntimeError("Field '{}'' from test is malformed; shape is {}, should be {} or {}".format(archive_name, np.shape(field.T), np.shape(archive), np.shape(archive.T)))
     189
     190                        error_diff = np.amax(np.abs(archive - field), axis=0) / (np.amax(np.abs(archive), axis=0) + float_info.epsilon)
     191                        if not np.isscalar(error_diff):
     192                            error_diff = error_diff[0]
     193
     194                        #disp test result
     195                        if (np.any(error_diff > tolerance) or np.isnan(error_diff)):
     196                            print(('ERROR   difference: {} > {} test id: {} test name: {} field: {}'.format(error_diff, tolerance, id, id_string, fieldname)))
     197                        else:
     198                            print(('SUCCESS difference: {} < {} test id: {} test name: {} field: {}'.format(error_diff, tolerance, id, id_string, fieldname)))
     199
     200                    except Exception as message:
     201                        #something went wrong, print failure message:
     202                        print((format_exc()))
     203                        if output == 'nightly':
     204                            fid = open(os.path.join(ISSM_DIR, 'nightlylog', 'pythonerror.log'), 'a')
     205                            fid.write('%s' % message)
     206                            fid.write('\n------------------------------------------------------------------\n')
     207                            fid.close()
     208                            print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id, id_string, fieldname)))
     209                        else:
     210                            print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id, id_string, fieldname)))
     211                            raise RuntimeError(message)
     212
     213        except Exception as message:
     214            #something went wrong, print failure message:
     215            print((format_exc()))
     216            if output == 'nightly':
     217                fid = open(os.path.join(ISSM_DIR, 'nightlylog', 'pythonerror.log'), 'a')
     218                fid.write('%s' % message)
     219                fid.write('\n------------------------------------------------------------------\n')
     220                fid.close()
     221                print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id, id_string, 'N/A')))
     222            else:
     223                print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id, id_string, 'N/A')))
     224                raise RuntimeError(message)
     225
     226        print(("----------------finished:{}-----------------------".format(id)))
     227    return
     228
     229
    235230if __name__ == '__main__':
    236         if 'PYTHONSTARTUP' in os.environ:
    237                 PYTHONSTARTUP=os.environ['PYTHONSTARTUP']
    238                 #print 'PYTHONSTARTUP =',PYTHONSTARTUP
    239                 if os.path.exists(PYTHONSTARTUP):
    240                         try:
    241                                 exec(compile(open(PYTHONSTARTUP).read(), PYTHONSTARTUP, 'exec'))
    242                         except Exception as e:
    243                                 print(("PYTHONSTARTUP error: ",e))
    244                 else:
    245                         print(("PYTHONSTARTUP file '{}' does not exist.".format(PYTHONSTARTUP)))
    246 
    247         parser = argparse.ArgumentParser(description='RUNME - test deck for ISSM nightly runs')
    248         parser.add_argument('-i','--id', nargs='*', type=int, help='followed by the list of ids requested', default=[])
    249         parser.add_argument('-in','--include_name', nargs='*', type=str, help='followed by the list of test names requested', default=[])
    250         parser.add_argument('-e','--exclude', nargs='+', type=int, help='ids to be excluded from the test', default=[])
    251         parser.add_argument('-en','--exclude_name', nargs='+', type=str, help='test names to be excluded from the test', default=[])
    252         parser.add_argument('-b','--benchmark', help='nightly/ismip/eismint/thermal/mesh/...', default='nightly')
    253         parser.add_argument('-p','--procedure', help='check/update', default='check')
    254         parser.add_argument('-o','--output', help='nightly/daily/none', default='none')
    255         parser.add_argument('-r','--rank', type=int, help='rank', default=1)
    256         parser.add_argument('-n','--numprocs', type=int, help='numprocs', default=1)
    257         args = parser.parse_args()
    258 
    259         md = runme([args.id,args.include_name], [args.exclude,args.exclude_name], args.benchmark, args.procedure, args.output, args.rank, args.numprocs)
    260 
    261         if args.output=='nightly':
    262                 print("PYTHONEXITEDCORRECTLY")
    263 
    264         exit(md)
     231    if 'PYTHONSTARTUP' in os.environ:
     232        PYTHONSTARTUP = os.environ['PYTHONSTARTUP']
     233        #print 'PYTHONSTARTUP =', PYTHONSTARTUP
     234        if os.path.exists(PYTHONSTARTUP):
     235            try:
     236                exec(compile(open(PYTHONSTARTUP).read(), PYTHONSTARTUP, 'exec'))
     237            except Exception as e:
     238                print("PYTHONSTARTUP error: ", e)
     239        else:
     240            print(("PYTHONSTARTUP file '{}' does not exist.".format(PYTHONSTARTUP)))
     241
     242        parser = argparse.ArgumentParser(description='RUNME - test deck for ISSM nightly runs')
     243        parser.add_argument('-i', '--id', nargs='*', type=int, help='followed by the list of ids requested', default=[])
     244        parser.add_argument('-in', '--include_name', nargs='*', type=str, help='followed by the list of test names requested', default=[])
     245        parser.add_argument('-e', '--exclude', nargs=' + ', type=int, help='ids to be excluded from the test', default=[])
     246        parser.add_argument('-en', '--exclude_name', nargs=' + ', type=str, help='test names to be excluded from the test', default=[])
     247        parser.add_argument('-b', '--benchmark', help='nightly/ismip/eismint/thermal/mesh/...', default='nightly')
     248        parser.add_argument('-p', '--procedure', help='check/update', default='check')
     249        parser.add_argument('-o', '--output', help='nightly/daily/none', default='none')
     250        parser.add_argument('-r', '--rank', type=int, help='rank', default=1)
     251        parser.add_argument('-n', '--numprocs', type=int, help='numprocs', default=1)
     252        args = parser.parse_args()
     253
     254        md = runme([args.id, args.include_name], [args.exclude, args.exclude_name], args.benchmark, args.procedure, args.output, args.rank, args.numprocs)
     255
     256        if args.output == 'nightly':
     257            print("PYTHONEXITEDCORRECTLY")
     258
     259        exit(md)
  • issm/trunk-jpl/test/NightlyRun/test101.py

    r23712 r23793  
    1010from generic import generic
    1111
    12 md=triangle(model(),'../Exp/Square.exp',50000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 50000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 2)
    1717#outputs
    18 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy','MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6']
    19 md.outputdefinition.definitions=[massfluxatgate('name','MassFlux1','profilename','../Exp/MassFlux1.exp','definitionstring','Outputdefinition1'),
    20                                                                                                                                  massfluxatgate('name','MassFlux2','profilename','../Exp/MassFlux2.exp','definitionstring','Outputdefinition2'),
    21                                                                                                                                  massfluxatgate('name','MassFlux3','profilename','../Exp/MassFlux3.exp','definitionstring','Outputdefinition3'),
    22                                                                                                                                  massfluxatgate('name','MassFlux4','profilename','../Exp/MassFlux4.exp','definitionstring','Outputdefinition4'),
    23                                                                                                                                  massfluxatgate('name','MassFlux5','profilename','../Exp/MassFlux5.exp','definitionstring','Outputdefinition5'),
    24                                                                                                                                  massfluxatgate('name','MassFlux6','profilename','../Exp/MassFlux6.exp','definitionstring','Outputdefinition6')]
     18md.stressbalance.requested_outputs = ['default', 'DeviatoricStressxx', 'DeviatoricStressyy', 'DeviatoricStressxy', 'MassFlux1', 'MassFlux2', 'MassFlux3', 'MassFlux4', 'MassFlux5', 'MassFlux6']
     19md.outputdefinition.definitions = [massfluxatgate('name', 'MassFlux1', 'profilename', '../Exp/MassFlux1.exp', 'definitionstring', 'Outputdefinition1'),
     20                                   massfluxatgate('name', 'MassFlux2', 'profilename', '../Exp/MassFlux2.exp', 'definitionstring', 'Outputdefinition2'),
     21                                   massfluxatgate('name', 'MassFlux3', 'profilename', '../Exp/MassFlux3.exp', 'definitionstring', 'Outputdefinition3'),
     22                                   massfluxatgate('name', 'MassFlux4', 'profilename', '../Exp/MassFlux4.exp', 'definitionstring', 'Outputdefinition4'),
     23                                   massfluxatgate('name', 'MassFlux5', 'profilename', '../Exp/MassFlux5.exp', 'definitionstring', 'Outputdefinition5'),
     24                                   massfluxatgate('name', 'MassFlux6', 'profilename', '../Exp/MassFlux6.exp', 'definitionstring', 'Outputdefinition6')]
    2525
    26 md=solve(md,'Stressbalance')
     26md = solve(md, 'Stressbalance')
    2727
    2828#Fields and tolerances to track changes
    29 field_names     =['Vx','Vy','Vel','Pressure',
    30                                                                         'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy',
    31                                                                         'MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6']
    32 field_tolerances=[3e-13, 1e-13, 1e-13, 1e-13,
    33                                                                         2e-13, 1e-13, 2e-13,
    34                                                                         1e-13, 1e-13, 1e-13,
    35                                                                         1e-13, 1e-13, 1e-13 ]
    36 field_values=[md.results.StressbalanceSolution.Vx,
    37                                                         md.results.StressbalanceSolution.Vy,
    38                                                         md.results.StressbalanceSolution.Vel,
    39                                                         md.results.StressbalanceSolution.Pressure,
    40                                                         md.results.StressbalanceSolution.DeviatoricStressxx,
    41                                                         md.results.StressbalanceSolution.DeviatoricStressyy,
    42                                                         md.results.StressbalanceSolution.DeviatoricStressxy,
    43                                                         md.results.StressbalanceSolution.MassFlux1,
    44                                                         md.results.StressbalanceSolution.MassFlux2,
    45                                                         md.results.StressbalanceSolution.MassFlux3,
    46                                                         md.results.StressbalanceSolution.MassFlux4,
    47                                                         md.results.StressbalanceSolution.MassFlux5,
    48                                                         md.results.StressbalanceSolution.MassFlux6 ]
     29field_names = ['Vx', 'Vy', 'Vel', 'Pressure',
     30               'DeviatoricStressxx', 'DeviatoricStressyy', 'DeviatoricStressxy',
     31               'MassFlux1', 'MassFlux2', 'MassFlux3', 'MassFlux4', 'MassFlux5', 'MassFlux6']
     32field_tolerances = [3e-13, 1e-13, 1e-13, 1e-13,
     33                    2e-13, 1e-13, 2e-13,
     34                    1e-13, 1e-13, 1e-13,
     35                    1e-13, 1e-13, 1e-13]
     36field_values = [md.results.StressbalanceSolution.Vx,
     37                md.results.StressbalanceSolution.Vy,
     38                md.results.StressbalanceSolution.Vel,
     39                md.results.StressbalanceSolution.Pressure,
     40                md.results.StressbalanceSolution.DeviatoricStressxx,
     41                md.results.StressbalanceSolution.DeviatoricStressyy,
     42                md.results.StressbalanceSolution.DeviatoricStressxy,
     43                md.results.StressbalanceSolution.MassFlux1,
     44                md.results.StressbalanceSolution.MassFlux2,
     45                md.results.StressbalanceSolution.MassFlux3,
     46                md.results.StressbalanceSolution.MassFlux4,
     47                md.results.StressbalanceSolution.MassFlux5,
     48                md.results.StressbalanceSolution.MassFlux6]
  • issm/trunk-jpl/test/NightlyRun/test102.py

    r21477 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    22 field_values=[md.results.StressbalanceSolution.Vx,
    23                                                         md.results.StressbalanceSolution.Vy,
    24                                                         md.results.StressbalanceSolution.Vz,
    25                                                         md.results.StressbalanceSolution.Vel,
    26                                                         md.results.StressbalanceSolution.Pressure]
    27 
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test103.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.stressbalance.requested_outputs = ['default', 'StressTensorxx', 'StressTensoryy', 'StressTensorzz', 'StressTensorxy', 'StressTensorxz', 'StressTensoryz']
     18md = solve(md, 'Stressbalance')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz',
    22                                                                         'Vel','Pressure',
    23                                                                         'StressTensorxx','StressTensoryy','StressTensorzz',
    24                                                                         'StressTensorxy','StressTensorxz','StressTensoryz']
    25 field_tolerances=[1e-09,1e-09,1e-09,
    26                                                                         1e-09,1e-09,
    27                                                                         1e-09,1e-09,1e-09,
    28                                                                         1e-09,1e-09,1e-08]
    29 field_values=[md.results.StressbalanceSolution.Vx,
    30                                                         md.results.StressbalanceSolution.Vy,
    31                                                         md.results.StressbalanceSolution.Vz,
    32                                                         md.results.StressbalanceSolution.Vel,
    33                                                         md.results.StressbalanceSolution.Pressure,
    34                                                         md.results.StressbalanceSolution.StressTensorxx,
    35                                                         md.results.StressbalanceSolution.StressTensoryy,
    36                                                         md.results.StressbalanceSolution.StressTensorzz,
    37                                                         md.results.StressbalanceSolution.StressTensorxy,
    38                                                         md.results.StressbalanceSolution.StressTensorxz,
    39                                                         md.results.StressbalanceSolution.StressTensoryz,]
     21field_names = ['Vx', 'Vy', 'Vz',
     22               'Vel', 'Pressure',
     23               'StressTensorxx', 'StressTensoryy', 'StressTensorzz',
     24               'StressTensorxy', 'StressTensorxz', 'StressTensoryz']
     25field_tolerances = [1e-09, 1e-09, 1e-09,
     26                    1e-09, 1e-09,
     27                    1e-09, 1e-09, 1e-09,
     28                    1e-09, 1e-09, 1e-08]
     29field_values = [md.results.StressbalanceSolution.Vx,
     30                md.results.StressbalanceSolution.Vy,
     31                md.results.StressbalanceSolution.Vz,
     32                md.results.StressbalanceSolution.Vel,
     33                md.results.StressbalanceSolution.Pressure,
     34                md.results.StressbalanceSolution.StressTensorxx,
     35                md.results.StressbalanceSolution.StressTensoryy,
     36                md.results.StressbalanceSolution.StressTensorzz,
     37                md.results.StressbalanceSolution.StressTensorxy,
     38                md.results.StressbalanceSolution.StressTensorxz,
     39                md.results.StressbalanceSolution.StressTensoryz]
  • issm/trunk-jpl/test/NightlyRun/test104.py

    r23539 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'FS','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'FS', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-08,1e-08,4e-06,1e-08,1e-08]
    22 field_values=[md.results.StressbalanceSolution.Vx,
    23         md.results.StressbalanceSolution.Vy,
    24         md.results.StressbalanceSolution.Vz,
    25         md.results.StressbalanceSolution.Vel,
    26         md.results.StressbalanceSolution.Pressure]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-08, 1e-08, 4e-06, 1e-08, 1e-08]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test105.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Masstransport')
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Masstransport')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Thickness']
    20 field_tolerances=[1e-13]
    21 field_values=[\
    22         md.results.MasstransportSolution.Thickness,\
    23         ]
     19field_names = ['Thickness']
     20field_tolerances = [1e-13]
     21field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test106.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000)
    13 md=meshconvert(md)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.masstransport.stabilization=3
    19 md.masstransport.spcthickness=md.geometry.thickness
    20 md=solve(md,'Masstransport')
     12md = triangle(model(), '../Exp/Square.exp', 150000)
     13md = meshconvert(md)
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelfConstrained.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.masstransport.stabilization = 3
     19md.masstransport.spcthickness = md.geometry.thickness
     20md = solve(md, 'Masstransport')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Thickness']
    24 field_tolerances=[1e-13]
    25 field_values=[\
    26         md.results.MasstransportSolution.Thickness,\
    27         ]
     23field_names = ['Thickness']
     24field_tolerances = [1e-13]
     25field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test107.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.extrude(5,3.)
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Masstransport')
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.extrude(5, 3.)
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Masstransport')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Thickness']
    21 field_tolerances=[1e-13]
    22 field_values=[\
    23         md.results.MasstransportSolution.Thickness,\
    24         ]
     20field_names = ['Thickness']
     21field_tolerances = [1e-13]
     22field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test108.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.timestepping.time_step=0
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Thermal')
     11md = triangle(model(), '../Exp/Square.exp', 180000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.timestepping.time_step = 0
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Thermal')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    22 field_tolerances=[1e-13,1e-5]
    23 field_values=[\
    24         md.results.ThermalSolution.Temperature,\
    25         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
    26         ]
     21field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [1e-13, 1e-5]
     23field_values = [md.results.ThermalSolution.Temperature,
     24                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test109.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.transient.isstressbalance=False
    18 md.transient.ismasstransport=False
    19 md.transient.issmb=True
    20 md.transient.isthermal=True
    21 md.transient.isgroundingline=False
    22 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 180000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.transient.isstressbalance = False
     18md.transient.ismasstransport = False
     19md.transient.issmb = True
     20md.transient.isthermal = True
     21md.transient.isgroundingline = False
     22md = solve(md, 'Transient')
    2323
    2424#Fields and tolerances to track changes
    25 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    26 field_tolerances=[1e-13,1e-13]
    27 field_values=[md.results.TransientSolution[0].Temperature,
    28                                                         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
     25field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     26field_tolerances = [1e-13, 1e-13]
     27field_values = [md.results.TransientSolution[0].Temperature,
     28                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test110.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md.transient.requested_outputs=['IceVolume']
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.transient.requested_outputs = ['IceVolume']
    1717
    18 md=solve(md,'Transient')
     18md = solve(md, 'Transient')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Volume3']
    22 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    23                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    24                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    25 field_values=[\
    26         md.results.TransientSolution[0].Vx,\
    27         md.results.TransientSolution[0].Vy,\
    28         md.results.TransientSolution[0].Vel,\
    29         md.results.TransientSolution[0].Pressure,\
    30         md.results.TransientSolution[0].Base,\
    31         md.results.TransientSolution[0].Surface,\
    32         md.results.TransientSolution[0].Thickness,\
    33         md.results.TransientSolution[0].IceVolume,\
    34         md.results.TransientSolution[1].Vx,\
    35         md.results.TransientSolution[1].Vy,\
    36         md.results.TransientSolution[1].Vel,\
    37         md.results.TransientSolution[1].Pressure,\
    38         md.results.TransientSolution[1].Base,\
    39         md.results.TransientSolution[1].Surface,\
    40         md.results.TransientSolution[1].Thickness,\
    41         md.results.TransientSolution[1].IceVolume,\
    42         md.results.TransientSolution[2].Vx,\
    43         md.results.TransientSolution[2].Vy,\
    44         md.results.TransientSolution[2].Vel,\
    45         md.results.TransientSolution[2].Pressure,\
    46         md.results.TransientSolution[2].Base,\
    47         md.results.TransientSolution[2].Surface,\
    48         md.results.TransientSolution[2].Thickness,\
    49         md.results.TransientSolution[2].IceVolume,\
    50         ]
     21field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Volume1', 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Volume2', 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Volume3']
     22field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     23                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     24                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     25field_values = [md.results.TransientSolution[0].Vx,
     26                md.results.TransientSolution[0].Vy,
     27                md.results.TransientSolution[0].Vel,
     28                md.results.TransientSolution[0].Pressure,
     29                md.results.TransientSolution[0].Base,
     30                md.results.TransientSolution[0].Surface,
     31                md.results.TransientSolution[0].Thickness,
     32                md.results.TransientSolution[0].IceVolume,
     33                md.results.TransientSolution[1].Vx,
     34                md.results.TransientSolution[1].Vy,
     35                md.results.TransientSolution[1].Vel,
     36                md.results.TransientSolution[1].Pressure,
     37                md.results.TransientSolution[1].Base,
     38                md.results.TransientSolution[1].Surface,
     39                md.results.TransientSolution[1].Thickness,
     40                md.results.TransientSolution[1].IceVolume,
     41                md.results.TransientSolution[2].Vx,
     42                md.results.TransientSolution[2].Vy,
     43                md.results.TransientSolution[2].Vel,
     44                md.results.TransientSolution[2].Pressure,
     45                md.results.TransientSolution[2].Base,
     46                md.results.TransientSolution[2].Surface,
     47                md.results.TransientSolution[2].Thickness,
     48                md.results.TransientSolution[2].IceVolume]
  • issm/trunk-jpl/test/NightlyRun/test1101.py

    r21411 r23793  
    11#Test Name: ISMIPAHO
    22import numpy as np
    3 import shutil
    43from model import *
    54from socket import gethostname
     
    1514"""
    1615
    17 printingflag=False
     16printingflag = False
    1817
    19 #L_list=[80000.]
    20 L_list=[80000.]
    21 results=[]
    22 minvx=[]
    23 maxvx=[]
     18L_list = [80000.]
     19results = []
     20minvx = []
     21maxvx = []
    2422
    2523for L in L_list:
    26         nx=20    #numberof nodes in x direction
    27         ny=20
    28         md=model()
    29         md=squaremesh(md,L,L,nx,ny)
    30         md=setmask(md,'','')    #ice sheet test
    31         md=parameterize(md,'../Par/ISMIPA.py')
    32         md.extrude(9,1.)
     24    nx = 20    #numberof nodes in x direction
     25    ny = 20
     26    md = model()
     27    md = squaremesh(md, L, L, nx, ny)
     28    md = setmask(md, '', '')    #ice sheet test
     29    md = parameterize(md, '../Par/ISMIPA.py')
     30    md.extrude(9, 1.)
    3331
    34         md=setflowequation(md,'HO','all')
     32    md = setflowequation(md, 'HO', 'all')
    3533
    36         #Create dirichlet on the bed only
    37         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    38         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    39         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
     34    #Create dirichlet on the bed only
     35    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     36    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     37    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    4038
    41         pos=np.where(md.mesh.vertexonbase)
    42         md.stressbalance.spcvx[pos]=0.
    43         md.stressbalance.spcvy[pos]=0.
     39    pos = np.where(md.mesh.vertexonbase)
     40    md.stressbalance.spcvx[pos] = 0.
     41    md.stressbalance.spcvy[pos] = 0.
    4442
    45         #Create MPCs to have periodic boundary conditions
    46         posx=np.where(md.mesh.x==0.)[0]
    47         posx2=np.where(md.mesh.x==np.max(md.mesh.x))[0]
     43    #Create MPCs to have periodic boundary conditions
     44    posx = np.where(md.mesh.x == 0.)[0]
     45    posx2 = np.where(md.mesh.x == np.max(md.mesh.x))[0]
    4846
    49         posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] #Don't take the same nodes two times
    50         posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]
     47    posy = np.where(np.logical_and.reduce((md.mesh.y == 0., md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0] #Don't take the same nodes two times
     48    posy2 = np.where(np.logical_and.reduce((md.mesh.y == np.max(md.mesh.y), md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]
    5149
    52         md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
     50    md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
    5351
    54         #Compute the stressbalance
    55         md.cluster=generic('name',gethostname(),'np',8)
    56         md=solve(md,'Stressbalance')
     52    #Compute the stressbalance
     53    md.cluster = generic('name', gethostname(), 'np', 8)
     54    md = solve(md, 'Stressbalance')
    5755
    58         #Plot the results and save them
    59         vx=md.results.StressbalanceSolution.Vx
    60         vy=md.results.StressbalanceSolution.Vy
    61         vz=md.results.StressbalanceSolution.Vz
    62         results.append(md.results.StressbalanceSolution)
    63         minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
    64         maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
     56    #Plot the results and save them
     57    vx = md.results.StressbalanceSolution.Vx
     58    vy = md.results.StressbalanceSolution.Vy
     59    vz = md.results.StressbalanceSolution.Vz
     60    results.append(md.results.StressbalanceSolution)
     61    minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
     62    maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
    6563
    66         #Now plot vx, vy, vz and vx on a cross section
    67 #       plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
    68         if printingflag:
    69                 pass
    70 #               set(gcf,'Color','w')
    71 #               printmodel(['ismipaHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    72 #               shutil.move("ismipaHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    73 #       plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
    74         if printingflag:
    75                 pass
    76 #               set(gcf,'Color','w')
    77 #               printmodel(['ismipaHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    78 #               shutil.move("ismipaHOvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    79 #       plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
    80         if printingflag:
    81                 pass
    82 #               set(gcf,'Color','w')
    83 #               printmodel(['ismipaHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    84 #               shutil.move("ismipaHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     64    #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')
     66    if printingflag:
     67        pass
     68#           set(gcf, 'Color', 'w')
     69#           printmodel(['ismipaHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     70#           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')
     72    if printingflag:
     73        pass
     74#           set(gcf, 'Color', 'w')
     75#           printmodel(['ismipaHOvy' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     76#           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')
     78    if printingflag:
     79        pass
     80#           set(gcf, 'Color', 'w')
     81#           printmodel(['ismipaHOvz' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     82#           shutil.move("ismipaHOvz%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    8583
    86         if   (L==5000.):
    87                 pass
    88 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,...
    89 #                       'resolution',[10 10],'ylim',[10 18],'xlim',[0 5000],'title','','xlabel','')
    90         elif (L==10000.):
    91                 pass
    92 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,...
    93 #                       'resolution',[10 10],'ylim',[10 30],'xlim',[0 10000],'title','','xlabel','')
    94         elif (L==20000.):
    95                 pass
    96 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,...
    97 #                       'resolution',[10 10],'ylim',[0 50],'xlim',[0 20000],'title','','xlabel','')
    98         elif (L==40000.):
    99                 pass
    100 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,...
    101 #                       'resolution',[10 10],'ylim',[0 80],'xlim',[0 40000],'title','','xlabel','')
    102         elif (L==80000.):
    103                 pass
    104 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,...
    105 #                       'resolution',[10 10],'ylim',[0 100],'xlim',[0 80000],'title','','xlabel','')
    106         elif (L==160000.):
    107                 pass
    108 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,...
    109 #                       'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','')
    110         if printingflag:
    111                 pass
    112 #               set(gcf,'Color','w')
    113 #               printmodel(['ismipaHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    114 #               shutil.move("ismipaHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     84    if (L == 5000.):
     85        pass
     86#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP5000.exp', 'layer', md.mesh.numberoflayers,...
     87#                   'resolution',[10 10], 'ylim',[10 18], 'xlim',[0 5000], 'title', '', 'xlabel', '')
     88    elif (L == 10000.):
     89        pass
     90#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP10000.exp', 'layer', md.mesh.numberoflayers,...
     91#                   'resolution',[10 10], 'ylim',[10 30], 'xlim',[0 10000], 'title', '', 'xlabel', '')
     92    elif (L == 20000.):
     93        pass
     94#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP20000.exp', 'layer', md.mesh.numberoflayers,...
     95#                   'resolution',[10 10], 'ylim',[0 50], 'xlim',[0 20000], 'title', '', 'xlabel', '')
     96    elif (L == 40000.):
     97        pass
     98#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP40000.exp', 'layer', md.mesh.numberoflayers,...
     99#                   'resolution',[10 10], 'ylim',[0 80], 'xlim',[0 40000], 'title', '', 'xlabel', '')
     100    elif (L == 80000.):
     101        pass
     102#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP80000.exp', 'layer', md.mesh.numberoflayers,...
     103#                   'resolution',[10 10], 'ylim',[0 100], 'xlim',[0 80000], 'title', '', 'xlabel', '')
     104    elif (L == 160000.):
     105        pass
     106#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP160000.exp', 'layer', md.mesh.numberoflayers,...
     107#                   'resolution',[10 10], 'ylim',[0 120], 'xlim',[0 160000], 'title', '', 'xlabel', '')
     108    if printingflag:
     109        pass
     110#           set(gcf, 'Color', 'w')
     111#           printmodel(['ismipaHOvxsec' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     112#           shutil.move("ismipaHOvxsec%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    115113
    116114#Now plot the min and max values of vx for each size of the square
    117 #plot([5 10 20 40 80 160],minvx)ylim([0 18])xlim([0 160])
     115#plot([5 10 20 40 80 160], minvx)ylim([0 18])xlim([0 160])
    118116if printingflag:
    119         pass
    120 #       set(gcf,'Color','w')
    121 #       printmodel('ismipaHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    122 #       shutil.move('ismipaHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    123 #plot([5 10 20 40 80 160],maxvx)ylim([0 120])xlim([0 160])
     117    pass
     118#       set(gcf, 'Color', 'w')
     119#       printmodel('ismipaHOminvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     120#       shutil.move('ismipaHOminvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     121#plot([5 10 20 40 80 160], maxvx)ylim([0 120])xlim([0 160])
    124122if printingflag:
    125         pass
    126 #       set(gcf,'Color','w')
    127 #       printmodel('ismipaHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    128 #       shutil.move('ismipaHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     123    pass
     124#       set(gcf, 'Color', 'w')
     125#       printmodel('ismipaHOmaxvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     126#       shutil.move('ismipaHOmaxvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    129127
    130128#Fields and tolerances to track changes
    131 field_names     =['Vx80km','Vy80km','Vz80km']
    132 field_tolerances=[1e-08,1e-08,1e-08]
    133 field_values=[]
     129field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     130field_tolerances = [1e-08, 1e-08, 1e-08]
     131field_values = []
    134132for result in results:
    135         field_values=field_values+[result.Vx,result.Vy,result.Vz]
     133    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1102.py

    r21411 r23793  
    11#Test Name: ISMIPAFS
    22import numpy as np
    3 import shutil
    43from model import *
    54from socket import gethostname
     
    1514"""
    1615
    17 printingflag=False
     16printingflag = False
    1817
    19 L_list=[80000.]
    20 results=[]
    21 minvx=[]
    22 maxvx=[]
     18L_list = [80000.]
     19results = []
     20minvx = []
     21maxvx = []
    2322
    2423for L in L_list:
    25         nx=20    #numberof nodes in x direction
    26         ny=20
    27         md=model()
    28         md=squaremesh(md,L,L,nx,ny)
    29         md=setmask(md,'','')    #ice sheet test
     24    nx = 20    #numberof nodes in x direction
     25    ny = 20
     26    md = model()
     27    md = squaremesh(md, L, L, nx, ny)
     28    md = setmask(md, '', '')    #ice sheet test
    3029
    31 #       #Find elements at the corner and extract model
    32 #       posnodes=np.nonzero(np.logical_and.reduce(np.logical_or.reduce(md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x)),np.logical_or.reduce(md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y))))
    33 #       a=np.nonzero(ismember(md.mesh.elements,posnodes))[0]
    34 #       elements=np.ones((md.mesh.numberofelements),int)
    35 #       elements[a]=0
    36 #       md.modelextract(elements)
     30#   #Find elements at the corner and extract model
     31#   posnodes = np.nonzero(np.logical_and.reduce(np.logical_or.reduce(md.mesh.x = 0., md.mesh.x = np.max(md.mesh.x)), np.logical_or.reduce(md.mesh.y = 0., md.mesh.y = np.max(md.mesh.y))))
     32#   a = np.nonzero(ismember(md.mesh.elements, posnodes))[0]
     33#   elements = np.ones((md.mesh.numberofelements), int)
     34#   elements[a]=0
     35#   md.modelextract(elements)
    3736
    38         md=parameterize(md,'../Par/ISMIPA.py')
    39         md.extrude(10,1.)
    40         md=setflowequation(md,'FS','all')
     37    md = parameterize(md, '../Par/ISMIPA.py')
     38    md.extrude(10, 1.)
     39    md = setflowequation(md, 'FS', 'all')
    4140
    42         #Create dirichlet on the bed only
    43         pos=np.nonzero(md.mesh.vertexonbase)
    44         md.stressbalance.spcvx[pos]=0.
    45         md.stressbalance.spcvy[pos]=0.
    46         md.stressbalance.spcvz[pos]=0.
     41    #Create dirichlet on the bed only
     42    pos = np.nonzero(md.mesh.vertexonbase)
     43    md.stressbalance.spcvx[pos] = 0.
     44    md.stressbalance.spcvy[pos] = 0.
     45    md.stressbalance.spcvz[pos] = 0.
    4746
    48         #Compute the stressbalance
    49         md.stressbalance.abstol=np.nan
    50         md.stressbalance.reltol=np.nan
    51         md.stressbalance.restol=1.
    52         md.cluster=generic('name',gethostname(),'np',8)
    53         md=solve(md,'Stressbalance')
     47    #Compute the stressbalance
     48    md.stressbalance.abstol = np.nan
     49    md.stressbalance.reltol = np.nan
     50    md.stressbalance.restol = 1.
     51    md.cluster = generic('name', gethostname(), 'np', 8)
     52    md = solve(md, 'Stressbalance')
    5453
    55         #Plot the results and save them
    56         vx=md.results.StressbalanceSolution.Vx
    57         vy=md.results.StressbalanceSolution.Vy
    58         vz=md.results.StressbalanceSolution.Vz
    59         pressure=md.results.StressbalanceSolution.Pressure
    60         results.append(md.results.StressbalanceSolution)
    61         minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
    62         maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
     54    #Plot the results and save them
     55    vx = md.results.StressbalanceSolution.Vx
     56    vy = md.results.StressbalanceSolution.Vy
     57    vz = md.results.StressbalanceSolution.Vz
     58    pressure = md.results.StressbalanceSolution.Pressure
     59    results.append(md.results.StressbalanceSolution)
     60    minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
     61    maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
    6362
    64         #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','figure',2)
    66         if printingflag:
    67                 pass
    68 #               set(gcf,'Color','w')
    69 #               printmodel(['ismipaFSvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    70 #               shutil.move("ismipaFSvx%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','figure',3)
    72         if printingflag:
    73                 pass
    74 #               set(gcf,'Color','w')
    75 #               printmodel(['ismipaFSvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    76 #               shutil.move("ismipaFSvy%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','figure',4)
    78         if printingflag:
    79                 pass
    80 #               set(gcf,'Color','w')
    81 #               printmodel(['ismipaFSvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    82 #               shutil.move("ismipaFSvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     63    #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)
     65    if printingflag:
     66        pass
     67#           set(gcf, 'Color', 'w')
     68#           printmodel(['ismipaFSvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     69#           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)
     71    if printingflag:
     72        pass
     73#           set(gcf, 'Color', 'w')
     74#           printmodel(['ismipaFSvy' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     75#           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)
     77    if printingflag:
     78        pass
     79#           set(gcf, 'Color', 'w')
     80#           printmodel(['ismipaFSvz' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     81#           shutil.move("ismipaFSvz%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    8382
    84         if   (L==5000.):
    85                 pass
    86 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,...
    87 #                       'resolution',[10 10],'ylim',[10 18],'xlim',[0 5000],'title','','xlabel','')
    88         elif (L==10000.):
    89                 pass
    90 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,...
    91 #                       'resolution',[10 10],'ylim',[10 30],'xlim',[0 10000],'title','','xlabel','')
    92         elif (L==20000.):
    93                 pass
    94 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,...
    95 #                       'resolution',[10 10],'ylim',[0 50],'xlim',[0 20000],'title','','xlabel','')
    96         elif (L==40000.):
    97                 pass
    98 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,...
    99 #                       'resolution',[10 10],'ylim',[0 80],'xlim',[0 40000],'title','','xlabel','')
    100         elif (L==80000.):
    101                 pass
    102 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,...
    103 #                       'resolution',[10 10],'ylim',[0 100],'xlim',[0 80000],'title','','xlabel','')
    104         elif (L==160000.):
    105                 pass
    106 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,...
    107 #                       'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','')
    108         if printingflag:
    109                 pass
    110 #               set(gcf,'Color','w')
    111 #               printmodel(['ismipaFSvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    112 #               shutil.move("ismipaFSvxsec.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     83    if (L == 5000.):
     84        pass
     85#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP5000.exp', 'layer', md.mesh.numberoflayers,...
     86#                   'resolution',[10 10], 'ylim',[10 18], 'xlim',[0 5000], 'title', '', 'xlabel', '')
     87    elif (L == 10000.):
     88        pass
     89#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP10000.exp', 'layer', md.mesh.numberoflayers,...
     90#                   'resolution',[10 10], 'ylim',[10 30], 'xlim',[0 10000], 'title', '', 'xlabel', '')
     91    elif (L == 20000.):
     92        pass
     93#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP20000.exp', 'layer', md.mesh.numberoflayers,...
     94#                   'resolution',[10 10], 'ylim',[0 50], 'xlim',[0 20000], 'title', '', 'xlabel', '')
     95    elif (L == 40000.):
     96        pass
     97#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP40000.exp', 'layer', md.mesh.numberoflayers,...
     98#                   'resolution',[10 10], 'ylim',[0 80], 'xlim',[0 40000], 'title', '', 'xlabel', '')
     99    elif (L == 80000.):
     100        pass
     101#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP80000.exp', 'layer', md.mesh.numberoflayers,...
     102#                   'resolution',[10 10], 'ylim',[0 100], 'xlim',[0 80000], 'title', '', 'xlabel', '')
     103    elif (L == 160000.):
     104        pass
     105#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP160000.exp', 'layer', md.mesh.numberoflayers,...
     106#                   'resolution',[10 10], 'ylim',[0 120], 'xlim',[0 160000], 'title', '', 'xlabel', '')
     107    if printingflag:
     108        pass
     109# set(gcf, 'Color', 'w')
     110# printmodel(['ismipaFSvxsec' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     111# shutil.move("ismipaFSvxsec.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    113112
    114113#Now plot the min and max values of vx for each size of the square
    115 #plot([5 10 20 40 80 160],minvx)ylim([0 18])
     114#plot([5 10 20 40 80 160], minvx)ylim([0 18])
    116115if printingflag:
    117         pass
    118 #       set(gcf,'Color','w')
    119 #       printmodel('ismipaFSminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    120 #       shutil.move('ismipaFSminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    121 #plot([5 10 20 40 80 160],maxvx)ylim([0 120])
     116    pass
     117#       set(gcf, 'Color', 'w')
     118#       printmodel('ismipaFSminvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     119#       shutil.move('ismipaFSminvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     120#plot([5 10 20 40 80 160], maxvx)ylim([0 120])
    122121if printingflag:
    123         pass
    124 #       set(gcf,'Color','w')
    125 #       printmodel('ismipaFSmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    126 #       shutil.move('ismipaFSmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
     122    pass
     123#       set(gcf, 'Color', 'w')
     124#       printmodel('ismipaFSmaxvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     125#       shutil.move('ismipaFSmaxvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
    127126
    128127#Fields and tolerances to track changes
    129 field_names     =['Vx80km','Vy80km','Vz80km']
    130 field_tolerances=[1e-12,1e-11,1e-12,]
    131 field_values=[]
     128field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     129field_tolerances = [1e-12, 1e-11, 1e-12]
     130field_values = []
    132131for result in results:
    133         field_values=field_values+[\
    134                 result.Vx,\
    135                 result.Vy,\
    136                 result.Vz,\
    137                 ]
     132    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1103.py

    r21411 r23793  
    11#Test Name: ISMIPBHO
    22import numpy as np
    3 import shutil
    43from model import *
    54from socket import gethostname
     
    1514"""
    1615
    17 printingflag=False
     16printingflag = False
    1817
    19 L_list=[80000.]
    20 results=[]
    21 minvx=[]
    22 maxvx=[]
     18L_list = [80000.]
     19results = []
     20minvx = []
     21maxvx = []
    2322
    2423for L in L_list:
    25         nx=20    #numberof nodes in x direction
    26         ny=20
    27         md=model()
    28         md=squaremesh(md,L,L,nx,ny)
    29         md=setmask(md,'','')    #ice sheet test
    30         md=parameterize(md,'../Par/ISMIPB.py')
    31         md.extrude(10,1.)
     24    nx = 20    #numberof nodes in x direction
     25    ny = 20
     26    md = model()
     27    md = squaremesh(md, L, L, nx, ny)
     28    md = setmask(md, '', '')    #ice sheet test
     29    md = parameterize(md, '../Par/ISMIPB.py')
     30    md.extrude(10, 1.)
    3231
    33         md=setflowequation(md,'HO','all')
     32    md = setflowequation(md, 'HO', 'all')
    3433
    35         #Create dirichlet on the bed only
    36         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    37         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    38         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
    39         pos=np.nonzero(md.mesh.vertexonbase)
    40         md.stressbalance.spcvx[pos]=0.
    41         md.stressbalance.spcvy[pos]=0.
     34    #Create dirichlet on the bed only
     35    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     36    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     37    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
     38    pos = np.nonzero(md.mesh.vertexonbase)
     39    md.stressbalance.spcvx[pos] = 0.
     40    md.stressbalance.spcvy[pos] = 0.
    4241
    43         #Create MPCs to have periodic boundary conditions
    44         posx=np.where(md.mesh.x==0.)[0]
    45         posx2=np.where(md.mesh.x==np.max(md.mesh.x))[0]
     42    #Create MPCs to have periodic boundary conditions
     43    posx = np.where(md.mesh.x == 0.)[0]
     44    posx2 = np.where(md.mesh.x == np.max(md.mesh.x))[0]
    4645
    47         posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]    #Don't take the same nodes two times
    48         posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]
     46    posy = np.where(np.logical_and.reduce((md.mesh.y == 0., md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]    #Don't take the same nodes two times
     47    posy2 = np.where(np.logical_and.reduce((md.mesh.y == np.max(md.mesh.y), md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]
    4948
    50         md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
     49    md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
    5150
    52         #Compute the stressbalance
    53         md.cluster=generic('name',gethostname(),'np',8)
    54         md=solve(md,'Stressbalance')
     51    #Compute the stressbalance
     52    md.cluster = generic('name', gethostname(), 'np', 8)
     53    md = solve(md, 'Stressbalance')
    5554
    56         #Plot the results and save them
    57         vx=md.results.StressbalanceSolution.Vx
    58         vy=md.results.StressbalanceSolution.Vy
    59         vz=md.results.StressbalanceSolution.Vz
    60         results.append(md.results.StressbalanceSolution)
    61         minvx.append(np.min(vx[md.mesh.numberofvertices2d:]))
    62         maxvx.append(np.max(vx[md.mesh.numberofvertices2d:]))
     55    #Plot the results and save them
     56    vx = md.results.StressbalanceSolution.Vx
     57    vy = md.results.StressbalanceSolution.Vy
     58    vz = md.results.StressbalanceSolution.Vz
     59    results.append(md.results.StressbalanceSolution)
     60    minvx.append(np.min(vx[md.mesh.numberofvertices2d:]))
     61    maxvx.append(np.max(vx[md.mesh.numberofvertices2d:]))
    6362
    64         #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')
    66         if printingflag:
    67                 pass
    68 #               set(gcf,'Color','w')
    69 #               printmodel(['ismipbHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    70 #               shutil.move("ismipbHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
    71 #       plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
    72         if printingflag:
    73                 pass
    74 #               set(gcf,'Color','w')
    75 #               printmodel(['ismipbHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    76 #               shutil.move("ismipbHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
     63    #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')
     65    if printingflag:
     66        pass
     67#           set(gcf, 'Color', 'w')
     68#           printmodel(['ismipbHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     69#           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')
     71    if printingflag:
     72        pass
     73#           set(gcf, 'Color', 'w')
     74#           printmodel(['ismipbHOvz' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     75#           shutil.move("ismipbHOvz%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
    7776
    78         if   (L==5000.):
    79                 pass
    80 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,...
    81 #                       'resolution',[10 10],'ylim',[6 16],'xlim',[0 5000],'title','','xlabel','')
    82         elif (L==10000.):
    83                 pass
    84 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,...
    85 #                       'resolution',[10 10],'ylim',[0 40],'xlim',[0 10000],'title','','xlabel','')
    86         elif (L==20000.):
    87                 pass
    88 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,...
    89 #                       'resolution',[10 10],'ylim',[0 60],'xlim',[0 20000],'title','','xlabel','')
    90         elif (L==40000.):
    91                 pass
    92 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,...
    93 #                       'resolution',[10 10],'ylim',[0 100],'xlim',[0 40000],'title','','xlabel','')
    94         elif (L==80000.):
    95                 pass
    96 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,...
    97 #                       'resolution',[10 10],'ylim',[0 120],'xlim',[0 80000],'title','','xlabel','')
    98         elif (L==160000.):
    99                 pass
    100 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,...
    101 #                       'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','')
    102         if printingflag:
    103                 pass
    104 #               set(gcf,'Color','w')
    105 #               printmodel(['ismipbHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    106 #               shutil.move("ismipbHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
     77    if (L == 5000.):
     78        pass
     79#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP5000.exp', 'layer', md.mesh.numberoflayers,...
     80#                   'resolution',[10 10], 'ylim',[6 16], 'xlim',[0 5000], 'title', '', 'xlabel', '')
     81    elif (L == 10000.):
     82        pass
     83#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP10000.exp', 'layer', md.mesh.numberoflayers,...
     84#                   'resolution',[10 10], 'ylim',[0 40], 'xlim',[0 10000], 'title', '', 'xlabel', '')
     85    elif (L == 20000.):
     86        pass
     87#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP20000.exp', 'layer', md.mesh.numberoflayers,...
     88#                   'resolution',[10 10], 'ylim',[0 60], 'xlim',[0 20000], 'title', '', 'xlabel', '')
     89    elif (L == 40000.):
     90        pass
     91#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP40000.exp', 'layer', md.mesh.numberoflayers,...
     92#                   'resolution',[10 10], 'ylim',[0 100], 'xlim',[0 40000], 'title', '', 'xlabel', '')
     93    elif (L == 80000.):
     94        pass
     95#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP80000.exp', 'layer', md.mesh.numberoflayers,...
     96#                   'resolution',[10 10], 'ylim',[0 120], 'xlim',[0 80000], 'title', '', 'xlabel', '')
     97    elif (L == 160000.):
     98        pass
     99#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP160000.exp', 'layer', md.mesh.numberoflayers,...
     100#                   'resolution',[10 10], 'ylim',[0 120], 'xlim',[0 160000], 'title', '', 'xlabel', '')
     101    if printingflag:
     102        pass
     103#           set(gcf, 'Color', 'w')
     104#           printmodel(['ismipbHOvxsec' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     105#           shutil.move("ismipbHOvxsec%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
    107106
    108107#Now plot the min and max values of vx for each size of the square
    109 #plot([5 10 20 40 80 160],minvx)ylim([0 14])xlim([0 160])
     108#plot([5 10 20 40 80 160], minvx)ylim([0 14])xlim([0 160])
    110109if printingflag:
    111         pass
    112 #       set(gcf,'Color','w')
    113 #       printmodel('ismipbHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    114 #       shutil.move('ismipbHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
    115 #plot([5 10 20 40 80 160],maxvx)ylim([0 120])xlim([0 160])
     110    pass
     111#       set(gcf, 'Color', 'w')
     112#       printmodel('ismipbHOminvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     113#       shutil.move('ismipbHOminvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
     114#plot([5 10 20 40 80 160], maxvx)ylim([0 120])xlim([0 160])
    116115if printingflag:
    117         pass
    118 #       set(gcf,'Color','w')
    119 #       printmodel('ismipbHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    120 #       shutil.move('ismipbHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
     116    pass
     117#       set(gcf, 'Color', 'w')
     118#       printmodel('ismipbHOmaxvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     119#       shutil.move('ismipbHOmaxvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
    121120
    122121#Fields and tolerances to track changes
    123 field_names     =['Vx80km','Vy80km','Vz80km']
    124 field_tolerances=[1e-08,1e-07,1e-07]
    125 field_values=[]
     122field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     123field_tolerances = [1e-08, 1e-07, 1e-07]
     124field_values = []
    126125for result in results:
    127         field_values=field_values+[result.Vx,result.Vy,result.Vz]
     126    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1104.py

    r23707 r23793  
    1414"""
    1515
    16 L_list=[80000.]
    17 results=[]
     16L_list = [80000.]
     17results = []
    1818
    1919for L in L_list:
    20         nx=20    #numberof nodes in x direction
    21         ny=20
    22         md=model()
    23         md=squaremesh(md,L,L,nx,ny)
    24         md=setmask(md,'','')    #ice sheet test
    25         md=parameterize(md,'../Par/ISMIPB.py')
    26         md.extrude(10,1.)
    27         md=setflowequation(md,'HO','all')
     20    nx = 20    #numberof nodes in x direction
     21    ny = 20
     22    md = model()
     23    md = squaremesh(md, L, L, nx, ny)
     24    md = setmask(md, '', '')    #ice sheet test
     25    md = parameterize(md, '../Par/ISMIPB.py')
     26    md.extrude(10, 1.)
     27    md = setflowequation(md, 'HO', 'all')
    2828
    29         #Create dirichlet on the bed only
    30         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    31         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    32         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
     29    #Create dirichlet on the bed only
     30    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     31    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     32    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    3333
    34         pos=np.where(md.mesh.vertexonbase)
    35         md.stressbalance.spcvx[pos]=0.
    36         md.stressbalance.spcvy[pos]=0.
     34    pos = np.where(md.mesh.vertexonbase)
     35    md.stressbalance.spcvx[pos] = 0.
     36    md.stressbalance.spcvy[pos] = 0.
    3737
    38         #Create MPCs to have periodic boundary conditions
    39         posx=np.where(md.mesh.x==0.)[0]
    40         posx2=np.where(md.mesh.x==np.max(md.mesh.x))[0]
     38    #Create MPCs to have periodic boundary conditions
     39    posx = np.where(md.mesh.x == 0.)[0]
     40    posx2 = np.where(md.mesh.x == np.max(md.mesh.x))[0]
    4141
    42         posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]    #Don't take the same nodes two times
    43         posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]
     42    posy = np.where(np.logical_and.reduce((md.mesh.y == 0., md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]    #Don't take the same nodes two times
     43    posy2 = np.where(np.logical_and.reduce((md.mesh.y == np.max(md.mesh.y), md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]
    4444
    45         md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
    46         print(np.shape(md.stressbalance.vertex_pairing))
    47         #Compute the stressbalance
    48         md.stressbalance.abstol=np.nan
    49         md.cluster=generic('name',gethostname(),'np',8)
    50         md=solve(md,'Stressbalance')
    51         pos=np.where(np.logical_or.reduce((md.mesh.x==0.,md.mesh.y==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==np.max(md.mesh.y))))
    52         md.stressbalance.spcvx[pos]=md.results.StressbalanceSolution.Vx[pos][:,0]
    53         md.stressbalance.spcvy[pos]=md.results.StressbalanceSolution.Vy[pos][:,0]
    54         md.stressbalance.vertex_pairing=np.empty((0,2),int)
    55         md=setflowequation(md,'FS','all')
    56         md=solve(md,'Stressbalance')
     45    md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
     46    print(np.shape(md.stressbalance.vertex_pairing))
     47    #Compute the stressbalance
     48    md.stressbalance.abstol = np.nan
     49    md.cluster = generic('name', gethostname(), 'np', 8)
     50    md = solve(md, 'Stressbalance')
     51    pos = np.where(np.logical_or.reduce((md.mesh.x == 0., md.mesh.y == 0., md.mesh.x == np.max(md.mesh.x), md.mesh.y == np.max(md.mesh.y))))
     52    md.stressbalance.spcvx[pos] = md.results.StressbalanceSolution.Vx[pos][:, 0]
     53    md.stressbalance.spcvy[pos] = md.results.StressbalanceSolution.Vy[pos][:, 0]
     54    md.stressbalance.vertex_pairing = np.empty((0, 2), int)
     55    md = setflowequation(md, 'FS', 'all')
     56    md = solve(md, 'Stressbalance')
    5757
    58         #Plot the results and save them
    59         vx=md.results.StressbalanceSolution.Vx
    60         vy=md.results.StressbalanceSolution.Vy
    61         vz=md.results.StressbalanceSolution.Vz
    62         results.append(md.results.StressbalanceSolution)
     58    #Plot the results and save them
     59    vx = md.results.StressbalanceSolution.Vx
     60    vy = md.results.StressbalanceSolution.Vy
     61    vz = md.results.StressbalanceSolution.Vz
     62    results.append(md.results.StressbalanceSolution)
    6363
    64 #       plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.mesh.numberoflayers)
     64#       plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer#all', md.mesh.numberoflayers)
    6565
    6666#Fields and tolerances to track changes
    67 field_names     =['Vx80km','Vy80km','Vz80km']
    68 field_tolerances=[1e-08,1e-07,1e-08]
    69 field_values=[]
     67field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     68field_tolerances = [1e-08, 1e-07, 1e-08]
     69field_values = []
    7070for result in results:
    71         field_values=field_values+[result.Vx,result.Vy,result.Vz]
     71    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1105.py

    r21411 r23793  
    11#Test Name: ISMIPCHO
    22import numpy as np
    3 import shutil
    43from model import *
    54from socket import gethostname
     
    1514"""
    1615
    17 printingflag=False
     16printingflag = False
    1817
    19 L_list=[80000.]
    20 results=[]
    21 minvx=[]
    22 maxvx=[]
     18L_list = [80000.]
     19results = []
     20minvx = []
     21maxvx = []
    2322
    24 for L in L_list:    #in m (3 times the desired length for BC problems) 
    25         nx=30    #number of nodes in x direction
    26         ny=30
    27         md=model()
    28         md=squaremesh(md,L,L,nx,ny)
    29         md=setmask(md,'','')    #ice sheet test
    30         md=parameterize(md,'../Par/ISMIPC.py')
    31         md.extrude(10,1.)
     23for L in L_list:    #in m (3 times the desired length for BC problems)
     24    nx = 30    #number of nodes in x direction
     25    ny = 30
     26    md = model()
     27    md = squaremesh(md, L, L, nx, ny)
     28    md = setmask(md, '', '')    #ice sheet test
     29    md = parameterize(md, '../Par/ISMIPC.py')
     30    md.extrude(10, 1.)
    3231
    33         md=setflowequation(md,'HO','all')
     32    md = setflowequation(md, 'HO', 'all')
    3433
    35         #Create MPCs to have periodic boundary conditions
    36         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    37         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    38         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
     34    #Create MPCs to have periodic boundary conditions
     35    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     36    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     37    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    3938
    40         posx=np.where(np.logical_and.reduce((md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=L)))[0]
    41         posx2=np.where(np.logical_and.reduce((md.mesh.x==L,md.mesh.y!=0.,md.mesh.y!=L)))[0]
     39    posx = np.where(np.logical_and.reduce((md.mesh.x == 0., md.mesh.y != 0., md.mesh.y != L)))[0]
     40    posx2 = np.where(np.logical_and.reduce((md.mesh.x == L, md.mesh.y != 0., md.mesh.y != L)))[0]
    4241
    43         posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=L)))[0]    #Don't take the same nodes two times
    44         posy2=np.where(np.logical_and.reduce((md.mesh.y==L,md.mesh.x!=0.,md.mesh.x!=L)))[0]
     42    posy = np.where(np.logical_and.reduce((md.mesh.y == 0., md.mesh.x != 0., md.mesh.x != L)))[0]    #Don't take the same nodes two times
     43    posy2 = np.where(np.logical_and.reduce((md.mesh.y == L, md.mesh.x != 0., md.mesh.x != L)))[0]
    4544
    46         md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
     45    md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
    4746
    48         #Add spc on the corners
    49         pos=np.where(np.logical_and.reduce((np.logical_or(md.mesh.x==0.,md.mesh.x==L),np.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase)))
    50         md.stressbalance.spcvx[pos]=0.
    51         md.stressbalance.spcvy[pos]=0.
    52         if   (L==5000.):
    53                 md.stressbalance.spcvx[pos]=15.66
    54                 md.stressbalance.spcvy[pos]=-0.1967
    55         elif (L==10000.):
    56                 md.stressbalance.spcvx[pos]=16.04
    57                 md.stressbalance.spcvy[pos]=-0.1977
    58         elif (L==20000.):
    59                 md.stressbalance.spcvx[pos]=16.53
    60                 md.stressbalance.spcvy[pos]=-1.27
    61         elif (L==40000.):
    62                 md.stressbalance.spcvx[pos]=17.23
    63                 md.stressbalance.spcvy[pos]=-3.17
    64         elif (L==80000.):
    65                 md.stressbalance.spcvx[pos]=16.68
    66                 md.stressbalance.spcvy[pos]=-2.69
    67         elif (L==160000.):
    68                 md.stressbalance.spcvx[pos]=16.03
    69                 md.stressbalance.spcvy[pos]=-1.27
    70        
    71         #Spc the bed at zero for vz
    72         pos=np.where(md.mesh.vertexonbase)
    73         md.stressbalance.spcvz[pos]=0.
     47    #Add spc on the corners
     48    pos = np.where(np.logical_and.reduce((np.logical_or(md.mesh.x == 0., md.mesh.x == L), np.logical_or(md.mesh.y == 0., md.mesh.y == L), md.mesh.vertexonbase)))
     49    md.stressbalance.spcvx[pos] = 0.
     50    md.stressbalance.spcvy[pos] = 0.
     51    if (L == 5000.):
     52        md.stressbalance.spcvx[pos] = 15.66
     53        md.stressbalance.spcvy[pos] = -0.1967
     54    elif (L == 10000.):
     55        md.stressbalance.spcvx[pos] = 16.04
     56        md.stressbalance.spcvy[pos] = -0.1977
     57    elif (L == 20000.):
     58        md.stressbalance.spcvx[pos] = 16.53
     59        md.stressbalance.spcvy[pos] = -1.27
     60    elif (L == 40000.):
     61        md.stressbalance.spcvx[pos] = 17.23
     62        md.stressbalance.spcvy[pos] = -3.17
     63    elif (L == 80000.):
     64        md.stressbalance.spcvx[pos] = 16.68
     65        md.stressbalance.spcvy[pos] = -2.69
     66    elif (L == 160000.):
     67        md.stressbalance.spcvx[pos] = 16.03
     68        md.stressbalance.spcvy[pos] = -1.27
    7469
    75         #Compute the stressbalance
    76         md.cluster=generic('name',gethostname(),'np',8)
    77         md=solve(md,'Stressbalance')
     70    #Spc the bed at zero for vz
     71    pos = np.where(md.mesh.vertexonbase)
     72    md.stressbalance.spcvz[pos] = 0.
    7873
    79         #Plot the results and save them
    80         vx=md.results.StressbalanceSolution.Vx
    81         vy=md.results.StressbalanceSolution.Vy
    82         vz=md.results.StressbalanceSolution.Vz
    83         results.append(md.results.StressbalanceSolution)
    84         minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
    85         maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
     74    #Compute the stressbalance
     75    md.cluster = generic('name', gethostname(), 'np', 8)
     76    md = solve(md, 'Stressbalance')
    8677
    87         #Now plot vx, vy, vz and vx on a cross section
    88 #       plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2)
    89         if printingflag:
    90                 pass
    91 #               set(gcf,'Color','w')
    92 #               printmodel(['ismipcHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    93 #               shutil.move("ismipcHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
    94 #       plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
    95         if printingflag:
    96                 pass
    97 #               set(gcf,'Color','w')
    98 #               printmodel(['ismipcHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    99 #               shutil.move("ismipcHOvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
    100 #       plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4)
    101         if printingflag:
    102                 pass
    103 #               set(gcf,'Color','w')
    104 #               printmodel(['ismipcHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    105 #               shutil.move("ismipcHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
     78    #Plot the results and save them
     79    vx = md.results.StressbalanceSolution.Vx
     80    vy = md.results.StressbalanceSolution.Vy
     81    vz = md.results.StressbalanceSolution.Vz
     82    results.append(md.results.StressbalanceSolution)
     83    minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
     84    maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
    10685
    107         if   (L==5000.):
    108                 pass
    109 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,...
    110 #                       'resolution',[10 10],'ylim',[0 20],'xlim',[0 5000],'title','','xlabel','','figure',5)
    111         elif (L==10000.):
    112                 pass
    113 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,...
    114 #                       'resolution',[10 10],'ylim',[13 18],'xlim',[0 10000],'title','','xlabel','')
    115         elif (L==20000.):
    116                 pass
    117 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,...
    118 #                       'resolution',[10 10],'ylim',[14 22],'xlim',[0 20000],'title','','xlabel','')
    119         elif (L==40000.):
    120                 pass
    121 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,...
    122 #                       'resolution',[10 10],'ylim',[10 40],'xlim',[0 40000],'title','','xlabel','')
    123         elif (L==80000.):
    124                 pass
    125 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,...
    126 #                       'resolution',[10 10],'ylim',[0 80],'xlim',[0 80000],'title','','xlabel','')
    127         elif (L==160000.):
    128                 pass
    129 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,...
    130 #                       'resolution',[10 10],'ylim',[0 200],'xlim',[0 160000],'title','','xlabel','')
    131         if printingflag:
    132                 pass
    133 #               set(gcf,'Color','w')
    134 #               printmodel(['ismipcHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    135 #               shutil.move("ismipcHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
     86    #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)
     88    if printingflag:
     89        pass
     90#           set(gcf, 'Color', 'w')
     91#           printmodel(['ismipcHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     92#           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)
     94    if printingflag:
     95        pass
     96#           set(gcf, 'Color', 'w')
     97#           printmodel(['ismipcHOvy' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     98#           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)
     100    if printingflag:
     101        pass
     102#           set(gcf, 'Color', 'w')
     103#           printmodel(['ismipcHOvz' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     104#           shutil.move("ismipcHOvz%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
     105
     106    if (L == 5000.):
     107        pass
     108#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP5000.exp', 'layer', md.mesh.numberoflayers,...
     109#                   'resolution',[10 10], 'ylim',[0 20], 'xlim',[0 5000], 'title', '', 'xlabel', '', 'figure', 5)
     110    elif (L == 10000.):
     111        pass
     112#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP10000.exp', 'layer', md.mesh.numberoflayers,...
     113#                   'resolution',[10 10], 'ylim',[13 18], 'xlim',[0 10000], 'title', '', 'xlabel', '')
     114    elif (L == 20000.):
     115        pass
     116#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP20000.exp', 'layer', md.mesh.numberoflayers,...
     117#                   'resolution',[10 10], 'ylim',[14 22], 'xlim',[0 20000], 'title', '', 'xlabel', '')
     118    elif (L == 40000.):
     119        pass
     120#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP40000.exp', 'layer', md.mesh.numberoflayers,...
     121#                   'resolution',[10 10], 'ylim',[10 40], 'xlim',[0 40000], 'title', '', 'xlabel', '')
     122    elif (L == 80000.):
     123        pass
     124#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP80000.exp', 'layer', md.mesh.numberoflayers,...
     125#                   'resolution',[10 10], 'ylim',[0 80], 'xlim',[0 80000], 'title', '', 'xlabel', '')
     126    elif (L == 160000.):
     127        pass
     128#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP160000.exp', 'layer', md.mesh.numberoflayers,...
     129#                   'resolution',[10 10], 'ylim',[0 200], 'xlim',[0 160000], 'title', '', 'xlabel', '')
     130    if printingflag:
     131        pass
     132#           set(gcf, 'Color', 'w')
     133#           printmodel(['ismipcHOvxsec' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     134#           shutil.move("ismipcHOvxsec%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
    136135
    137136#Now plot the min and max values of vx for each size of the square
    138 #plot([5 10 20 40 80 160],minvx)ylim([4 18])xlim([0 160])
     137#plot([5 10 20 40 80 160], minvx)ylim([4 18])xlim([0 160])
    139138if printingflag:
    140         pass
    141 #       set(gcf,'Color','w')
    142 #       printmodel('ismipcHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    143 #       shutil.move('ismipcHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
    144 #plot([5 10 20 40 80 160],maxvx)ylim([0 200]) xlim([0 160])
     139    pass
     140#       set(gcf, 'Color', 'w')
     141#       printmodel('ismipcHOminvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     142#       shutil.move('ismipcHOminvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
     143#plot([5 10 20 40 80 160], maxvx)ylim([0 200]) xlim([0 160])
    145144if printingflag:
    146         pass
    147 #       set(gcf,'Color','w')
    148 #       printmodel('ismipcHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    149 #       shutil.move('ismipcHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
     145    pass
     146#       set(gcf, 'Color', 'w')
     147#       printmodel('ismipcHOmaxvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     148#       shutil.move('ismipcHOmaxvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
    150149
    151150#Fields and tolerances to track changes
    152 field_names     =['Vx80km','Vy80km','Vz80km']
    153 field_tolerances=[1e-09,1e-08,1e-08]
    154 field_values=[]
     151field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     152field_tolerances = [1e-09, 1e-08, 1e-08]
     153field_values = []
    155154for result in results:
    156         field_values=field_values+[result.Vx,result.Vy,result.Vz]
     155    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1106.py

    r21408 r23793  
    1414"""
    1515
    16 L_list=[80000.]
    17 results=[]
     16L_list = [80000.]
     17results = []
    1818
    1919for L in L_list:
    20         md=triangle(model(),"../Exp/Square_%d.exp" % L,L/10.)    #size 3*L
    21         md=setmask(md,'','')    #ice sheet test
    22         md=parameterize(md,'../Par/ISMIPC.py')
    23         md.friction.coefficient=np.sqrt(md.constants.yts*(1000.+1000.*np.sin(md.mesh.x*2.*np.pi/L)*np.sin(md.mesh.y*2.*np.pi/L)))
    24         md.extrude(10,1.)
     20    md = triangle(model(), "../Exp/Square_{}.exp".format(L), L / 10.)    #size 3*L
     21    md = setmask(md, '', '')    #ice sheet test
     22    md = parameterize(md, '../Par/ISMIPC.py')
     23    md.friction.coefficient = np.sqrt(md.constants.yts * (1000. + 1000. * np.sin(md.mesh.x * 2. * np.pi / L) * np.sin(md.mesh.y * 2. * np.pi / L)))
     24    md.extrude(10, 1.)
    2525
    26         #Add spc on the borders
    27         pos=np.where(np.logical_or.reduce((md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y))))
    28         md.stressbalance.spcvx[pos]=0.
    29         md.stressbalance.spcvy[pos]=0.
    30         if   (L==5000.):
    31                 md.stressbalance.spcvx[pos]=15.66
    32                 md.stressbalance.spcvy[pos]=-0.1967
    33         elif (L==10000.):
    34                 md.stressbalance.spcvx[pos]=16.04
    35                 md.stressbalance.spcvy[pos]=-0.1977
    36         elif (L==20000.):
    37                 md.stressbalance.spcvx[pos]=16.53
    38                 md.stressbalance.spcvy[pos]=-1.27
    39         elif (L==40000.):
    40                 md.stressbalance.spcvx[pos]=17.23
    41                 md.stressbalance.spcvy[pos]=-3.17
    42         elif (L==80000.):
    43                 md.stressbalance.spcvx[pos]=16.68
    44                 md.stressbalance.spcvy[pos]=-2.69
    45         elif (L==160000.):
    46                 md.stressbalance.spcvx[pos]=16.03
    47                 md.stressbalance.spcvy[pos]=-1.27
     26    #Add spc on the borders
     27    pos = np.where(np.logical_or.reduce((md.mesh.x == 0., md.mesh.x == np.max(md.mesh.x), md.mesh.y == 0., md.mesh.y == np.max(md.mesh.y))))
     28    md.stressbalance.spcvx[pos] = 0.
     29    md.stressbalance.spcvy[pos] = 0.
     30    if (L == 5000.):
     31        md.stressbalance.spcvx[pos] = 15.66
     32        md.stressbalance.spcvy[pos] = -0.1967
     33    elif (L == 10000.):
     34        md.stressbalance.spcvx[pos] = 16.04
     35        md.stressbalance.spcvy[pos] = -0.1977
     36    elif (L == 20000.):
     37        md.stressbalance.spcvx[pos] = 16.53
     38        md.stressbalance.spcvy[pos] = -1.27
     39    elif (L == 40000.):
     40        md.stressbalance.spcvx[pos] = 17.23
     41        md.stressbalance.spcvy[pos] = -3.17
     42    elif (L == 80000.):
     43        md.stressbalance.spcvx[pos] = 16.68
     44        md.stressbalance.spcvy[pos] = -2.69
     45    elif (L == 160000.):
     46        md.stressbalance.spcvx[pos] = 16.03
     47        md.stressbalance.spcvy[pos] = -1.27
    4848
    49         md=setflowequation(md,'FS','all')
     49    md = setflowequation(md, 'FS', 'all')
    5050
    51         #Compute the stressbalance
    52         md.cluster=generic('name',gethostname(),'np',8)
    53         md=solve(md,'Stressbalance')
     51    #Compute the stressbalance
     52    md.cluster = generic('name', gethostname(), 'np', 8)
     53    md = solve(md, 'Stressbalance')
    5454
    55         #Plot the results and save them
    56         vx=md.results.StressbalanceSolution.Vx
    57         vy=md.results.StressbalanceSolution.Vy
    58         vz=md.results.StressbalanceSolution.Vz
    59         results.append(md.results.StressbalanceSolution)
     55    #Plot the results and save them
     56    vx = md.results.StressbalanceSolution.Vx
     57    vy = md.results.StressbalanceSolution.Vy
     58    vz = md.results.StressbalanceSolution.Vz
     59    results.append(md.results.StressbalanceSolution)
    6060
    61 #       plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.mesh.numberoflayers)
     61#   plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer#all', md.mesh.numberoflayers)
    6262
    6363#Fields and tolerances to track changes
    64 field_names     =['Vx80km','Vy80km','Vz80km']
    65 field_tolerances=[1e-12,1e-12,1e-12]
    66 field_values=[]
     64field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     65field_tolerances = [1e-12, 1e-12, 1e-12]
     66field_values = []
    6767for result in results:
    68         field_values=field_values+[result.Vx,result.Vy,result.Vz]
     68    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1107.py

    r21411 r23793  
    11#Test Name: ISMIPDHO
    22import numpy as np
    3 import shutil
    43from model import *
    54from socket import gethostname
     
    1514"""
    1615
    17 printingflag=False
     16printingflag = False
    1817
    19 L_list=[80000.]
    20 results=[]
    21 minvx=[]
    22 maxvx=[]
     18L_list = [80000.]
     19results = []
     20minvx = []
     21maxvx = []
    2322
    2423for L in L_list:
    25         nx=30    #numberof nodes in x direction
    26         ny=30
    27         md=model()
    28         md=squaremesh(md,L,L,nx,ny)
    29         md=setmask(md,'','')    #ice sheet test
    30         md=parameterize(md,'../Par/ISMIPD.py')
    31         md.extrude(10,1.)
     24    nx = 30    #numberof nodes in x direction
     25    ny = 30
     26    md = model()
     27    md = squaremesh(md, L, L, nx, ny)
     28    md = setmask(md, '', '')    #ice sheet test
     29    md = parameterize(md, '../Par/ISMIPD.py')
     30    md.extrude(10, 1.)
    3231
    33         md=setflowequation(md,'HO','all')
     32    md = setflowequation(md, 'HO', 'all')
    3433
    35         #We need one grd on dirichlet: the 4 corners are set to zero
    36         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    37         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    38         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
     34    #We need one grd on dirichlet: the 4 corners are set to zero
     35    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     36    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     37    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    3938
    40         #Create MPCs to have periodic boundary conditions
    41 #       posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase))
    42         posx=np.where(np.logical_and.reduce((md.mesh.x==0.,np.logical_not(np.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),np.logical_not(np.logical_and(md.mesh.y==L,md.mesh.vertexonbase)))))[0]
    43 #       posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase))
    44         posx2=np.where(np.logical_and.reduce((md.mesh.x==np.max(md.mesh.x),np.logical_not(np.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),np.logical_not(np.logical_and(md.mesh.y==L,md.mesh.vertexonbase)))))[0]
     39    #Create MPCs to have periodic boundary conditions
     40#   posx = find(md.mesh.x = 0. & ~(md.mesh.y = 0. & md.mesh.vertexonbase) & ~(md.mesh.y = L & md.mesh.vertexonbase))
     41    posx = np.where(np.logical_and.reduce((md.mesh.x == 0., np.logical_not(np.logical_and(md.mesh.y == 0., md.mesh.vertexonbase)), np.logical_not(np.logical_and(md.mesh.y == L, md.mesh.vertexonbase)))))[0]
     42#   posx2 = find(md.mesh.x = max(md.mesh.x) & ~(md.mesh.y = 0. & md.mesh.vertexonbase) & ~(md.mesh.y = L & md.mesh.vertexonbase))
     43    posx2 = np.where(np.logical_and.reduce((md.mesh.x == np.max(md.mesh.x), np.logical_not(np.logical_and(md.mesh.y == 0., md.mesh.vertexonbase)), np.logical_not(np.logical_and(md.mesh.y == L, md.mesh.vertexonbase)))))[0]
    4544
    46         posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]    #Don't take the same nodes two times
    47         posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0]
     45    posy = np.where(np.logical_and.reduce((md.mesh.y == 0., md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]    #Don't take the same nodes two times
     46    posy2 = np.where(np.logical_and.reduce((md.mesh.y == np.max(md.mesh.y), md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]
    4847
    49         md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
     48    md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
    5049
    51         #Add spc on the corners
    52         pos=np.where(np.logical_and.reduce((np.logical_or(md.mesh.x==0.,md.mesh.x==L),np.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase)))
    53         md.stressbalance.spcvy[:]=0.
    54         md.stressbalance.spcvx[pos]=0.
    55         if   (L==5000.):
    56                 md.stressbalance.spcvx[pos]=16.0912
    57         elif (L==10000.):
    58                 md.stressbalance.spcvx[pos]=16.52
    59         elif (L==20000.):
    60                 md.stressbalance.spcvx[pos]=17.77
    61         elif (L==40000.):
    62                 md.stressbalance.spcvx[pos]=19.88
    63         elif (L==80000.):
    64                 md.stressbalance.spcvx[pos]=18.65
    65         elif (L==160000.):
    66                 md.stressbalance.spcvx[pos]=16.91
    67        
    68         #Spc the bed at zero for vz
    69         pos=np.where(md.mesh.vertexonbase)
    70         md.stressbalance.spcvz[pos]=0.
     50    #Add spc on the corners
     51    pos = np.where(np.logical_and.reduce((np.logical_or(md.mesh.x == 0., md.mesh.x == L), np.logical_or(md.mesh.y == 0., md.mesh.y == L), md.mesh.vertexonbase)))
     52    md.stressbalance.spcvy[:] = 0.
     53    md.stressbalance.spcvx[pos] = 0.
     54    if (L == 5000.):
     55        md.stressbalance.spcvx[pos] = 16.0912
     56    elif (L == 10000.):
     57        md.stressbalance.spcvx[pos] = 16.52
     58    elif (L == 20000.):
     59        md.stressbalance.spcvx[pos] = 17.77
     60    elif (L == 40000.):
     61        md.stressbalance.spcvx[pos] = 19.88
     62    elif (L == 80000.):
     63        md.stressbalance.spcvx[pos] = 18.65
     64    elif (L == 160000.):
     65        md.stressbalance.spcvx[pos] = 16.91
    7166
    72         #Compute the stressbalance
    73         md.cluster=generic('name',gethostname(),'np',8)
    74         md=solve(md,'Stressbalance')
     67    #Spc the bed at zero for vz
     68    pos = np.where(md.mesh.vertexonbase)
     69    md.stressbalance.spcvz[pos] = 0.
    7570
    76         #Plot the results and save them
    77         vx=md.results.StressbalanceSolution.Vx
    78         vy=md.results.StressbalanceSolution.Vy
    79         vz=md.results.StressbalanceSolution.Vz
    80         results.append(md.results.StressbalanceSolution)
    81         minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
    82         maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
     71    #Compute the stressbalance
     72    md.cluster = generic('name', gethostname(), 'np', 8)
     73    md = solve(md, 'Stressbalance')
    8374
    84         #Now plot vx, vy, vz and vx on a cross section
    85 #       plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2)
    86         if printingflag:
    87                 pass
    88 #               set(gcf,'Color','w')
    89 #               printmodel(['ismipdHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    90 #               shutil.move("ismipdHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
    91 #       plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
    92         if printingflag:
    93                 pass
    94 #               set(gcf,'Color','w')
    95 #               printmodel(['ismipdHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    96 #               shutil.move("ismipdHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
     75    #Plot the results and save them
     76    vx = md.results.StressbalanceSolution.Vx
     77    vy = md.results.StressbalanceSolution.Vy
     78    vz = md.results.StressbalanceSolution.Vz
     79    results.append(md.results.StressbalanceSolution)
     80    minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
     81    maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
    9782
    98         if   (L==5000.):
    99                 pass
    100 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,...
    101 #                       'resolution',[10 10],'ylim',[0 20],'xlim',[0 5000],'title','','xlabel','','figure',4)
    102         elif (L==10000.):
    103                 pass
    104 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,...
    105 #                       'resolution',[10 10],'ylim',[0 20],'xlim',[0 10000],'title','','xlabel','','figure',4)
    106         elif (L==20000.):
    107                 pass
    108 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,...
    109 #                       'resolution',[10 10],'ylim',[0 30],'xlim',[0 20000],'title','','xlabel','','figure',4)
    110         elif (L==40000.):
    111                 pass
    112 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,...
    113 #                       'resolution',[10 10],'ylim',[10 60],'xlim',[0 40000],'title','','xlabel','','figure',4)
    114         elif (L==80000.):
    115                 pass
    116 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,...
    117 #                       'resolution',[10 10],'ylim',[0 200],'xlim',[0 80000],'title','','xlabel','','figure',4)
    118         elif (L==160000.):
    119                 pass
    120 #               plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,...
    121 #                       'resolution',[10 10],'ylim',[0 400],'xlim',[0 160000],'title','','xlabel','','figure',4)
    122         if printingflag:
    123                 pass
    124 #               set(gcf,'Color','w')
    125 #               printmodel(['ismipdHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    126 #               shutil.move("ismipdHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
     83    #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)
     85    if printingflag:
     86        pass
     87#           set(gcf, 'Color', 'w')
     88#           printmodel(['ismipdHOvx' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     89#           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)
     91    if printingflag:
     92        pass
     93#           set(gcf, 'Color', 'w')
     94#           printmodel(['ismipdHOvz' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     95#           shutil.move("ismipdHOvz%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
     96
     97    if (L == 5000.):
     98        pass
     99#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP5000.exp', 'layer', md.mesh.numberoflayers,...
     100#                   'resolution',[10 10], 'ylim',[0 20], 'xlim',[0 5000], 'title', '', 'xlabel', '', 'figure', 4)
     101    elif (L == 10000.):
     102        pass
     103#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP10000.exp', 'layer', md.mesh.numberoflayers,...
     104#                   'resolution',[10 10], 'ylim',[0 20], 'xlim',[0 10000], 'title', '', 'xlabel', '', 'figure', 4)
     105    elif (L == 20000.):
     106        pass
     107#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP20000.exp', 'layer', md.mesh.numberoflayers,...
     108#                   'resolution',[10 10], 'ylim',[0 30], 'xlim',[0 20000], 'title', '', 'xlabel', '', 'figure', 4)
     109    elif (L == 40000.):
     110        pass
     111#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP40000.exp', 'layer', md.mesh.numberoflayers,...
     112#                   'resolution',[10 10], 'ylim',[10 60], 'xlim',[0 40000], 'title', '', 'xlabel', '', 'figure', 4)
     113    elif (L == 80000.):
     114        pass
     115#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP80000.exp', 'layer', md.mesh.numberoflayers,...
     116#                   'resolution',[10 10], 'ylim',[0 200], 'xlim',[0 80000], 'title', '', 'xlabel', '', 'figure', 4)
     117    elif (L == 160000.):
     118        pass
     119#           plotmodel(md, 'data', vx, 'sectionvalue', '../Exp/ISMIP160000.exp', 'layer', md.mesh.numberoflayers,...
     120#                   'resolution',[10 10], 'ylim',[0 400], 'xlim',[0 160000], 'title', '', 'xlabel', '', 'figure', 4)
     121    if printingflag:
     122        pass
     123#           set(gcf, 'Color', 'w')
     124#           printmodel(['ismipdHOvxsec' num2str(L)], 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     125#           shutil.move("ismipdHOvxsec%d.png" % L, ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
    127126
    128127#Now plot the min and max values of vx for each size of the square
    129 #plot([5 10 20 40 80 160],minvx)ylim([2 18])xlim([0 160])
     128#plot([5 10 20 40 80 160], minvx)ylim([2 18])xlim([0 160])
    130129if printingflag:
    131         pass
    132 #       set(gcf,'Color','w')
    133 #       printmodel('ismipdHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    134 #       shutil.move('ismipdHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
    135 #plot([5 10 20 40 80 160],maxvx)ylim([0 300])xlim([0 160])
     130    pass
     131#       set(gcf, 'Color', 'w')
     132#       printmodel('ismipdHOminvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     133#       shutil.move('ismipdHOminvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
     134#plot([5 10 20 40 80 160], maxvx)ylim([0 300])xlim([0 160])
    136135if printingflag:
    137         pass
    138 #       set(gcf,'Color','w')
    139 #       printmodel('ismipdHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    140 #       shutil.move('ismipdHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
     136    pass
     137#       set(gcf, 'Color', 'w')
     138#       printmodel('ismipdHOmaxvx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     139#       shutil.move('ismipdHOmaxvx.png', ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
    141140
    142141#Fields and tolerances to track changes
    143 field_names     =['Vx80km','Vy80km','Vz80km']
    144 field_tolerances=[1e-08,1e-08,1e-07]
    145 field_values=[]
     142field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     143field_tolerances = [1e-08, 1e-08, 1e-07]
     144field_values = []
    146145for result in results:
    147         field_values=field_values+[result.Vx,result.Vy,result.Vz]
     146    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1108.py

    r22272 r23793  
    1717"""
    1818
    19 #L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
    20 L_list=[80000.]
    21 results=[]
     19#L_list = [5000., 10000., 20000., 40000., 80000., 160000.]
     20L_list = [80000.]
     21results = []
    2222
    2323for L in L_list:
    24         nx=30    #numberof nodes in x direction
    25         ny=30
    26         md=model()
    27         md=squaremesh(md,L,L,nx,ny)
    28         md=setmask(md,'','')    #ice sheet test
    29         md=parameterize(md,'../Par/ISMIPD.py')
    30         md.extrude(10,1.)
     24    nx = 30    #numberof nodes in x direction
     25    ny = 30
     26    md = model()
     27    md = squaremesh(md, L, L, nx, ny)
     28    md = setmask(md, '', '')    #ice sheet test
     29    md = parameterize(md, '../Par/ISMIPD.py')
     30    md.extrude(10, 1.)
    3131
    32         md=setflowequation(md,'HO','all')
     32    md = setflowequation(md, 'HO', 'all')
    3333
    34         #We need one grd on dirichlet: the 4 corners are set to zero
    35         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    36         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    37         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
    38        
    39         maxx = max(md.mesh.x)
    40         maxy = max(md.mesh.y)
    41         posA = np.where(md.mesh.vertexonbase)
    42         posB = np.unique(np.concatenate((np.where(md.mesh.x==0.), np.where(md.mesh.x==maxx))))
    43         posC = np.unique(np.concatenate((np.where(md.mesh.y==0.), np.where(md.mesh.y==maxy))))
    44         pos = np.intersect1d(np.intersect1d(posA,posB),posC)
     34    #We need one grd on dirichlet: the 4 corners are set to zero
     35    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     36    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     37    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    4538
    46         md.stressbalance.spcvx[pos]=0.
    47         md.stressbalance.spcvy[pos]=0.
    48         md.stressbalance.spcvz[pos]=0.
     39    maxx = max(md.mesh.x)
     40    maxy = max(md.mesh.y)
     41    posA = np.where(md.mesh.vertexonbase)
     42    posB = np.unique(np.concatenate((np.where(md.mesh.x == 0.), np.where(md.mesh.x == maxx))))
     43    posC = np.unique(np.concatenate((np.where(md.mesh.y == 0.), np.where(md.mesh.y == maxy))))
     44    pos = np.intersect1d(np.intersect1d(posA, posB), posC)
    4945
    50         #Create MPCs to have periodic boundary conditions
    51         posx=np.nonzero(md.mesh.x==0.)[0]
    52         posx2=np.nonzero(md.mesh.x==np.max(md.mesh.x))[0]
     46    md.stressbalance.spcvx[pos] = 0.
     47    md.stressbalance.spcvy[pos] = 0.
     48    md.stressbalance.spcvz[pos] = 0.
    5349
    54         posy=np.intersect1d(np.intersect1d(np.where(md.mesh.y==0.),np.where(md.mesh.x!=0.)),np.where(md.mesh.x!=np.max(md.mesh.x)))[0]    #Don't take the same nodes two times
    55         posy2=np.intersect1d(np.intersect1d(np.where(md.mesh.y==np.max(md.mesh.y)),np.where(md.mesh.x!=0.)),np.where(md.mesh.x!=np.max(md.mesh.x)))[0]
     50    #Create MPCs to have periodic boundary conditions
     51    posx = np.nonzero(md.mesh.x == 0.)[0]
     52    posx2 = np.nonzero(md.mesh.x == np.max(md.mesh.x))[0]
    5653
    57         md.stressbalance.vertex_pairing=np.vstack((np.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),np.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
     54    posy = np.intersect1d(np.intersect1d(np.where(md.mesh.y == 0.), np.where(md.mesh.x != 0.)), np.where(md.mesh.x != np.max(md.mesh.x)))[0]    #Don't take the same nodes two times
     55    posy2 = np.intersect1d(np.intersect1d(np.where(md.mesh.y == np.max(md.mesh.y)), np.where(md.mesh.x != 0.)), np.where(md.mesh.x != np.max(md.mesh.x)))[0]
    5856
    59         #Compute the stressbalance
    60         md.cluster=generic('name',gethostname(),'np',8)
    61         md.verbose=verbose('convergence',True)
    62         md=solve(md,'Stressbalance')
    63         md.stressbalance.reltol=np.nan
    64         md.stressbalance.abstol=np.nan
    65         md.stressbalance.vertex_pairing=np.empty((0,2))
    66         #We need one grid on dirichlet: the 4 corners are set to zero
    67         md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    68         md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    69         md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
    70         pos=np.nonzero(logical_or.reduce_n(md.mesh.y==0.,md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==np.max(md.mesh.y)))    #Don't take the same nodes two times
    71         md.stressbalance.spcvx[pos]=md.results.StressbalanceSolution.Vx[pos]
    72         md.stressbalance.spcvy[pos]=md.results.StressbalanceSolution.Vy[pos]
    73         md=setflowequation(md,'FS','all')
    74         md=solve(md,'Stressbalance')
     57    md.stressbalance.vertex_pairing = np.vstack((np.hstack((posx.reshape(-1, 1) + 1, posx2.reshape(-1, 1) + 1)), np.hstack((posy.reshape(-1, 1) + 1, posy2.reshape(-1, 1) + 1))))
    7558
    76         #Plot the results and save them
    77         vx=md.results.StressbalanceSolution.Vx
    78         vy=md.results.StressbalanceSolution.Vy
    79         vz=md.results.StressbalanceSolution.Vz
    80         results.append(md.results.StressbalanceSolution)
     59    #Compute the stressbalance
     60    md.cluster = generic('name', gethostname(), 'np', 8)
     61    md.verbose = verbose('convergence', True)
     62    md = solve(md, 'Stressbalance')
     63    md.stressbalance.reltol = np.nan
     64    md.stressbalance.abstol = np.nan
     65    md.stressbalance.vertex_pairing = np.empty((0, 2))
     66    #We need one grid on dirichlet: the 4 corners are set to zero
     67    md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     68    md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     69    md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
     70    pos = np.nonzero(logical_or.reduce_n(md.mesh.y == 0., md.mesh.x == 0., md.mesh.x == np.max(md.mesh.x), md.mesh.y == np.max(md.mesh.y)))    #Don't take the same nodes two times
     71    md.stressbalance.spcvx[pos] = md.results.StressbalanceSolution.Vx[pos]
     72    md.stressbalance.spcvy[pos] = md.results.StressbalanceSolution.Vy[pos]
     73    md = setflowequation(md, 'FS', 'all')
     74    md = solve(md, 'Stressbalance')
    8175
    82 #       plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.mesh.numberoflayers)
     76    #Plot the results and save them
     77    vx = md.results.StressbalanceSolution.Vx
     78    vy = md.results.StressbalanceSolution.Vy
     79    vz = md.results.StressbalanceSolution.Vz
     80    results.append(md.results.StressbalanceSolution)
     81
     82#       plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer#all', md.mesh.numberoflayers)
    8383
    8484#Fields and tolerances to track changes
    85 field_names     =['Vx80km','Vy80km','Vz80km']
    86 field_tolerances=[1e-08,1e-07,1e-07]
    87 field_values=[]
     85field_names = ['Vx80km', 'Vy80km', 'Vz80km']
     86field_tolerances = [1e-08, 1e-07, 1e-07]
     87field_values = []
    8888for result in results:
    89         field_values=field_values+[\
    90                 result.Vx,\
    91                 result.Vy,\
    92                 result.Vz,\
    93                 ]
     89    field_values = field_values + [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test1109.py

    r22272 r23793  
    11#Test Name: ISMIPE
    22import numpy as np
    3 import sys
    43from model import *
    54from socket import gethostname
     
    1211
    1312#This test is a test from the ISMP-HOM Intercomparison project.
    14 #TestE 
     13#TestE
    1514#Four tests to run: - Pattyn frozen
    1615#                   - Stokes frozen
     
    2120
    2221for i in range(4):
    23         Lx=10. #in m
    24         Ly=5000. #in m
    25         nx=3 #number of nodes in x direction
    26         ny=51
    27         md = model()
    28         md = squaremesh(md,Lx,Ly,nx,ny)
    29         md = setmask(md,'','') #ice sheet test
    30         md = parameterize(md,'../Par/ISMIPE.py')
    31         md = md.extrude(10,1.)
     22    Lx = 10. #in m
     23    Ly = 5000. #in m
     24    nx = 3 #number of nodes in x direction
     25    ny = 51
     26    md = model()
     27    md = squaremesh(md, Lx, Ly, nx, ny)
     28    md = setmask(md, '', '') #ice sheet test
     29    md = parameterize(md, '../Par/ISMIPE.py')
     30    md = md.extrude(10, 1.)
    3231
    33         if i==0 or i==2:
    34                 md = setflowequation(md,'HO','all')
    35         elif i==1 or i==3:
    36                 md = setflowequation(md,'FS','all')
     32    if i == 0 or i == 2:
     33        md = setflowequation(md, 'HO', 'all')
     34    elif i == 1 or i == 3:
     35        md = setflowequation(md, 'FS', 'all')
    3736
    38         #Create MPCs to have periodic boundary conditions
    39         posx = np.where(md.mesh.x == 0.)[0]
    40         posx2 = np.where(md.mesh.x == max(md.mesh.x))[0]
    41         md.stressbalance.vertex_pairing = np.column_stack((posx,posx2))
     37    #Create MPCs to have periodic boundary conditions
     38    posx = np.where(md.mesh.x == 0.)[0]
     39    posx2 = np.where(md.mesh.x == max(md.mesh.x))[0]
     40    md.stressbalance.vertex_pairing = np.column_stack((posx, posx2))
    4241
    43         #Create spcs on the bed
    44         pos = np.where(md.mesh.vertexonbase)[0]
    45         md.stressbalance.spcvx = float('NaN') * np.ones((md.mesh.numberofvertices,))
    46         md.stressbalance.spcvy = float('NaN') * np.ones((md.mesh.numberofvertices,))
    47         md.stressbalance.spcvz = float('NaN') * np.ones((md.mesh.numberofvertices,))
    48         md.stressbalance.spcvx[pos] = 0.
    49         md.stressbalance.spcvy[pos] = 0.
    50         md.stressbalance.spcvz[pos] = 0.
     42    #Create spcs on the bed
     43    pos = np.where(md.mesh.vertexonbase)[0]
     44    md.stressbalance.spcvx = float('NaN') * np.ones((md.mesh.numberofvertices,))
     45    md.stressbalance.spcvy = float('NaN') * np.ones((md.mesh.numberofvertices,))
     46    md.stressbalance.spcvz = float('NaN') * np.ones((md.mesh.numberofvertices,))
     47    md.stressbalance.spcvx[pos] = 0.
     48    md.stressbalance.spcvy[pos] = 0.
     49    md.stressbalance.spcvz[pos] = 0.
    5150
    52         #Remove the spc where there is some sliding (case 3 and 4):
    53         if i==2 or i==3:
    54                 pos = np.intersect1d(np.where((md.mesh.y / max(md.mesh.y)) >= 0.44), np.where((md.mesh.y / max(md.mesh.y)) <= 0.5))[0]
    55                 md.stressbalance.spcvx[pos] = float('NaN')
    56                 md.stressbalance.spcvy[pos] = float('NaN')
    57                 md.stressbalance.spcvz[pos] = float('NaN')
     51    #Remove the spc where there is some sliding (case 3 and 4):
     52    if i == 2 or i == 3:
     53        pos = np.intersect1d(np.where((md.mesh.y / max(md.mesh.y)) >= 0.44), np.where((md.mesh.y / max(md.mesh.y)) <= 0.5))[0]
     54        md.stressbalance.spcvx[pos] = float('NaN')
     55        md.stressbalance.spcvy[pos] = float('NaN')
     56        md.stressbalance.spcvz[pos] = float('NaN')
    5857
    59         #Compute the stressbalance
    60         md.cluster = generic('name',gethostname(),'np',8)
    61         md = solve(md,'Stressbalance')
     58    #Compute the stressbalance
     59    md.cluster = generic('name', gethostname(), 'np', 8)
     60    md = solve(md, 'Stressbalance')
    6261
    63         vx = md.results.StressbalanceSolution.Vx
    64         vy = md.results.StressbalanceSolution.Vy
    65         vz = md.results.StressbalanceSolution.Vz
    66         results[i] = md.results.StressbalanceSolution
     62    vx = md.results.StressbalanceSolution.Vx
     63    vy = md.results.StressbalanceSolution.Vy
     64    vz = md.results.StressbalanceSolution.Vz
     65    results[i] = md.results.StressbalanceSolution
    6766
    6867
    6968#Fields and tolerances to track changes
    70 field_names = [
    71         'VyPattynSliding','VzPattynSliding',
    72         'VxStokesSliding','VyStokesSliding','VzStokesSliding',
    73         'VyPattynFrozen','VzPattynFrozen',
    74         'VxStokesFrozen','VyStokesFrozen','VzStokesFrozen'
    75         ]
    76 field_tolerances = [
    77         1e-05,1e-05,
    78         1e-05,1e-06,1e-06,
    79         1e-05,1e-04,
    80         1e-05,1e-05,1e-06
    81         ]
     69field_names = ['VyPattynSliding', 'VzPattynSliding',
     70               'VxStokesSliding', 'VyStokesSliding', 'VzStokesSliding',
     71               'VyPattynFrozen', 'VzPattynFrozen',
     72               'VxStokesFrozen', 'VyStokesFrozen', 'VzStokesFrozen']
     73field_tolerances = [1e-05, 1e-05,
     74                    1e-05, 1e-06, 1e-06,
     75                    1e-05, 1e-04,
     76                    1e-05, 1e-05, 1e-06]
    8277
    8378field_values = []
    8479for i in range(4):
    85         result = results[i]
    86         field_values += [result.Vx,result.Vy,result.Vz]
     80    result = results[i]
     81    field_values += [result.Vx, result.Vy, result.Vz]
  • issm/trunk-jpl/test/NightlyRun/test111.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',200000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.transient.requested_outputs=['IceVolume']
    18 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 200000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.transient.requested_outputs = ['IceVolume']
     18md = solve(md, 'Transient')
    1919
    2020#Fields and tolerances to track changes
    21 field_names=[\
    22         'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface2','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','Volume1', \
    23         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','Volume2', \
    24         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','Volume3']
    25 field_tolerances=[\
    26         1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,1e-13,\
    27         1e-09,1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,2e-11,\
    28         1e-09,1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,1e-11]
    29 field_values=[\
    30         md.results.TransientSolution[0].Vx,\
    31         md.results.TransientSolution[0].Vy,\
    32         md.results.TransientSolution[0].Vz,\
    33         md.results.TransientSolution[0].Vel,\
    34         md.results.TransientSolution[0].Pressure,\
    35         md.results.TransientSolution[0].Base,\
    36         md.results.TransientSolution[0].Surface,\
    37         md.results.TransientSolution[0].Thickness,\
    38         md.results.TransientSolution[0].Temperature,\
    39         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    40         md.results.TransientSolution[0].IceVolume,\
    41         md.results.TransientSolution[1].Vx,\
    42         md.results.TransientSolution[1].Vy,\
    43         md.results.TransientSolution[1].Vz,\
    44         md.results.TransientSolution[1].Vel,\
    45         md.results.TransientSolution[1].Pressure,\
    46         md.results.TransientSolution[1].Base,\
    47         md.results.TransientSolution[1].Surface,\
    48         md.results.TransientSolution[1].Thickness,\
    49         md.results.TransientSolution[1].Temperature,\
    50         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    51         md.results.TransientSolution[1].IceVolume,\
    52         md.results.TransientSolution[2].Vx,\
    53         md.results.TransientSolution[2].Vy,\
    54         md.results.TransientSolution[2].Vz,\
    55         md.results.TransientSolution[2].Vel,\
    56         md.results.TransientSolution[2].Pressure,\
    57         md.results.TransientSolution[2].Base,\
    58         md.results.TransientSolution[2].Surface,\
    59         md.results.TransientSolution[2].Thickness,\
    60         md.results.TransientSolution[2].Temperature,\
    61         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    62         md.results.TransientSolution[2].IceVolume,\
    63         ]
     21field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface2', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'Volume1',
     22               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'Volume2',
     23               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3', 'Volume3']
     24field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05, 1e-13,
     25                    1e-09, 1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05, 2e-11,
     26                    1e-09, 1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05, 1e-11]
     27field_values = [md.results.TransientSolution[0].Vx,
     28                md.results.TransientSolution[0].Vy,
     29                md.results.TransientSolution[0].Vz,
     30                md.results.TransientSolution[0].Vel,
     31                md.results.TransientSolution[0].Pressure,
     32                md.results.TransientSolution[0].Base,
     33                md.results.TransientSolution[0].Surface,
     34                md.results.TransientSolution[0].Thickness,
     35                md.results.TransientSolution[0].Temperature,
     36                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     37                md.results.TransientSolution[0].IceVolume,
     38                md.results.TransientSolution[1].Vx,
     39                md.results.TransientSolution[1].Vy,
     40                md.results.TransientSolution[1].Vz,
     41                md.results.TransientSolution[1].Vel,
     42                md.results.TransientSolution[1].Pressure,
     43                md.results.TransientSolution[1].Base,
     44                md.results.TransientSolution[1].Surface,
     45                md.results.TransientSolution[1].Thickness,
     46                md.results.TransientSolution[1].Temperature,
     47                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     48                md.results.TransientSolution[1].IceVolume,
     49                md.results.TransientSolution[2].Vx,
     50                md.results.TransientSolution[2].Vy,
     51                md.results.TransientSolution[2].Vz,
     52                md.results.TransientSolution[2].Vel,
     53                md.results.TransientSolution[2].Pressure,
     54                md.results.TransientSolution[2].Base,
     55                md.results.TransientSolution[2].Surface,
     56                md.results.TransientSolution[2].Thickness,
     57                md.results.TransientSolution[2].Temperature,
     58                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
     59                md.results.TransientSolution[2].IceVolume]
  • issm/trunk-jpl/test/NightlyRun/test1110.py

    r22272 r23793  
    1111
    1212#This test is a test from the ISMP-HOM Intercomparison project.
    13 #TestF 
     13#TestF
    1414printingflag = False
    1515results = []
    1616
    1717for i in range(4):
    18         L = 100000. #in m
    19         nx = 30 #numberof nodes in x direction
    20         ny = 30
    21         md = model()
    22         md = squaremesh(md,L,L,nx,ny)
    23 #       md = triangle(md,'../Exp/SquareISMIP.exp',5500.)
    24         md = setmask(md,'','') #ice sheet test
    25         md = parameterize(md,'../Par/ISMIPF.py')
    26         md = md.extrude(4,1.)
     18    L == 100000. #in m
     19    nx = 30 #numberof nodes in x direction
     20    ny = 30
     21    md = model()
     22    md = squaremesh(md, L, L, nx, ny)
     23#   md = triangle(md, '../Exp/SquareISMIP.exp', 5500.)
     24    md = setmask(md, '', '') #ice sheet test
     25    md = parameterize(md, '../Par/ISMIPF.py')
     26    md = md.extrude(4, 1.)
    2727
    28         if (i == 0 or i == 1):
    29                 md = setflowequation(md,'HO','all')
    30         else:
    31                 md = setflowequation(md,'FS','all')
     28    if (i == 0 or i == 1):
     29        md = setflowequation(md, 'HO', 'all')
     30    else:
     31        md = setflowequation(md, 'FS', 'all')
    3232
    33         md.stressbalance.spcvx = float('NaN') * np.ones((md.mesh.numberofvertices,))
    34         md.stressbalance.spcvy = float('NaN') * np.ones((md.mesh.numberofvertices,))
    35         md.stressbalance.spcvz = float('NaN') * np.ones((md.mesh.numberofvertices,))
    36         if (i == 0 or i == 2):
    37                 #Create dirichlet on the bed if no slip
    38                 pos = np.where(md.mesh.vertexonbase)
    39                 md.stressbalance.spcvx[pos] = 0.
    40                 md.stressbalance.spcvy[pos] = 0.
    41                 md.stressbalance.spcvz[pos] = 0.
    42         else:
    43                 posA = np.where(md.mesh.vertexonbase)
    44                 posB = np.unique(np.concatenate(np.where(md.mesh.x == 0.),np.where(md.mesh.x == max(md.mesh.x))))
    45                 posC = np.unique(np.concatenate(np.where(md.mesh.y == 0.),np.where(md.mesh.y == max(md.mesh.y))))
    46                 pos = np.intersect1d(np.intersect1d(posA,posB),posC)
    47                 md.stressbalance.spcvx[pos] = 100. #because we need a dirichlet somewhere
    48                 md.stressbalance.spcvy[pos] = 0.
    49                 md.stressbalance.spcvz[pos] = 0.
    50        
    51         pos = np.where(np.logical_not(md.mesh.vertexonbase))
    52         md.thermal.spctemperature[pos] = 255.
     33    md.stressbalance.spcvx = float('NaN') * np.ones((md.mesh.numberofvertices,))
     34    md.stressbalance.spcvy = float('NaN') * np.ones((md.mesh.numberofvertices,))
     35    md.stressbalance.spcvz = float('NaN') * np.ones((md.mesh.numberofvertices,))
     36    if (i == 0 or i == 2):
     37        #Create dirichlet on the bed if no slip
     38        pos = np.where(md.mesh.vertexonbase)
     39        md.stressbalance.spcvx[pos] = 0.
     40        md.stressbalance.spcvy[pos] = 0.
     41        md.stressbalance.spcvz[pos] = 0.
     42    else:
     43        posA = np.where(md.mesh.vertexonbase)
     44        posB = np.unique(np.concatenate(np.where(md.mesh.x == 0.), np.where(md.mesh.x == max(md.mesh.x))))
     45        posC = np.unique(np.concatenate(np.where(md.mesh.y == 0.), np.where(md.mesh.y == max(md.mesh.y))))
     46        pos = np.intersect1d(np.intersect1d(posA, posB), posC)
     47        md.stressbalance.spcvx[pos] = 100.  #because we need a dirichlet somewhere
     48        md.stressbalance.spcvy[pos] = 0.
     49        md.stressbalance.spcvz[pos] = 0.
    5350
    54         #Create MPCs to have periodic boundary conditions
    55         posx = np.where(md.mesh.x == 0.)
    56         posx2 = np.where(md.mesh.x == max(md.mesh.x))
     51    pos = np.where(np.logical_not(md.mesh.vertexonbase))
     52    md.thermal.spctemperature[pos] = 255.
    5753
    58         posy = np.where(md.mesh.y == 0.)
    59         posy2 = np.where(md.mesh.y == max(md.mesh.y))
     54    #Create MPCs to have periodic boundary conditions
     55    posx = np.where(md.mesh.x == 0.)
     56    posx2 = np.where(md.mesh.x == max(md.mesh.x))
    6057
    61         md.stressbalance.vertex_pairing = np.column_stack((posx,posx2,posy,posy2))
    62         md.masstransport.vertex_pairing = np.column_stack((posx,posx2,posy,posy2))
     58    posy = np.where(md.mesh.y == 0.)
     59    posy2 = np.where(md.mesh.y == max(md.mesh.y))
    6360
    64         md.timestepping.time_step = 3.
    65         md.timestepping.final_time = 300.
    66         md.settings.output_frequency = 50
    67         md.masstransport.stabilization = 1
    68         md.stressbalance.maxiter = 1
    69        
    70         #Compute the stressbalance
    71         md.cluster = generic('name',gethostname(),'np',8)
    72         md.verbose = verbose('convergence',True,'solution',True)
    73         md = solve(md,'Transient')
     61    md.stressbalance.vertex_pairing = np.column_stack((posx, posx2, posy, posy2))
     62    md.masstransport.vertex_pairing = np.column_stack((posx, posx2, posy, posy2))
    7463
    75         #save the results
    76         results[i] = md.results.TransientSolution()
    77        
    78         #Now plot vx and delta surface
    79         if (i == 0 or i == 2):
    80                 plotmodel(md,'data',(md.results.TransientSolution().Vx),'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Velocity (m/yr)','linewidth',3,'grid','on','unit','km','ylim',[91,100])
    81         elif (i == 1 or i == 3):
    82                 plotmodel(md,'data',(md.results.TransientSolution().Vx),'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Velocity (m/yr)','linewidth',3,'grid','on','unit','km','ylim',[185,200])
    83        
    84         if printingflag:
    85                 #set(gcf,'Color','w')
    86                 if i == 0:
    87                         printmodel('ismipfHOvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    88                         #system(['mv ismipfHOvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    89                 elif i == 1:
    90                         printmodel('ismipfHOvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    91                         #system(['mv ismipfHOvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    92                 elif i == 2:
    93                         printmodel('ismipfFSvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    94                         #system(['mv ismipfFSvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    95                 elif i == 3:
    96                         printmodel('ismipfFSvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    97                         #system(['mv ismipfFSvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    98                
    99        
     64    md.timestepping.time_step = 3.
     65    md.timestepping.final_time = 300.
     66    md.settings.output_frequency = 50
     67    md.masstransport.stabilization = 1
     68    md.stressbalance.maxiter = 1
    10069
    101         plotmodel(md,'data',(md.results.TransientSolution().Surface)-md.geometry.surface,'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Surface (m)','linewidth',3,'grid','on','unit','km','ylim',[-30,50])
    102         if printingflag:
    103                 #set(gcf,'Color','w')
    104                 if i == 0:
    105                         printmodel('ismipfHOdeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    106                         #system(['mv ismipfHOdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    107                 elif i == 1:
    108                         printmodel('ismipfHOdeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    109                         #system(['mv ismipfHOdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    110                 elif i == 2:
    111                         printmodel('ismipfFSdeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    112                         #system(['mv ismipfFSdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    113                 elif i == 3:
    114                         printmodel('ismipfFSdeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
    115                         #system(['mv ismipfFSdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    116                
    117        
     70    #Compute the stressbalance
     71    md.cluster = generic('name', gethostname(), 'np', 8)
     72    md.verbose = verbose('convergence', True, 'solution', True)
     73    md = solve(md, 'Transient')
    11874
     75    #save the results
     76    results[i] = md.results.TransientSolution()
     77
     78    #Now plot vx and delta surface
     79    if (i == 0 or i == 2):
     80        plotmodel(md, 'data', (md.results.TransientSolution().Vx),
     81                  'layer', md.mesh.numberoflayers,
     82                  'sectionvalue', '../Exp/ISMIP100000.exp',
     83                  'title', '',
     84                  'xlabel', '',
     85                  'ylabel', 'Velocity (m/yr)',
     86                  'linewidth', 3,
     87                  'grid', 'on',
     88                  'unit', 'km',
     89                  'ylim', [91, 100])
     90    elif (i == 1 or i == 3):
     91        plotmodel(md, 'data', (md.results.TransientSolution().Vx),
     92                  'layer', md.mesh.numberoflayers,
     93                  'sectionvalue', '../Exp/ISMIP100000.exp',
     94                  'title', '',
     95                  'xlabel', '',
     96                  'ylabel', 'Velocity (m/yr)',
     97                  'linewidth', 3,
     98                  'grid', 'on',
     99                  'unit', 'km',
     100                  'ylim', [185, 200])
     101
     102    if printingflag:
     103        #set(gcf, 'Color', 'w')
     104        if i == 0:
     105            printmodel('ismipfHOvxfrozen', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     106            #system(['mv ismipfHOvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     107        elif i == 1:
     108            printmodel('ismipfHOvxsliding', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     109            #system(['mv ismipfHOvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     110        elif i == 2:
     111            printmodel('ismipfFSvxfrozen', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     112            #system(['mv ismipfFSvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     113        elif i == 3:
     114            printmodel('ismipfFSvxsliding', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     115            #system(['mv ismipfFSvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     116
     117    plotmodel(md, 'data', (md.results.TransientSolution().Surface) - md.geometry.surface, 'layer', md.mesh.numberoflayers, 'sectionvalue', '../Exp/ISMIP100000.exp', 'title', '', 'xlabel', '', 'ylabel', 'Surface (m)', 'linewidth', 3, 'grid', 'on', 'unit', 'km', 'ylim', [-30, 50])
     118    if printingflag:
     119        #set(gcf, 'Color', 'w')
     120        if i == 0:
     121            printmodel('ismipfHOdeltasurfacefrozen', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     122            #system(['mv ismipfHOdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     123        elif i == 1:
     124            printmodel('ismipfHOdeltasurfacesliding', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     125            #system(['mv ismipfHOdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     126        elif i == 2:
     127            printmodel('ismipfFSdeltasurfacefrozen', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     128            #system(['mv ismipfFSdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
     129        elif i == 3:
     130            printmodel('ismipfFSdeltasurfacesliding', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 1.5, 'hardcopy', 'off')
     131            #system(['mv ismipfFSdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
    119132
    120133#Fields and tolerances to track changes
    121 field_names = [
    122         'VxPattynFrozen','VyPattynFrozen','VzPattynFrozen','SurfacePattynFrozen',
    123         'VxPattynSliding','VyPattynSliding','VzPattynSliding','SurfacePattynSliding',
    124         'VxStokesFrozen','VyStokesFrozen','VzStokesFrozen','SurfaceStokesFrozen',
    125         'VxStokesSliding','VyStokesSliding','VzStokesSliding','SurfaceStokesSliding'
    126 ]
    127 field_tolerances = [
    128         1e-10,1e-09,1e-09,1e-10,
    129         1e-10,1e-09,1e-09,1e-10,
    130         1e-08,1e-09,1e-08,1e-09,
    131         1e-08,2e-09,1e-08,1e-09
    132 ]
     134field_names = ['VxPattynFrozen', 'VyPattynFrozen', 'VzPattynFrozen', 'SurfacePattynFrozen',
     135               'VxPattynSliding', 'VyPattynSliding', 'VzPattynSliding', 'SurfacePattynSliding',
     136               'VxStokesFrozen', 'VyStokesFrozen', 'VzStokesFrozen', 'SurfaceStokesFrozen',
     137               'VxStokesSliding', 'VyStokesSliding', 'VzStokesSliding', 'SurfaceStokesSliding']
     138field_tolerances = [1e-10, 1e-09, 1e-09, 1e-10,
     139                    1e-10, 1e-09, 1e-09, 1e-10,
     140                    1e-08, 1e-09, 1e-08, 1e-09,
     141                    1e-08, 2e-09, 1e-08, 1e-09]
    133142field_values = []
    134143for i in range(4):
    135         result = results[i]
    136         field_values += ([
    137                 result.Vx,
    138                 result.Vy,
    139                 result.Vz,
    140                 result.Surface] - md.geometry.surface)
    141 
     144    result = results[i]
     145    field_values += ([result.Vx, result.Vy, result.Vz, result.Surface] - md.geometry.surface)
  • issm/trunk-jpl/test/NightlyRun/test112.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'SurfaceSlope')
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'SurfaceSlope')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['SurfaceSlopeX','SurfaceSlopeY']
    20 field_tolerances=[1e-13,1e-13]
    21 field_values=[\
    22         md.results.SurfaceSlopeSolution.SurfaceSlopeX,\
    23         md.results.SurfaceSlopeSolution.SurfaceSlopeY,\
    24         ]
     19field_names = ['SurfaceSlopeX', 'SurfaceSlopeY']
     20field_tolerances = [1e-13, 1e-13]
     21field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX,
     22                md.results.SurfaceSlopeSolution.SurfaceSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test113.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(5,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'SurfaceSlope')
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'SurfaceSlope')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['SurfaceSlopeX','SurfaceSlopeY']
    21 field_tolerances=[1e-13,1e-13]
    22 field_values=[\
    23         md.results.SurfaceSlopeSolution.SurfaceSlopeX,\
    24         md.results.SurfaceSlopeSolution.SurfaceSlopeY,\
    25         ]
     20field_names = ['SurfaceSlopeX', 'SurfaceSlopeY']
     21field_tolerances = [1e-13, 1e-13]
     22field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX,
     23                md.results.SurfaceSlopeSolution.SurfaceSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test114.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'BedSlope')
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'BedSlope')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['BedSlopeX','BedSlopeY']
    20 field_tolerances=[1e-13,1e-13]
    21 field_values=[\
    22         md.results.BedSlopeSolution.BedSlopeX,\
    23         md.results.BedSlopeSolution.BedSlopeY,\
    24         ]
     19field_names = ['BedSlopeX', 'BedSlopeY']
     20field_tolerances = [1e-13, 1e-13]
     21field_values = [md.results.BedSlopeSolution.BedSlopeX,
     22                md.results.BedSlopeSolution.BedSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test115.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(5,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'BedSlope')
     11md = triangle(model(), '../Exp/Square.exp', 150000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'BedSlope')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['BedSlopeX','BedSlopeY']
    21 field_tolerances=[1e-13,1e-13]
    22 field_values=[\
    23         md.results.BedSlopeSolution.BedSlopeX,\
    24         md.results.BedSlopeSolution.BedSlopeY,\
    25         ]
     20field_names = ['BedSlopeX', 'BedSlopeY']
     21field_tolerances = [1e-13, 1e-13]
     22field_values = [md.results.BedSlopeSolution.BedSlopeX,
     23                md.results.BedSlopeSolution.BedSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test116.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
     12md = triangle(model(), '../Exp/Square.exp', 150000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
    1515#Add boundary conditions on thickness on the border
    16 pos=np.nonzero(md.mesh.vertexonboundary)
    17 md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos]
    18 md=setflowequation(md,'SSA','all')
    19 md.cluster=generic('name',gethostname(),'np',3)
    20 md=solve(md,'Balancethickness')
     16pos = np.nonzero(md.mesh.vertexonboundary)
     17md.balancethickness.spcthickness[pos] = md.geometry.thickness[pos]
     18md = setflowequation(md, 'SSA', 'all')
     19md.cluster = generic('name', gethostname(), 'np', 3)
     20md = solve(md, 'Balancethickness')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Thickness']
    24 field_tolerances=[1e-13]
    25 field_values=[\
    26         md.results.BalancethicknessSolution.Thickness,\
    27         ]
     23field_names = ['Thickness']
     24field_tolerances = [1e-13]
     25field_values = [md.results.BalancethicknessSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test119.py

    r23692 r23793  
    33import time
    44from model import *
    5 from socket import gethostname
    65from bamg import *
    76
    87
    98#Simple mesh
    10 md=bamg(model(),'domain','../Exp/Square.exp','hmax',100000.)
    11 x1=md.mesh.x
    12 y1=md.mesh.y
     9md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 100000.)
     10x1 = md.mesh.x
     11y1 = md.mesh.y
    1312
    1413#hVertices
    15 md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',np.array([10000.,100000.,400000.,100000.]).reshape(-1,1))
    16 x2=md.mesh.x
    17 y2=md.mesh.y
     14md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 300000., 'hVertices', np.array([10000., 100000., 400000., 100000.]).reshape(-1, 1))
     15x2 = md.mesh.x
     16y2 = md.mesh.y
    1817
    1918#big mesh
    20 t0=time.time()
    21 md=bamg(model(),'domain','../Exp/Square.exp','hmax',3000.)
    22 nbelements=md.mesh.numberofelements
    23 elapsedtime=time.time()-t0
    24 if nbelements>267895-50 and nbelements<267895+50:
    25         nbewithinrange = 1.
     19t0 = time.time()
     20md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 3000.)
     21nbelements = md.mesh.numberofelements
     22elapsedtime = time.time() - t0
     23if nbelements > 267895 - 50 and nbelements < 267895 + 50:
     24    nbewithinrange = 1.
    2625else:
    27         nbewithinrange = 0.
     26    nbewithinrange = 0.
    2827
    2928#Fields and tolerances to track changes
    30 field_names     =['x1','y1','x2','y2','nbelements','elapsed time']
     29field_names = ['x1', 'y1', 'x2', 'y2', 'nbelements', 'elapsed time']
    3130# NOTE: Elapsed time tolerance has been increased to 7.0 for this test, but not the MATLBAB one
    32 field_tolerances=[2e-9,2e-9,1e-13,1e-13,1e-13,7.0]
    33 field_values=[\
    34         x1, y1,\
    35         x2, y2,\
    36         nbewithinrange,elapsedtime,\
    37         ]
     31field_tolerances = [2e-9, 2e-9, 1e-13, 1e-13, 1e-13, 7.0]
     32field_values = [x1, y1, x2, y2, nbewithinrange, elapsedtime]
  • issm/trunk-jpl/test/NightlyRun/test120.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.timestepping.time_step=0
    18 md.initialization.waterfraction=np.zeros(md.mesh.numberofvertices)
    19 md.initialization.watercolumn=np.zeros(md.mesh.numberofvertices)
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.timestepping.time_step = 0
     18md.initialization.waterfraction = np.zeros(md.mesh.numberofvertices)
     19md.initialization.watercolumn = np.zeros(md.mesh.numberofvertices)
    2020md.thermal.isenthalpy = 1
    2121md.thermal.isdynamicbasalspc = 1
    2222
    23 md.cluster=generic('name',gethostname(),'np',3)
    24 md=solve(md,'Thermal')
     23md.cluster = generic('name', gethostname(), 'np', 3)
     24md = solve(md, 'Thermal')
    2525
    2626#Fields and tolerances to track changes
    27 field_names     =['Enthalpy','Waterfraction','Temperature']
    28 field_tolerances=[1e-13,2e-10,1e-13]
    29 field_values=[md.results.ThermalSolution.Enthalpy,
    30                                                         md.results.ThermalSolution.Waterfraction,
    31                                                         md.results.ThermalSolution.Temperature]
     27field_names = ['Enthalpy', 'Waterfraction', 'Temperature']
     28field_tolerances = [1e-13, 2e-10, 1e-13]
     29field_values = [md.results.ThermalSolution.Enthalpy,
     30                md.results.ThermalSolution.Waterfraction,
     31                md.results.ThermalSolution.Temperature]
  • issm/trunk-jpl/test/NightlyRun/test1201.py

    r23707 r23793  
    1414"""
    1515
    16 printingflag=False
    17 results=[]
     16printingflag = False
     17results = []
    1818
    19 for stabilization in range(1,4):
    20         #The goal is to test the masstransport model
    21         md=bamg(model(),'domain','../Exp/SquareEISMINT.exp','hmax',3000.)
    22         md=setmask(md,'all','')
    23         md=parameterize(md,'../Par/SquareEISMINT.py')
    24         md.smb.mass_balance[:]=0.
    25         md=setflowequation(md,'SSA','all')
    26         md.cluster=generic('name',gethostname(),'np',8)
     19for stabilization in range(1, 4):
     20    #The goal is to test the masstransport model
     21    md = bamg(model(), 'domain', '../Exp/SquareEISMINT.exp', 'hmax', 3000.)
     22    md = setmask(md, 'all', '')
     23    md = parameterize(md, '../Par/SquareEISMINT.py')
     24    md.smb.mass_balance[:] = 0.
     25    md = setflowequation(md, 'SSA', 'all')
     26    md.cluster = generic('name', gethostname(), 'np', 8)
    2727
    28         print("      initial velocity")
    29         md.initialization.vx=np.zeros((md.mesh.numberofvertices))
    30         md.initialization.vy=-400.*np.ones((md.mesh.numberofvertices))
     28    print("      initial velocity")
     29    md.initialization.vx = np.zeros((md.mesh.numberofvertices))
     30    md.initialization.vy = -400. * np.ones((md.mesh.numberofvertices))
    3131
    32         #Stabilization
    33         if stabilization==2:
    34                 md.masstransport.stabilization=0
    35         else:
    36                 md.masstransport.stabilization=stabilization
     32    #Stabilization
     33    if stabilization == 2:
     34        md.masstransport.stabilization = 0
     35    else:
     36        md.masstransport.stabilization = stabilization
    3737
    38         #spc thickness
    39         pos=np.where(md.mesh.y>199999.9)[0]
    40         times=np.arange(0,501)
    41         md.masstransport.spcthickness=np.nan*np.ones((md.mesh.numberofvertices+1,np.size(times)))
    42         md.masstransport.spcthickness[-1,:]=times
    43         md.masstransport.spcthickness[pos,:]=500.+100.*np.sin(2.*np.pi*times/200.)
    44         if stabilization==3:
    45                 pos=np.nonzero(np.isnan(md.masstransport.spcthickness))
    46                 md.masstransport.spcthickness[pos]=500.    #No NaN for DG
     38    #spc thickness
     39    pos = np.where(md.mesh.y > 199999.9)[0]
     40    times = np.arange(0, 501)
     41    md.masstransport.spcthickness = np.nan * np.ones((md.mesh.numberofvertices + 1, np.size(times)))
     42    md.masstransport.spcthickness[-1, :] = times
     43    md.masstransport.spcthickness[pos, :] = 500. + 100. * np.sin(2. * np.pi * times / 200.)
     44    if stabilization == 3:
     45        pos = np.nonzero(np.isnan(md.masstransport.spcthickness))
     46        md.masstransport.spcthickness[pos] = 500.    #No NaN for DG
    4747
    48         #solve
    49         md.transient.isstressbalance=False
    50         md.settings.output_frequency=500    #keep only last step
    51         md.verbose=verbose()
    52         md=solve(md,'Transient')
    53         results.append(md.results.TransientSolution[-1].Thickness)
     48    #solve
     49    md.transient.isstressbalance = False
     50    md.settings.output_frequency = 500    #keep only last step
     51    md.verbose = verbose()
     52    md = solve(md, 'Transient')
     53    results.append(md.results.TransientSolution[-1].Thickness)
    5454
    5555#plot results
    56 #[elements,x,y,z,s,h1]=SectionValues(md,results[0],'../Exp/CrossLineEISMINT.exp',100.)
    57 #[elements,x,y,z,s,h2]=SectionValues(md,results[1],'../Exp/CrossLineEISMINT.exp',100.)
    58 #[elements,x,y,z,s,h3]=SectionValues(md,results[2],'../Exp/CrossLineEISMINT.exp',100.)
    59 #[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100.)
    60 #plot(s,h1,'r',s,h2,'b',s,h3,'g',s,hth,'k')
    61 #legend('Art. diff.','No Art. diff.','D.G.','Theoretical')
     56#[elements, x, y, z, s, h1]=SectionValues(md, results[0], '../Exp/CrossLineEISMINT.exp', 100.)
     57#[elements, x, y, z, s, h2]=SectionValues(md, results[1], '../Exp/CrossLineEISMINT.exp', 100.)
     58#[elements, x, y, z, s, h3]=SectionValues(md, results[2], '../Exp/CrossLineEISMINT.exp', 100.)
     59#[elements, x, y, z, s, hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)), '../Exp/CrossLineEISMINT.exp', 100.)
     60#plot(s, h1, 'r', s, h2, 'b', s, h3, 'g', s, hth, 'k')
     61#legend('Art. diff.', 'No Art. diff.', 'D.G.', 'Theoretical')
    6262if printingflag:
    63         pass
    64 #       set(gcf,'Color','w')
    65 #       export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf'])
     63    pass
     64#       set(gcf, 'Color', 'w')
     65#       export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf'])
    6666
    6767#Fields and tolerances to track changes
    68 field_names     =['ThicknessArtDiff','ThicknessNoArtDiff','ThicknessDG']
    69 field_tolerances=[1e-13, 1e-13, 1e-13]
    70 field_values=[results[0],results[1],results[2]]
     68field_names = ['ThicknessArtDiff', 'ThicknessNoArtDiff', 'ThicknessDG']
     69field_tolerances = [1e-13, 1e-13, 1e-13]
     70field_values = [results[0], results[1], results[2]]
  • issm/trunk-jpl/test/NightlyRun/test1202.py

    r21408 r23793  
    11#Test Name: EISMINTStress1
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    1413"""
    1514
    16 printingflag=False
     15printingflag = False
    1716
    1817#tests 3 and 4: using Glen's flow law
    19 md=model()
    20 md=triangle(md,'../Exp/SquareEISMINT.exp',3550.)
    21 md=setmask(md,'all','')
    22 md=parameterize(md,'../Par/SquareEISMINT.py')
    23 md=setflowequation(md,'SSA','all')    #SSA's model and 2d
     18md = model()
     19md = triangle(md, '../Exp/SquareEISMINT.exp', 3550.)
     20md = setmask(md, 'all', '')
     21md = parameterize(md, '../Par/SquareEISMINT.py')
     22md = setflowequation(md, 'SSA', 'all')    #SSA's model and 2d
    2423
    25 #Compute solution for SSA's model 
    26 md.cluster=generic('name',gethostname(),'np',8)
    27 md=solve(md,'Stressbalance')
     24#Compute solution for SSA's model
     25md.cluster = generic('name', gethostname(), 'np', 8)
     26md = solve(md, 'Stressbalance')
    2827
    2928#plot results
    30 vx=md.results.StressbalanceSolution.Vx
    31 vy=md.results.StressbalanceSolution.Vy
     29vx = md.results.StressbalanceSolution.Vx
     30vy = md.results.StressbalanceSolution.Vy
    3231
    33 #plotmodel(md,'data',vx,'contourlevels',{0,20,40,60,60,100,120,140,160,180,-20,-40,-60,-80,-100,-120,-140,-160,-180}, ...
    34 #       'contourcolor','k')
     32#plotmodel(md, 'data', vx, 'contourlevels',{0, 20, 40, 60, 60, 100, 120, 140, 160, 180,-20,-40,-60,-80,-100,-120,-140,-160,-180}, ...
     33#       'contourcolor', 'k')
    3534if printingflag:
    36         pass
    37 #       set(gcf,'Color','w')
    38 #       printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    39 #       system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
     35    pass
     36#       set(gcf, 'Color', 'w')
     37#       printmodel('eismintdiag1vx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     38#       system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    4039
    41 #plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
    42 #       'contourcolor','k')
     40#plotmodel(md, 'data', vy, 'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
     41#       'contourcolor', 'k')
    4342if printingflag:
    44         pass
    45 #       set(gcf,'Color','w')
    46 #       printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    47 #       system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
     43    pass
     44#       set(gcf, 'Color', 'w')
     45#       printmodel('eismintdiag1vy', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     46#       system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    4847
    4948#Fields and tolerances to track changes
    50 field_names     =['Vx','Vy']
    51 field_tolerances=[1e-13,1e-13]
    52 field_values=[vx,vy]
     49field_names = ['Vx', 'Vy']
     50field_tolerances = [1e-13, 1e-13]
     51field_values = [vx, vy]
  • issm/trunk-jpl/test/NightlyRun/test1203.py

    r21408 r23793  
    1515"""
    1616
    17 printingflag=False
     17printingflag = False
    1818
    19 #test 5 and 6: 
    20 md=model()
    21 md=triangle(md,'../Exp/SquareEISMINT.exp',5100.)    #test3
    22 md=setmask(md,'all','')
    23 md=parameterize(md,'../Par/SquareEISMINT.py')
    24 md=setflowequation(md,'SSA','all')    #SSA's model and 2d
     19#test 5 and 6:
     20md = model()
     21md = triangle(md, '../Exp/SquareEISMINT.exp', 5100.)    #test3
     22md = setmask(md, 'all', '')
     23md = parameterize(md, '../Par/SquareEISMINT.py')
     24md = setflowequation(md, 'SSA', 'all')    #SSA's model and 2d
    2525
    26 #Impose a non zero velocity on the upper boundary condition (y=max(y))
    27 pos=np.where(md.mesh.y==np.max(md.mesh.y))
    28 heavyside=np.where(np.logical_and(md.mesh.y==np.max(md.mesh.y),((1.+sys.float_info.epsilon)*np.ones((np.size(md.mesh.y)))-((md.mesh.x-100000.)/25000.)**2)>0))
    29 md.stressbalance.spcvy[pos]=np.zeros((np.size(pos)))
    30 md.stressbalance.spcvy[heavyside]=400.*(((md.mesh.x[heavyside]-100000.)/25000.)**2-np.ones((np.size(heavyside))))
     26#Impose a non zero velocity on the upper boundary condition (y = max(y))
     27pos = np.where(md.mesh.y == np.max(md.mesh.y))
     28heavyside = np.where(np.logical_and(md.mesh.y == np.max(md.mesh.y), ((1. + sys.float_info.epsilon) * np.ones((np.size(md.mesh.y))) - ((md.mesh.x - 100000.) / 25000.)**2) > 0))
     29md.stressbalance.spcvy[pos] = np.zeros((np.size(pos)))
     30md.stressbalance.spcvy[heavyside] = 400. * (((md.mesh.x[heavyside] - 100000.) / 25000.)**2 - np.ones((np.size(heavyside))))
    3131
    32 #Compute solution for SSA's model 
    33 md.cluster=generic('name',gethostname(),'np',8)
    34 md=solve(md,'Stressbalance')
     32#Compute solution for SSA's model
     33md.cluster = generic('name', gethostname(), 'np', 8)
     34md = solve(md, 'Stressbalance')
    3535
    36 vx=md.results.StressbalanceSolution.Vx
    37 vy=md.results.StressbalanceSolution.Vy
     36vx = md.results.StressbalanceSolution.Vx
     37vy = md.results.StressbalanceSolution.Vy
    3838
    3939#plot results
    40 #plotmodel(md,'data',vx,'contourlevels',{0,20,40,60,80,100,-20,-40,-60,-80,-100},...
    41 #       'contourcolor','k')
     40#plotmodel(md, 'data', vx, 'contourlevels',{0, 20, 40, 60, 80, 100,-20,-40,-60,-80,-100},...
     41#       'contourcolor', 'k')
    4242if printingflag:
    43         pass
    44 #       set(gcf,'Color','w')
    45 #       printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    46 #       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},...
    48 #       'contourcolor','k')
     43    pass
     44#       set(gcf, 'Color', 'w')
     45#       printmodel('eismintdiag2vx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     46#       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},...
     48#       'contourcolor', 'k')
    4949if printingflag:
    50         pass
    51 #       set(gcf,'Color','w')
    52 #       printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    53 #       system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
     50    pass
     51#       set(gcf, 'Color', 'w')
     52#       printmodel('eismintdiag2vy', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     53#       system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    5454
    5555#Fields and tolerances to track changes
    56 field_names     =['Vx','Vy']
    57 field_tolerances=[1e-13,1e-13]
    58 field_values=[vx,vy]
     56field_names = ['Vx', 'Vy']
     57field_tolerances = [1e-13, 1e-13]
     58field_values = [vx, vy]
  • issm/trunk-jpl/test/NightlyRun/test1204.py

    r21408 r23793  
    1515"""
    1616
    17 printingflag=False
     17printingflag = False
    1818
    1919#tests 3 and 4: using Glen's flow law
    20 md=model()
    21 md=triangle(md,'../Exp/SquareEISMINT.exp',3550.)
    22 md=setmask(md,'all','')
    23 md=parameterize(md,'../Par/SquareEISMINT.py')
    24 md=setflowequation(md,'SSA','all')    #SSA's model and 2d
     20md = model()
     21md = triangle(md, '../Exp/SquareEISMINT.exp', 3550.)
     22md = setmask(md, 'all', '')
     23md = parameterize(md, '../Par/SquareEISMINT.py')
     24md = setflowequation(md, 'SSA', 'all')    #SSA's model and 2d
    2525
    26 #Impose a non zero velocity on the upper boundary condition (y=max(y))
    27 pos=np.where(md.mesh.y==np.max(md.mesh.y))
    28 heavyside=np.where(np.logical_and(md.mesh.y==np.max(md.mesh.y),((1.+sys.float_info.epsilon)*np.ones((np.size(md.mesh.y)))-((md.mesh.x-100000.)/25000.)**2)>0))
    29 md.stressbalance.spcvy[pos]=np.zeros((np.size(pos)))
    30 md.stressbalance.spcvy[heavyside]=400.*(((md.mesh.x[heavyside]-100000.)/25000.)**2-np.ones((np.size(heavyside))))
     26#Impose a non zero velocity on the upper boundary condition (y = max(y))
     27pos = np.where(md.mesh.y == np.max(md.mesh.y))
     28heavyside = np.where(np.logical_and(md.mesh.y == np.max(md.mesh.y), ((1. + sys.float_info.epsilon) * np.ones((np.size(md.mesh.y))) - ((md.mesh.x - 100000.) / 25000.)**2) > 0))
     29md.stressbalance.spcvy[pos] = np.zeros((np.size(pos)))
     30md.stressbalance.spcvy[heavyside] = 400. * (((md.mesh.x[heavyside] - 100000.) / 25000.)**2 - np.ones((np.size(heavyside))))
    3131
    32 #Compute solution for SSA's model 
    33 md.cluster=generic('name',gethostname(),'np',8)
    34 md=solve(md,'Stressbalance')
     32#Compute solution for SSA's model
     33md.cluster = generic('name', gethostname(), 'np', 8)
     34md = solve(md, 'Stressbalance')
    3535
    3636#plot results
    37 md.initialization.vx=md.results.StressbalanceSolution.Vx
    38 md.initialization.vy=md.results.StressbalanceSolution.Vy
     37md.initialization.vx = md.results.StressbalanceSolution.Vx
     38md.initialization.vy = md.results.StressbalanceSolution.Vy
    3939
    40 md.timestepping.time_step=1.
    41 md.timestepping.final_time=5000.
    42 md.masstransport.stabilization=1
    43 md=solve(md,'Transient')
     40md.timestepping.time_step = 1.
     41md.timestepping.final_time = 5000.
     42md.masstransport.stabilization = 1
     43md = solve(md, 'Transient')
    4444
    45 #plotmodel(md,'data',(md.results.TransientSolution(end).Vx))
     45#plotmodel(md, 'data',(md.results.TransientSolution(end).Vx))
    4646if printingflag:
    47         pass
    48 #       set(gcf,'Color','w')
    49 #       printmodel('eisminttrans2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    50 #       system(['mv eisminttrans2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
     47    pass
     48#       set(gcf, 'Color', 'w')
     49#       printmodel('eisminttrans2vx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     50#       system(['mv eisminttrans2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    5151
    52 #plotmodel(md,'data',(md.results.TransientSolution(end).Vy))
     52#plotmodel(md, 'data',(md.results.TransientSolution(end).Vy))
    5353if printingflag:
    54         pass
    55 #       set(gcf,'Color','w')
    56 #       printmodel('eisminttrans2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    57 #       system(['mv eisminttrans2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
     54    pass
     55#       set(gcf, 'Color', 'w')
     56#       printmodel('eisminttrans2vy', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     57#       system(['mv eisminttrans2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    5858
    59 #plotmodel(md,'data',(md.results.TransientSolution(end).Thickness))
     59#plotmodel(md, 'data',(md.results.TransientSolution(end).Thickness))
    6060if printingflag:
    61         pass
    62 #       set(gcf,'Color','w')
    63 #       printmodel('eisminttrans2thickness','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
    64 #       system(['mv eisminttrans2thickness.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
     61    pass
     62#       set(gcf, 'Color', 'w')
     63#       printmodel('eisminttrans2thickness', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
     64#       system(['mv eisminttrans2thickness.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
    6565
    6666#Fields and tolerances to track changes
    67 field_names     =['Vx','Vy','Thickness']
    68 field_tolerances=[1e-13,1e-13,1e-13]
    69 field_values=[md.results.TransientSolution[-1].Vx,
    70                                                         md.results.TransientSolution[-1].Vy,
    71                                                         md.results.TransientSolution[-1].Thickness]
     67field_names = ['Vx', 'Vy', 'Thickness']
     68field_tolerances = [1e-13, 1e-13, 1e-13]
     69field_values = [md.results.TransientSolution[-1].Vx,
     70                md.results.TransientSolution[-1].Vy,
     71                md.results.TransientSolution[-1].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test1205.py

    r23707 r23793  
    1414"""
    1515
    16 printingflag=False
     16printingflag = False
    1717
    18 numlayers=10
    19 resolution=30000.
     18numlayers = 10
     19resolution = 30000.
    2020
    2121#To begin with the numerical model
    22 md=model()
    23 md=roundmesh(md,750000.,resolution)
    24 md=setmask(md,'','')    #We can not test iceshelves nor ice rises with this analytical solution
    25 md=parameterize(md,'../Par/RoundSheetStaticEISMINT.py')
     22md = model()
     23md = roundmesh(md, 750000., resolution)
     24md = setmask(md, '', '')    #We can not test iceshelves nor ice rises with this analytical solution
     25md = parameterize(md, '../Par/RoundSheetStaticEISMINT.py')
    2626
    2727#Calculation of the analytical 2d velocity field
    28 constant=0.3
    29 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
    30 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
    31 vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
     28constant = 0.3
     29vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**-1
     30vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**-1
     31vel_obs = np.sqrt((md.inversion.vx_obs)**2 + (md.inversion.vy_obs)**2)
    3232
    3333#We extrude the model to have a 3d model
    34 md.extrude(numlayers,1.)
    35 md=setflowequation(md,'SIA','all')
     34md.extrude(numlayers, 1.)
     35md = setflowequation(md, 'SIA', 'all')
    3636
    3737#Spc the nodes on the bed
    38 pos=np.where(md.mesh.vertexonbase)
    39 md.stressbalance.spcvx[pos]=0.
    40 md.stressbalance.spcvy[pos]=0.
    41 md.stressbalance.spcvz[pos]=0.
     38pos = np.where(md.mesh.vertexonbase)
     39md.stressbalance.spcvx[pos] = 0.
     40md.stressbalance.spcvy[pos] = 0.
     41md.stressbalance.spcvz[pos] = 0.
    4242
    43 #Now we can solve the problem 
    44 md.cluster=generic('name',gethostname(),'np',8)
    45 md=solve(md,'Stressbalance')
     43#Now we can solve the problem
     44md.cluster = generic('name', gethostname(), 'np', 8)
     45md = solve(md, 'Stressbalance')
    4646
    4747#Calculate the depth averaged velocity field (2d):
    48 vx=md.results.StressbalanceSolution.Vx
    49 vy=md.results.StressbalanceSolution.Vy
    50 vel=np.zeros((md.mesh.numberofvertices2d))
     48vx = md.results.StressbalanceSolution.Vx
     49vy = md.results.StressbalanceSolution.Vy
     50vel = np.zeros((md.mesh.numberofvertices2d))
    5151
    52 for i in range(0,md.mesh.numberofvertices2d):
    53         node_vel=0.
    54         for j in range(0,md.mesh.numberoflayers-1):
    55                 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*(np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
    56         vel[i]=node_vel
     52for i in range(0, md.mesh.numberofvertices2d):
     53    node_vel = 0.
     54    for j in range(0, md.mesh.numberoflayers - 1):
     55        node_vel = node_vel + 1. / (2. * (md.mesh.numberoflayers - 1)) * (np.sqrt(vx[i + (j + 1) * md.mesh.numberofvertices2d, 0]**2 + vy[i + (j + 1) * md.mesh.numberofvertices2d, 0]**2) + np.sqrt(vx[i + j * md.mesh.numberofvertices2d, 0]**2 + vy[i + j * md.mesh.numberofvertices2d, 0]**2))
     56    vel[i] = node_vel
    5757
    5858#Plot of the velocity from the exact and calculated solutions
    5959#figure(1)
    60 #set(gcf,'Position',[1 1 1580 1150])
    61 #subplot(2,2,1)
    62 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    63 #vel,'FaceColor','interp','EdgeColor','none')
    64 #title('Modelled velocity','FontSize',14,'FontWeight','bold')
    65 #colorbar
    66 #caxis([0 200])
    67    
    68 #subplot(2,2,2)
    69 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    70 #vel_obs,'FaceColor','interp','EdgeColor','none')
    71 #title('Analytical velocity','FontSize',14,'FontWeight','bold')
    72 #colorbar
     60#set(gcf, 'Position',[1 1 1580 1150])
     61#subplot(2, 2, 1)
     62#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     63#vel, 'FaceColor', 'interp', 'EdgeColor', 'none')
     64#title('Modelled velocity', 'FontSize', 14, 'FontWeight', 'bold')
     65#colorbar
    7366#caxis([0 200])
    7467
    75 #subplot(2,2,3)
     68#subplot(2, 2, 2)
     69#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     70#vel_obs, 'FaceColor', 'interp', 'EdgeColor', 'none')
     71#title('Analytical velocity', 'FontSize', 14, 'FontWeight', 'bold')
     72#colorbar
     73#caxis([0 200])
     74
     75#subplot(2, 2, 3)
    7676#hold on
    77 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.')
    78 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.')
    79 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold')
    80 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold')
    81 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold')
    82 #legend('calculated velocity','exact velocity')
     77#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2), vel, 'r.')
     78#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2), vel_obs, 'b.')
     79#title('Analytical vs calculated velocity', 'FontSize', 14, 'FontWeight', 'bold')
     80#xlabel('distance to the center of the icesheet [m]', 'FontSize', 14, 'FontWeight', 'bold')
     81#ylabel('velocity [m/yr]', 'FontSize', 14, 'FontWeight', 'bold')
     82#legend('calculated velocity', 'exact velocity')
    8383#axis([0 750000 0 200])
    8484#hold off
    8585
    86 #subplot(2,2,4)
    87 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    88 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none')
    89 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
     86#subplot(2, 2, 4)
     87#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     88#abs(vel-vel_obs)./vel_obs*100, 'FaceColor', 'interp', 'EdgeColor', 'none')
     89#title('Relative misfit [%]', 'FontSize', 14, 'FontWeight', 'bold')
    9090#colorbar
    9191#caxis([0 100])
    9292
    9393if printingflag:
    94         pass
    95 #       set(gcf,'Color','w')
    96 #       printmodel('SIAstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    97 #       system(['mv SIAstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
     94    pass
     95#       set(gcf, 'Color', 'w')
     96#       printmodel('SIAstatic', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     97#       system(['mv SIAstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
    9898
    9999#Fields and tolerances to track changes
    100 field_names     =['Vx','Vy','Vel']
    101 field_tolerances=[1e-13,1e-13,1e-13]
    102 field_values=[vx,vy,vel]
     100field_names = ['Vx', 'Vy', 'Vel']
     101field_tolerances = [1e-13, 1e-13, 1e-13]
     102field_values = [vx, vy, vel]
  • issm/trunk-jpl/test/NightlyRun/test1206.py

    r23707 r23793  
    1414"""
    1515
    16 printingflag=False
     16printingflag = False
    1717
    18 numlayers=10
    19 resolution=30000.
     18numlayers = 10
     19resolution = 30000.
    2020
    2121#To begin with the numerical model
    22 md=model()
    23 md=roundmesh(md,750000.,resolution)
    24 md=setmask(md,'','')    #We can not test iceshelves nor ice rises with this analytical solution
    25 md=parameterize(md,'../Par/RoundSheetStaticEISMINT.py')
     22md = model()
     23md = roundmesh(md, 750000., resolution)
     24md = setmask(md, '', '')    #We can not test iceshelves nor ice rises with this analytical solution
     25md = parameterize(md, '../Par/RoundSheetStaticEISMINT.py')
    2626
    2727#Calculation of the analytical 2d velocity field
    28 constant=0.3
    29 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
    30 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
    31 vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
     28constant = 0.3
     29vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**-1
     30vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**-1
     31vel_obs = np.sqrt((md.inversion.vx_obs)**2 + (md.inversion.vy_obs)**2)
    3232
    3333#We extrude the model to have a 3d model
    34 md.extrude(numlayers,1.)
    35 md=setflowequation(md,'HO','all')
     34md.extrude(numlayers, 1.)
     35md = setflowequation(md, 'HO', 'all')
    3636
    3737#Spc the nodes on the bed
    38 pos=np.where(md.mesh.vertexonbase)
    39 md.stressbalance.spcvx[pos]=0.
    40 md.stressbalance.spcvy[pos]=0.
    41 md.stressbalance.spcvz[pos]=0.
     38pos = np.where(md.mesh.vertexonbase)
     39md.stressbalance.spcvx[pos] = 0.
     40md.stressbalance.spcvy[pos] = 0.
     41md.stressbalance.spcvz[pos] = 0.
    4242
    43 #Now we can solve the problem 
    44 md.cluster=generic('name',gethostname(),'np',8)
    45 md=solve(md,'Stressbalance')
     43#Now we can solve the problem
     44md.cluster = generic('name', gethostname(), 'np', 8)
     45md = solve(md, 'Stressbalance')
    4646
    4747#Calculate the depth averaged velocity field (2d):
    48 vx=md.results.StressbalanceSolution.Vx
    49 vy=md.results.StressbalanceSolution.Vy
    50 vel=np.zeros((md.mesh.numberofvertices2d))
     48vx = md.results.StressbalanceSolution.Vx
     49vy = md.results.StressbalanceSolution.Vy
     50vel = np.zeros((md.mesh.numberofvertices2d))
    5151
    52 for i in range(0,md.mesh.numberofvertices2d):
    53         node_vel=0.
    54         for j in range(0,md.mesh.numberoflayers-1):
    55                 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\
    56                         (np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
    57                         np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
    58         vel[i]=node_vel
     52for i in range(0, md.mesh.numberofvertices2d):
     53    node_vel = 0.
     54    for j in range(0, md.mesh.numberoflayers - 1):
     55        node_vel = node_vel + 1. / (2. * (md.mesh.numberoflayers - 1)) * (np.sqrt(vx[i + (j + 1) * md.mesh.numberofvertices2d, 0]**2 + vy[i + (j + 1) * md.mesh.numberofvertices2d, 0]**2) + np.sqrt(vx[i + j * md.mesh.numberofvertices2d, 0]**2 + vy[i + j * md.mesh.numberofvertices2d, 0]**2))
     56    vel[i] = node_vel
    5957
    6058#Plot of the velocity from the exact and calculated solutions
    6159#figure(1)
    62 #subplot(2,2,1)
    63 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    64 #vel,'FaceColor','interp','EdgeColor','none')
    65 #title('Modelled velocity','FontSize',14,'FontWeight','bold')
    66 #colorbar
    67 #caxis([0 200])
    68    
    69 #subplot(2,2,2)
    70 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    71 #vel_obs,'FaceColor','interp','EdgeColor','none')
    72 #title('Analytical velocity','FontSize',14,'FontWeight','bold')
    73 #colorbar
     60#subplot(2, 2, 1)
     61#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     62#vel, 'FaceColor', 'interp', 'EdgeColor', 'none')
     63#title('Modelled velocity', 'FontSize', 14, 'FontWeight', 'bold')
     64#colorbar
    7465#caxis([0 200])
    7566
    76 #subplot(2,2,3)
     67#subplot(2, 2, 2)
     68#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     69#vel_obs, 'FaceColor', 'interp', 'EdgeColor', 'none')
     70#title('Analytical velocity', 'FontSize', 14, 'FontWeight', 'bold')
     71#colorbar
     72#caxis([0 200])
     73
     74#subplot(2, 2, 3)
    7775#hold on
    78 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.')
    79 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.')
    80 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold')
    81 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold')
    82 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold')
    83 #legend('calculated velocity','exact velocity')
     76#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2), vel, 'r.')
     77#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2), vel_obs, 'b.')
     78#title('Analytical vs calculated velocity', 'FontSize', 14, 'FontWeight', 'bold')
     79#xlabel('distance to the center of the icesheet [m]', 'FontSize', 14, 'FontWeight', 'bold')
     80#ylabel('velocity [m/yr]', 'FontSize', 14, 'FontWeight', 'bold')
     81#legend('calculated velocity', 'exact velocity')
    8482#axis([0 750000 0 200])
    8583#hold off
    8684
    87 #subplot(2,2,4)
    88 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    89 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none')
    90 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
     85#subplot(2, 2, 4)
     86#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     87#abs(vel-vel_obs)./vel_obs*100, 'FaceColor', 'interp', 'EdgeColor', 'none')
     88#title('Relative misfit [%]', 'FontSize', 14, 'FontWeight', 'bold')
    9189#colorbar
    9290#caxis([0 100])
    9391
    9492if printingflag:
    95         pass
    96 #       set(gcf,'Color','w')
    97 #       printmodel('HOstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    98 #       system(['mv HOstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
     93    pass
     94#       set(gcf, 'Color', 'w')
     95#       printmodel('HOstatic', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     96#       system(['mv HOstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
    9997
    10098#Fields and tolerances to track changes
    101 field_names     =['Vx','Vy','Vel']
    102 field_tolerances=[1e-12,1e-12,1e-12]
    103 field_values=[vx,vy,vel]
     99field_names = ['Vx', 'Vy', 'Vel']
     100field_tolerances = [1e-12, 1e-12, 1e-12]
     101field_values = [vx, vy, vel]
  • issm/trunk-jpl/test/NightlyRun/test1207.py

    r23707 r23793  
    1414"""
    1515
    16 printingflag=False
     16printingflag = False
    1717
    18 numlayers=10
    19 resolution=30000.
     18numlayers = 10
     19resolution = 30000.
    2020
    2121#To begin with the numerical model
    22 md=model()
    23 md=roundmesh(md,750000.,resolution)
    24 md=setmask(md,'','')    #We can not test iceshelves nor ice rises with this analytical solution
    25 md=parameterize(md,'../Par/RoundSheetStaticEISMINT.py')
     22md = model()
     23md = roundmesh(md, 750000., resolution)
     24md = setmask(md, '', '')    #We can not test iceshelves nor ice rises with this analytical solution
     25md = parameterize(md, '../Par/RoundSheetStaticEISMINT.py')
    2626
    2727#Calculation of the analytical 2d velocity field
    28 constant=0.3
    29 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
    30 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
    31 vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
     28constant = 0.3
     29vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**-1
     30vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**-1
     31vel_obs = np.sqrt((md.inversion.vx_obs)**2 + (md.inversion.vy_obs)**2)
    3232
    3333#We extrude the model to have a 3d model
    34 md.extrude(numlayers,1.)
    35 md=setflowequation(md,'FS','all')
     34md.extrude(numlayers, 1.)
     35md = setflowequation(md, 'FS', 'all')
    3636
    3737#Spc the nodes on the bed
    38 pos=np.where(md.mesh.vertexonbase)
    39 md.stressbalance.spcvx[pos]=0.
    40 md.stressbalance.spcvy[pos]=0.
    41 md.stressbalance.spcvz[pos]=0.
     38pos = np.where(md.mesh.vertexonbase)
     39md.stressbalance.spcvx[pos] = 0.
     40md.stressbalance.spcvy[pos] = 0.
     41md.stressbalance.spcvz[pos] = 0.
    4242
    43 #Now we can solve the problem 
    44 md.cluster=generic('name',gethostname(),'np',8)
    45 md=solve(md,'Stressbalance')
     43#Now we can solve the problem
     44md.cluster = generic('name', gethostname(), 'np', 8)
     45md = solve(md, 'Stressbalance')
    4646
    4747#Calculate the depth averaged velocity field (2d):
    48 vx=md.results.StressbalanceSolution.Vx
    49 vy=md.results.StressbalanceSolution.Vy
    50 vel=np.zeros((md.mesh.numberofvertices2d))
     48vx = md.results.StressbalanceSolution.Vx
     49vy = md.results.StressbalanceSolution.Vy
     50vel = np.zeros((md.mesh.numberofvertices2d))
    5151
    52 for i in range(0,md.mesh.numberofvertices2d):
    53         node_vel=0.
    54         for j in range(0,md.mesh.numberoflayers-1):
    55                 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\
    56                         (np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
    57                         np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
    58         vel[i]=node_vel
     52for i in range(0, md.mesh.numberofvertices2d):
     53    node_vel = 0.
     54    for j in range(0, md.mesh.numberoflayers - 1):
     55        node_vel = node_vel + (1. / (2. * (md.mesh.numberoflayers - 1)) * (np.sqrt(vx[i + (j + 1) * md.mesh.numberofvertices2d, 0]**2 + vy[i + (j + 1) * md.mesh.numberofvertices2d, 0]**2) + np.sqrt(vx[i + j * md.mesh.numberofvertices2d, 0]**2 + vy[i + j * md.mesh.numberofvertices2d, 0]**2)))
     56    vel[i] = node_vel
    5957
    6058#Plot of the velocity from the exact and calculated solutions
    6159#figure(1)
    62 #subplot(2,2,1)
    63 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    64 #vel,'FaceColor','interp','EdgeColor','none')
    65 #title('Modelled velocity','FontSize',14,'FontWeight','bold')
    66 #colorbar
    67 #caxis([0 200])
    68    
    69 #subplot(2,2,2)
    70 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    71 #vel_obs,'FaceColor','interp','EdgeColor','none')
    72 #title('Analytical velocity','FontSize',14,'FontWeight','bold')
    73 #colorbar
     60#subplot(2, 2, 1)
     61#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     62#vel, 'FaceColor', 'interp', 'EdgeColor', 'none')
     63#title('Modelled velocity', 'FontSize', 14, 'FontWeight', 'bold')
     64#colorbar
    7465#caxis([0 200])
    7566
    76 #subplot(2,2,3)
     67#subplot(2, 2, 2)
     68#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     69#vel_obs, 'FaceColor', 'interp', 'EdgeColor', 'none')
     70#title('Analytical velocity', 'FontSize', 14, 'FontWeight', 'bold')
     71#colorbar
     72#caxis([0 200])
     73
     74#subplot(2, 2, 3)
    7775#hold on
    78 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.')
    79 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.')
    80 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold')
    81 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold')
    82 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold')
    83 #legend('calculated velocity','exact velocity')
     76#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2), vel, 'r.')
     77#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2), vel_obs, 'b.')
     78#title('Analytical vs calculated velocity', 'FontSize', 14, 'FontWeight', 'bold')
     79#xlabel('distance to the center of the icesheet [m]', 'FontSize', 14, 'FontWeight', 'bold')
     80#ylabel('velocity [m/yr]', 'FontSize', 14, 'FontWeight', 'bold')
     81#legend('calculated velocity', 'exact velocity')
    8482#axis([0 750000 0 200])
    8583#hold off
    8684
    87 #subplot(2,2,4)
    88 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    89 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none')
    90 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
     85#subplot(2, 2, 4)
     86#p = patch('Faces', md.mesh.elements2d, 'Vertices',[md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...
     87#abs(vel-vel_obs)./vel_obs*100, 'FaceColor', 'interp', 'EdgeColor', 'none')
     88#title('Relative misfit [%]', 'FontSize', 14, 'FontWeight', 'bold')
    9189#colorbar
    9290#caxis([0 100])
    9391
    9492if printingflag:
    95         pass
    96 #       set(gcf,'Color','w')
    97 #       printmodel('FSstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    98 #       system(['mv FSstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
     93    pass
     94#       set(gcf, 'Color', 'w')
     95#       printmodel('FSstatic', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     96#       system(['mv FSstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
    9997
    10098#Fields and tolerances to track changes
    101 field_names     =['Vx','Vy','Vel']
    102 field_tolerances=[1e-12,1e-12,1e-12]
    103 field_values=[vx,vy,vel]
     99field_names = ['Vx', 'Vy', 'Vel']
     100field_tolerances = [1e-12, 1e-12, 1e-12]
     101field_values = [vx, vy, vel]
  • issm/trunk-jpl/test/NightlyRun/test1208.py

    r21408 r23793  
    1414"""
    1515
    16 numlayers=8
    17 resolution=50000.
     16numlayers = 8
     17resolution = 50000.
    1818
    1919#To begin with the numerical model
    20 md=triangle(model(),'../Exp/SquareEISMINT750000.exp',resolution)
    21 md=setmask(md,'','')
    22 md=parameterize(md,'../Par/RoundSheetEISMINT.py')
     20md = triangle(model(), '../Exp/SquareEISMINT750000.exp', resolution)
     21md = setmask(md, '', '')
     22md = parameterize(md, '../Par/RoundSheetEISMINT.py')
    2323
    2424#We extrude the model to have a 3d model
    25 md.extrude(numlayers,1.)
    26 md=setflowequation(md,'SIA','all')
     25md.extrude(numlayers, 1.)
     26md = setflowequation(md, 'SIA', 'all')
    2727
    2828#Spc the nodes on the bed
    29 pos=np.where(md.mesh.vertexonbase)
    30 md.stressbalance.spcvx[pos]=0.
    31 md.stressbalance.spcvy[pos]=0.
    32 md.stressbalance.spcvz[pos]=0.
     29pos = np.where(md.mesh.vertexonbase)
     30md.stressbalance.spcvx[pos] = 0.
     31md.stressbalance.spcvy[pos] = 0.
     32md.stressbalance.spcvz[pos] = 0.
    3333
    3434#Adapt the time steps to the resolution
    35 md.timestepping.time_step=15.
    36 md.settings.output_frequency=500
    37 md.timestepping.final_time=30000.
    38 md.masstransport.stabilization=1
    39 md.thermal.stabilization=1
     35md.timestepping.time_step = 15.
     36md.settings.output_frequency = 500
     37md.timestepping.final_time = 30000.
     38md.masstransport.stabilization = 1
     39md.thermal.stabilization = 1
    4040
    41 #Now we can solve the problem 
    42 md.cluster=generic('name',gethostname(),'np',8)
    43 md=solve(md,'Transient')
     41#Now we can solve the problem
     42md.cluster = generic('name', gethostname(), 'np', 8)
     43md = solve(md, 'Transient')
    4444
    4545#Fields and tolerances to track changes
    46 field_names     =['Vx','Vy','Vz','Vel','Pressure','Thickness','Base','Surface','Temperature','BasalforcingsGroundediceMeltingRate']
    47 field_tolerances=[1e-08,1e-08,1e-07,1e-08,1e-08,1e-08,1e-08,1e-08,1e-07,1e-07]
    48 field_values=[md.results.TransientSolution[-1].Vx,
    49                                                         md.results.TransientSolution[-1].Vy,
    50                                                         md.results.TransientSolution[-1].Vz,
    51                                                         md.results.TransientSolution[-1].Vel,
    52                                                         md.results.TransientSolution[-1].Pressure,
    53                                                         md.results.TransientSolution[-1].Thickness,
    54                                                         md.results.TransientSolution[-1].Base,
    55                                                         md.results.TransientSolution[-1].Surface,
    56                                                         md.results.TransientSolution[-1].Temperature,
    57                                                         md.results.TransientSolution[-1].BasalforcingsGroundediceMeltingRate]
     46field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Thickness', 'Base', 'Surface', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     47field_tolerances = [1e-08, 1e-08, 1e-07, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-07, 1e-07]
     48field_values = [md.results.TransientSolution[-1].Vx,
     49                md.results.TransientSolution[-1].Vy,
     50                md.results.TransientSolution[-1].Vz,
     51                md.results.TransientSolution[-1].Vel,
     52                md.results.TransientSolution[-1].Pressure,
     53                md.results.TransientSolution[-1].Thickness,
     54                md.results.TransientSolution[-1].Base,
     55                md.results.TransientSolution[-1].Surface,
     56                md.results.TransientSolution[-1].Temperature,
     57                md.results.TransientSolution[-1].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test121.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    18 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
    19 md.transient.isstressbalance=False
    20 md.transient.ismasstransport=False
    21 md.transient.issmb=True
    22 md.transient.isthermal=True
    23 md.transient.isgroundingline=False
    24 md.thermal.isenthalpy=1
    25 md.thermal.isdynamicbasalspc=1
    26 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 180000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     18md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
     19md.transient.isstressbalance = False
     20md.transient.ismasstransport = False
     21md.transient.issmb = True
     22md.transient.isthermal = True
     23md.transient.isgroundingline = False
     24md.thermal.isenthalpy = 1
     25md.thermal.isdynamicbasalspc = 1
     26md = solve(md, 'Transient')
    2727
    2828#Fields and tolerances to track changes
    29 field_names     =['Enthalpy1','Waterfraction1','Temperature1',\
    30         'Enthalpy2','Waterfraction2','Temperature2',\
    31         'Enthalpy3','Waterfraction3','Temperature3']
    32 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-9,1e-13]
    33 field_values=[\
    34         md.results.TransientSolution[0].Enthalpy,\
    35         md.results.TransientSolution[0].Waterfraction,\
    36         md.results.TransientSolution[0].Temperature,\
    37         md.results.TransientSolution[1].Enthalpy,\
    38         md.results.TransientSolution[1].Waterfraction,\
    39         md.results.TransientSolution[1].Temperature,\
    40         md.results.TransientSolution[2].Enthalpy,\
    41         md.results.TransientSolution[2].Waterfraction,\
    42         md.results.TransientSolution[2].Temperature,\
    43         ]
     29field_names = ['Enthalpy1', 'Waterfraction1', 'Temperature1',
     30               'Enthalpy2', 'Waterfraction2', 'Temperature2',
     31               'Enthalpy3', 'Waterfraction3', 'Temperature3']
     32field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-9, 1e-13]
     33field_values = [md.results.TransientSolution[0].Enthalpy,
     34                md.results.TransientSolution[0].Waterfraction,
     35                md.results.TransientSolution[0].Temperature,
     36                md.results.TransientSolution[1].Enthalpy,
     37                md.results.TransientSolution[1].Waterfraction,
     38                md.results.TransientSolution[1].Temperature,
     39                md.results.TransientSolution[2].Enthalpy,
     40                md.results.TransientSolution[2].Waterfraction,
     41                md.results.TransientSolution[2].Temperature]
  • issm/trunk-jpl/test/NightlyRun/test122.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',200000)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    17 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
    18 md.thermal.isenthalpy=1
    19 md.thermal.isdynamicbasalspc=1
    20 md.thermal.stabilization=2
    21 md.cluster=generic('name',gethostname(),'np',3)
    22 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 200000)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     17md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
     18md.thermal.isenthalpy = 1
     19md.thermal.isdynamicbasalspc = 1
     20md.thermal.stabilization = 2
     21md.cluster = generic('name', gethostname(), 'np', 3)
     22md = solve(md, 'Transient')
    2323
    2424#Fields and tolerances to track changes
    25 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','Enthalpy1','Waterfraction1',\
    26         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','Enthalpy2','Waterfraction2',\
    27         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','Enthalpy3','Waterfraction3']
    28 field_tolerances=[\
    29         1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,\
    30         1e-09,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,\
    31         1e-09,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09]
    32 field_values=[\
    33         md.results.TransientSolution[0].Vx,\
    34         md.results.TransientSolution[0].Vy,\
    35         md.results.TransientSolution[0].Vz,\
    36         md.results.TransientSolution[0].Vel,\
    37         md.results.TransientSolution[0].Pressure,\
    38         md.results.TransientSolution[0].Base,\
    39         md.results.TransientSolution[0].Surface,\
    40         md.results.TransientSolution[0].Thickness,\
    41         md.results.TransientSolution[0].Temperature,\
    42         md.results.TransientSolution[0].Enthalpy,\
    43         md.results.TransientSolution[0].Waterfraction,\
    44         md.results.TransientSolution[1].Vx,\
    45         md.results.TransientSolution[1].Vy,\
    46         md.results.TransientSolution[1].Vz,\
    47         md.results.TransientSolution[1].Vel,\
    48         md.results.TransientSolution[1].Pressure,\
    49         md.results.TransientSolution[1].Base,\
    50         md.results.TransientSolution[1].Surface,\
    51         md.results.TransientSolution[1].Thickness,\
    52         md.results.TransientSolution[1].Temperature,\
    53         md.results.TransientSolution[1].Enthalpy,\
    54         md.results.TransientSolution[1].Waterfraction,\
    55         md.results.TransientSolution[2].Vx,\
    56         md.results.TransientSolution[2].Vy,\
    57         md.results.TransientSolution[2].Vz,\
    58         md.results.TransientSolution[2].Vel,\
    59         md.results.TransientSolution[2].Pressure,\
    60         md.results.TransientSolution[2].Base,\
    61         md.results.TransientSolution[2].Surface,\
    62         md.results.TransientSolution[2].Thickness,\
    63         md.results.TransientSolution[2].Temperature,\
    64         md.results.TransientSolution[2].Enthalpy,\
    65         md.results.TransientSolution[2].Waterfraction,\
    66         ]
     25field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'Enthalpy1', 'Waterfraction1',
     26               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'Enthalpy2', 'Waterfraction2',
     27               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'Enthalpy3', 'Waterfraction3']
     28field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     29                    1e-09, 1e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     30                    1e-09, 1e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09]
     31field_values = [md.results.TransientSolution[0].Vx,
     32                md.results.TransientSolution[0].Vy,
     33                md.results.TransientSolution[0].Vz,
     34                md.results.TransientSolution[0].Vel,
     35                md.results.TransientSolution[0].Pressure,
     36                md.results.TransientSolution[0].Base,
     37                md.results.TransientSolution[0].Surface,
     38                md.results.TransientSolution[0].Thickness,
     39                md.results.TransientSolution[0].Temperature,
     40                md.results.TransientSolution[0].Enthalpy,
     41                md.results.TransientSolution[0].Waterfraction,
     42                md.results.TransientSolution[1].Vx,
     43                md.results.TransientSolution[1].Vy,
     44                md.results.TransientSolution[1].Vz,
     45                md.results.TransientSolution[1].Vel,
     46                md.results.TransientSolution[1].Pressure,
     47                md.results.TransientSolution[1].Base,
     48                md.results.TransientSolution[1].Surface,
     49                md.results.TransientSolution[1].Thickness,
     50                md.results.TransientSolution[1].Temperature,
     51                md.results.TransientSolution[1].Enthalpy,
     52                md.results.TransientSolution[1].Waterfraction,
     53                md.results.TransientSolution[2].Vx,
     54                md.results.TransientSolution[2].Vy,
     55                md.results.TransientSolution[2].Vz,
     56                md.results.TransientSolution[2].Vel,
     57                md.results.TransientSolution[2].Pressure,
     58                md.results.TransientSolution[2].Base,
     59                md.results.TransientSolution[2].Surface,
     60                md.results.TransientSolution[2].Thickness,
     61                md.results.TransientSolution[2].Temperature,
     62                md.results.TransientSolution[2].Enthalpy,
     63                md.results.TransientSolution[2].Waterfraction]
  • issm/trunk-jpl/test/NightlyRun/test123.py

    r22104 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 fake_surface = np.vstack((np.append(np.array(md.geometry.surface)+100,1.1),
    19                 np.append(np.array(md.geometry.surface)+200,2.1),
    20                 np.append(np.array(md.geometry.surface)+300,2.5))).T
     18fake_surface = np.vstack((np.append(np.array(md.geometry.surface) + 100, 1.1),
     19                          np.append(np.array(md.geometry.surface) + 200, 2.1),
     20                          np.append(np.array(md.geometry.surface) + 300, 2.5))).T
    2121
    22 md.transient.requested_outputs = ['default','SurfaceMisfit']
    23 md.outputdefinition.definitions = [misfit(
    24                 name='SurfaceMisfit',
    25                 definitionstring='Outputdefinition1',
    26                 model_string='Surface',
    27                 observation=fake_surface,
    28                 observation_string='SurfaceObservation',
    29                 timeinterpolation='nearestneighbor',
    30                 weights=np.ones((md.mesh.numberofvertices,1)),
    31                 weights_string='WeightsSurfaceObservation'
    32                 )]
     22md.transient.requested_outputs = ['default', 'SurfaceMisfit']
     23md.outputdefinition.definitions = [misfit(name='SurfaceMisfit',
     24                                          definitionstring='Outputdefinition1',
     25                                          model_string='Surface',
     26                                          observation=fake_surface,
     27                                          observation_string='SurfaceObservation',
     28                                          timeinterpolation='nearestneighbor',
     29                                          weights=np.ones((md.mesh.numberofvertices, 1)),
     30                                          weights_string='WeightsSurfaceObservation')]
    3331
    34 md=solve(md,'Transient')
     32md = solve(md, 'Transient')
    3533
    3634#Fields and tolerances to track changes
    37 field_names = ['SurfaceMisfitFirstStep','SurfaceMisfitSecondStep','SurfaceMisfitThirdStep']
    38 field_tolerances = [1e-13,1e-13,1e-13]
    39 field_values = [
    40         md.results.TransientSolution[0].SurfaceMisfit,
    41         md.results.TransientSolution[1].SurfaceMisfit,
    42         md.results.TransientSolution[2].SurfaceMisfit
    43         ]
     35field_names = ['SurfaceMisfitFirstStep', 'SurfaceMisfitSecondStep', 'SurfaceMisfitThirdStep']
     36field_tolerances = [1e-13, 1e-13, 1e-13]
     37field_values = [md.results.TransientSolution[0].SurfaceMisfit,
     38                md.results.TransientSolution[1].SurfaceMisfit,
     39                md.results.TransientSolution[2].SurfaceMisfit]
  • issm/trunk-jpl/test/NightlyRun/test124.py

    r22104 r23793  
    88from solve import *
    99
    10 md=triangle(model(),'../Exp/Square.exp',150000)
    11 md=setmask(md,'all','')
    12 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    13 md.extrude(3,1)
    14 md=setflowequation(md,'FS','all')
     10md = triangle(model(), '../Exp/Square.exp', 150000)
     11md = setmask(md, 'all', '')
     12md = parameterize(md, '../Par/SquareShelfConstrained.py')
     13md.extrude(3, 1)
     14md = setflowequation(md, 'FS', 'all')
    1515
    1616#Free surface
     
    2020
    2121#Go solve
    22 md.cluster=generic('name',gethostname(),'np',3)
    23 md=solve(md,'Transient')
     22md.cluster = generic('name', gethostname(), 'np', 3)
     23md = solve(md, 'Transient')
    2424
    2525#Fields and tolerances to track changes
    26 field_names      = [
    27         'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1',
    28         'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2',
    29         'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    30 field_tolerances = [
    31         2e-09,3e-9,3e-9,3e-9,1e-13,1e-12,1e-12,
    32         2e-09,3e-9,3e-9,3e-9,1e-10,1e-10,1e-10,
    33         2e-09,3e-9,3e-9,3e-9,1e-10,1e-10,1e-10]
    34 field_values = [
    35         md.results.TransientSolution[0].Vx,
    36         md.results.TransientSolution[0].Vy,
    37         md.results.TransientSolution[0].Vel,
    38         md.results.TransientSolution[0].Pressure,
    39         md.results.TransientSolution[0].Base,
    40         md.results.TransientSolution[0].Surface,
    41         md.results.TransientSolution[0].Thickness,
    42         md.results.TransientSolution[1].Vx,
    43         md.results.TransientSolution[1].Vy,
    44         md.results.TransientSolution[1].Vel,
    45         md.results.TransientSolution[1].Pressure,
    46         md.results.TransientSolution[1].Base,
    47         md.results.TransientSolution[1].Surface,
    48         md.results.TransientSolution[1].Thickness,
    49         md.results.TransientSolution[2].Vx,
    50         md.results.TransientSolution[2].Vy,
    51         md.results.TransientSolution[2].Vel,
    52         md.results.TransientSolution[2].Pressure,
    53         md.results.TransientSolution[2].Base,
    54         md.results.TransientSolution[2].Surface,
    55         md.results.TransientSolution[2].Thickness,
    56         ]
     26field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1',
     27               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2',
     28               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3']
     29field_tolerances = [2e-09, 3e-9, 3e-9, 3e-9, 1e-13, 1e-12, 1e-12,
     30                    2e-09, 3e-9, 3e-9, 3e-9, 1e-10, 1e-10, 1e-10,
     31                    2e-09, 3e-9, 3e-9, 3e-9, 1e-10, 1e-10, 1e-10]
     32field_values = [md.results.TransientSolution[0].Vx,
     33                md.results.TransientSolution[0].Vy,
     34                md.results.TransientSolution[0].Vel,
     35                md.results.TransientSolution[0].Pressure,
     36                md.results.TransientSolution[0].Base,
     37                md.results.TransientSolution[0].Surface,
     38                md.results.TransientSolution[0].Thickness,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vel,
     42                md.results.TransientSolution[1].Pressure,
     43                md.results.TransientSolution[1].Base,
     44                md.results.TransientSolution[1].Surface,
     45                md.results.TransientSolution[1].Thickness,
     46                md.results.TransientSolution[2].Vx,
     47                md.results.TransientSolution[2].Vy,
     48                md.results.TransientSolution[2].Vel,
     49                md.results.TransientSolution[2].Pressure,
     50                md.results.TransientSolution[2].Base,
     51                md.results.TransientSolution[2].Surface,
     52                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test125.py

    r23762 r23793  
    77from setflowequation import *
    88from solve import *
    9 
    10 from massfluxatgate import massfluxatgate
    119from generic import generic
    1210import copy
    1311
    14 md=triangle(model(),'../Exp/Square.exp',150000.)
    15 md=setmask(md,'all','')
    16 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',1)
    19 md.transient.requested_outputs=['IceVolume','TotalSmb']
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 1)
     17md.transient.requested_outputs = ['IceVolume', 'TotalSmb']
    2018
    21 md.verbose=verbose('solution',1)
    22 md.settings.recording_frequency=4
     19md.verbose = verbose('solution', 1)
     20md.settings.recording_frequency = 4
    2321
    2422# time steps and resolution
    25 md.timestepping.final_time=19
    26 md.settings.output_frequency=2
     23md.timestepping.final_time = 19
     24md.settings.output_frequency = 2
    2725
    28 md=solve(md,'Transient')
    29 md2=copy.deepcopy(md)
    30 md=solve(md,'Transient','restart',1)
     26md = solve(md, 'Transient')
     27md2 = copy.deepcopy(md)
     28md = solve(md, 'Transient', 'restart', 1)
    3129
    3230#Fields and tolerances to track changes
    33 field_names     =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3']
    34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    35                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    36                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    37                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    38 field_values=[\
    39                 md2.results.TransientSolution[6].Vx-md.results.TransientSolution[6].Vx,\
    40                 md2.results.TransientSolution[6].Vy-md.results.TransientSolution[6].Vy,\
    41                 md2.results.TransientSolution[6].Vel-md.results.TransientSolution[6].Vel,\
    42                 md2.results.TransientSolution[6].TotalSmb-md.results.TransientSolution[6].TotalSmb,\
    43                 md2.results.TransientSolution[6].Base-md.results.TransientSolution[6].Base,\
    44                 md2.results.TransientSolution[6].Surface-md.results.TransientSolution[6].Surface,\
    45                 md2.results.TransientSolution[6].Thickness-md.results.TransientSolution[6].Thickness,\
    46                 md2.results.TransientSolution[6].IceVolume-md.results.TransientSolution[6].IceVolume,\
    47                 md2.results.TransientSolution[7].Vx-md.results.TransientSolution[7].Vx,\
    48                 md2.results.TransientSolution[7].Vy-md.results.TransientSolution[7].Vy,\
    49                 md2.results.TransientSolution[7].Vel-md.results.TransientSolution[7].Vel,\
    50                 md2.results.TransientSolution[7].TotalSmb-md.results.TransientSolution[7].TotalSmb,\
    51                 md2.results.TransientSolution[7].Base-md.results.TransientSolution[7].Base,\
    52                 md2.results.TransientSolution[7].Surface-md.results.TransientSolution[7].Surface,\
    53                 md2.results.TransientSolution[7].Thickness-md.results.TransientSolution[7].Thickness,\
    54                 md2.results.TransientSolution[7].IceVolume-md.results.TransientSolution[7].IceVolume,\
    55                 md2.results.TransientSolution[8].Vx-md.results.TransientSolution[8].Vx,\
    56                 md2.results.TransientSolution[8].Vy-md.results.TransientSolution[8].Vy,\
    57                 md2.results.TransientSolution[8].Vel-md.results.TransientSolution[8].Vel,\
    58                 md2.results.TransientSolution[8].TotalSmb-md.results.TransientSolution[8].TotalSmb,\
    59                 md2.results.TransientSolution[8].Base-md.results.TransientSolution[8].Base,\
    60                 md2.results.TransientSolution[8].Surface-md.results.TransientSolution[8].Surface,\
    61                 md2.results.TransientSolution[8].Thickness-md.results.TransientSolution[8].Thickness,\
    62                 md2.results.TransientSolution[8].IceVolume-md.results.TransientSolution[8].IceVolume\
    63                 ]
    64 
     31field_names = ['Vx1', 'Vy1', 'Vel1', 'TotalSmb1', 'Bed1', 'Surface1', 'Thickness1', 'Volume1', 'Vx2', 'Vy2', 'Vel2', 'TotalSmb2', 'Bed2', 'Surface2', 'Thickness2', 'Volume2', 'Vx3', 'Vy3', 'Vel3', 'TotalSmb3', 'Bed3', 'Surface3', 'Thickness3', 'Volume3']
     32field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     33                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     34                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     35                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     36field_values = [md2.results.TransientSolution[6].Vx - md.results.TransientSolution[6].Vx,
     37                md2.results.TransientSolution[6].Vy - md.results.TransientSolution[6].Vy,
     38                md2.results.TransientSolution[6].Vel - md.results.TransientSolution[6].Vel,
     39                md2.results.TransientSolution[6].TotalSmb - md.results.TransientSolution[6].TotalSmb,
     40                md2.results.TransientSolution[6].Base - md.results.TransientSolution[6].Base,
     41                md2.results.TransientSolution[6].Surface - md.results.TransientSolution[6].Surface,
     42                md2.results.TransientSolution[6].Thickness - md.results.TransientSolution[6].Thickness,
     43                md2.results.TransientSolution[6].IceVolume - md.results.TransientSolution[6].IceVolume,
     44                md2.results.TransientSolution[7].Vx - md.results.TransientSolution[7].Vx,
     45                md2.results.TransientSolution[7].Vy - md.results.TransientSolution[7].Vy,
     46                md2.results.TransientSolution[7].Vel - md.results.TransientSolution[7].Vel,
     47                md2.results.TransientSolution[7].TotalSmb - md.results.TransientSolution[7].TotalSmb,
     48                md2.results.TransientSolution[7].Base - md.results.TransientSolution[7].Base,
     49                md2.results.TransientSolution[7].Surface - md.results.TransientSolution[7].Surface,
     50                md2.results.TransientSolution[7].Thickness - md.results.TransientSolution[7].Thickness,
     51                md2.results.TransientSolution[7].IceVolume - md.results.TransientSolution[7].IceVolume,
     52                md2.results.TransientSolution[8].Vx - md.results.TransientSolution[8].Vx,
     53                md2.results.TransientSolution[8].Vy - md.results.TransientSolution[8].Vy,
     54                md2.results.TransientSolution[8].Vel - md.results.TransientSolution[8].Vel,
     55                md2.results.TransientSolution[8].TotalSmb - md.results.TransientSolution[8].TotalSmb,
     56                md2.results.TransientSolution[8].Base - md.results.TransientSolution[8].Base,
     57                md2.results.TransientSolution[8].Surface - md.results.TransientSolution[8].Surface,
     58                md2.results.TransientSolution[8].Thickness - md.results.TransientSolution[8].Thickness,
     59                md2.results.TransientSolution[8].IceVolume - md.results.TransientSolution[8].IceVolume]
  • issm/trunk-jpl/test/NightlyRun/test126.py

    r21408 r23793  
    77from setflowequation import *
    88from solve import *
    9 
    10 from massfluxatgate import massfluxatgate
    119from generic import generic
    1210import copy
    1311
    14 md=triangle(model(),'../Exp/Square.exp',150000.)
    15 md=setmask(md,'all','')
    16 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.transient.requested_outputs=['IceVolume','TotalSmb']
    19 md.extrude(3,1.)
    20 md=setflowequation(md,'HO','all')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.cluster = generic('name', gethostname(), 'np', 1)
     16md.transient.requested_outputs = ['IceVolume', 'TotalSmb']
     17md.extrude(3, 1.)
     18md = setflowequation(md, 'HO', 'all')
    2119
    22 md.verbose=verbose('solution',1)
    23 md.settings.recording_frequency=5
     20md.verbose = verbose('solution', 1)
     21md.settings.recording_frequency = 5
    2422
    2523# time steps and resolution
    26 md.timestepping.final_time=8
     24md.timestepping.final_time = 8
    2725
    28 md=solve(md,'Transient')
    29 md2=copy.deepcopy(md)
    30 md=solve(md,'Transient','restart',1)
     26md = solve(md, 'Transient')
     27md2 = copy.deepcopy(md)
     28md = solve(md, 'Transient', 'restart', 1)
    3129
    3230#Fields and tolerances to track changes
    33 field_names     =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Temperature1','Pressure1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Temperature2','Pressure2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3','Temperature3','Pressure3']
    34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    35                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    36                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    37                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    38                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    39 field_values=[\
    40                 md2.results.TransientSolution[5].Vx-md.results.TransientSolution[5].Vx,\
    41                 md2.results.TransientSolution[5].Vy-md.results.TransientSolution[5].Vy,\
    42                 md2.results.TransientSolution[5].Vel-md.results.TransientSolution[5].Vel,\
    43                 md2.results.TransientSolution[5].TotalSmb-md.results.TransientSolution[5].TotalSmb,\
    44                 md2.results.TransientSolution[5].Base-md.results.TransientSolution[5].Base,\
    45                 md2.results.TransientSolution[5].Surface-md.results.TransientSolution[5].Surface,\
    46                 md2.results.TransientSolution[5].Thickness-md.results.TransientSolution[5].Thickness,\
    47                 md2.results.TransientSolution[5].IceVolume-md.results.TransientSolution[5].IceVolume,\
    48                 md2.results.TransientSolution[5].Temperature-md.results.TransientSolution[5].Temperature,\
    49                 md2.results.TransientSolution[5].Pressure-md.results.TransientSolution[5].Pressure,\
    50                 md2.results.TransientSolution[6].Vx-md.results.TransientSolution[6].Vx,\
    51                 md2.results.TransientSolution[6].Vy-md.results.TransientSolution[6].Vy,\
    52                 md2.results.TransientSolution[6].Vel-md.results.TransientSolution[6].Vel,\
    53                 md2.results.TransientSolution[6].TotalSmb-md.results.TransientSolution[6].TotalSmb,\
    54                 md2.results.TransientSolution[6].Base-md.results.TransientSolution[6].Base,\
    55                 md2.results.TransientSolution[6].Surface-md.results.TransientSolution[6].Surface,\
    56                 md2.results.TransientSolution[6].Thickness-md.results.TransientSolution[6].Thickness,\
    57                 md2.results.TransientSolution[6].IceVolume-md.results.TransientSolution[6].IceVolume,\
    58                 md2.results.TransientSolution[6].Temperature-md.results.TransientSolution[6].Temperature,\
    59                 md2.results.TransientSolution[6].Pressure-md.results.TransientSolution[6].Pressure,\
    60                 md2.results.TransientSolution[7].Vx-md.results.TransientSolution[7].Vx,\
    61                 md2.results.TransientSolution[7].Vy-md.results.TransientSolution[7].Vy,\
    62                 md2.results.TransientSolution[7].Vel-md.results.TransientSolution[7].Vel,\
    63                 md2.results.TransientSolution[7].TotalSmb-md.results.TransientSolution[7].TotalSmb,\
    64                 md2.results.TransientSolution[7].Base-md.results.TransientSolution[7].Base,\
    65                 md2.results.TransientSolution[7].Surface-md.results.TransientSolution[7].Surface,\
    66                 md2.results.TransientSolution[7].Thickness-md.results.TransientSolution[7].Thickness,\
    67                 md2.results.TransientSolution[7].IceVolume-md.results.TransientSolution[7].IceVolume,\
    68                 md2.results.TransientSolution[7].Temperature-md.results.TransientSolution[7].Temperature,\
    69                 md2.results.TransientSolution[7].Pressure-md.results.TransientSolution[7].Pressure\
    70                 ]
    71 
     31field_names = ['Vx1', 'Vy1', 'Vel1', 'TotalSmb1', 'Bed1', 'Surface1', 'Thickness1', 'Volume1', 'Temperature1', 'Pressure1', 'Vx2', 'Vy2', 'Vel2', 'TotalSmb2', 'Bed2', 'Surface2', 'Thickness2', 'Volume2', 'Temperature2', 'Pressure2', 'Vx3', 'Vy3', 'Vel3', 'TotalSmb3', 'Bed3', 'Surface3', 'Thickness3', 'Volume3', 'Temperature3', 'Pressure3']
     32field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     33                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     34                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     35                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     36                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     37field_values = [md2.results.TransientSolution[5].Vx - md.results.TransientSolution[5].Vx,
     38                md2.results.TransientSolution[5].Vy - md.results.TransientSolution[5].Vy,
     39                md2.results.TransientSolution[5].Vel - md.results.TransientSolution[5].Vel,
     40                md2.results.TransientSolution[5].TotalSmb - md.results.TransientSolution[5].TotalSmb,
     41                md2.results.TransientSolution[5].Base - md.results.TransientSolution[5].Base,
     42                md2.results.TransientSolution[5].Surface - md.results.TransientSolution[5].Surface,
     43                md2.results.TransientSolution[5].Thickness - md.results.TransientSolution[5].Thickness,
     44                md2.results.TransientSolution[5].IceVolume - md.results.TransientSolution[5].IceVolume,
     45                md2.results.TransientSolution[5].Temperature - md.results.TransientSolution[5].Temperature,
     46                md2.results.TransientSolution[5].Pressure - md.results.TransientSolution[5].Pressure,
     47                md2.results.TransientSolution[6].Vx - md.results.TransientSolution[6].Vx,
     48                md2.results.TransientSolution[6].Vy - md.results.TransientSolution[6].Vy,
     49                md2.results.TransientSolution[6].Vel - md.results.TransientSolution[6].Vel,
     50                md2.results.TransientSolution[6].TotalSmb - md.results.TransientSolution[6].TotalSmb,
     51                md2.results.TransientSolution[6].Base - md.results.TransientSolution[6].Base,
     52                md2.results.TransientSolution[6].Surface - md.results.TransientSolution[6].Surface,
     53                md2.results.TransientSolution[6].Thickness - md.results.TransientSolution[6].Thickness,
     54                md2.results.TransientSolution[6].IceVolume - md.results.TransientSolution[6].IceVolume,
     55                md2.results.TransientSolution[6].Temperature - md.results.TransientSolution[6].Temperature,
     56                md2.results.TransientSolution[6].Pressure - md.results.TransientSolution[6].Pressure,
     57                md2.results.TransientSolution[7].Vx - md.results.TransientSolution[7].Vx,
     58                md2.results.TransientSolution[7].Vy - md.results.TransientSolution[7].Vy,
     59                md2.results.TransientSolution[7].Vel - md.results.TransientSolution[7].Vel,
     60                md2.results.TransientSolution[7].TotalSmb - md.results.TransientSolution[7].TotalSmb,
     61                md2.results.TransientSolution[7].Base - md.results.TransientSolution[7].Base,
     62                md2.results.TransientSolution[7].Surface - md.results.TransientSolution[7].Surface,
     63                md2.results.TransientSolution[7].Thickness - md.results.TransientSolution[7].Thickness,
     64                md2.results.TransientSolution[7].IceVolume - md.results.TransientSolution[7].IceVolume,
     65                md2.results.TransientSolution[7].Temperature - md.results.TransientSolution[7].Temperature,
     66                md2.results.TransientSolution[7].Pressure - md.results.TransientSolution[7].Pressure]
  • issm/trunk-jpl/test/NightlyRun/test1301.py

    r21408 r23793  
    1818"""
    1919
    20 printingflag=False
     20printingflag = False
    2121
    22 md=model()
    23 md=triangle(md,'../Exp/Square.exp',100000.)
    24 md=setmask(md,'','')
    25 md=parameterize(md,'../Par/SquareThermal.py')
    26 md.extrude(3,2.)
    27 md=setflowequation(md,'HO','all')
     22md = model()
     23md = triangle(md, '../Exp/Square.exp', 100000.)
     24md = setmask(md, '', '')
     25md = parameterize(md, '../Par/SquareThermal.py')
     26md.extrude(3, 2.)
     27md = setflowequation(md, 'HO', 'all')
    2828
    2929#Some conditions specific to melting test
    30 md.initialization.pressure=np.zeros((md.mesh.numberofvertices,1),int)
    31 md.initialization.temperature=273.15*np.ones((md.mesh.numberofvertices))
    32 pos=np.nonzero(md.mesh.vertexonsurface)[0]
    33 md.thermal.spctemperature[pos]=md.initialization.temperature[pos]
    34 md.materials.rheology_B=paterson(md.initialization.temperature)
     30md.initialization.pressure = np.zeros((md.mesh.numberofvertices, 1), int)
     31md.initialization.temperature = 273.15 * np.ones((md.mesh.numberofvertices))
     32pos = np.nonzero(md.mesh.vertexonsurface)[0]
     33md.thermal.spctemperature[pos] = md.initialization.temperature[pos]
     34md.materials.rheology_B = paterson(md.initialization.temperature)
    3535
    3636#analytical results
    3737#melting heat = geothermal flux
    38 #Mb*L*rho=G   => Mb=G/L*rho
    39 melting=md.basalforcings.geothermalflux/(md.materials.rho_ice*md.materials.latentheat)*md.constants.yts
     38#Mb*L*rho = G => Mb = G/L*rho
     39melting = md.basalforcings.geothermalflux / (md.materials.rho_ice * md.materials.latentheat) * md.constants.yts
    4040
    4141#modeled results
    42 md.cluster=generic('name',gethostname(),'np',2)
    43 md=solve(md,'Thermal')
     42md.cluster = generic('name', gethostname(), 'np', 2)
     43md = solve(md, 'Thermal')
    4444
    4545#plot results
    46 comp_melting=md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate
    47 relative=np.abs((comp_melting-melting)/melting)*100.
    48 relative[np.nonzero(comp_melting==melting)[0]]=0.
    49 #plotmodel(md,'data',comp_melting,'title','Modeled melting','data',melting,'title','Analytical melting',...
    50 #       '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')
     46comp_melting = md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate
     47relative = np.abs((comp_melting - melting) / melting) * 100.
     48relative[np.nonzero(comp_melting == melting)[0]] = 0.
     49#plotmodel(md, 'data', comp_melting, 'title', 'Modeled melting', 'data', melting, 'title', 'Analytical melting',...
     50#       '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')
    5252if printingflag:
    53         pass
    54 #       set(gcf,'Color','w')
    55 #       printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    56 #       system(['mv thermalmelting.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
     53    pass
     54#       set(gcf, 'Color', 'w')
     55#       printmodel('thermalmelting', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     56#       system(['mv thermalmelting.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
    5757
    5858#Fields and tolerances to track changes
    59 field_names     =['BasalMelting']
    60 field_tolerances=[1e-08]
    61 field_values    =[comp_melting]
     59field_names = ['BasalMelting']
     60field_tolerances = [1e-08]
     61field_values = [comp_melting]
  • issm/trunk-jpl/test/NightlyRun/test1302.py

    r21408 r23793  
    11#Test Name: ThermalAdvection
    22import numpy as np
    3 import sys
    43from model import *
    54from socket import gethostname
     
    1312"""
    1413This file can be run to check that the advection-diffusion  is correctly modeled.
    15 There is u=v=0 and w=cst everywhere the only thermal boundary conditions are an imposed temperature
     14There is u = v=0 and w = cst everywhere the only thermal boundary conditions are an imposed temperature
    1615at upper surface and an impose flux at its base.
    1716"""
    1817
    19 printingflag=False
     18printingflag = False
    2019
    21 md=model()
    22 md=triangle(md,'../Exp/Square.exp',100000.)
    23 md=setmask(md,'','')
    24 md=parameterize(md,'../Par/SquareThermal.py')
    25 md.extrude(30,1.)    #NB: the more one extrudes, the better (10-> relative~0.35%, 20->0.1%, 30->0.05%)
    26 md=setflowequation(md,'HO','all')
     20md = model()
     21md = triangle(md, '../Exp/Square.exp', 100000.)
     22md = setmask(md, '', '')
     23md = parameterize(md, '../Par/SquareThermal.py')
     24md.extrude(30, 1.)    #NB: the more one extrudes, the better (10-> relative~0.35%, 20->0.1%, 30->0.05%)
     25md = setflowequation(md, 'HO', 'all')
    2726
    2827#Thermal boundary conditions
    29 pos1=np.where(np.isnan(md.mesh.lowerelements))[0]
    30 md.thermal.spctemperature[md.mesh.elements[pos1,0:3]-1]=10.
    31 pos2=np.where(np.isnan(md.mesh.upperelements))[0]
    32 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0.
    33 md.initialization.vz=0.1*np.ones((md.mesh.numberofvertices))
    34 md.initialization.vel=np.sqrt(md.initialization.vx**2+ md.initialization.vy**2+ md.initialization.vz**2)
    35 md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int)
     28pos1 = np.where(np.isnan(md.mesh.lowerelements))[0]
     29md.thermal.spctemperature[md.mesh.elements[pos1, 0:3] - 1] = 10.
     30pos2 = np.where(np.isnan(md.mesh.upperelements))[0]
     31md.thermal.spctemperature[md.mesh.elements[pos2, 3:6] - 1] = 0.
     32md.initialization.vz = 0.1 * np.ones((md.mesh.numberofvertices))
     33md.initialization.vel = np.sqrt(md.initialization.vx**2 + md.initialization.vy**2 + md.initialization.vz**2)
     34md.initialization.pressure = np.zeros((md.mesh.numberofvertices), int)
    3635
    37 md.thermal.stabilization=2
     36md.thermal.stabilization = 2
    3837#analytical results
    39 #d2T/dz2-w*rho_ice*c/k*dT/dz=0   T(surface)=0  T(bed)=10   => T=A exp(alpha z)+B
    40 alpha=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
    41 A=10./(np.exp(alpha*(-1000.))-1.)    #A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
    42 B=-A
    43 md.initialization.temperature=A*np.exp(alpha*md.mesh.z)+B
     38#d2T/dz2-w*rho_ice*c/k*dT/dz = 0   T(surface)=0  T(bed)=10 => T = A exp(alpha z)+B
     39alpha = 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
     40A = 10. / (np.exp(alpha * (-1000.)) - 1.)    #A = T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
     41B = -A
     42md.initialization.temperature = A * np.exp(alpha * md.mesh.z) + B
    4443
    4544#modeled results
    46 md.cluster=generic('name',gethostname(),'np',2)
    47 md=solve(md,'Thermal')
     45md.cluster = generic('name', gethostname(), 'np', 2)
     46md = solve(md, 'Thermal')
    4847
    4948#plot results
    50 comp_temp=md.results.ThermalSolution.Temperature
    51 relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
    52 relative[np.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
    53 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
    54 #       'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
    55 #       'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    56 #       'figposition','mathieu','FontSize#all',20)
     49comp_temp = md.results.ThermalSolution.Temperature
     50relative = np.abs((comp_temp - md.initialization.temperature) / md.initialization.temperature) * 100.
     51relative[np.nonzero(comp_temp == md.initialization.temperature)[0]] = 0.
     52#plotmodel(md, 'data', comp_temp, 'title', 'Modeled temperature [K]', 'data', md.initialization.temperature, 'view', 3,...
     53#       'title', 'Analytical temperature [K]', 'view', 3, 'data', comp_temp-md.initialization.temperature,...
     54#       'title', 'Absolute error [K]', 'view', 3, 'data', relative, 'title', 'Relative error [%]', 'view', 3,...
     55#       'figposition', 'mathieu', 'FontSize#all', 20)
    5756if printingflag:
    58         pass
    59 #       set(gcf,'Color','w')
    60 #       printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    61 #       system(['mv thermaladvection.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT '])
     57    pass
     58#       set(gcf, 'Color', 'w')
     59#       printmodel('thermaladvection', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     60#       system(['mv thermaladvection.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT '])
    6261
    6362#Fields and tolerances to track changes
    64 field_names     =['AdvectionTemperature']
    65 field_tolerances=[1e-13]
    66 field_values    =[comp_temp]
     63field_names = ['AdvectionTemperature']
     64field_tolerances = [1e-13]
     65field_values = [comp_temp]
  • issm/trunk-jpl/test/NightlyRun/test1303.py

    r21408 r23793  
    11#Test Name: ThermalConduction
    22import numpy as np
    3 import sys
    43from model import *
    54from socket import gethostname
     
    1817"""
    1918
    20 printingflag=False
     19printingflag = False
    2120
    22 md=model()
    23 md=triangle(md,'../Exp/Square.exp',100000.)
    24 md=setmask(md,'all','')
    25 md=parameterize(md,'../Par/SquareThermal.py')
    26 md.extrude(11,2.)
    27 md=setflowequation(md,'HO','all')
     21md = model()
     22md = triangle(md, '../Exp/Square.exp', 100000.)
     23md = setmask(md, 'all', '')
     24md = parameterize(md, '../Par/SquareThermal.py')
     25md.extrude(11, 2.)
     26md = setflowequation(md, 'HO', 'all')
    2827
    2928
    30 pos1=np.where(np.isnan(md.mesh.lowerelements))[0]
    31 md.thermal.spctemperature[md.mesh.elements[pos1,0:3]-1]=10.
    32 pos2=np.where(np.isnan(md.mesh.upperelements))[0]
    33 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0.
    34 md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int)
     29pos1 = np.where(np.isnan(md.mesh.lowerelements))[0]
     30md.thermal.spctemperature[md.mesh.elements[pos1, 0:3] - 1] = 10.
     31pos2 = np.where(np.isnan(md.mesh.upperelements))[0]
     32md.thermal.spctemperature[md.mesh.elements[pos2, 3:6] - 1] = 0.
     33md.initialization.pressure = np.zeros((md.mesh.numberofvertices), int)
    3534
    3635#analytical results
    37 #d2T/dz2=0 T(bed)=10 T(surface)=0  => T=0*(z-bed)/thickness+10*(surface-z)/thickness
     36#d2T/dz2 = 0 T(bed)=10 T(surface)=0 => T = 0*(z-bed)/thickness+10*(surface-z)/thickness
    3837#each layer of the 3d mesh must have a constant value
    39 md.initialization.temperature=10.*(md.geometry.surface-md.mesh.z)/md.geometry.thickness
     38md.initialization.temperature = 10. * (md.geometry.surface - md.mesh.z) / md.geometry.thickness
    4039
    4140#modeled results
    42 md.cluster=generic('name',gethostname(),'np',2)
    43 md=solve(md,'Thermal')
     41md.cluster = generic('name', gethostname(), 'np', 2)
     42md = solve(md, 'Thermal')
    4443
    4544#plot results
    46 comp_temp=md.results.ThermalSolution.Temperature
    47 relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
    48 relative[np.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
    49 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
    50 #       'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
    51 #       'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    52 #       'figposition','mathieu','FontSize#all',20)
     45comp_temp = md.results.ThermalSolution.Temperature
     46relative = np.abs((comp_temp - md.initialization.temperature) / md.initialization.temperature) * 100.
     47relative[np.nonzero(comp_temp == md.initialization.temperature)[0]] = 0.
     48#plotmodel(md, 'data', comp_temp, 'title', 'Modeled temperature [K]', 'data', md.initialization.temperature, 'view', 3,...
     49#       'title', 'Analytical temperature [K]', 'view', 3, 'data', comp_temp-md.initialization.temperature,...
     50#       'title', 'Absolute error [K]', 'view', 3, 'data', relative, 'title', 'Relative error [%]', 'view', 3,...
     51#       'figposition', 'mathieu', 'FontSize#all', 20)
    5352if printingflag:
    54         pass
    55 #       set(gcf,'Color','w')
    56 #       printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    57 #       system(['mv thermalconduction.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
     53    pass
     54#       set(gcf, 'Color', 'w')
     55#       printmodel('thermalconduction', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     56#       system(['mv thermalconduction.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
    5857
    5958#Fields and tolerances to track changes
    60 field_names     =['ConductionTemperature']
    61 field_tolerances=[1e-13]
    62 field_values    =[comp_temp]
     59field_names = ['ConductionTemperature']
     60field_tolerances = [1e-13]
     61field_values = [comp_temp]
  • issm/trunk-jpl/test/NightlyRun/test1304.py

    r21408 r23793  
    11#Test Name: ThermalGeothermalFlux
    22import numpy as np
    3 import sys
    43from model import *
    54from socket import gethostname
     
    1817"""
    1918
    20 printingflag=False
     19printingflag = False
    2120
    22 md=model()
    23 md=triangle(md,'../Exp/Square.exp',100000.)
    24 md=setmask(md,'','')
    25 md=parameterize(md,'../Par/SquareThermal.py')
    26 md.extrude(11,1.)
    27 md=setflowequation(md,'HO','all')
     21md = model()
     22md = triangle(md, '../Exp/Square.exp', 100000.)
     23md = setmask(md, '', '')
     24md = parameterize(md, '../Par/SquareThermal.py')
     25md.extrude(11, 1.)
     26md = setflowequation(md, 'HO', 'all')
    2827
    29 pos2=np.where(np.isnan(md.mesh.upperelements))[0]
    30 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0.
    31 md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int)
    32 md.basalforcings.geothermalflux[:]=0.1    #100mW/m^2
     28pos2 = np.where(np.isnan(md.mesh.upperelements))[0]
     29md.thermal.spctemperature[md.mesh.elements[pos2, 3:6] - 1] = 0.
     30md.initialization.pressure = np.zeros((md.mesh.numberofvertices), int)
     31md.basalforcings.geothermalflux[:] = 0.1    #100mW/m^2
    3332
    3433#analytical results
    3534#the result is linear with depth and is equal to 0 on the upper surface (See BC)
    36 #d2T/dz2=0  -k*dT/dz(bed)=G  T(surface)=0 => T=-G/k*(z-surface)
    37 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
    3837
    3938#modeled results
    40 md.cluster=generic('name',gethostname(),'np',2)
    41 md=solve(md,'Thermal')
     39md.cluster = generic('name', gethostname(), 'np', 2)
     40md = solve(md, 'Thermal')
    4241
    4342#plot results
    44 comp_temp=md.results.ThermalSolution.Temperature
    45 relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
    46 relative[np.where(comp_temp==md.initialization.temperature)[0]]=0.
    47 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
    48 #       'title','Analytical temperature','view',3,'data',comp_temp-md.initialization.temperature,...
    49 #       'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    50 #       'figposition','mathieu','FontSize#all',20)
     43comp_temp = md.results.ThermalSolution.Temperature
     44relative = np.abs((comp_temp - md.initialization.temperature) / md.initialization.temperature) * 100.
     45relative[np.where(comp_temp == md.initialization.temperature)[0]] = 0.
     46#plotmodel(md, 'data', comp_temp, 'title', 'Modeled temperature [K]', 'data', md.initialization.temperature, 'view', 3,...
     47#       'title', 'Analytical temperature', 'view', 3, 'data', comp_temp-md.initialization.temperature,...
     48#       'title', 'Absolute error [K]', 'view', 3, 'data', relative, 'title', 'Relative error [%]', 'view', 3,...
     49#       'figposition', 'mathieu', 'FontSize#all', 20)
    5150if printingflag:
    52         pass
    53 #       set(gcf,'Color','w')
    54 #       printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
    55 #       system(['mv thermalgeothermalflux.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
     51    pass
     52#       set(gcf, 'Color', 'w')
     53#       printmodel('thermalgeothermalflux', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 0.7, 'hardcopy', 'off')
     54#       system(['mv thermalgeothermalflux.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
    5655
    5756#Fields and tolerances to track changes
    58 field_names     =['GeothermalFluxTemperature']
    59 field_tolerances=[1e-13]
    60 field_values    =[comp_temp]
     57field_names = ['GeothermalFluxTemperature']
     58field_tolerances = [1e-13]
     59field_values = [comp_temp]
  • issm/trunk-jpl/test/NightlyRun/test1501.py

    r23707 r23793  
    11#Test Name: SquareShelfTranSawTooth2d
    22import numpy as np
    3 import sys
    43from model import *
    54from socket import gethostname
     
    1312printingflag = False
    1413
    15 md=triangle(model(),'../Exp/Square.exp',350000.)
    16 md=setmask(md,'all','')
    17 md=parameterize(md,'../Par/SquareShelf.py')
    18 md=setflowequation(md,'SSA','all')
    19 md.cluster=generic('name',gethostname(),'np',3)
    20 md.transient.isthermal=False
    21 
    22 md.timestepping.time_step=1.
    23 md.settings.output_frequency=1
    24 md.timestepping.final_time=2000.
     14md = triangle(model(), '../Exp/Square.exp', 350000.)
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md.transient.isthermal = False
     20
     21md.timestepping.time_step = 1.
     22md.settings.output_frequency = 1
     23md.timestepping.final_time = 2000.
    2524
    2625#Solve for thinning rate -> -1 * surface mass balance
    27 smb= 2.*np.ones((md.mesh.numberofvertices))
    28 md.smb.mass_balance= smb
    29 md.basalforcings.groundedice_melting_rate= smb
    30 
    31 md=solve(md,'Masstransport')
    32 
    33 for i in range(1,11):
    34          md=solve(md,'Masstransport')
    35          md.smb.mass_balance= md.smb.mass_balance - ((md.results.MasstransportSolution.Thickness)-md.geometry.thickness)
     26smb = 2. * np.ones((md.mesh.numberofvertices))
     27md.smb.mass_balance = smb
     28md.basalforcings.groundedice_melting_rate = smb
     29
     30md = solve(md, 'Masstransport')
     31
     32for i in range(1, 11):
     33    md = solve(md, 'Masstransport')
     34    md.smb.mass_balance = md.smb.mass_balance - ((md.results.MasstransportSolution.Thickness) - md.geometry.thickness)
    3635
    3736#Set up transient
    3837smb = md.smb.mass_balance
    3938
    40 #tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ]
    41 tooth=np.hstack((np.tile(smb-10.,(1,400)),np.tile(smb,(1,400))))
    42 #smb=[ [ones(399,1)*(smb')]' smb  tooth tooth]
    43 smb=np.hstack((np.tile(smb,(1,399)),smb,tooth,tooth))
     39#tooth= [ [ones(400, 1)*(smb') - 10.]' [ones(400, 1)*(smb')]' ]
     40tooth = np.hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400))))
     41#smb = [ [ones(399, 1)*(smb')]' smb  tooth tooth]
     42smb = np.hstack((np.tile(smb, (1, 399)), smb, tooth, tooth))
    4443
    4544#md.smb.mass_balance= smb
    4645#md.smb.mass_balance(end+1,:)=[1.:2000.]
    47 md.smb.mass_balance=np.vstack((smb,np.arange(1,2001)))
    48 
    49 md=solve(md,'Transient')
     46md.smb.mass_balance = np.vstack((smb, np.arange(1, 2001)))
     47
     48md = solve(md, 'Transient')
    5049
    5150#Fields and tolerances to track changes
    52 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
    53         'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
    54         'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
    55         'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4', \
    56         'Vx5','Vy5','Vel5','Pressure5','Bed5','Surface5','Thickness5','SmbMassBalance5']
    57 field_tolerances=[1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
    58         1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
    59         1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
    60         1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
    61         1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
    62 field_values=[\
    63         md.results.TransientSolution[400-1].Vx,\
    64         md.results.TransientSolution[400-1].Vy,\
    65         md.results.TransientSolution[400-1].Vel,\
    66         md.results.TransientSolution[400-1].Pressure,\
    67         md.results.TransientSolution[400-1].Base,\
    68         md.results.TransientSolution[400-1].Surface,\
    69         md.results.TransientSolution[400-1].Thickness,\
    70         md.results.TransientSolution[400-1].SmbMassBalance,\
    71         md.results.TransientSolution[800-1].Vx,\
    72         md.results.TransientSolution[800-1].Vy,\
    73         md.results.TransientSolution[800-1].Vel,\
    74         md.results.TransientSolution[800-1].Pressure,\
    75         md.results.TransientSolution[800-1].Base,\
    76         md.results.TransientSolution[800-1].Surface,\
    77         md.results.TransientSolution[800-1].Thickness,\
    78         md.results.TransientSolution[800-1].SmbMassBalance,\
    79         md.results.TransientSolution[1200-1].Vx,\
    80         md.results.TransientSolution[1200-1].Vy,\
    81         md.results.TransientSolution[1200-1].Vel,\
    82         md.results.TransientSolution[1200-1].Pressure,\
    83         md.results.TransientSolution[1200-1].Base,\
    84         md.results.TransientSolution[1200-1].Surface,\
    85         md.results.TransientSolution[1200-1].Thickness,\
    86         md.results.TransientSolution[1200-1].SmbMassBalance,\
    87         md.results.TransientSolution[1600-1].Vx,\
    88         md.results.TransientSolution[1600-1].Vy,\
    89         md.results.TransientSolution[1600-1].Vel,\
    90         md.results.TransientSolution[1600-1].Pressure,\
    91         md.results.TransientSolution[1600-1].Base,\
    92         md.results.TransientSolution[1600-1].Surface,\
    93         md.results.TransientSolution[1600-1].Thickness,\
    94         md.results.TransientSolution[1600-1].SmbMassBalance,\
    95         md.results.TransientSolution[2000-1].Vx,\
    96         md.results.TransientSolution[2000-1].Vy,\
    97         md.results.TransientSolution[2000-1].Vel,\
    98         md.results.TransientSolution[2000-1].Pressure,\
    99         md.results.TransientSolution[2000-1].Base,\
    100         md.results.TransientSolution[2000-1].Surface,\
    101         md.results.TransientSolution[2000-1].Thickness,\
    102         md.results.TransientSolution[2000-1].SmbMassBalance,\
    103         ]
     51field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     52               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     53               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     54               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4',
     55               'Vx5', 'Vy5', 'Vel5', 'Pressure5', 'Bed5', 'Surface5', 'Thickness5', 'SmbMassBalance5']
     56field_tolerances = [1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     57                    1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     58                    1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     59                    1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     60                    1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     61field_values = [md.results.TransientSolution[400 - 1].Vx,
     62                md.results.TransientSolution[400 - 1].Vy,
     63                md.results.TransientSolution[400 - 1].Vel,
     64                md.results.TransientSolution[400 - 1].Pressure,
     65                md.results.TransientSolution[400 - 1].Base,
     66                md.results.TransientSolution[400 - 1].Surface,
     67                md.results.TransientSolution[400 - 1].Thickness,
     68                md.results.TransientSolution[400 - 1].SmbMassBalance,
     69                md.results.TransientSolution[800 - 1].Vx,
     70                md.results.TransientSolution[800 - 1].Vy,
     71                md.results.TransientSolution[800 - 1].Vel,
     72                md.results.TransientSolution[800 - 1].Pressure,
     73                md.results.TransientSolution[800 - 1].Base,
     74                md.results.TransientSolution[800 - 1].Surface,
     75                md.results.TransientSolution[800 - 1].Thickness,
     76                md.results.TransientSolution[800 - 1].SmbMassBalance,
     77                md.results.TransientSolution[1200 - 1].Vx,
     78                md.results.TransientSolution[1200 - 1].Vy,
     79                md.results.TransientSolution[1200 - 1].Vel,
     80                md.results.TransientSolution[1200 - 1].Pressure,
     81                md.results.TransientSolution[1200 - 1].Base,
     82                md.results.TransientSolution[1200 - 1].Surface,
     83                md.results.TransientSolution[1200 - 1].Thickness,
     84                md.results.TransientSolution[1200 - 1].SmbMassBalance,
     85                md.results.TransientSolution[1600 - 1].Vx,
     86                md.results.TransientSolution[1600 - 1].Vy,
     87                md.results.TransientSolution[1600 - 1].Vel,
     88                md.results.TransientSolution[1600 - 1].Pressure,
     89                md.results.TransientSolution[1600 - 1].Base,
     90                md.results.TransientSolution[1600 - 1].Surface,
     91                md.results.TransientSolution[1600 - 1].Thickness,
     92                md.results.TransientSolution[1600 - 1].SmbMassBalance,
     93                md.results.TransientSolution[2000 - 1].Vx,
     94                md.results.TransientSolution[2000 - 1].Vy,
     95                md.results.TransientSolution[2000 - 1].Vel,
     96                md.results.TransientSolution[2000 - 1].Pressure,
     97                md.results.TransientSolution[2000 - 1].Base,
     98                md.results.TransientSolution[2000 - 1].Surface,
     99                md.results.TransientSolution[2000 - 1].Thickness,
     100                md.results.TransientSolution[2000 - 1].SmbMassBalance]
    104101
    105102if printingflag:
    106         pass
    107 
    108         """
    109         starttime = 360
    110         endtime = 2000
    111         res = 40
    112         ts = [starttime:res:endtime]
    113 
    114         index = md.mesh.elements
    115         x1=md.mesh.x(index(:)) x2=md.mesh.x(index(:,2)) x3=md.mesh.x(index(:,3))
    116         y1=md.mesh.y(index(:)) y2=md.mesh.y(index(:,2)) y3=md.mesh.y(index(:,3))
    117         areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)))
    118 
    119         thickness = []
    120         volume = []
    121         massbal = []
    122         velocity = []
    123         for t=starttime:endtime
    124                 thickness = [thickness (md.results.TransientSolution(t).Thickness)]
    125                 volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas]
    126                 massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)]
    127                 velocity = [velocity (md.results.TransientSolution(t).Vel)]
    128         end
    129 
    130         figure('Position', [0 0 860 932])
    131 
    132         options = plotoptions('data','transient_movie','unit','km')
    133         options = options.list{1}
    134         options = checkplotoptions(md,options)
    135 
    136         %loop over the time steps
    137         results=md.results.TransientSolution
    138         count = 1
    139         for i=ts
    140 
    141                 subplot(5,9,[28:31 37:40])
    142                 set(gca,'pos',get(gca,'pos')+[-0.08 -0.08 0.07 0.08])
    143                 field = 'Thickness'
    144 
    145                 %process data
    146                 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
    147                 [data datatype]=processdata(md,results(i).(field),options)
    148 
    149                 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
    150                 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
    151                 options=changefieldvalue(options,'title',titlestring)
    152                 options=addfielddefault(options,'colorbar',1)
    153                 options=changefieldvalue(options,'caxis',[0 max(max(thickness))])
    154                 applyoptions(md,[],options)
    155 
    156                 subplot(5,9,[33:36 42:45])
    157                 set(gca,'pos',get(gca,'pos')+[-0.00 -0.08 0.07 0.08])
    158                 field = 'Vel'
    159 
    160                 %process data
    161                 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
    162                 [data datatype]=processdata(md,results(i).(field),options)
    163 
    164                 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
    165                 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
    166                 options=changefieldvalue(options,'title',titlestring)
    167                 options=addfielddefault(options,'colorbar',1)
    168                 options=changefieldvalue(options,'caxis',[0 max(max(velocity))])
    169                 applyoptions(md,[],options)
    170 
    171                 subplot(5,4,1:4)
    172                 cla
    173                 set(gca,'pos',get(gca,'pos')+[-0.07 0.03 0.12 0.015])
    174                 plot(starttime:endtime,mean(massbal),'k','LineWidth', 4)
    175                 hold on
    176                 ya = ylim
    177                 plot([i i], ya, 'r', 'LineWidth',6)
    178                 ylim(ya) xlim([starttime endtime])
    179                 title('Surface Mass Balance','FontSize',14)
    180                 ylabel('m/year','FontSize',14)
    181 
    182                 subplot(5,4,5:8)
    183                 cla
    184                 set(gca,'pos',get(gca,'pos')+[-0.07 0.015 0.12 0.015])
    185                 plot(starttime:endtime,sum(volume)/1000/1000/1000,'LineWidth',4)
    186                 hold on
    187                 ya = ylim
    188                 plot([i i], ya, 'r', 'LineWidth',6)
    189                 ylim(ya) xlim([starttime endtime])
    190                 title('Ice Volume','FontSize',14)
    191                 ylabel('km^3','FontSize',14)
    192 
    193                 subplot(5,4,9:12)
    194                 cla
    195                 set(gca,'pos',get(gca,'pos')+[-0.07 0 0.12 0.015])
    196                 plot(starttime:endtime,mean(velocity)/1000, 'LineWidth', 4)
    197                 hold on
    198                 ya = ylim
    199                 plot([i i], ya, 'r', 'LineWidth',6)
    200                 ylim(ya) xlim([starttime endtime])
    201                 title('Mean Velocity','FontSize', 14)
    202                 ylabel('km/year','FontSize', 14)
    203                 xlabel('year','FontSize', 14)
    204 
    205                 set(gcf,'Renderer','zbuffer','color','white') %fixes a bug on Mac OS X (not needed in future Matlab version)
    206                 if i==starttime,
    207                         %initialize images and frame
    208                         frame=getframe(gcf)
    209                         [images,map]=rgb2ind(frame.cdata,256,'nodither')
    210                         images(1,1,1,length(ts))=0
    211                 else
    212                         frame=getframe(gcf)
    213                         images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither')
    214                 end
    215 
    216                 count = count+1
    217 
    218         end
    219 
    220         filename='transawtooth2d.gif'
    221         imwrite(images,map,filename,'DelayTime',1.0,'LoopCount',inf)
    222         """
    223 
     103    pass
     104
     105    """
     106    starttime = 360
     107    endtime = 2000
     108    res = 40
     109    ts = [starttime:res:endtime]
     110
     111    index = md.mesh.elements
     112    x1 = md.mesh.x(index(:)) x2 = md.mesh.x(index(:, 2)) x3 = md.mesh.x(index(:, 3))
     113    y1 = md.mesh.y(index(:)) y2 = md.mesh.y(index(:, 2)) y3 = md.mesh.y(index(:, 3))
     114    areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)))
     115
     116    thickness = []
     117    volume = []
     118    massbal = []
     119    velocity = []
     120    for t = starttime:endtime
     121            thickness = [thickness (md.results.TransientSolution(t).Thickness)]
     122            volume = [volume mean(md.results.TransientSolution(t).Thickness.value, 2).*areas]
     123            massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)]
     124            velocity = [velocity (md.results.TransientSolution(t).Vel)]
     125
     126    figure('Position', [0 0 860 932])
     127
     128    options = plotoptions('data', 'transient_movie', 'unit', 'km')
     129    options = options.list{1}
     130    options = checkplotoptions(md, options)
     131
     132    %loop over the time steps
     133    results = md.results.TransientSolution
     134    count = 1
     135    for i = ts
     136
     137        subplot(5, 9,[28:31 37:40])
     138        set(gca, 'pos', get(gca, 'pos')+[-0.08 -0.08 0.07 0.08])
     139        field = 'Thickness'
     140
     141        %process data
     142        [x y z elements is2d isplanet]=processmesh(md, results(i).(field), options)
     143        [data datatype]=processdata(md, results(i).(field), options)
     144
     145        titlestring = [field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
     146        plot_unit(x, y, z, elements, data, is2d, isplanet, datatype, options)
     147        options = changefieldvalue(options, 'title', titlestring)
     148        options = addfielddefault(options, 'colorbar', 1)
     149        options = changefieldvalue(options, 'caxis',[0 max(max(thickness))])
     150        applyoptions(md,[], options)
     151
     152        subplot(5, 9,[33:36 42:45])
     153        set(gca, 'pos', get(gca, 'pos')+[-0.00 -0.08 0.07 0.08])
     154        field = 'Vel'
     155
     156        %process data
     157        [x y z elements is2d isplanet]=processmesh(md, results(i).(field), options)
     158        [data datatype]=processdata(md, results(i).(field), options)
     159
     160        titlestring = [field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
     161        plot_unit(x, y, z, elements, data, is2d, isplanet, datatype, options)
     162        options = changefieldvalue(options, 'title', titlestring)
     163        options = addfielddefault(options, 'colorbar', 1)
     164        options = changefieldvalue(options, 'caxis',[0 max(max(velocity))])
     165        applyoptions(md,[], options)
     166
     167        subplot(5, 4, 1:4)
     168        cla
     169        set(gca, 'pos', get(gca, 'pos')+[-0.07 0.03 0.12 0.015])
     170        plot(starttime:endtime, mean(massbal), 'k', 'LineWidth', 4)
     171        hold on
     172        ya = ylim
     173        plot([i i], ya, 'r', 'LineWidth', 6)
     174        ylim(ya) xlim([starttime endtime])
     175        title('Surface Mass Balance', 'FontSize', 14)
     176        ylabel('m/year', 'FontSize', 14)
     177
     178        subplot(5, 4, 5:8)
     179        cla
     180        set(gca, 'pos', get(gca, 'pos')+[-0.07 0.015 0.12 0.015])
     181        plot(starttime:endtime, sum(volume)/1000/1000/1000, 'LineWidth', 4)
     182        hold on
     183        ya = ylim
     184        plot([i i], ya, 'r', 'LineWidth', 6)
     185        ylim(ya) xlim([starttime endtime])
     186        title('Ice Volume', 'FontSize', 14)
     187        ylabel('km^3', 'FontSize', 14)
     188
     189        subplot(5, 4, 9:12)
     190        cla
     191        set(gca, 'pos', get(gca, 'pos')+[-0.07 0 0.12 0.015])
     192        plot(starttime:endtime, mean(velocity)/1000, 'LineWidth', 4)
     193        hold on
     194        ya = ylim
     195        plot([i i], ya, 'r', 'LineWidth', 6)
     196        ylim(ya) xlim([starttime endtime])
     197        title('Mean Velocity', 'FontSize', 14)
     198        ylabel('km/year', 'FontSize', 14)
     199        xlabel('year', 'FontSize', 14)
     200
     201        set(gcf, 'Renderer', 'zbuffer', 'color', 'white') %fixes a bug on Mac OS X (not needed in future Matlab version)
     202        if i = starttime,
     203                %initialize images and frame
     204                frame = getframe(gcf)
     205                [images, map]=rgb2ind(frame.cdata, 256, 'nodither')
     206                images(1, 1, 1, length(ts))=0
     207        else
     208                frame = getframe(gcf)
     209                images(:,:, 1, count) = rgb2ind(frame.cdata, map, 'nodither')
     210        end
     211
     212        count = count+1
     213
     214        end
     215
     216        filename='transawtooth2d.gif'
     217        imwrite(images, map, filename, 'DelayTime', 1.0, 'LoopCount', inf)
     218        """
  • issm/trunk-jpl/test/NightlyRun/test1502.py

    r23707 r23793  
    11#Test Name: SquareShelfTranSawTooth3d
    22import numpy as np
    3 import sys
    43from model import *
    54from socket import gethostname
     
    1312printingflag = False
    1413
    15 md=triangle(model(),'../Exp/Square.exp',450000.)
    16 md=setmask(md,'all','')
    17 md=parameterize(md,'../Par/SquareShelf.py')
    18 md=setflowequation(md,'SSA','all')
    19 md.extrude(3,1.)
    20 md.cluster=generic('name',gethostname(),'np',2)
    21 md.transient.isthermal=False
    22 
    23 md.timestepping.time_step=1.
    24 md.settings.output_frequency=1
    25 md.timestepping.final_time=2000.
     14md = triangle(model(), '../Exp/Square.exp', 450000.)
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.extrude(3, 1.)
     19md.cluster = generic('name', gethostname(), 'np', 2)
     20md.transient.isthermal = False
     21
     22md.timestepping.time_step = 1.
     23md.settings.output_frequency = 1
     24md.timestepping.final_time = 2000.
    2625
    2726#Solve for thinning rate -> -1 * surface mass balance
    28 smb= 2.*np.ones((md.mesh.numberofvertices))
    29 md.smb.mass_balance= smb
    30 md.basalforcings.groundedice_melting_rate= smb
    31 
    32 md=solve(md,'Masstransport')
    33 
    34 for i in range(1,11):
    35          md=solve(md,'Masstransport')
    36          md.smb.mass_balance= md.smb.mass_balance - ((md.results.MasstransportSolution.Thickness)-md.geometry.thickness)
     27smb = 2. * np.ones((md.mesh.numberofvertices))
     28md.smb.mass_balance = smb
     29md.basalforcings.groundedice_melting_rate = smb
     30
     31md = solve(md, 'Masstransport')
     32
     33for i in range(1, 11):
     34    md = solve(md, 'Masstransport')
     35    md.smb.mass_balance = md.smb.mass_balance - ((md.results.MasstransportSolution.Thickness) - md.geometry.thickness)
    3736
    3837#Set up transient
    3938smb = md.smb.mass_balance
    4039
    41 #tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ]
    42 tooth=np.hstack((np.tile(smb-10.,(1,400)),np.tile(smb,(1,400))))
    43 #smb=[ [ones(399,1)*(smb')]' smb  tooth tooth]
    44 smb=np.hstack((np.tile(smb,(1,399)),smb,tooth,tooth))
     40#tooth= [ [ones(400, 1)*(smb') - 10.]' [ones(400, 1)*(smb')]' ]
     41tooth = np.hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400))))
     42#smb = [ [ones(399, 1)*(smb')]' smb  tooth tooth]
     43smb = np.hstack((np.tile(smb, (1, 399)), smb, tooth, tooth))
    4544
    4645#md.smb.mass_balance= smb
    4746#md.smb.mass_balance(end+1,:)=[1.:2000.]
    48 md.smb.mass_balance=np.vstack((smb,np.arange(1,2001)))
    49 
    50 md=solve(md,'Transient')
     47md.smb.mass_balance = np.vstack((smb, np.arange(1, 2001)))
     48
     49md = solve(md, 'Transient')
    5150
    5251#Fields and tolerances to track changes
    53 field_names=['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
    54         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
    55         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
    56         'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4', \
    57         'Vx5','Vy5','Vz5','Vel5','Pressure5','Bed5','Surface5','Thickness5','SmbMassBalance5']
    58 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    59         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    60         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    61         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    62         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    63 field_values=[\
    64         md.results.TransientSolution[400-1].Vx,\
    65         md.results.TransientSolution[400-1].Vy,\
    66         md.results.TransientSolution[400-1].Vz,\
    67         md.results.TransientSolution[400-1].Vel,\
    68         md.results.TransientSolution[400-1].Pressure,\
    69         md.results.TransientSolution[400-1].Base,\
    70         md.results.TransientSolution[400-1].Surface,\
    71         md.results.TransientSolution[400-1].Thickness,\
    72         md.results.TransientSolution[400-1].SmbMassBalance,\
    73         md.results.TransientSolution[800-1].Vx,\
    74         md.results.TransientSolution[800-1].Vy,\
    75         md.results.TransientSolution[800-1].Vz,\
    76         md.results.TransientSolution[800-1].Vel,\
    77         md.results.TransientSolution[800-1].Pressure,\
    78         md.results.TransientSolution[800-1].Base,\
    79         md.results.TransientSolution[800-1].Surface,\
    80         md.results.TransientSolution[800-1].Thickness,\
    81         md.results.TransientSolution[800-1].SmbMassBalance,\
    82         md.results.TransientSolution[1200-1].Vx,\
    83         md.results.TransientSolution[1200-1].Vy,\
    84         md.results.TransientSolution[1200-1].Vz,\
    85         md.results.TransientSolution[1200-1].Vel,\
    86         md.results.TransientSolution[1200-1].Pressure,\
    87         md.results.TransientSolution[1200-1].Base,\
    88         md.results.TransientSolution[1200-1].Surface,\
    89         md.results.TransientSolution[1200-1].Thickness,\
    90         md.results.TransientSolution[1200-1].SmbMassBalance,\
    91         md.results.TransientSolution[1600-1].Vx,\
    92         md.results.TransientSolution[1600-1].Vy,\
    93         md.results.TransientSolution[1600-1].Vz,\
    94         md.results.TransientSolution[1600-1].Vel,\
    95         md.results.TransientSolution[1600-1].Pressure,\
    96         md.results.TransientSolution[1600-1].Base,\
    97         md.results.TransientSolution[1600-1].Surface,\
    98         md.results.TransientSolution[1600-1].Thickness,\
    99         md.results.TransientSolution[1600-1].SmbMassBalance,\
    100         md.results.TransientSolution[2000-1].Vx,\
    101         md.results.TransientSolution[2000-1].Vy,\
    102         md.results.TransientSolution[2000-1].Vz,\
    103         md.results.TransientSolution[2000-1].Vel,\
    104         md.results.TransientSolution[2000-1].Pressure,\
    105         md.results.TransientSolution[2000-1].Base,\
    106         md.results.TransientSolution[2000-1].Surface,\
    107         md.results.TransientSolution[2000-1].Thickness,\
    108         md.results.TransientSolution[2000-1].SmbMassBalance,\
    109         ]
     52field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     53               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     54               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     55               'Vx4', 'Vy4', 'Vz4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4',
     56               'Vx5', 'Vy5', 'Vz5', 'Vel5', 'Pressure5', 'Bed5', 'Surface5', 'Thickness5', 'SmbMassBalance5']
     57field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     58                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     59                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     60                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     61                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     62field_values = [md.results.TransientSolution[400 - 1].Vx,
     63                md.results.TransientSolution[400 - 1].Vy,
     64                md.results.TransientSolution[400 - 1].Vz,
     65                md.results.TransientSolution[400 - 1].Vel,
     66                md.results.TransientSolution[400 - 1].Pressure,
     67                md.results.TransientSolution[400 - 1].Base,
     68                md.results.TransientSolution[400 - 1].Surface,
     69                md.results.TransientSolution[400 - 1].Thickness,
     70                md.results.TransientSolution[400 - 1].SmbMassBalance,
     71                md.results.TransientSolution[800 - 1].Vx,
     72                md.results.TransientSolution[800 - 1].Vy,
     73                md.results.TransientSolution[800 - 1].Vz,
     74                md.results.TransientSolution[800 - 1].Vel,
     75                md.results.TransientSolution[800 - 1].Pressure,
     76                md.results.TransientSolution[800 - 1].Base,
     77                md.results.TransientSolution[800 - 1].Surface,
     78                md.results.TransientSolution[800 - 1].Thickness,
     79                md.results.TransientSolution[800 - 1].SmbMassBalance,
     80                md.results.TransientSolution[1200 - 1].Vx,
     81                md.results.TransientSolution[1200 - 1].Vy,
     82                md.results.TransientSolution[1200 - 1].Vz,
     83                md.results.TransientSolution[1200 - 1].Vel,
     84                md.results.TransientSolution[1200 - 1].Pressure,
     85                md.results.TransientSolution[1200 - 1].Base,
     86                md.results.TransientSolution[1200 - 1].Surface,
     87                md.results.TransientSolution[1200 - 1].Thickness,
     88                md.results.TransientSolution[1200 - 1].SmbMassBalance,
     89                md.results.TransientSolution[1600 - 1].Vx,
     90                md.results.TransientSolution[1600 - 1].Vy,
     91                md.results.TransientSolution[1600 - 1].Vz,
     92                md.results.TransientSolution[1600 - 1].Vel,
     93                md.results.TransientSolution[1600 - 1].Pressure,
     94                md.results.TransientSolution[1600 - 1].Base,
     95                md.results.TransientSolution[1600 - 1].Surface,
     96                md.results.TransientSolution[1600 - 1].Thickness,
     97                md.results.TransientSolution[1600 - 1].SmbMassBalance,
     98                md.results.TransientSolution[2000 - 1].Vx,
     99                md.results.TransientSolution[2000 - 1].Vy,
     100                md.results.TransientSolution[2000 - 1].Vz,
     101                md.results.TransientSolution[2000 - 1].Vel,
     102                md.results.TransientSolution[2000 - 1].Pressure,
     103                md.results.TransientSolution[2000 - 1].Base,
     104                md.results.TransientSolution[2000 - 1].Surface,
     105                md.results.TransientSolution[2000 - 1].Thickness,
     106                md.results.TransientSolution[2000 - 1].SmbMassBalance]
    110107
    111108if printingflag:
    112         pass
    113         """
    114 
    115         starttime = 360
    116         endtime = 2000
    117         res = 40
    118         ts = [starttime:res:endtime]
    119 
    120         index = md.mesh.elements
    121         x1=md.mesh.x(index(:)) x2=md.mesh.x(index(:,2)) x3=md.mesh.x(index(:,3))
    122         y1=md.mesh.y(index(:)) y2=md.mesh.y(index(:,2)) y3=md.mesh.y(index(:,3))
    123         areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)))
    124 
    125         thickness = []
    126         volume = []
    127         massbal = []
    128         velocity = []
    129         for t=starttime:endtime
    130                 thickness = [thickness (md.results.TransientSolution(t).Thickness)]
    131                 volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas]
    132                 massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)]
    133                 velocity = [velocity (md.results.TransientSolution(t).Vel)]
    134         end
    135 
    136         figure('Position', [0 0 1060 1060])
    137 
    138         options = plotoptions('data','transient_movie','unit','km')
    139         options = options.list{1}
    140         options = checkplotoptions(md,options)
    141 
    142         %loop over the time steps
    143         results=md.results.TransientSolution
    144         count = 1
    145         for i=ts
    146 
    147                 subplot(5,9,[28:31 37:40])
    148                 set(gca,'pos',get(gca,'pos')+[-0.08 -0.08 0.07 0.08])
    149                 field = 'Thickness'
    150 
    151                 %process data
    152                 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
    153                 [data datatype]=processdata(md,results(i).(field),options)
    154 
    155                 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
    156                 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
    157                 options=changefieldvalue(options,'title',titlestring)
    158                 options=addfielddefault(options,'colorbar',1)
    159                 options=changefieldvalue(options,'caxis',[0 max(max(thickness))])
    160                 applyoptions(md,[],options)
    161 
    162                 subplot(5,9,[33:36 42:45])
    163                 set(gca,'pos',get(gca,'pos')+[-0.01 -0.08 0.07 0.08])
    164                 field = 'Vel'
    165 
    166                 %process data
    167                 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
    168                 [data datatype]=processdata(md,results(i).(field),options)
    169 
    170                 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
    171                 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
    172                 options=changefieldvalue(options,'title',titlestring)
    173                 options=addfielddefault(options,'colorbar',1)
    174                 options=changefieldvalue(options,'caxis',[0 max(max(velocity))])
    175                 applyoptions(md,[],options)
    176 
    177                 subplot(5,4,1:4)
    178                 cla
    179                 set(gca,'pos',get(gca,'pos')+[-0.07 0.03 0.12 0.015])
    180                 plot(starttime:endtime,mean(massbal),'k','LineWidth', 4)
    181                 hold on
    182                 ya = ylim
    183                 plot([i i], ya, 'r', 'LineWidth',6)
    184                 ylim(ya) xlim([starttime endtime])
    185                 title('Surface Mass Balance','FontSize',14)
    186                 ylabel('m/year','FontSize',14)
    187 
    188                 subplot(5,4,5:8)
    189                 cla
    190                 set(gca,'pos',get(gca,'pos')+[-0.07 0.015 0.12 0.015])
    191                 plot(starttime:endtime,sum(volume)/1000/1000/1000,'LineWidth',4)
    192                 hold on
    193                 ya = ylim
    194                 plot([i i], ya, 'r', 'LineWidth',6)
    195                 ylim(ya) xlim([starttime endtime])
    196                 title('Ice Volume','FontSize',14)
    197                 ylabel('km^3','FontSize',14)
    198 
    199                 subplot(5,4,9:12)
    200                 cla
    201                 set(gca,'pos',get(gca,'pos')+[-0.07 0 0.12 0.015])
    202                 plot(starttime:endtime,mean(velocity)/1000, 'LineWidth', 4)
    203                 hold on
    204                 ya = ylim
    205                 plot([i i], ya, 'r', 'LineWidth',6)
    206                 ylim(ya) xlim([starttime endtime])
    207                 title('Mean Velocity','FontSize', 14)
    208                 ylabel('km/year','FontSize', 14)
    209                 xlabel('year','FontSize', 14)
    210 
    211                 set(gcf,'Renderer','zbuffer','color','white') %fixes a bug on Mac OS X (not needed in future Matlab version)
    212                 if i==starttime,
    213                         %initialize images and frame
    214                         frame=getframe(gcf)
    215                         [images,map]=rgb2ind(frame.cdata,256,'nodither')
    216                         images(1,1,1,length(ts))=0
    217                 else
    218                         frame=getframe(gcf)
    219                         images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither')
    220                 end
    221 
    222                 count = count+1
    223 
    224         end
    225 
    226         filename='transawtooth3d.gif'
    227         imwrite(images,map,filename,'DelayTime',1.0,'LoopCount',inf)
    228         """
    229 
     109    pass
     110    """
     111
     112    starttime = 360
     113    endtime = 2000
     114    res = 40
     115    ts = [starttime:res:endtime]
     116
     117    index = md.mesh.elements
     118    x1 = md.mesh.x(index(:)) x2 = md.mesh.x(index(:, 2)) x3 = md.mesh.x(index(:, 3))
     119    y1 = md.mesh.y(index(:)) y2 = md.mesh.y(index(:, 2)) y3 = md.mesh.y(index(:, 3))
     120    areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)))
     121
     122    thickness = []
     123    volume = []
     124    massbal = []
     125    velocity = []
     126    for t = starttime:endtime
     127            thickness = [thickness (md.results.TransientSolution(t).Thickness)]
     128            volume = [volume mean(md.results.TransientSolution(t).Thickness.value, 2).*areas]
     129            massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)]
     130            velocity = [velocity (md.results.TransientSolution(t).Vel)]
     131    end
     132
     133    figure('Position', [0 0 1060 1060])
     134
     135    options = plotoptions('data', 'transient_movie', 'unit', 'km')
     136    options = options.list{1}
     137    options = checkplotoptions(md, options)
     138
     139    %loop over the time steps
     140    results = md.results.TransientSolution
     141    count = 1
     142    for i = ts
     143
     144        subplot(5, 9,[28:31 37:40])
     145        set(gca, 'pos', get(gca, 'pos')+[-0.08 -0.08 0.07 0.08])
     146        field = 'Thickness'
     147
     148        %process data
     149        [x y z elements is2d isplanet]=processmesh(md, results(i).(field), options)
     150        [data datatype]=processdata(md, results(i).(field), options)
     151
     152        titlestring = [field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
     153        plot_unit(x, y, z, elements, data, is2d, isplanet, datatype, options)
     154        options = changefieldvalue(options, 'title', titlestring)
     155        options = addfielddefault(options, 'colorbar', 1)
     156        options = changefieldvalue(options, 'caxis',[0 max(max(thickness))])
     157        applyoptions(md,[], options)
     158
     159        subplot(5, 9,[33:36 42:45])
     160        set(gca, 'pos', get(gca, 'pos')+[-0.01 -0.08 0.07 0.08])
     161        field = 'Vel'
     162
     163        %process data
     164        [x y z elements is2d isplanet]=processmesh(md, results(i).(field), options)
     165        [data datatype]=processdata(md, results(i).(field), options)
     166
     167        titlestring = [field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
     168        plot_unit(x, y, z, elements, data, is2d, isplanet, datatype, options)
     169        options = changefieldvalue(options, 'title', titlestring)
     170        options = addfielddefault(options, 'colorbar', 1)
     171        options = changefieldvalue(options, 'caxis',[0 max(max(velocity))])
     172        applyoptions(md,[], options)
     173
     174        subplot(5, 4, 1:4)
     175        cla
     176        set(gca, 'pos', get(gca, 'pos')+[-0.07 0.03 0.12 0.015])
     177        plot(starttime:endtime, mean(massbal), 'k', 'LineWidth', 4)
     178        hold on
     179        ya = ylim
     180        plot([i i], ya, 'r', 'LineWidth', 6)
     181        ylim(ya) xlim([starttime endtime])
     182        title('Surface Mass Balance', 'FontSize', 14)
     183        ylabel('m/year', 'FontSize', 14)
     184
     185        subplot(5, 4, 5:8)
     186        cla
     187        set(gca, 'pos', get(gca, 'pos')+[-0.07 0.015 0.12 0.015])
     188        plot(starttime:endtime, sum(volume)/1000/1000/1000, 'LineWidth', 4)
     189        hold on
     190        ya = ylim
     191        plot([i i], ya, 'r', 'LineWidth', 6)
     192        ylim(ya) xlim([starttime endtime])
     193        title('Ice Volume', 'FontSize', 14)
     194        ylabel('km^3', 'FontSize', 14)
     195
     196        subplot(5, 4, 9:12)
     197        cla
     198        set(gca, 'pos', get(gca, 'pos')+[-0.07 0 0.12 0.015])
     199        plot(starttime:endtime, mean(velocity)/1000, 'LineWidth', 4)
     200        hold on
     201        ya = ylim
     202        plot([i i], ya, 'r', 'LineWidth', 6)
     203        ylim(ya) xlim([starttime endtime])
     204        title('Mean Velocity', 'FontSize', 14)
     205        ylabel('km/year', 'FontSize', 14)
     206        xlabel('year', 'FontSize', 14)
     207
     208        set(gcf, 'Renderer', 'zbuffer', 'color', 'white') %fixes a bug on Mac OS X (not needed in future Matlab version)
     209        if i = starttime,
     210            %initialize images and frame
     211            frame = getframe(gcf)
     212            [images, map]=rgb2ind(frame.cdata, 256, 'nodither')
     213            images(1, 1, 1, length(ts))=0
     214        else
     215            frame = getframe(gcf)
     216            images(:,:, 1, count) = rgb2ind(frame.cdata, map, 'nodither')
     217        end
     218
     219        count = count+1
     220
     221    end
     222
     223    filename='transawtooth3d.gif'
     224    imwrite(images, map, filename, 'DelayTime', 1.0, 'LoopCount', inf)
     225    """
  • issm/trunk-jpl/test/NightlyRun/test1601.py

    r23707 r23793  
    1111
    1212
    13 md=triangle(model(),'../Exp/Square.exp',150000.)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md=setflowequation(md,'SSA','all')
    17 md.stressbalance.spcvx[np.where(md.mesh.y>0.)]=np.nan
    18 md.initialization.vx[:]=0.
    19 md.initialization.vy[:]=0.
    20 md.initialization.vel=np.zeros((md.mesh.numberofvertices))
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelf.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.stressbalance.spcvx[np.where(md.mesh.y > 0.)] = np.nan
     18md.initialization.vx[:] = 0.
     19md.initialization.vy[:] = 0.
     20md.initialization.vel = np.zeros((md.mesh.numberofvertices))
    2121
    22 md.cluster=generic('name',gethostname(),'np',2)
    23 md=solve(md,'Stressbalance')
    24 vel0=md.results.StressbalanceSolution.Vel
    25 theta=30.*np.pi/180.
    26 x=md.mesh.x
    27 y=md.mesh.y
    28 md.mesh.x=np.cos(theta)*x-np.sin(theta)*y
    29 md.mesh.y=np.sin(theta)*x+np.cos(theta)*y
     22md.cluster = generic('name', gethostname(), 'np', 2)
     23md = solve(md, 'Stressbalance')
     24vel0 = md.results.StressbalanceSolution.Vel
     25theta = 30. * np.pi / 180.
     26x = md.mesh.x
     27y = md.mesh.y
     28md.mesh.x = np.cos(theta) * x - np.sin(theta) * y
     29md.mesh.y = np.sin(theta) * x + np.cos(theta) * y
    3030
    31 rotation_array=np.array([np.cos(theta),np.sin(theta),0])
    32 md.stressbalance.referential[:,0:3]=(np.tile(rotation_array,(md.mesh.numberofvertices,1)))
    33 md.stressbalance.referential[:,3: ]=np.tile([0,0,1],(md.mesh.numberofvertices,1))
    34 md=solve(md,'Stressbalance')
    35 vel1=md.results.StressbalanceSolution.Vel
    36 #plotmodel(md,'data',vel0,'data',vel1,'data',vel1-vel0,'title','Cartesian CS','title','Rotated CS','title','difference')
    37 print("Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel1))/(np.max(np.abs(vel0))+sys.float_info.epsilon)))
     31rotation_array = np.array([np.cos(theta), np.sin(theta), 0])
     32md.stressbalance.referential[:, 0:3] = (np.tile(rotation_array, (md.mesh.numberofvertices, 1)))
     33md.stressbalance.referential[:, 3:] = np.tile([0, 0, 1], (md.mesh.numberofvertices, 1))
     34md = solve(md, 'Stressbalance')
     35vel1 = md.results.StressbalanceSolution.Vel
     36#plotmodel(md, 'data', vel0, 'data', vel1, 'data', vel1-vel0, 'title', 'Cartesian CS', 'title', 'Rotated CS', 'title', 'difference')
     37print("Error between Cartesian and rotated CS: {}".format(np.max(np.abs(vel0 - vel1)) / (np.max(np.abs(vel0)) + sys.float_info.epsilon)))
    3838
    3939#Now, put CS back to normal except on the side where the spc are applied
    40 pos=np.where(np.logical_or(x==0.,x==1000000.))[0]
    41 md.stressbalance.referential[:]=np.nan
    42 md.stressbalance.referential[pos,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(len(pos),1))
    43 md.stressbalance.referential[pos,3: ]=np.tile([0,0,1],(len(pos),1))
    44 md=solve(md,'Stressbalance')
    45 vel2=md.results.StressbalanceSolution.Vel
     40pos = np.where(np.logical_or(x == 0., x == 1000000.))[0]
     41md.stressbalance.referential[:] = np.nan
     42md.stressbalance.referential[pos, 0:3] = np.tile([np.cos(theta), np.sin(theta), 0], (len(pos), 1))
     43md.stressbalance.referential[pos, 3:] = np.tile([0, 0, 1], (len(pos), 1))
     44md = solve(md, 'Stressbalance')
     45vel2 = md.results.StressbalanceSolution.Vel
    4646
    47 #plotmodel(md,'data',vel0,'data',vel2,'data',vel2-vel0,'title','Cartesian CS','title','Rotated CS','title','difference')
    48 print("Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel2))/(np.max(np.abs(vel0))+sys.float_info.epsilon)))
     47#plotmodel(md, 'data', vel0, 'data', vel2, 'data', vel2-vel0, 'title', 'Cartesian CS', 'title', 'Rotated CS', 'title', 'difference')
     48print("Error between Cartesian and rotated CS: {}".format(np.max(np.abs(vel0 - vel2)) / (np.max(np.abs(vel0)) + sys.float_info.epsilon)))
    4949
    5050#Fields and tolerances to track changes
    51 field_names     =['vel1','vel2']
    52 field_tolerances=[1e-11,1e-11]
    53 field_values=[vel1,vel2]
     51field_names = ['vel1', 'vel2']
     52field_tolerances = [1e-11, 1e-11]
     53field_values = [vel1, vel2]
  • issm/trunk-jpl/test/NightlyRun/test1602.py

    r23707 r23793  
    1111
    1212
    13 md=triangle(model(),'../Exp/Square.exp',150000.)
    14 md=setmask(md,'../Exp/SquareShelf.exp','')
    15 md=parameterize(md,'../Par/SquareSheetShelf.py')
    16 md.extrude(5,1.)
    17 md=setflowequation(md,'HO','all')
    18 md.stressbalance.spcvx[np.nonzero(md.mesh.y>0.)]=np.nan
    19 md.initialization.vx[:]=0.
    20 md.initialization.vy[:]=0.
    21 md.initialization.vel=np.zeros_like(md.initialization.vx)
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, '../Exp/SquareShelf.exp', '')
     15md = parameterize(md, '../Par/SquareSheetShelf.py')
     16md.extrude(5, 1.)
     17md = setflowequation(md, 'HO', 'all')
     18md.stressbalance.spcvx[np.nonzero(md.mesh.y > 0.)] = np.nan
     19md.initialization.vx[:] = 0.
     20md.initialization.vy[:] = 0.
     21md.initialization.vel = np.zeros_like(md.initialization.vx)
    2222
    23 md.cluster=generic('name',gethostname(),'np',3)
    24 md=solve(md,'Stressbalance')
    25 vel0=md.results.StressbalanceSolution.Vel
     23md.cluster = generic('name', gethostname(), 'np', 3)
     24md = solve(md, 'Stressbalance')
     25vel0 = md.results.StressbalanceSolution.Vel
    2626
    27 theta=30.*np.pi/180.
    28 x=md.mesh.x
    29 y=md.mesh.y
    30 md.mesh.x=np.cos(theta)*x-np.sin(theta)*y
    31 md.mesh.y=np.sin(theta)*x+np.cos(theta)*y
     27theta = 30. * np.pi / 180.
     28x = md.mesh.x
     29y = md.mesh.y
     30md.mesh.x = np.cos(theta) * x - np.sin(theta) * y
     31md.mesh.y = np.sin(theta) * x + np.cos(theta) * y
    3232
    33 md.stressbalance.referential[:,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(md.mesh.numberofvertices,1))
    34 md.stressbalance.referential[:,3: ]=np.tile([0,0,1],(md.mesh.numberofvertices,1))
    35 md=solve(md,'Stressbalance')
    36 vel1=md.results.StressbalanceSolution.Vel
     33md.stressbalance.referential[:, 0:3] = np.tile([np.cos(theta), np.sin(theta), 0], (md.mesh.numberofvertices, 1))
     34md.stressbalance.referential[:, 3:] = np.tile([0, 0, 1], (md.mesh.numberofvertices, 1))
     35md = solve(md, 'Stressbalance')
     36vel1 = md.results.StressbalanceSolution.Vel
    3737
    38 #plotmodel(md,'data',vel0,'data',vel1,'data',vel1-vel0,'title','Cartesian CS','title','Rotated CS','title','difference','view#all',2)
    39 print("Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel1))/(np.max(np.abs(vel0))+sys.float_info.epsilon)))
     38#plotmodel(md, 'data', vel0, 'data', vel1, 'data', vel1-vel0, 'title', 'Cartesian CS', 'title', 'Rotated CS', 'title', 'difference', 'view#all', 2)
     39print("Error between Cartesian and rotated CS: {}".format(np.max(np.abs(vel0 - vel1)) / (np.max(np.abs(vel0)) + sys.float_info.epsilon)))
    4040
    4141#Fields and tolerances to track changes
    42 field_names     =['vel1']
    43 field_tolerances=[1e-9]
    44 field_values=[vel1]
     42field_names = ['vel1']
     43field_tolerances = [1e-9]
     44field_values = [vel1]
  • issm/trunk-jpl/test/NightlyRun/test2001.py

    r21585 r23793  
    11#Test Name: SquareSheetConstrainedGia2d
    22import numpy as np
    3 import copy
    43from model import *
    54from socket import gethostname
     
    1110
    1211
    13 #Define a model 
    14 md=model()
    15 md=triangle(md,'../Exp/Square.exp',100000.)
    16 md=setmask(md,'','')
    17 md=parameterize(md,'../Par/SquareSheetConstrained.py')
     12#Define a model
     13md = model()
     14md = triangle(md, '../Exp/Square.exp', 100000.)
     15md = setmask(md, '', '')
     16md = parameterize(md, '../Par/SquareSheetConstrained.py')
    1817
    19 #Indicate what you want to compute 
    20 md.gia.cross_section_shape=1    # for square-edged x-section
     18#Indicate what you want to compute
     19md.gia.cross_section_shape = 1    # for square-edged x-section
    2120
    2221#Define loading history (see test2001.m for the description)
    23 md.timestepping.start_time=2400000 # 2,400 kyr
    24 md.timestepping.final_time=2500000 # 2,500 kyr
    25 md.geometry.thickness=np.vstack((np.hstack((md.geometry.thickness*0.0, 0.0)),
    26                                                                                                                                  np.hstack((md.geometry.thickness/2.0, 0.1)),
    27                                                                                                                                 np.hstack((md.geometry.thickness, 0.2)),
    28                                                                                                                                 np.hstack((md.geometry.thickness, 1.0)),
    29                                                                                                                                 np.hstack((md.geometry.thickness, md.timestepping.start_time)))).T
     22md.timestepping.start_time = 2400000  # 2, 400 kyr
     23md.timestepping.final_time = 2500000  # 2, 500 kyr
     24md.geometry.thickness = np.vstack((np.hstack((md.geometry.thickness * 0.0, 0.0)),
     25                                   np.hstack((md.geometry.thickness / 2.0, 0.1)),
     26                                  np.hstack((md.geometry.thickness, 0.2)),
     27                                  np.hstack((md.geometry.thickness, 1.0)),
     28                                  np.hstack((md.geometry.thickness, md.timestepping.start_time)))).T
    3029
    31 #Solve for GIA deflection 
    32 md.cluster=generic('name',gethostname(),'np',3)
    33 md=solve(md,'Gia')
     30#Solve for GIA deflection
     31md.cluster = generic('name', gethostname(), 'np', 3)
     32md = solve(md, 'Gia')
    3433
    3534#Fields and tolerances to track changes
    36 field_names     =['GiaW','GiadWdt']
    37 field_tolerances=[1e-13,1e-13]
    38 field_values    =[md.results.GiaSolution.GiaW,
    39                                                                         md.results.GiaSolution.GiadWdt]
    40 
     35field_names = ['GiaW', 'GiadWdt']
     36field_tolerances = [1e-13, 1e-13]
     37field_values = [md.results.GiaSolution.GiaW,
     38                md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2002.py

    r23088 r23793  
    11#Test Name: EarthSlr
    22from model import *
    3 from socket import gethostname
    43import numpy as np
    54from parameterize import *
     
    1211
    1312#mesh earth:
    14 md=model()
    15 md.mesh=gmshplanet('radius',6.371012*10**3,'resolution',700.) #500 km resolution mesh
     13md = model()
     14md.mesh = gmshplanet('radius', 6.371012 * 10**3, 'resolution', 700.) #500 km resolution mesh
    1615
    1716#parameterize slr solution:
    1817#slr loading:
    19 md.slr.deltathickness=np.zeros((md.mesh.numberofelements))
    20 md.slr.sealevel=np.zeros((md.mesh.numberofvertices))
    21 md.slr.steric_rate=np.zeros((md.mesh.numberofvertices))
     18md.slr.deltathickness = np.zeros((md.mesh.numberofelements))
     19md.slr.sealevel = np.zeros((md.mesh.numberofvertices))
     20md.slr.steric_rate = np.zeros((md.mesh.numberofvertices))
    2221
    2322#antarctica
    24 late=np.sum(md.mesh.lat[md.mesh.elements-1],axis=1)/3
    25 longe=np.sum(md.mesh.long[md.mesh.elements-1],axis=1)/3
    26 pos=np.where(late <-80)
    27 md.slr.deltathickness[pos]=-100
    28 #greenland 
    29 pos=np.where(np.logical_and.reduce((late > 70,late < 80,longe>-60,longe<-30)))
    30 md.slr.deltathickness[pos]=-100
     23late = np.sum(md.mesh.lat[md.mesh.elements - 1], axis=1) / 3
     24longe = np.sum(md.mesh.long[md.mesh.elements - 1], axis=1) / 3
     25pos = np.where(late < -80)
     26md.slr.deltathickness[pos] = -100
     27#greenland
     28pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30)))
     29md.slr.deltathickness[pos] = -100
    3130
    3231#elastic loading from love numbers:
    33 nlov=101
     32nlov = 101
    3433md.slr.love_h = love_numbers('h')[:nlov]
    3534md.slr.love_k = love_numbers('k')[:nlov]
     
    3736
    3837#mask:
    39 md.mask=maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
    40 mask=gmtmask(md.mesh.lat,md.mesh.long)
     38md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
     39mask = gmtmask(md.mesh.lat, md.mesh.long)
    4140
    42 icemask=np.ones((md.mesh.numberofvertices))
    43 pos=np.where(mask==0)[0] 
    44 icemask[pos]=-1
    45 pos=np.where(np.sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)[0]
    46 icemask[md.mesh.elements[pos,:].astype(int)-1]=-1
    47 md.mask.ice_levelset=icemask
    48 md.mask.ocean_levelset=np.zeros((md.mesh.numberofvertices))
    49 pos=np.where(md.mask.ice_levelset==1)
    50 md.mask.ocean_levelset[pos]=1
     41icemask = np.ones((md.mesh.numberofvertices))
     42pos = np.where(mask == 0)[0]
     43icemask[pos] = -1
     44pos = np.where(np.sum(mask[md.mesh.elements.astype(int) - 1], axis=1) < 3)[0]
     45icemask[md.mesh.elements[pos, :].astype(int) - 1] = -1
     46md.mask.ice_levelset = icemask
     47md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices))
     48pos = np.where(md.mask.ice_levelset == 1)
     49md.mask.ocean_levelset[pos] = 1
    5150
    5251#make sure that the ice level set is all inclusive:
    53 md.mask.land_levelset=np.zeros((md.mesh.numberofvertices))
    54 md.mask.groundedice_levelset=-np.ones((md.mesh.numberofvertices))
     52md.mask.land_levelset = np.zeros((md.mesh.numberofvertices))
     53md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices))
    5554
    5655#make sure that the elements that have loads are fully grounded:
    57 pos=np.nonzero(md.slr.deltathickness)[0]
    58 md.mask.groundedice_levelset[md.mesh.elements[pos,:]-1]=1;
     56pos = np.nonzero(md.slr.deltathickness)[0]
     57md.mask.groundedice_levelset[md.mesh.elements[pos, :] - 1] = 1
    5958
    6059#make sure wherever there is an ice load, that the mask is set to ice:
    61 icemask[md.mesh.elements[pos,:]-1]=-1
    62 md.mask.ice_levelset=icemask
     60icemask[md.mesh.elements[pos, :] - 1] = -1
     61md.mask.ice_levelset = icemask
    6362
    64 md.slr.ocean_area_scaling=0
     63md.slr.ocean_area_scaling = 0
    6564
    6665#geometry
    67 di=md.materials.rho_ice/md.materials.rho_water
    68 md.geometry.thickness=np.ones((md.mesh.numberofvertices))
    69 md.geometry.surface=(1-di)*np.zeros((md.mesh.numberofvertices))
    70 md.geometry.base=md.geometry.surface-md.geometry.thickness
    71 md.geometry.bed=md.geometry.base
     66di = md.materials.rho_ice / md.materials.rho_water
     67md.geometry.thickness = np.ones((md.mesh.numberofvertices))
     68md.geometry.surface = (1 - di) * np.zeros((md.mesh.numberofvertices))
     69md.geometry.base = md.geometry.surface - md.geometry.thickness
     70md.geometry.bed = md.geometry.base
    7271
    7372#materials
    74 md.initialization.temperature=273.25*np.ones((md.mesh.numberofvertices))
    75 md.materials.rheology_B=paterson(md.initialization.temperature)
    76 md.materials.rheology_n=3*np.ones((md.mesh.numberofelements))
     73md.initialization.temperature = 273.25 * np.ones((md.mesh.numberofvertices))
     74md.materials.rheology_B = paterson(md.initialization.temperature)
     75md.materials.rheology_n = 3 * np.ones((md.mesh.numberofelements))
    7776
    7877#New stuff
    79 md.slr.spcthickness = np.nan*np.ones((md.mesh.numberofvertices,));
     78md.slr.spcthickness = np.nan * np.ones((md.mesh.numberofvertices,))
    8079md.slr.Ngia = np.zeros((md.mesh.numberofvertices,))
    8180md.slr.Ugia = np.zeros((md.mesh.numberofvertices,))
    8281
    8382#Miscellaneous
    84 md.miscellaneous.name='test2002'
     83md.miscellaneous.name = 'test2002'
    8584
    8685#Solution parameters
    87 md.slr.reltol=np.nan
    88 md.slr.abstol=1e-3
    89 md.slr.geodetic=1
     86md.slr.reltol = np.nan
     87md.slr.abstol = 1e-3
     88md.slr.geodetic = 1
    9089
    9190#max number of iteration reverted back to 10 (i.e., the original default value)
    92 md.slr.maxiter=10
     91md.slr.maxiter = 10
    9392
    94 #eustatic run: 
    95 md.slr.rigid=0
    96 md.slr.elastic=0
    97 md.slr.rotation=0
    98 md=solve(md,'Sealevelrise')
    99 Seustatic=md.results.SealevelriseSolution.Sealevel
     93#eustatic run:
     94md.slr.rigid = 0
     95md.slr.elastic = 0
     96md.slr.rotation = 0
     97md = solve(md, 'Sealevelrise')
     98Seustatic = md.results.SealevelriseSolution.Sealevel
    10099
    101 #eustatic + rigid run: 
    102 md.slr.rigid=1
    103 md.slr.elastic=0
    104 md.slr.rotation=0
    105 md=solve(md,'Sealevelrise')
    106 Srigid=md.results.SealevelriseSolution.Sealevel
     100#eustatic + rigid run:
     101md.slr.rigid = 1
     102md.slr.elastic = 0
     103md.slr.rotation = 0
     104md = solve(md, 'Sealevelrise')
     105Srigid = md.results.SealevelriseSolution.Sealevel
    107106
    108 #eustatic + rigid + elastic run: 
    109 md.slr.rigid=1
    110 md.slr.elastic=1
    111 md.slr.rotation=0
    112 md=solve(md,'Sealevelrise')
    113 Selastic=md.results.SealevelriseSolution.Sealevel
     107#eustatic + rigid + elastic run:
     108md.slr.rigid = 1
     109md.slr.elastic = 1
     110md.slr.rotation = 0
     111md = solve(md, 'Sealevelrise')
     112Selastic = md.results.SealevelriseSolution.Sealevel
    114113
    115 #eustatic + rigid + elastic + rotation run: 
    116 md.slr.rigid=1
    117 md.slr.elastic=1
    118 md.slr.rotation=1
    119 md=solve(md,'Sealevelrise')
    120 Srotation=md.results.SealevelriseSolution.Sealevel
     114#eustatic + rigid + elastic + rotation run:
     115md.slr.rigid = 1
     116md.slr.elastic = 1
     117md.slr.rotation = 1
     118md = solve(md, 'Sealevelrise')
     119Srotation = md.results.SealevelriseSolution.Sealevel
    121120
    122121#Fields and tolerances to track changes
    123 field_names     =['Eustatic','Rigid','Elastic','Rotation']
    124 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    125 field_values=[Seustatic,Srigid,Selastic,Srotation]
     122field_names = ['Eustatic', 'Rigid', 'Elastic', 'Rotation']
     123field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     124field_values = [Seustatic, Srigid, Selastic, Srotation]
  • issm/trunk-jpl/test/NightlyRun/test2003.py

    r23088 r23793  
    1212#mesh earth:
    1313md = model()
    14 md.mesh = gmshplanet('radius',6.371012*1e3,'resolution',1000.) #500 km resolution mesh
     14md.mesh = gmshplanet('radius', 6.371012 * 1e3, 'resolution', 1000.) #500 km resolution mesh
    1515
    1616#parameterize slr solution:
     
    2323#Access every element in lat using the indices in elements
    2424#-1 to convert to base 0 indexing, 1 (not 2, in matlab) to sum over rows
    25 late = sum(md.mesh.lat[md.mesh.elements - 1],1) / 3
    26 longe = sum(md.mesh.long[md.mesh.elements - 1],1) / 3
     25late = sum(md.mesh.lat[md.mesh.elements - 1], 1) / 3
     26longe = 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)))
    2828md.slr.deltathickness[pos] = -1
    2929
    30 #elastic loading from love numbers: 
     30#elastic loading from love numbers:
    3131nlov = 1000
    3232md.slr.love_h = np.array(love_numbers('h'))
     
    3939
    4040#mask:  {{{
    41 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
    42 mask = gmtmask(md.mesh.lat,md.mesh.long)
     41md.mask = maskpsl()  # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
     42mask = gmtmask(md.mesh.lat, md.mesh.long)
    4343
    4444icemask = np.ones((md.mesh.numberofvertices,))
    4545pos = np.where(mask == 0)
    46 #pos[0] because np.where(mask==0) returns a 2d array, the latter parts of which are all array/s of 0s
     46#pos[0] because np.where(mask = 0) returns a 2d array, the latter parts of which are all array/s of 0s
    4747icemask[pos[0]] = -1
    48 pos = np.where(sum(mask[md.mesh.elements - 1],1) < 3)
    49 icemask[md.mesh.elements[pos,:] - 1] = -1
     48pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3)
     49icemask[md.mesh.elements[pos, :] - 1] = -1
    5050md.mask.ice_levelset = icemask
    5151md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices,))
     
    5858
    5959#make sure that the elements that have loads are fully grounded:
    60 pos=np.nonzero(md.slr.deltathickness)[0]
    61 md.mask.groundedice_levelset[md.mesh.elements[pos,:]-1]=1;
     60pos = np.nonzero(md.slr.deltathickness)[0]
     61md.mask.groundedice_levelset[md.mesh.elements[pos, :] - 1] = 1
    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
    65 md.mask.ice_levelset=icemask
     64icemask[md.mesh.elements[pos, :] - 1] = -1
     65md.mask.ice_levelset = icemask
    6666# }}}
    6767
    68 # use model representation of ocea area (not the ture area) 
     68# use model representation of ocea area (not the ture area)
    6969md.slr.ocean_area_scaling = 0
    7070
     
    8585
    8686#New stuff
    87 md.slr.spcthickness = np.nan*np.ones((md.mesh.numberofvertices,));
     87md.slr.spcthickness = np.nan * np.ones((md.mesh.numberofvertices,))
    8888md.slr.Ngia = np.zeros((md.mesh.numberofvertices,))
    8989md.slr.Ugia = np.zeros((md.mesh.numberofvertices,))
     
    9292md.slr.reltol = float('NaN')
    9393md.slr.abstol = 1e-3
    94 md.slr.geodetic=1
     94md.slr.geodetic = 1
    9595
    96 #eustatic + rigid + elastic run: 
     96#eustatic + rigid + elastic run:
    9797md.slr.rigid = 1
    9898md.slr.elastic = 1
    9999md.slr.rotation = 0
    100 md.cluster = generic('name',gethostname(),'np',3)
     100md.cluster = generic('name', gethostname(), 'np', 3)
    101101#md.verbose = verbose('111111111')
    102102#print md.calving
     
    105105#print md.esa
    106106#print md.autodiff
    107 md = solve(md,'Sealevelrise')
     107md = solve(md, 'Sealevelrise')
    108108SnoRotation = md.results.SealevelriseSolution.Sealevel
    109109
    110 #eustatic + rigid + elastic + rotation run: 
     110#eustatic + rigid + elastic + rotation run:
    111111md.slr.rigid = 1
    112112md.slr.elastic = 1
    113113md.slr.rotation = 1
    114 md.cluster = generic('name',gethostname(),'np',3)
     114md.cluster = generic('name', gethostname(), 'np', 3)
    115115#md.verbose = verbose('111111111')
    116 md = solve(md,'Sealevelrise')
     116md = solve(md, 'Sealevelrise')
    117117SRotation = md.results.SealevelriseSolution.Sealevel
    118118
     
    121121field_tolerances = [1e-13, 1e-13]
    122122field_values = [SnoRotation, SRotation]
    123 
  • issm/trunk-jpl/test/NightlyRun/test201.py

    r21614 r23793  
    1010from ContourToMesh import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 150000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vel','Pressure']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    22 field_values=[md.results.StressbalanceSolution.Vx,
    23                                                         md.results.StressbalanceSolution.Vy,
    24                                                         md.results.StressbalanceSolution.Vel,
    25                                                         md.results.StressbalanceSolution.Pressure]
     20field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     21field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vel,
     25                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test2010.py

    r23088 r23793  
    1010from gmtmask import *
    1111
    12 #mesh earth: 
     12#mesh earth:
    1313md = model()
    14 rad_e = 6.371012*1e3 # mean radius of Earth, km
    15 md.mesh = gmshplanet('radius',rad_e,'resolution',1000.0)  # km resolution
     14rad_e = 6.371012 * 1e3 # mean radius of Earth, km
     15md.mesh = gmshplanet('radius', rad_e, 'resolution', 1000.0)  # km resolution
    1616
    1717#parameterize slr solution:
    1818#slr loading:  {{{
    19 late = sum(md.mesh.lat[md.mesh.elements - 1],1) / 3
    20 longe = sum(md.mesh.long[md.mesh.elements - 1],1) / 3
     19late = sum(md.mesh.lat[md.mesh.elements - 1], 1) / 3
     20longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 3
    2121
    2222md.slr.deltathickness = np.zeros((md.mesh.numberofelements,))
     
    2929md.slr.ocean_area_scaling = 1
    3030
    31 #elastic loading from love numbers: 
     31#elastic loading from love numbers:
    3232nlov = 1000
    3333md.slr.love_h = np.array(love_numbers('h'))
     
    4040#}}}
    4141#mask:  {{{
    42 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
    43 mask = gmtmask(md.mesh.lat,md.mesh.long)
     42md.mask = maskpsl()  # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
     43mask = gmtmask(md.mesh.lat, md.mesh.long)
    4444
    4545icemask = np.ones((md.mesh.numberofvertices,))
    4646pos = np.where(mask == 0)
    4747icemask[pos[0]] = -1
    48 pos = np.where(sum(mask[md.mesh.elements - 1],1) < 3)
    49 icemask[md.mesh.elements[pos,:] - 1] = -1
     48pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3)
     49icemask[md.mesh.elements[pos, :] - 1] = -1
    5050md.mask.ice_levelset = icemask
    5151md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices,))
     
    5858
    5959#make sure that the elements that have loads are fully grounded:
    60 pos=np.nonzero(md.slr.deltathickness)[0]
    61 md.mask.groundedice_levelset[md.mesh.elements[pos,:]-1]=1;
     60pos = np.nonzero(md.slr.deltathickness)[0]
     61md.mask.groundedice_levelset[md.mesh.elements[pos, :] - 1] = 1
    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
    65 md.mask.ice_levelset=icemask
     64icemask[md.mesh.elements[pos, :] - 1] = -1
     65md.mask.ice_levelset = icemask
    6666# }}}
    6767#geometry {{{
     
    8787
    8888#New stuff
    89 md.slr.spcthickness = np.nan*np.ones((md.mesh.numberofvertices,));
     89md.slr.spcthickness = np.nan * np.ones((md.mesh.numberofvertices,))
    9090md.slr.Ngia = np.zeros((md.mesh.numberofvertices,))
    9191md.slr.Ugia = np.zeros((md.mesh.numberofvertices,))
    9292
    93 #eustatic + rigid + elastic run: 
     93#eustatic + rigid + elastic run:
    9494md.slr.rigid = 1
    9595md.slr.elastic = 1
    9696md.slr.rotation = 1
    97 md.cluster = generic('name',gethostname(),'np',3)
     97md.cluster = generic('name', gethostname(), 'np', 3)
    9898
    99 # uncomment following 2 lines for 
    100 md = solve(md,'Sealevelrise')
     99# uncomment following 2 lines for
     100md = solve(md, 'Sealevelrise')
    101101eus = md.results.SealevelriseSolution.SealevelRSLEustatic
    102102slr = md.results.SealevelriseSolution.Sealevel
    103103moixz = md.results.SealevelriseSolution.SealevelInertiaTensorXZ
    104104moiyz = md.results.SealevelriseSolution.SealevelInertiaTensorYZ
    105 moizz = md.results.SealevelriseSolution.SealevelInertiaTensorZZ 
     105moizz = md.results.SealevelriseSolution.SealevelInertiaTensorZZ
    106106
    107107# analytical moi => just checking FOR ICE only!!! {{{
    108 # ...have to mute ** slr induced MOI in Tria.cpp ** prior to the comparison 
    109 #rad_e = rad_e*1e3 # now in meters 
    110 #areas=GetAreasSphericalTria(md.mesh.elements,md.mesh.lat,md.mesh.long,rad_e)
    111 #lat=late*pi/180 lon=longe*pi/180
     108# ...have to mute ** slr induced MOI in Tria.cpp ** prior to the comparison
     109#rad_e = rad_e*1e3 # now in meters
     110#areas = GetAreasSphericalTria(md.mesh.elements, md.mesh.lat, md.mesh.long, rad_e)
     111#lat = late*pi/180 lon = longe*pi/180
    112112#moi_xz = sum(-md.materials.rho_freshwater.*md.slr.deltathickness.*areas.*rad_e^2.*sin(lat).*cos(lat).*cos(lon))
    113113#moi_yz = sum(-md.materials.rho_freshwater.*md.slr.deltathickness.*areas.*rad_e^2.*sin(lat).*cos(lat).*sin(lon))
     
    115115
    116116#Fields and tolerances to track changes
    117 field_names     = ['eus','slr','moixz','moiyz','moizz']
    118 field_tolerances= [1e-13,1e-13,1e-13,1e-13,1e-13]
    119 field_values = [eus,slr,moixz,moiyz,moizz]
     117field_names = ['eus', 'slr', 'moixz', 'moiyz', 'moizz']
     118field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     119field_values = [eus, slr, moixz, moiyz, moizz]
  • issm/trunk-jpl/test/NightlyRun/test202.py

    r21408 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',180000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,2.)
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Stressbalance')
    2019
    2120
    2221# Fields and tolerances to track changes
    2322
    24 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    25 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    26 field_values=[\
    27         md.results.StressbalanceSolution.Vx,\
    28         md.results.StressbalanceSolution.Vy,\
    29         md.results.StressbalanceSolution.Vz,\
    30         md.results.StressbalanceSolution.Vel,\
    31         md.results.StressbalanceSolution.Pressure,\
    32         ]
     23field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     24field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     25field_values = [md.results.StressbalanceSolution.Vx,
     26                md.results.StressbalanceSolution.Vy,
     27                md.results.StressbalanceSolution.Vz,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test203.py

    r23792 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',180000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,2.)
    17 md=setflowequation(md,'HO','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Stressbalance')
    2019
    2120
    2221# Fields and tolerances to track changes
    2322
    24 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    25 field_tolerances=[2e-09,2e-09,1e-09,2e-09,1e-09]
    26 field_values=[\
    27         md.results.StressbalanceSolution.Vx,\
    28         md.results.StressbalanceSolution.Vy,\
    29         md.results.StressbalanceSolution.Vz,\
    30         md.results.StressbalanceSolution.Vel,\
    31         md.results.StressbalanceSolution.Pressure,\
    32         ]
     23field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     24field_tolerances = [2e-09, 2e-09, 1e-09, 2e-09, 1e-09]
     25field_values = [md.results.StressbalanceSolution.Vx,
     26                md.results.StressbalanceSolution.Vy,
     27                md.results.StressbalanceSolution.Vz,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test204.py

    r22658 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',180000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,2.)
    17 md=setflowequation(md,'FS','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.stressbalance.shelf_dampening=1
    20 md.timestepping.time_step=0
    21 md1=solve(md,'Stressbalance')
    22 md.stressbalance.shelf_dampening=0
    23 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'FS', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.stressbalance.shelf_dampening = 1
     19md.timestepping.time_step = 0
     20md1 = solve(md, 'Stressbalance')
     21md.stressbalance.shelf_dampening = 0
     22md = solve(md, 'Stressbalance')
    2423
    2524
    2625# Fields and tolerances to track changes
    2726
    28 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    29 field_tolerances=[1e-08,1e-08,4e-06,1e-08,1e-08]
    30 field_values=[\
    31         md.results.StressbalanceSolution.Vx,\
    32         md.results.StressbalanceSolution.Vy,\
    33         md.results.StressbalanceSolution.Vz,\
    34         md.results.StressbalanceSolution.Vel,\
    35         md.results.StressbalanceSolution.Pressure,\
    36         ]
     27field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     28field_tolerances = [1e-08, 1e-08, 4e-06, 1e-08, 1e-08]
     29field_values = [md.results.StressbalanceSolution.Vx,
     30                md.results.StressbalanceSolution.Vy,
     31                md.results.StressbalanceSolution.Vz,
     32                md.results.StressbalanceSolution.Vel,
     33                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test205.py

    r21408 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',150000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,2.)
    17 md=setflowequation(md,'HO','../Exp/SquareHalfRight.exp','fill','SSA','coupling','penalties')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 150000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', '../Exp/SquareHalfRight.exp', 'fill', 'SSA', 'coupling', 'penalties')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Stressbalance')
    2019
    2120
    2221# Fields and tolerances to track changes
    2322
    24 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    25 field_tolerances=[2e-05,2e-05,1e-05,1e-05,1e-05]
    26 field_values=[\
    27 md.results.StressbalanceSolution.Vx,\
    28 md.results.StressbalanceSolution.Vy,\
    29 md.results.StressbalanceSolution.Vz,\
    30 md.results.StressbalanceSolution.Vel,\
    31 md.results.StressbalanceSolution.Pressure,\
    32 ]
     23field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     24field_tolerances = [2e-05, 2e-05, 1e-05, 1e-05, 1e-05]
     25field_values = [md.results.StressbalanceSolution.Vx,
     26                md.results.StressbalanceSolution.Vy,
     27                md.results.StressbalanceSolution.Vz,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test2051.py

    r22134 r23793  
    88from parameterize import *
    99
    10 # Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000.)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksAB.py')
     10# Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksAB.py')
    1414
    15 # indicate what you want to compute 
    16 md.gia.cross_section_shape = 1 # for square-edged x-section
     15# indicate what you want to compute
     16md.gia.cross_section_shape = 1  # for square-edged x-section
    1717
    18 # define loading history
    19 md.timestepping.start_time = 2002100 # after 2 kyr of deglaciation
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0 ,0.0),
    23         np.append(md.geometry.thickness, 1000),
    24         np.append(md.geometry.thickness, 2000000),
    25         np.append(md.geometry.thickness * 0.0, 2000100),
    26         np.append(md.geometry.thickness * 0.0, md.timestepping.start_time)
    27         ]).T
     18# define loading history
     19md.timestepping.start_time = 2002100  # after 2 kyr of deglaciation
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness, 1000),
     23                                  np.append(md.geometry.thickness, 2000000),
     24                                  np.append(md.geometry.thickness * 0.0, 2000100),
     25                                  np.append(md.geometry.thickness * 0.0, md.timestepping.start_time)]).T
    2826
    29 # solve for GIA deflection 
    30 md.cluster=generic('name',gethostname(),'np',3)
     27# solve for GIA deflection
     28md.cluster = generic('name', gethostname(), 'np', 3)
    3129md.verbose = verbose('1111111')
    32 md = solve(md,'Gia')
     30md = solve(md, 'Gia')
    3331
    3432#Fields and tolerances to track changes
    35 field_names      = ['GiaW','GiadWdt']
    36 field_tolerances = [1e-13,1e-13]
     33field_names = ['GiaW', 'GiadWdt']
     34field_tolerances = [1e-13, 1e-13]
    3735field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2052.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksAB.py')
     10#Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksAB.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 1    # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 1  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 2005100 # after 5 kyr of deglaciation
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0 ,0.0),
    23         np.append(md.geometry.thickness, 1000),
    24         np.append(md.geometry.thickness, 2000000),
    25         np.append(md.geometry.thickness * 0.0, 2000100),
    26         np.append(md.geometry.thickness * 0.0, md.timestepping.start_time)
    27         ]).T
     18#define loading history
     19md.timestepping.start_time = 2005100  # after 5 kyr of deglaciation
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness, 1000),
     23                                  np.append(md.geometry.thickness, 2000000),
     24                                  np.append(md.geometry.thickness * 0.0, 2000100),
     25                                  np.append(md.geometry.thickness * 0.0, md.timestepping.start_time)]).T
    2826
    29 #solve for GIA deflection 
    30 md.cluster = generic('name',gethostname(),'np',3)
     27#solve for GIA deflection
     28md.cluster = generic('name', gethostname(), 'np', 3)
    3129md.verbose = verbose('1111111')
    32 md = solve(md,'Gia')
     30md = solve(md, 'Gia')
    3331
    3432#Fields and tolerances to track changes
    35 field_names      = ['GiaW','GiadWdt']
    36 field_tolerances = [1e-13,1e-13]
    37 field_values = [md.results.GiaSolution.GiaW,md.results.GiaSolution.GiadWdt]
     33field_names = ['GiaW', 'GiadWdt']
     34field_tolerances = [1e-13, 1e-13]
     35field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2053.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksAB.py')
     10#Benchmark experiments (Figure A2a Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksAB.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 1    # for square-edged x-section 
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 1    # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 2010100 # after 10 kyr of deglaciation
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0 ,0.0),
    23         np.append(md.geometry.thickness, 1000),
    24         np.append(md.geometry.thickness, 2000000),
    25         np.append(md.geometry.thickness * 0.0, 2000100),
    26         np.append(md.geometry.thickness * 0.0, md.timestepping.start_time)
    27         ]).T
     18#define loading history
     19md.timestepping.start_time = 2010100  # after 10 kyr of deglaciation
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness, 1000),
     23                                  np.append(md.geometry.thickness, 2000000),
     24                                  np.append(md.geometry.thickness * 0.0, 2000100),
     25                                  np.append(md.geometry.thickness * 0.0, md.timestepping.start_time)]).T
    2826
    29 #solve for GIA deflection 
    30 md.cluster = generic('name',gethostname(),'np',3)
     27#solve for GIA deflection
     28md.cluster = generic('name', gethostname(), 'np', 3)
    3129md.verbose = verbose('1111111')
    32 md = solve(md,'Gia')
     30md = solve(md, 'Gia')
    3331
    3432#Fields and tolerances to track changes
    35 field_names      = ['GiaW','GiadWdt']
    36 field_tolerances = [1e-13,1e-13]
    37 field_values = [md.results.GiaSolution.GiaW,md.results.GiaSolution.GiadWdt]
     33field_names = ['GiaW', 'GiadWdt']
     34field_tolerances = [1e-13, 1e-13]
     35field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test206.py

    r21408 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',180000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'SSA','all')
    18 md.timestepping.time_step=0
    19 md.cluster=generic('name',gethostname(),'np',3)
    20 md=solve(md,'Thermal')
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.timestepping.time_step = 0
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md = solve(md, 'Thermal')
    2120
    2221
    2322# Fields and tolerances to track changes
    2423
    25 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    26 field_tolerances=[1e-13,5e-6]
    27 field_values=[md.results.ThermalSolution.Temperature,
    28                                                         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
     24field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     25field_tolerances = [1e-13, 5e-6]
     26field_values = [md.results.ThermalSolution.Temperature, md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test207.py

    r21408 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',180000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.transient.isstressbalance=False
    20 md.transient.ismasstransport=False
    21 md.transient.issmb=True
    22 md.transient.isthermal=True
    23 md.transient.isgroundingline=False
    24 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.transient.isstressbalance = False
     19md.transient.ismasstransport = False
     20md.transient.issmb = True
     21md.transient.isthermal = True
     22md.transient.isgroundingline = False
     23md = solve(md, 'Transient')
    2524
    2625# Fields and tolerances to track changes
    27 field_names     =['Temperature1','BasalforcingsGroundediceMeltingRate1','Temperature2','BasalforcingsGroundediceMeltingRate2','Temperature3','BasalforcingsGroundediceMeltingRate3']
    28 field_tolerances=[1e-13,1e-6,1e-13,1e-6,1e-13,1e-6]
    29 field_values=[\
    30         md.results.TransientSolution[0].Temperature,\
    31         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    32         md.results.TransientSolution[1].Temperature,\
    33         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    34         md.results.TransientSolution[2].Temperature,\
    35         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    36         ]
     26field_names = ['Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     27field_tolerances = [1e-13, 1e-6, 1e-13, 1e-6, 1e-13, 1e-6]
     28field_values = [md.results.TransientSolution[0].Temperature,
     29                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     30                md.results.TransientSolution[1].Temperature,
     31                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     32                md.results.TransientSolution[2].Temperature,
     33                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test2071.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksCD.py')
     10#Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 1 # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 1  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 0.3 # for t \approx 0 kyr : to get eleastic response!   
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0, 0.0),
    23         np.append(md.geometry.thickness / 2.0, 0.1),
    24         np.append(md.geometry.thickness, 0.2),
    25         np.append(md.geometry.thickness, md.timestepping.start_time)
    26         ]).T
     18#define loading history
     19md.timestepping.start_time = 0.3  # for t \approx 0 kyr : to get eleastic response!
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness / 2.0, 0.1),
     23                                  np.append(md.geometry.thickness, 0.2),
     24                                  np.append(md.geometry.thickness, md.timestepping.start_time)]).T
    2725
    28 #solve for GIA deflection 
    29 md.cluster = generic('name',gethostname(),'np',3)
     26#solve for GIA deflection
     27md.cluster = generic('name', gethostname(), 'np', 3)
    3028md.verbose = verbose('1111111')
    31 md = solve(md,'Gia')
     29md = solve(md, 'Gia')
    3230
    3331#Fields and tolerances to track changes
    34 field_names      = ['GiaW','GiadWdt']
    35 field_tolerances = [1e-13,1e-13]
     32field_names = ['GiaW', 'GiadWdt']
     33field_tolerances = [1e-13, 1e-13]
    3634field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2072.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksCD.py')
     10#Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 1 # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 1  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 1000.3 # for t \approx 1 kyr   
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0, 0.0),
    23         np.append(md.geometry.thickness / 2.0, 0.1),
    24         np.append(md.geometry.thickness, 0.2),
    25         np.append(md.geometry.thickness, md.timestepping.start_time)
    26         ]).T
     18#define loading history
     19md.timestepping.start_time = 1000.3  # for t \approx 1 kyr
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness / 2.0, 0.1),
     23                                  np.append(md.geometry.thickness, 0.2),
     24                                  np.append(md.geometry.thickness, md.timestepping.start_time)]).T
    2725
    28 #solve for GIA deflection 
    29 md.cluster = generic('name',gethostname(),'np',3)
     26#solve for GIA deflection
     27md.cluster = generic('name', gethostname(), 'np', 3)
    3028md.verbose = verbose('1111111')
    31 md = solve(md,'Gia')
     29md = solve(md, 'Gia')
    3230
    3331#Fields and tolerances to track changes
    34 field_names      = ['GiaW','GiadWdt']
    35 field_tolerances = [1e-13,1e-13]
     32field_names = ['GiaW', 'GiadWdt']
     33field_tolerances = [1e-13, 1e-13]
    3634field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2073.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksCD.py')
     10#Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 1 # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 1  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 2400000 # for t \approx \infty 
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0, 0.0),
    23         np.append(md.geometry.thickness / 2.0, 0.1),
    24         np.append(md.geometry.thickness, 0.2),
    25         np.append(md.geometry.thickness, md.timestepping.start_time)
    26         ]).T
     18#define loading history
     19md.timestepping.start_time = 2400000  # for t \approx \infty
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness / 2.0, 0.1),
     23                                  np.append(md.geometry.thickness, 0.2),
     24                                  np.append(md.geometry.thickness, md.timestepping.start_time)]).T
    2725
    28 #solve for GIA deflection 
    29 md.cluster = generic('name',gethostname(),'np',3)
     26#solve for GIA deflection
     27md.cluster = generic('name', gethostname(), 'np', 3)
    3028md.verbose = verbose('1111111')
    31 md = solve(md,'Gia')
     29md = solve(md, 'Gia')
    3230
    3331#Fields and tolerances to track changes
    34 field_names      = ['GiaW','GiadWdt']
    35 field_tolerances = [1e-13,1e-13]
     32field_names = ['GiaW', 'GiadWdt']
     33field_tolerances = [1e-13, 1e-13]
    3634field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test208.py

    r21408 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',150000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.basalforcings.floatingice_melting_rate[:]=1.
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.transient.requested_outputs=['default','FloatingArea','GroundedArea','TotalFloatingBmb','TotalGroundedBmb']
    20 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 150000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.basalforcings.floatingice_melting_rate[:] = 1.
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.transient.requested_outputs = ['default', 'FloatingArea', 'GroundedArea', 'TotalFloatingBmb', 'TotalGroundedBmb']
     19md = solve(md, 'Transient')
    2120
    2221
    2322# Fields and tolerances to track changes
    2423
    25 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','TotalGroundedBmb1','TotalFloatingBmb1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','TotalGroundedBmb2','TotalFloatingBmb2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','TotalGroundedBmb3','TotalFloatingBmb3']
    26 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    27 field_values=[\
    28         md.results.TransientSolution[0].Vx,\
    29         md.results.TransientSolution[0].Vy,\
    30         md.results.TransientSolution[0].Vel,\
    31         md.results.TransientSolution[0].Pressure,\
    32         md.results.TransientSolution[0].Base,\
    33         md.results.TransientSolution[0].Surface,\
    34         md.results.TransientSolution[0].Thickness,\
    35         md.results.TransientSolution[0].TotalGroundedBmb,\
    36         md.results.TransientSolution[0].TotalFloatingBmb,\
    37         md.results.TransientSolution[1].Vx,\
    38         md.results.TransientSolution[1].Vy,\
    39         md.results.TransientSolution[1].Vel,\
    40         md.results.TransientSolution[1].Pressure,\
    41         md.results.TransientSolution[1].Base,\
    42         md.results.TransientSolution[1].Surface,\
    43         md.results.TransientSolution[1].Thickness,\
    44         md.results.TransientSolution[1].TotalGroundedBmb,\
    45         md.results.TransientSolution[1].TotalFloatingBmb,\
    46         md.results.TransientSolution[2].Vx,\
    47         md.results.TransientSolution[2].Vy,\
    48         md.results.TransientSolution[2].Vel,\
    49         md.results.TransientSolution[2].Pressure,\
    50         md.results.TransientSolution[2].Base,\
    51         md.results.TransientSolution[2].Surface,\
    52         md.results.TransientSolution[2].Thickness,\
    53         md.results.TransientSolution[2].TotalGroundedBmb,\
    54         md.results.TransientSolution[2].TotalFloatingBmb,\
    55         ]
     24field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1',
     25               'Bed1', 'Surface1', 'Thickness1', 'TotalGroundedBmb1', 'TotalFloatingBmb1',
     26               'Vx2', 'Vy2', 'Vel2', 'Pressure2',
     27               'Bed2', 'Surface2', 'Thickness2', 'TotalGroundedBmb2', 'TotalFloatingBmb2',
     28               'Vx3', 'Vy3', 'Vel3', 'Pressure3',
     29               'Bed3', 'Surface3', 'Thickness3', 'TotalGroundedBmb3', 'TotalFloatingBmb3']
     30field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     31                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     32                    1e-13, 1e-13, 1e-13, 1e-13,
     33                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     34                    1e-13, 1e-13, 1e-13, 1e-13,
     35                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     36field_values = [md.results.TransientSolution[0].Vx,
     37                md.results.TransientSolution[0].Vy,
     38                md.results.TransientSolution[0].Vel,
     39                md.results.TransientSolution[0].Pressure,
     40                md.results.TransientSolution[0].Base,
     41                md.results.TransientSolution[0].Surface,
     42                md.results.TransientSolution[0].Thickness,
     43                md.results.TransientSolution[0].TotalGroundedBmb,
     44                md.results.TransientSolution[0].TotalFloatingBmb,
     45                md.results.TransientSolution[1].Vx,
     46                md.results.TransientSolution[1].Vy,
     47                md.results.TransientSolution[1].Vel,
     48                md.results.TransientSolution[1].Pressure,
     49                md.results.TransientSolution[1].Base,
     50                md.results.TransientSolution[1].Surface,
     51                md.results.TransientSolution[1].Thickness,
     52                md.results.TransientSolution[1].TotalGroundedBmb,
     53                md.results.TransientSolution[1].TotalFloatingBmb,
     54                md.results.TransientSolution[2].Vx,
     55                md.results.TransientSolution[2].Vy,
     56                md.results.TransientSolution[2].Vel,
     57                md.results.TransientSolution[2].Pressure,
     58                md.results.TransientSolution[2].Base,
     59                md.results.TransientSolution[2].Surface,
     60                md.results.TransientSolution[2].Thickness,
     61                md.results.TransientSolution[2].TotalGroundedBmb,
     62                md.results.TransientSolution[2].TotalFloatingBmb]
  • issm/trunk-jpl/test/NightlyRun/test2081.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksCD.py')
     10#Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 2 # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 2  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 0.3 # for t \approx 0 kyr : to get eleastic response! 
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0, 0.0),
    23         np.append(md.geometry.thickness / 2.0, 0.1),
    24         np.append(md.geometry.thickness, 0.2),
    25         np.append(md.geometry.thickness, md.timestepping.start_time)
    26         ]).T
     18#define loading history
     19md.timestepping.start_time = 0.3  # for t \approx 0 kyr : to get eleastic response!
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness / 2.0, 0.1),
     23                                  np.append(md.geometry.thickness, 0.2),
     24                                  np.append(md.geometry.thickness, md.timestepping.start_time)]).T
    2725
    28 #solve for GIA deflection 
    29 md.cluster = generic('name',gethostname(),'np',3)
     26#solve for GIA deflection
     27md.cluster = generic('name', gethostname(), 'np', 3)
    3028md.verbose = verbose('1111111')
    31 md = solve(md,'Gia')
     29md = solve(md, 'Gia')
    3230
    3331#Fields and tolerances to track changes
    34 field_names      = ['GiaW','GiadWdt']
    35 field_tolerances = [1e-13,1e-13]
     32field_names = ['GiaW', 'GiadWdt']
     33field_tolerances = [1e-13, 1e-13]
    3634field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2082.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksCD.py')
     10#Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 2 # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 2  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 1000.3 # for t \approx 1 kyr 
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0, 0.0),
    23         np.append(md.geometry.thickness / 2.0, 0.1),
    24         np.append(md.geometry.thickness, 0.2),
    25         np.append(md.geometry.thickness, md.timestepping.start_time)
    26         ]).T
     18#define loading history
     19md.timestepping.start_time = 1000.3  # for t \approx 1 kyr
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness / 2.0, 0.1),
     23                                  np.append(md.geometry.thickness, 0.2),
     24                                  np.append(md.geometry.thickness, md.timestepping.start_time)]).T
    2725
    28 #solve for GIA deflection 
    29 md.cluster = generic('name',gethostname(),'np',3)
     26#solve for GIA deflection
     27md.cluster = generic('name', gethostname(), 'np', 3)
    3028md.verbose = verbose('1111111')
    31 md = solve(md,'Gia')
     29md = solve(md, 'Gia')
    3230
    3331#Fields and tolerances to track changes
    34 field_names      = ['GiaW','GiadWdt']
    35 field_tolerances = [1e-13,1e-13]
     32field_names = ['GiaW', 'GiadWdt']
     33field_tolerances = [1e-13, 1e-13]
    3634field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2083.py

    r22134 r23793  
    88from parameterize import *
    99
    10 #Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.) 
    11 md = triangle(model(),'../Exp/RoundFrontEISMINT.exp',200000)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/GiaIvinsBenchmarksCD.py')
     10#Benchmark experiments (Figure A2c Ivins and James, 1999, Geophys. J. Int.)
     11md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py')
    1414
    15 #indicate what you want to compute 
    16 md.gia.cross_section_shape = 2 # for square-edged x-section
     15#indicate what you want to compute
     16md.gia.cross_section_shape = 2  # for square-edged x-section
    1717
    18 #define loading history
    19 md.timestepping.start_time = 2400000 # for t \approx \infty 
    20 md.timestepping.final_time = 2500000 # 2,500 kyr
    21 md.geometry.thickness = np.array([
    22         np.append(md.geometry.thickness * 0.0, 0.0),
    23         np.append(md.geometry.thickness / 2.0, 0.1),
    24         np.append(md.geometry.thickness, 0.2),
    25         np.append(md.geometry.thickness, md.timestepping.start_time)
    26         ]).T
     18#define loading history
     19md.timestepping.start_time = 2400000  # for t \approx \infty
     20md.timestepping.final_time = 2500000  # 2, 500 kyr
     21md.geometry.thickness = np.array([np.append(md.geometry.thickness * 0.0, 0.0),
     22                                  np.append(md.geometry.thickness / 2.0, 0.1),
     23                                  np.append(md.geometry.thickness, 0.2),
     24                                  np.append(md.geometry.thickness, md.timestepping.start_time)]).T
    2725
    28 #solve for GIA deflection 
    29 md.cluster = generic('name',gethostname(),'np',3)
     26#solve for GIA deflection
     27md.cluster = generic('name', gethostname(), 'np', 3)
    3028md.verbose = verbose('1111111')
    31 md = solve(md,'Gia')
     29md = solve(md, 'Gia')
    3230
    3331#Fields and tolerances to track changes
    34 field_names      = ['GiaW','GiadWdt']
    35 field_tolerances = [1e-13,1e-13]
     32field_names = ['GiaW', 'GiadWdt']
     33field_tolerances = [1e-13, 1e-13]
    3634field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt]
  • issm/trunk-jpl/test/NightlyRun/test2084.py

    r23272 r23793  
    1414from materials import *
    1515
    16 md=model()
    17 md.cluster=generic('name',gethostname(),'np',1)
     16md = model()
     17md.cluster = generic('name', gethostname(), 'np', 1)
    1818
    19 md.materials=materials('litho')
    20 md.miscellaneous.name='FourierLoveTest'
    21 md.groundingline.migration='None'
     19md.materials = materials('litho')
     20md.miscellaneous.name = 'FourierLoveTest'
     21md.groundingline.migration = 'None'
    2222
    23 md.verbose=verbose('all')
    24 cst=365.25*24*3600*1000
     23md.verbose = verbose('all')
     24cst = 365.25 * 24 * 3600 * 1000
    2525
    26 md.materials.numlayers=6
    27 md.materials.radius=np.array([10,1222.5,3.4800e+03,5.7010e+03,5.9510e+03,
    28                                 6.3010e+03,6.3710e+03]).reshape(-1,1)*1e3
    29 md.materials.density=np.array([1.0750e4,1.0750e+04,4.9780e+03,3.8710e+03,
    30                                 3.4380e+03,3.0370e+03]).reshape(-1,1)
    31 md.materials.lame_mu=np.array([1e-5,0,2.2834e+00,1.0549e+00,7.0363e-01,
    32                                 5.0605e-01]).reshape(-1,1)*1e11
    33 md.materials.viscosity=np.array([0,0,2.0000e+00,1.0000e+00,1.0000e+00,
    34                                 1.0000e+25]).reshape(-1,1)*1e21
    35 md.materials.lame_lambda=np.array(md.materials.lame_mu)*0+5e14
    36 md.materials.issolid=np.array([1,0,1,1,1,1]).reshape(-1,1)
    37 md.materials.isburgers=np.zeros((md.materials.numlayers,1))
     26md.materials.numlayers = 6
     27md.materials.radius = np.array([10, 1222.5, 3.4800e+03, 5.7010e+03, 5.9510e+03,
     28                                6.3010e+03, 6.3710e+03]).reshape(-1, 1) * 1e3
     29md.materials.density = np.array([1.0750e4, 1.0750e+04, 4.9780e+03, 3.8710e+03,
     30                                3.4380e+03, 3.0370e+03]).reshape(-1, 1)
     31md.materials.lame_mu = np.array([1e-5, 0, 2.2834e+00, 1.0549e+00, 7.0363e-01,
     32                                5.0605e-01]).reshape(-1, 1) * 1e11
     33md.materials.viscosity = np.array([0, 0, 2.0000e+00, 1.0000e+00, 1.0000e+00,
     34                                   1.0000e+25]).reshape(-1, 1) * 1e21
     35md.materials.lame_lambda = np.array(md.materials.lame_mu) * 0 + 5e14
     36md.materials.issolid = np.array([1, 0, 1, 1, 1, 1]).reshape(-1, 1)
     37md.materials.isburgers = np.zeros((md.materials.numlayers, 1))
    3838
    39 md.love.allow_layer_deletion=1
    40 md.love.frequencies=(np.array([0])*2*pi).reshape(-1,1)/cst
    41 md.love.nfreq=len(md.love.frequencies)
    42 md.love.sh_nmax=256
     39md.love.allow_layer_deletion = 1
     40md.love.frequencies = (np.array([0]) * 2 * pi).reshape(-1, 1) / cst
     41md.love.nfreq = len(md.love.frequencies)
     42md.love.sh_nmax = 256
    4343
    44 md.materials.burgers_mu=md.materials.lame_mu
    45 md.materials.burgers_viscosity=md.materials.viscosity
     44md.materials.burgers_mu = md.materials.lame_mu
     45md.materials.burgers_viscosity = md.materials.viscosity
    4646
    47 md=solve(md,'lv')
     47md = solve(md, 'lv')
    4848
    4949#Fields and tolerances to track changes
    5050#loading love numbers
    51 field_names=['LoveH_loading_elastic','LoveK_loading_elastic','LoveL_loading_elastic']
    52 field_tolerances=[4.3e-9,4.3e-9,4.3e-9]
    53 field_values=[
    54 np.array(md.results.LoveSolution.LoveHr)[:,0],
    55 np.array(md.results.LoveSolution.LoveKr)[:,0],
    56 np.array(md.results.LoveSolution.LoveLr)[:,0]
    57 ]
     51field_names = ['LoveH_loading_elastic', 'LoveK_loading_elastic', 'LoveL_loading_elastic']
     52field_tolerances = [4.3e-9, 4.3e-9, 4.3e-9]
     53field_values = [np.array(md.results.LoveSolution.LoveHr)[:, 0],
     54                np.array(md.results.LoveSolution.LoveKr)[:, 0],
     55                np.array(md.results.LoveSolution.LoveLr)[:, 0]]
    5856
    59 md.love.frequencies=(np.array([1e-3,1e-2,1e-1,1,-1e-3,-1e-2,-1e-1,
    60                                 -1])*2*pi).reshape(-1,1)/cst
    61 md.love.nfreq=len(md.love.frequencies)
    62 md.love.sh_nmax=256
    63 md.materials.burgers_mu=md.materials.lame_mu
    64 md.materials.burgers_viscosity=md.materials.viscosity
     57md.love.frequencies = (np.array([1e-3, 1e-2, 1e-1, 1, -1e-3, -1e-2, -1e-1,
     58                                -1]) * 2 * pi).reshape(-1, 1) / cst
     59md.love.nfreq = len(md.love.frequencies)
     60md.love.sh_nmax = 256
     61md.materials.burgers_mu = md.materials.lame_mu
     62md.materials.burgers_viscosity = md.materials.viscosity
    6563
    66 md=solve(md,'lv')
     64md = solve(md, 'lv')
    6765
    6866#Fields and tolerances to track changes
    6967#loading love numbers
    70 field_names+=['LoveH_loading_realpart','LoveK_loading_realpart','LoveL_loading_realpart','LoveH_loading_imagpart','LoveK_loading_imagpart','LoveL_loading_imagpart']
    71 field_tolerances+=[5e-7,5e-7,5e-7,5e-7,5e-7,5e-7]
    72 field_values+=[
    73 np.array(md.results.LoveSolution.LoveHr),
    74 np.array(md.results.LoveSolution.LoveKr),
    75 np.array(md.results.LoveSolution.LoveLr),
    76 np.array(md.results.LoveSolution.LoveHi),
    77 np.array(md.results.LoveSolution.LoveKi),
    78 np.array(md.results.LoveSolution.LoveLi)
    79 ]
     68field_names += ['LoveH_loading_realpart', 'LoveK_loading_realpart', 'LoveL_loading_realpart', 'LoveH_loading_imagpart', 'LoveK_loading_imagpart', 'LoveL_loading_imagpart']
     69field_tolerances += [5e-7, 5e-7, 5e-7, 5e-7, 5e-7, 5e-7]
     70field_values += [np.array(md.results.LoveSolution.LoveHr),
     71                 np.array(md.results.LoveSolution.LoveKr),
     72                 np.array(md.results.LoveSolution.LoveLr),
     73                 np.array(md.results.LoveSolution.LoveHi),
     74                 np.array(md.results.LoveSolution.LoveKi),
     75                 np.array(md.results.LoveSolution.LoveLi)]
    8076
    81 md.love.forcing_type=9
    82 md.love.sh_nmin=2
    83 md.love.frequencies=((np.array([0,1e-3,1e-2,1e-1,1,-1e-3,
    84                                 -1e-2,-1e-1,-1])*2*pi).reshape(-1,1)/cst)
    85 md.love.nfreq=len(md.love.frequencies)
     77md.love.forcing_type = 9
     78md.love.sh_nmin = 2
     79md.love.frequencies = ((np.array([0, 1e-3, 1e-2, 1e-1, 1, -1e-3,
     80                                  -1e-2, -1e-1, -1]) * 2 * pi).reshape(-1, 1) / cst)
     81md.love.nfreq = len(md.love.frequencies)
    8682
    87 md=solve(md,'lv')
     83md = solve(md, 'lv')
    8884
    8985#tidal love numbers, check
    90 field_names+=['LoveH_tidal_elastic','LoveK_tidal_elastic','LoveL_tidal_elastic','LoveH_tidal_realpart','LoveK_tidal_realpart','LoveL_tidal_realpart','LoveH_tidal_imagpart','LoveK_tidal_imagpart','LoveL_tidal_imagpart']
    91 field_tolerances+=[8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6]
    92 field_values+=[
    93 np.array(md.results.LoveSolution.LoveHr)[:,0],
    94 np.array(md.results.LoveSolution.LoveKr)[:,0],
    95 np.array(md.results.LoveSolution.LoveLr)[:,0],
    96 np.array(md.results.LoveSolution.LoveHr)[:,1:],
    97 np.array(md.results.LoveSolution.LoveKr)[:,1:],
    98 np.array(md.results.LoveSolution.LoveLr)[:,1:],
    99 np.array(md.results.LoveSolution.LoveHi)[:,1:],
    100 np.array(md.results.LoveSolution.LoveKi)[:,1:],
    101 np.array(md.results.LoveSolution.LoveLi)[:,1:]
    102 ]
     86field_names += ['LoveH_tidal_elastic', 'LoveK_tidal_elastic', 'LoveL_tidal_elastic', 'LoveH_tidal_realpart', 'LoveK_tidal_realpart', 'LoveL_tidal_realpart', 'LoveH_tidal_imagpart', 'LoveK_tidal_imagpart', 'LoveL_tidal_imagpart']
     87field_tolerances += [8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6]
     88field_values += [np.array(md.results.LoveSolution.LoveHr)[:, 0],
     89                 np.array(md.results.LoveSolution.LoveKr)[:, 0],
     90                 np.array(md.results.LoveSolution.LoveLr)[:, 0],
     91                 np.array(md.results.LoveSolution.LoveHr)[:, 1:],
     92                 np.array(md.results.LoveSolution.LoveKr)[:, 1:],
     93                 np.array(md.results.LoveSolution.LoveLr)[:, 1:],
     94                 np.array(md.results.LoveSolution.LoveHi)[:, 1:],
     95                 np.array(md.results.LoveSolution.LoveKi)[:, 1:],
     96                 np.array(md.results.LoveSolution.LoveLi)[:, 1:]]
    10397
    10498#Many layers PREM-based model
    105 #data=load('../Data/PREM_500layers')
    106 #md.love.sh_nmin=1
    107 #md.materials.radius=data(2:end-2,1)
    108 #md.materials.density=data(3:end-2,2)
    109 #md.materials.lame_lambda=data(3:end-2,3)
    110 #md.materials.lame_mu=data(3:end-2,4)
    111 #md.materials.issolid=data(3:end-2,4)>0
    112 #ind=find(md.materials.issolid==0)
     99#data = load('../Data/PREM_500layers')
     100#md.love.sh_nmin = 1
     101#md.materials.radius = data(2:end-2, 1)
     102#md.materials.density = data(3:end-2, 2)
     103#md.materials.lame_lambda = data(3:end-2, 3)
     104#md.materials.lame_mu = data(3:end-2, 4)
     105#md.materials.issolid = data(3:end-2, 4)>0
     106#ind = find(md.materials.issolid = 0)
    113107#md.materials.density(ind(1))=sum((md.materials.radius(ind+1).^3-md.materials.radius(ind).^3).*md.materials.density(ind))/(md.materials.radius(ind(end)+1).^3-md.materials.radius(ind(1)+1).^3)
    114108#md.materials.lame_lambda(ind(1))=sum((md.materials.radius(ind+1).^3-md.materials.radius(ind).^3).*md.materials.lame_lambda(ind))/(md.materials.radius(ind(end)+1).^3-md.materials.radius(ind(1)+1).^3)
     
    119113#md.materials.lame_mu(ind(2:end))=[]
    120114#md.materials.issolid(ind(2:end))=[]
    121 #md.materials.viscosity=10.^interp1([0 3479e3 3480e3 3680e3 5720e3 5800e3 6270e3 6371e3], log10([1e8 1e8 5e21 1e23 1e22 1e20 1e21 1e40]), md.materials.radius(2:end),'PCHIP')
    122 #md.materials.viscosity=md.materials.viscosity.*md.materials.issolid
    123 #md.materials.burgers_mu=md.materials.lame_mu
    124 #md.materials.burgers_viscosity=md.materials.viscosity
    125 #md.materials.isburgers=md.materials.issolid*0
    126 #md.love.forcing_type=11
    127 #md.materials.numlayers=len(md.materials.viscosity)
    128 #md=solve(md,'lv')
     115#md.materials.viscosity = 10.^interp1([0 3479e3 3480e3 3680e3 5720e3 5800e3 6270e3 6371e3], log10([1e8 1e8 5e21 1e23 1e22 1e20 1e21 1e40]), md.materials.radius(2:end), 'PCHIP')
     116#md.materials.viscosity = md.materials.viscosity.*md.materials.issolid
     117#md.materials.burgers_mu = md.materials.lame_mu
     118#md.materials.burgers_viscosity = md.materials.viscosity
     119#md.materials.isburgers = md.materials.issolid*0
     120#md.love.forcing_type = 11
     121#md.materials.numlayers = len(md.materials.viscosity)
     122#md = solve(md, 'lv')
    129123#
    130 #field_names=[field_names,'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart']
    131 #field_tolerances=[field_tolerances,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9]
    132 #field_values=[field_values,\
    133 #       (md.results.LoveSolution.LoveHr[:][0]),\
    134 #       (md.results.LoveSolution.LoveKr[:][0]),\
    135 #       (md.results.LoveSolution.LoveLr[:][0]),\
    136 #       (md.results.LoveSolution.LoveHr[:][1:]),\
    137 #       (md.results.LoveSolution.LoveKr[:][1:]),\
    138 #       (md.results.LoveSolution.LoveLr[:][1:]),\
    139 #       (md.results.LoveSolution.LoveHi[:][1:]),\
    140 #       (md.results.LoveSolution.LoveKi[:][1:]),\
    141 #       (md.results.LoveSolution.LoveLi[:][1:]),\
    142 #       ]
     124#field_names = [field_names, 'LoveH_loadingVSS96_elastic', 'LoveK_loadingVSS96_elastic', 'LoveL_loadingVSS96_elastic', 'LoveH_loadingVSS96_realpart', 'LoveK_loadingVSS96_realpart', 'LoveL_loadingVSS96_realpart', 'LoveH_loadingVSS96_imagpart', 'LoveK_loadingVSS96_imagpart', 'LoveL_loadingVSS96_imagpart']
     125#field_tolerances = [field_tolerances, 4.3e-9, 4.3e-9, 4.3e-9, 4.3e-9, 4.3e-9, 4.3e-9, 4.3e-9, 4.3e-9, 4.3e-9]
     126#field_values = [field_values,
     127#       (md.results.LoveSolution.LoveHr[:][0]),
     128#       (md.results.LoveSolution.LoveKr[:][0]),
     129#       (md.results.LoveSolution.LoveLr[:][0]),
     130#       (md.results.LoveSolution.LoveHr[:][1:]),
     131#       (md.results.LoveSolution.LoveKr[:][1:]),
     132#       (md.results.LoveSolution.LoveLr[:][1:]),
     133#       (md.results.LoveSolution.LoveHi[:][1:]),
     134#       (md.results.LoveSolution.LoveKi[:][1:]),
     135#       (md.results.LoveSolution.LoveLi[:][1:]),
     136#       ]
    143137#Model VSS96 from Vermeersen, L.L.A., Sabadini, R. & Spada, G., 1996a. Analytical visco-elastic relaxation models, Geophys. Res. Lett., 23, 697-700.
    144138
    145 md.materials.radius=np.array([10,1222.5,3480.,3600.,3630.5,3700.,3900.,4000.,
    146                                 4200.,4300.,4500.,4600.,4800.,4900.,5100.,5200.,
    147                                 5400.,5500.,5600.5,5650.,5701.,5736.,5771.5,
    148                                 5821.,5951.,5970.5,6016.,6061.,6150.5,6151.5,
    149                                 6251.,6371.]).reshape(-1,1)*1e3
    150 md.materials.lame_mu=np.array([1e-5,0.,2.933,2.8990002,2.8550003,2.7340002,2.675,
    151                                 2.559,2.502,2.388,2.331,2.215,2.157,2.039,1.979,
    152                                 1.8560001,1.794,1.73,1.639,1.2390001,1.224,1.21,
    153                                 1.128,0.97700006,0.906,0.79,0.773,0.741,0.656,0.665,
    154                                 0.602]).reshape(-1,1)*1e11
    155 md.materials.density=np.array([10925.,10925.,5506.42,5491.45,5456.57,5357.06,
    156                                 5307.24,5207.13,5156.69,5054.69,5002.99,4897.83,
    157                                 4844.22,4734.6,4678.44,4563.07,4503.72,4443.16,
    158                                 4412.41,3992.14,3983.99,3975.84,3912.82,3786.78,
    159                                 3723.78,3516.39,3489.51,3435.78,3359.5,3367.1,
    160                                 3184.3]).reshape(-1,1)
    161 md.materials.viscosity=np.array([0.,0.,7.999999999999999E+21,8.5E+21,
    162                                 8.999999999999999E+21,3.E+22,4.E+22,
    163                                 5.0000000000000004E+22,6.E+22,
    164                                 5.0000000000000004E+22,4.5E+22,3.E+22,
    165                                 2.5000000000000002E+22,1.7999999999999998E+22,
    166                                 1.3E+22,7.999999999999999E+21,6.999999999999999E+21,
    167                                 6.5E+21,6.E+21,5.5E+21,5.E+21,4.4999999999999995E+21,
    168                                 3.9999999999999995E+21,2.5E+21,
    169                                 1.9999999999999997E+21,1.5E+21,9.999999999999999E+20,
    170                                 6.E+20,5.5000000000000007E+20,2.E+20,
    171                                 1.E40]).reshape(-1,1)
    172 md.materials.lame_lambda=np.array(md.materials.lame_mu)*0+5e14
    173 md.materials.issolid=np.ones(len(md.materials.lame_mu)).reshape(-1,1)
    174 md.materials.issolid[1]=0
    175 md.materials.numlayers=len(md.materials.lame_mu)
    176 md.materials.burgers_mu=md.materials.lame_mu
    177 md.materials.burgers_viscosity=md.materials.viscosity
    178 md.materials.isburgers=md.materials.issolid*0
    179 md.love.forcing_type=11
    180 md.love.sh_nmin=1
    181 md.love.sh_nmax=100
     139md.materials.radius = np.array([10, 1222.5, 3480., 3600., 3630.5, 3700., 3900., 4000.,
     140                                4200., 4300., 4500., 4600., 4800., 4900., 5100., 5200.,
     141                                5400., 5500., 5600.5, 5650., 5701., 5736., 5771.5,
     142                                5821., 5951., 5970.5, 6016., 6061., 6150.5, 6151.5,
     143                                6251., 6371.]).reshape(-1, 1) * 1e3
     144md.materials.lame_mu = np.array([1e-5, 0., 2.933, 2.8990002, 2.8550003, 2.7340002, 2.675,
     145                                2.559, 2.502, 2.388, 2.331, 2.215, 2.157, 2.039, 1.979,
     146                                1.8560001, 1.794, 1.73, 1.639, 1.2390001, 1.224, 1.21,
     147                                1.128, 0.97700006, 0.906, 0.79, 0.773, 0.741, 0.656, 0.665,
     148                                0.602]).reshape(-1, 1) * 1e11
     149md.materials.density = np.array([10925., 10925., 5506.42, 5491.45, 5456.57, 5357.06,
     150                                5307.24, 5207.13, 5156.69, 5054.69, 5002.99, 4897.83,
     151                                4844.22, 4734.6, 4678.44, 4563.07, 4503.72, 4443.16,
     152                                4412.41, 3992.14, 3983.99, 3975.84, 3912.82, 3786.78,
     153                                3723.78, 3516.39, 3489.51, 3435.78, 3359.5, 3367.1,
     154                                3184.3]).reshape(-1, 1)
     155md.materials.viscosity = np.array([0., 0., 7.999999999999999E+21, 8.5E+21,
     156                                   8.999999999999999E+21, 3.E+22, 4.E+22,
     157                                   5.0000000000000004E+22, 6.E+22,
     158                                   5.0000000000000004E+22, 4.5E+22, 3.E+22,
     159                                   2.5000000000000002E+22, 1.7999999999999998E+22,
     160                                   1.3E+22, 7.999999999999999E+21, 6.999999999999999E+21,
     161                                   6.5E+21, 6.E+21, 5.5E+21, 5.E+21, 4.4999999999999995E+21,
     162                                   3.9999999999999995E+21, 2.5E+21,
     163                                   1.9999999999999997E+21, 1.5E+21, 9.999999999999999E+20,
     164                                   6.E+20, 5.5000000000000007E+20, 2.E+20,
     165                                   1.E40]).reshape(-1, 1)
     166md.materials.lame_lambda = np.array(md.materials.lame_mu) * 0 + 5e14
     167md.materials.issolid = np.ones(len(md.materials.lame_mu)).reshape(-1, 1)
     168md.materials.issolid[1] = 0
     169md.materials.numlayers = len(md.materials.lame_mu)
     170md.materials.burgers_mu = md.materials.lame_mu
     171md.materials.burgers_viscosity = md.materials.viscosity
     172md.materials.isburgers = md.materials.issolid * 0
     173md.love.forcing_type = 11
     174md.love.sh_nmin = 1
     175md.love.sh_nmax = 100
    182176
    183 md=solve(md,'lv')
     177md = solve(md, 'lv')
    184178
    185 md.love.frequencies=(np.array([0,1e-3,1e-2,1,-1e-3,-1e-2,
    186                                 -1])*2*pi).reshape(-1,1)/cst
    187 md.love.nfreq=len(md.love.frequencies)
     179md.love.frequencies = (np.array([0, 1e-3, 1e-2, 1, -1e-3, -1e-2,
     180                                 -1]) * 2 * pi).reshape(-1, 1) / cst
     181md.love.nfreq = len(md.love.frequencies)
    188182
    189 field_names+=['LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart']
    190 field_tolerances+=[2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6]
    191 field_values+=[
    192 np.array(md.results.LoveSolution.LoveHr)[:,0],
    193 np.array(md.results.LoveSolution.LoveKr)[:,0],
    194 np.array(md.results.LoveSolution.LoveLr)[:,0],
    195 np.array(md.results.LoveSolution.LoveHr)[:,1:],
    196 np.array(md.results.LoveSolution.LoveKr)[:,1:],
    197 np.array(md.results.LoveSolution.LoveLr)[:,1:],
    198 np.array(md.results.LoveSolution.LoveHi)[:,1:],
    199 np.array(md.results.LoveSolution.LoveKi)[:,1:],
    200 np.array(md.results.LoveSolution.LoveLi)[:,1:]
    201 ]
     183field_names += ['LoveH_loadingVSS96_elastic', 'LoveK_loadingVSS96_elastic', 'LoveL_loadingVSS96_elastic', 'LoveH_loadingVSS96_realpart', 'LoveK_loadingVSS96_realpart', 'LoveL_loadingVSS96_realpart', 'LoveH_loadingVSS96_imagpart', 'LoveK_loadingVSS96_imagpart', 'LoveL_loadingVSS96_imagpart']
     184field_tolerances += [2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6]
     185field_values += [np.array(md.results.LoveSolution.LoveHr)[:, 0],
     186                 np.array(md.results.LoveSolution.LoveKr)[:, 0],
     187                 np.array(md.results.LoveSolution.LoveLr)[:, 0],
     188                 np.array(md.results.LoveSolution.LoveHr)[:, 1:],
     189                 np.array(md.results.LoveSolution.LoveKr)[:, 1:],
     190                 np.array(md.results.LoveSolution.LoveLr)[:, 1:],
     191                 np.array(md.results.LoveSolution.LoveHi)[:, 1:],
     192                 np.array(md.results.LoveSolution.LoveKi)[:, 1:],
     193                 np.array(md.results.LoveSolution.LoveLi)[:, 1:]]
  • issm/trunk-jpl/test/NightlyRun/test2085.py

    r23786 r23793  
    11#Test Name: LovenumberstAtDepth.
    2 #Same as test #1 of test2084.m 
     2#Same as test #1 of test2084.m
    33
    44from model import *
     
    1010
    1111md = model()
    12 md.cluster = generic('name',gethostname(),'np',1)
     12md.cluster = generic('name', gethostname(), 'np', 1)
    1313
    1414md.materials = materials('litho')
    1515md.miscellaneous.name = 'FourierLoveTest'
    16 md.groundingline.migration='None'
     16md.groundingline.migration = 'None'
    1717
    1818md.verbose = verbose('111111101')
    19 cst = 365.25*24*3600*1000
     19cst = 365.25 * 24 * 3600 * 1000
    2020
    2121md.materials.numlayers = 6
    22 md.materials.radius = np.array([10,1222.5,3.4800e+03,5.7010e+03,5.9510e+03,6.3010e+03,6.3710e+03]).reshape(-1,1)*1e3
    23 md.materials.density = np.array([1.0750e4,1.0750e+04,4.9780e+03,3.8710e+03,3.4380e+03,3.0370e+03]).reshape(-1,1)
    24 md.materials.lame_mu = np.array([1e-5,0,2.2834e+00,1.0549e+00,7.0363e-01,5.0605e-01]).reshape(-1,1)*1e11
    25 md.materials.viscosity = np.array([0,0,2.0000e+00,1.0000e+00,1.0000e+00,1.0000e+25]).reshape(-1,1)*1e21
    26 md.materials.lame_lambda = np.array(md.materials.lame_mu)*0+5e14
    27 md.materials.issolid = np.array([1,0,1,1,1,1]).reshape(-1,1)
    28 md.materials.isburgers = np.zeros((md.materials.numlayers)).reshape(-1,1)
     22md.materials.radius = np.array([10, 1222.5, 3.4800e+03, 5.7010e+03, 5.9510e+03, 6.3010e+03, 6.3710e+03]).reshape(-1, 1) * 1e3
     23md.materials.density = np.array([1.0750e4, 1.0750e+04, 4.9780e+03, 3.8710e+03, 3.4380e+03, 3.0370e+03]).reshape(-1, 1)
     24md.materials.lame_mu = np.array([1e-5, 0, 2.2834e+00, 1.0549e+00, 7.0363e-01, 5.0605e-01]).reshape(-1, 1) * 1e11
     25md.materials.viscosity = np.array([0, 0, 2.0000e+00, 1.0000e+00, 1.0000e+00, 1.0000e+25]).reshape(-1, 1) * 1e21
     26md.materials.lame_lambda = np.array(md.materials.lame_mu) * 0 + 5e14
     27md.materials.issolid = np.array([1, 0, 1, 1, 1, 1]).reshape(-1, 1)
     28md.materials.isburgers = np.zeros((md.materials.numlayers)).reshape(-1, 1)
    2929
    30 md.love.love_kernels = 1 
     30md.love.love_kernels = 1
    3131md.love.allow_layer_deletion = 1
    32 md.love.frequencies = (np.array([0])*2*pi).reshape(-1,1) / cst
     32md.love.frequencies = (np.array([0]) * 2 * pi).reshape(-1, 1) / cst
    3333md.love.nfreq = len(md.love.frequencies)
    3434md.love.sh_nmax = 2
     
    3737md.materials.burgers_viscosity = md.materials.viscosity
    3838
    39 md = solve(md,'lv')
     39md = solve(md, 'lv')
    4040
    4141#Fields and tolerances to track changes
    4242#loading love numbers
    43 field_names =  ['LoveH_loading_elastic','LoveK_loading_elastic','LoveL_loading_elastic','LoveKernels_degree1','LoveKernels_degree2']
    44 field_tolerances = [1e-10,1e-10,1e-10,1e-10,1e-10]
    45 field_values = [
    46         md.results.LoveSolution.LoveHr[:,0],
    47         md.results.LoveSolution.LoveKr[:,0],
    48         md.results.LoveSolution.LoveLr[:,0],
    49         md.results.LoveSolution.LoveKernelsReal[1,0,:,:],
    50         md.results.LoveSolution.LoveKernelsReal[2,0,:,:]]
     43field_names = ['LoveH_loading_elastic', 'LoveK_loading_elastic', 'LoveL_loading_elastic', 'LoveKernels_degree1', 'LoveKernels_degree2']
     44field_tolerances = [1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     45field_values = [md.results.LoveSolution.LoveHr[:, 0],
     46                md.results.LoveSolution.LoveKr[:, 0],
     47                md.results.LoveSolution.LoveLr[:, 0],
     48                md.results.LoveSolution.LoveKernelsReal[1, 0, :, :],
     49                md.results.LoveSolution.LoveKernelsReal[2, 0, :, :]]
  • issm/trunk-jpl/test/NightlyRun/test209.py

    r23619 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',180000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 180000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Transient')
    2019
    2120
    2221# Fields and tolerances to track changes
    2322
    24 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    25         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', \
    26         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    27 field_tolerances=[\
    28         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,\
    29         1e-13,1e-13,3e-9,1e-13,3.8e-11,3.85e-11,3.85e-11,3.85e-11,1e-13,3e-8,\
    30         5e-11,6e-12,1e-08,6e-12,3.9e-11,1e-10,1e-10,1e-10,9e-12,5e-8]
     23field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     24               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     25               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     26field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-8,
     27                    1e-13, 1e-13, 3e-9, 1e-13, 3.8e-11, 3.85e-11, 3.85e-11, 3.85e-11, 1e-13, 3e-8,
     28                    5e-11, 6e-12, 1e-08, 6e-12, 3.9e-11, 1e-10, 1e-10, 1e-10, 9e-12, 5e-8]
    3129
    32 field_values=[\
    33         md.results.TransientSolution[0].Vx,\
    34         md.results.TransientSolution[0].Vy,\
    35         md.results.TransientSolution[0].Vz,\
    36         md.results.TransientSolution[0].Vel,\
    37         md.results.TransientSolution[0].Pressure,\
    38         md.results.TransientSolution[0].Base,\
    39         md.results.TransientSolution[0].Surface,\
    40         md.results.TransientSolution[0].Thickness,\
    41         md.results.TransientSolution[0].Temperature,\
    42         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    43         md.results.TransientSolution[1].Vx,\
    44         md.results.TransientSolution[1].Vy,\
    45         md.results.TransientSolution[1].Vz,\
    46         md.results.TransientSolution[1].Vel,\
    47         md.results.TransientSolution[1].Pressure,\
    48         md.results.TransientSolution[1].Base,\
    49         md.results.TransientSolution[1].Surface,\
    50         md.results.TransientSolution[1].Thickness,\
    51         md.results.TransientSolution[1].Temperature,\
    52         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    53         md.results.TransientSolution[2].Vx,\
    54         md.results.TransientSolution[2].Vy,\
    55         md.results.TransientSolution[2].Vz,\
    56         md.results.TransientSolution[2].Vel,\
    57         md.results.TransientSolution[2].Pressure,\
    58         md.results.TransientSolution[2].Base,\
    59         md.results.TransientSolution[2].Surface,\
    60         md.results.TransientSolution[2].Thickness,\
    61         md.results.TransientSolution[2].Temperature,\
    62         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    63         ]
     30field_values = [md.results.TransientSolution[0].Vx,
     31                md.results.TransientSolution[0].Vy,
     32                md.results.TransientSolution[0].Vz,
     33                md.results.TransientSolution[0].Vel,
     34                md.results.TransientSolution[0].Pressure,
     35                md.results.TransientSolution[0].Base,
     36                md.results.TransientSolution[0].Surface,
     37                md.results.TransientSolution[0].Thickness,
     38                md.results.TransientSolution[0].Temperature,
     39                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     40                md.results.TransientSolution[1].Vx,
     41                md.results.TransientSolution[1].Vy,
     42                md.results.TransientSolution[1].Vz,
     43                md.results.TransientSolution[1].Vel,
     44                md.results.TransientSolution[1].Pressure,
     45                md.results.TransientSolution[1].Base,
     46                md.results.TransientSolution[1].Surface,
     47                md.results.TransientSolution[1].Thickness,
     48                md.results.TransientSolution[1].Temperature,
     49                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     50                md.results.TransientSolution[2].Vx,
     51                md.results.TransientSolution[2].Vy,
     52                md.results.TransientSolution[2].Vz,
     53                md.results.TransientSolution[2].Vel,
     54                md.results.TransientSolution[2].Pressure,
     55                md.results.TransientSolution[2].Base,
     56                md.results.TransientSolution[2].Surface,
     57                md.results.TransientSolution[2].Thickness,
     58                md.results.TransientSolution[2].Temperature,
     59                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test210.py

    r22318 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',200000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'HO','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 200000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Transient')
    2019
    2120
    2221# Fields and tolerances to track changes
    2322
    24 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    25         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', \
    26         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    27 field_tolerances=[\
    28         1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,\
    29         1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06,\
    30         1e-08,1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05]
    31 field_values=[\
    32         md.results.TransientSolution[0].Vx,\
    33         md.results.TransientSolution[0].Vy,\
    34         md.results.TransientSolution[0].Vz,\
    35         md.results.TransientSolution[0].Vel,\
    36         md.results.TransientSolution[0].Pressure,\
    37         md.results.TransientSolution[0].Base,\
    38         md.results.TransientSolution[0].Surface,\
    39         md.results.TransientSolution[0].Thickness,\
    40         md.results.TransientSolution[0].Temperature,\
    41         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    42         md.results.TransientSolution[1].Vx,\
    43         md.results.TransientSolution[1].Vy,\
    44         md.results.TransientSolution[1].Vz,\
    45         md.results.TransientSolution[1].Vel,\
    46         md.results.TransientSolution[1].Pressure,\
    47         md.results.TransientSolution[1].Base,\
    48         md.results.TransientSolution[1].Surface,\
    49         md.results.TransientSolution[1].Thickness,\
    50         md.results.TransientSolution[1].Temperature,\
    51         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    52         md.results.TransientSolution[2].Vx,\
    53         md.results.TransientSolution[2].Vy,\
    54         md.results.TransientSolution[2].Vz,\
    55         md.results.TransientSolution[2].Vel,\
    56         md.results.TransientSolution[2].Pressure,\
    57         md.results.TransientSolution[2].Base,\
    58         md.results.TransientSolution[2].Surface,\
    59         md.results.TransientSolution[2].Thickness,\
    60         md.results.TransientSolution[2].Temperature,\
    61         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    62         ]
     23field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     24               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     25               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     26field_tolerances = [1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     27                    1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-06,
     28                    1e-08, 1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05]
     29field_values = [md.results.TransientSolution[0].Vx,
     30                md.results.TransientSolution[0].Vy,
     31                md.results.TransientSolution[0].Vz,
     32                md.results.TransientSolution[0].Vel,
     33                md.results.TransientSolution[0].Pressure,
     34                md.results.TransientSolution[0].Base,
     35                md.results.TransientSolution[0].Surface,
     36                md.results.TransientSolution[0].Thickness,
     37                md.results.TransientSolution[0].Temperature,
     38                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vz,
     42                md.results.TransientSolution[1].Vel,
     43                md.results.TransientSolution[1].Pressure,
     44                md.results.TransientSolution[1].Base,
     45                md.results.TransientSolution[1].Surface,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[1].Temperature,
     48                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     49                md.results.TransientSolution[2].Vx,
     50                md.results.TransientSolution[2].Vy,
     51                md.results.TransientSolution[2].Vz,
     52                md.results.TransientSolution[2].Vel,
     53                md.results.TransientSolution[2].Pressure,
     54                md.results.TransientSolution[2].Base,
     55                md.results.TransientSolution[2].Surface,
     56                md.results.TransientSolution[2].Thickness,
     57                md.results.TransientSolution[2].Temperature,
     58                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test2101.py

    r22148 r23793  
    1212from gmtmask import *
    1313
    14 #mesh earth: 
     14#mesh earth:
    1515md = model()
    16 md.mesh = gmshplanet('radius',6.371012*1e3,'resolution',1000)
     16md.mesh = gmshplanet('radius', 6.371012 * 1e3, 'resolution', 1000)
    1717
    18 #define load 
     18#define load
    1919md.esa.deltathickness = np.zeros((md.mesh.numberofelements,))
    2020pos = 449
     
    2323#love numbers:
    2424nlov = 10000
    25 md.esa.love_h = np.array(love_numbers('h'))     #Originally had CM arg
     25md.esa.love_h = np.array(love_numbers('h'))     #Originally had CM arg
    2626md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    27 md.esa.love_l = np.array(love_numbers('l'))     #Originally had CM arg
     27md.esa.love_l = np.array(love_numbers('l'))     #Originally had CM arg
    2828md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
    2929
    3030#mask:  {{{
    31 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
    32 md.mask.ocean_levelset = gmtmask(md.mesh.lat,md.mesh.long)
     31md.mask = maskpsl()  # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
     32md.mask.ocean_levelset = gmtmask(md.mesh.lat, md.mesh.long)
    3333
    34 #make sure wherever there is an ice load, that the mask is set to ice: 
     34#make sure wherever there is an ice load, that the mask is set to ice:
    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
    39 #is ice grounded? 
     39#is ice grounded?
    4040md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,))
    4141pos = np.where(md.mask.ice_levelset <= 0)
    4242md.mask.groundedice_levelset[pos] = 1
    4343
    44 #make sure ice domain is on the continent: 
     44#make sure ice domain is on the continent:
    4545#pos = np.where(md.mask.ice_levelset <= 0)
    4646#md.mask.ocean_levelset[pos] = 0
    4747
    48 #land mask 
     48#land mask
    4949md.mask.land_levelset = 1 - md.mask.ocean_levelset
    5050
     
    6666# }}}
    6767
    68 #solve esa 
    69 md.esa.requested_outputs = ['EsaUmotion','EsaNmotion','EsaEmotion']
    70 md.cluster = generic('name',gethostname(),'np',3)
     68#solve esa
     69md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion']
     70md.cluster = generic('name', gethostname(), 'np', 3)
    7171md.verbose = verbose('111111111')
    72 md = solve(md,'Esa')
     72md = solve(md, 'Esa')
    7373
    7474#Fields and tolerances to track changes
    75 field_names     = ['EsaUmotion','EsaNmotion','EsaEmotion']
    76 field_tolerances= [1e-13,1e-13,1e-13]
    77 field_values = [
    78         md.results.EsaSolution.EsaUmotion,
    79         md.results.EsaSolution.EsaNmotion,
    80         md.results.EsaSolution.EsaEmotion,
    81         ]
    82 
     75field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion']
     76field_tolerances = [1e-13, 1e-13, 1e-13]
     77field_values = [md.results.EsaSolution.EsaUmotion,
     78                md.results.EsaSolution.EsaNmotion,
     79                md.results.EsaSolution.EsaEmotion]
  • issm/trunk-jpl/test/NightlyRun/test211.py

    r23684 r23793  
    1010from generic import generic
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'FS','all')
    17 md.stressbalance.reltol=np.NaN
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 200000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'FS', 'all')
     17md.stressbalance.reltol = np.NaN
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md = solve(md, 'Transient')
    2020
    2121
    2222# Fields and tolerances to track changes
    2323
    24 field_names=['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1',
    25                                                  'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2',
    26                                                  'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    27 field_tolerances=[2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,
    28         5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05,
    29         8e-06,8e-06,8e-05,8e-06,8e-07,8e-07,8e-07,8e-07,5e-06,8e-05]
    30 field_values=[md.results.TransientSolution[0].Vx,
    31                                                         md.results.TransientSolution[0].Vy,
    32                                                         md.results.TransientSolution[0].Vz,
    33                                                         md.results.TransientSolution[0].Vel,
    34                                                         md.results.TransientSolution[0].Pressure,
    35                                                         md.results.TransientSolution[0].Base,
    36                                                         md.results.TransientSolution[0].Surface,
    37                                                         md.results.TransientSolution[0].Thickness,
    38                                                         md.results.TransientSolution[0].Temperature,
    39                                                         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
    40                                                         md.results.TransientSolution[1].Vx,
    41                                                         md.results.TransientSolution[1].Vy,
    42                                                         md.results.TransientSolution[1].Vz,
    43                                                         md.results.TransientSolution[1].Vel,
    44                                                         md.results.TransientSolution[1].Pressure,
    45                                                         md.results.TransientSolution[1].Base,
    46                                                         md.results.TransientSolution[1].Surface,
    47                                                         md.results.TransientSolution[1].Thickness,
    48                                                         md.results.TransientSolution[1].Temperature,
    49                                                         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
    50                                                         md.results.TransientSolution[2].Vx,
    51                                                         md.results.TransientSolution[2].Vy,
    52                                                         md.results.TransientSolution[2].Vz,
    53                                                         md.results.TransientSolution[2].Vel,
    54                                                         md.results.TransientSolution[2].Pressure,
    55                                                         md.results.TransientSolution[2].Base,
    56                                                         md.results.TransientSolution[2].Surface,
    57                                                         md.results.TransientSolution[2].Thickness,
    58                                                         md.results.TransientSolution[2].Temperature,
    59                                                         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
     24field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     25               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     26               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     27field_tolerances = [2e-08, 2e-08, 5e-05, 2e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08,
     28                    5e-06, 5e-06, 8e-05, 5e-06, 5e-07, 5e-07, 5e-07, 5e-07, 3e-06, 5e-05,
     29                    8e-06, 8e-06, 8e-05, 8e-06, 8e-07, 8e-07, 8e-07, 8e-07, 5e-06, 8e-05]
     30field_values = [md.results.TransientSolution[0].Vx,
     31                md.results.TransientSolution[0].Vy,
     32                md.results.TransientSolution[0].Vz,
     33                md.results.TransientSolution[0].Vel,
     34                md.results.TransientSolution[0].Pressure,
     35                md.results.TransientSolution[0].Base,
     36                md.results.TransientSolution[0].Surface,
     37                md.results.TransientSolution[0].Thickness,
     38                md.results.TransientSolution[0].Temperature,
     39                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     40                md.results.TransientSolution[1].Vx,
     41                md.results.TransientSolution[1].Vy,
     42                md.results.TransientSolution[1].Vz,
     43                md.results.TransientSolution[1].Vel,
     44                md.results.TransientSolution[1].Pressure,
     45                md.results.TransientSolution[1].Base,
     46                md.results.TransientSolution[1].Surface,
     47                md.results.TransientSolution[1].Thickness,
     48                md.results.TransientSolution[1].Temperature,
     49                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     50                md.results.TransientSolution[2].Vx,
     51                md.results.TransientSolution[2].Vy,
     52                md.results.TransientSolution[2].Vz,
     53                md.results.TransientSolution[2].Vel,
     54                md.results.TransientSolution[2].Pressure,
     55                md.results.TransientSolution[2].Base,
     56                md.results.TransientSolution[2].Surface,
     57                md.results.TransientSolution[2].Thickness,
     58                md.results.TransientSolution[2].Temperature,
     59                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test2110.py

    r22355 r23793  
    1010from paterson import *
    1111
    12 #mesh earth: 
     12#mesh earth:
    1313md = model()
    14 md = roundmesh(md,50000,2000)     # radius and element size (meters)
     14md = roundmesh(md, 50000, 2000)     # radius and element size (meters)
    1515
    16 #define load 
     16#define load
    1717md.esa.deltathickness = np.zeros((md.mesh.numberofelements,))
    18 disc_radius = 20 # km
     18disc_radius = 20  # km
    1919index = md.mesh.elements
    2020x_element = np.mean(md.mesh.x[index - 1], 1)
     
    2424
    2525#love numbers:
    26 nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
     26nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
    2727md.esa.love_h = np.array(love_numbers('h'))
    2828md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
     
    3131
    3232#mask:  {{{
    33 #make sure wherever there is an ice load, that the mask is set to ice: 
     33#make sure wherever there is an ice load, that the mask is set to ice:
    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
    38 #is ice grounded? 
     38#is ice grounded?
    3939md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,))
    4040pos = np.where(md.mask.ice_levelset <= 0)
     
    6060md.esa.degacc = 0.01
    6161
    62 #solve esa 
    63 md.esa.requested_outputs = ['EsaUmotion','EsaXmotion','EsaYmotion',
    64         'EsaStrainratexx','EsaStrainratexy','EsaStrainrateyy','EsaRotationrate']
    65 md.cluster = generic('name',gethostname(),'np',3)
     62#solve esa
     63md.esa.requested_outputs = ['EsaUmotion', 'EsaXmotion', 'EsaYmotion',
     64                            'EsaStrainratexx', 'EsaStrainratexy', 'EsaStrainrateyy', 'EsaRotationrate']
     65md.cluster = generic('name', gethostname(), 'np', 3)
    6666md.verbose = verbose('111111111')
    67 md = solve(md,'Esa')
     67md = solve(md, 'Esa')
    6868
    6969#Fields and tolerances to track changes
    70 field_names     = ['EsaUmotion','EsaXmotion','EsaYmotion',
    71         'EsaStrainratexx','EsaStrainratexy','EsaStrainrateyy','EsaRotationrate']
    72 field_tolerances = [1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    73 field_values = [
    74         md.results.EsaSolution.EsaUmotion,
    75         md.results.EsaSolution.EsaXmotion,
    76         md.results.EsaSolution.EsaYmotion,
    77         md.results.EsaSolution.EsaStrainratexx,
    78         md.results.EsaSolution.EsaStrainratexy,
    79         md.results.EsaSolution.EsaStrainrateyy,
    80         md.results.EsaSolution.EsaRotationrate,
    81         ]
    82 
     70field_names = ['EsaUmotion', 'EsaXmotion', 'EsaYmotion',
     71               'EsaStrainratexx', 'EsaStrainratexy', 'EsaStrainrateyy', 'EsaRotationrate']
     72field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     73field_values = [md.results.EsaSolution.EsaUmotion,
     74                md.results.EsaSolution.EsaXmotion,
     75                md.results.EsaSolution.EsaYmotion,
     76                md.results.EsaSolution.EsaStrainratexx,
     77                md.results.EsaSolution.EsaStrainratexy,
     78                md.results.EsaSolution.EsaStrainrateyy,
     79                md.results.EsaSolution.EsaRotationrate]
  • issm/trunk-jpl/test/NightlyRun/test2111.py

    r22350 r23793  
    11#Test Name: Esa2Dsurface
    2 #AIS -- southern hemisphere example for north-south, east-west components of horiz motion 
     2#AIS -- southern hemisphere example for north-south, east-west components of horiz motion
    33
    44import numpy as np
     
    1212#mesh ais: {{{
    1313md = model()
    14 md = triangle(md,'../Exp/Ais.exp',200000); # max element size
     14md = triangle(md, '../Exp/Ais.exp', 200000) # max element size
    1515# }}}
    1616#define load: {{{
    1717md.esa.deltathickness = np.zeros((md.mesh.numberofelements,))
    18 disc_radius = 500 # km
     18disc_radius = 500  # km
    1919index = md.mesh.elements
    2020x_element = np.mean(md.mesh.x[index - 1], 1) - 1.0e6
     
    2424# }}}
    2525#love numbers: {{{
    26 nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
    27 md.esa.love_h = np.array(love_numbers('h','CF'))
     26nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
     27md.esa.love_h = np.array(love_numbers('h', 'CF'))
    2828md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    29 md.esa.love_l = np.array(love_numbers('l','CF'))
     29md.esa.love_l = np.array(love_numbers('l', 'CF'))
    3030md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
    3131# }}}
    3232#mask:  {{{
    33 #make sure wherever there is an ice load, that the mask is set to ice: 
     33#make sure wherever there is an ice load, that the mask is set to ice:
    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
    38 #is ice grounded? 
     38#is ice grounded?
    3939md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,))
    4040pos = np.where(md.mask.ice_levelset <= 0)
     
    5454# }}}
    5555#additional parameters, miscellaneous: {{{
    56 md.miscellaneous.name='test2111';
    57 md.esa.degacc=0.01;
    58 md.esa.hemisphere = -1;
     56md.miscellaneous.name = 'test2111'
     57md.esa.degacc = 0.01
     58md.esa.hemisphere = -1
    5959# }}}
    6060
    6161#solve esa: {{{
    62 md.esa.requested_outputs = ['EsaUmotion','EsaNmotion','EsaEmotion','EsaXmotion','EsaYmotion']
    63 md.cluster = generic('name',gethostname(),'np',3)
     62md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion']
     63md.cluster = generic('name', gethostname(), 'np', 3)
    6464md.verbose = verbose('111111111')
    65 md = solve(md,'Esa')
     65md = solve(md, 'Esa')
    6666# }}}
    6767#Fields and tolerances to track changes: {{{
    68 field_names     = ['EsaUmotion','EsaNmotion','EsaEmotion','EsaXmotion','EsaYmotion']
    69 field_tolerances = [1e-13,1e-13,1e-13,1e-13,1e-13]
    70 field_values = [
    71         md.results.EsaSolution.EsaUmotion,
    72         md.results.EsaSolution.EsaNmotion,
    73         md.results.EsaSolution.EsaEmotion,
    74         md.results.EsaSolution.EsaXmotion,
    75         md.results.EsaSolution.EsaYmotion,
    76         ]
     68field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion']
     69field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     70field_values = [md.results.EsaSolution.EsaUmotion,
     71                md.results.EsaSolution.EsaNmotion,
     72                md.results.EsaSolution.EsaEmotion,
     73                md.results.EsaSolution.EsaXmotion,
     74                md.results.EsaSolution.EsaYmotion]
    7775# }}}
    78 
  • issm/trunk-jpl/test/NightlyRun/test2112.py

    r22350 r23793  
    11#Test Name: Esa2Dsurface
    2 #AIS 2 -- load centered at the south pole!
    3 
     2#AIS 2 -- load centered at the south pole!
    43import numpy as np
    54from model import *
     
    1211#mesh ais: {{{
    1312md = model()
    14 md = triangle(md,'../Exp/Ais.exp',100000); # max element size
     13md = triangle(md, '../Exp/Ais.exp', 100000) # max element size
    1514# }}}
    1615#define load: {{{
    1716md.esa.deltathickness = np.zeros((md.mesh.numberofelements,))
    18 disc_radius = 500 # km
     17disc_radius = 500  # km
    1918index = md.mesh.elements
    2019x_element = np.mean(md.mesh.x[index - 1], 1)
     
    2423# }}}
    2524#love numbers: {{{
    26 nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
    27 md.esa.love_h = np.array(love_numbers('h','CF'))
     25nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
     26md.esa.love_h = np.array(love_numbers('h', 'CF'))
    2827md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    29 md.esa.love_l = np.array(love_numbers('l','CF'))
     28md.esa.love_l = np.array(love_numbers('l', 'CF'))
    3029md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
    3130# }}}
    3231#mask:  {{{
    33 #make sure wherever there is an ice load, that the mask is set to ice: 
     32#make sure wherever there is an ice load, that the mask is set to ice:
    3433md.mask.ice_levelset = np.ones((md.mesh.numberofvertices,))
    3534pos = np.where(md.esa.deltathickness)
    36 md.mask.ice_levelset[md.mesh.elements[pos,:]] = -1
     35md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1
    3736
    38 #is ice grounded? 
     37#is ice grounded?
    3938md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,))
    4039pos = np.where(md.mask.ice_levelset <= 0)
     
    5453# }}}
    5554#additional parameters, miscellaneous: {{{
    56 md.miscellaneous.name='test2112';
    57 md.esa.degacc=0.01;
    58 md.esa.hemisphere = -1;
     55md.miscellaneous.name = 'test2112'
     56md.esa.degacc = 0.01
     57md.esa.hemisphere = -1
    5958# }}}
    6059
    6160#solve esa: {{{
    62 md.esa.requested_outputs = ['EsaUmotion','EsaNmotion','EsaEmotion','EsaXmotion','EsaYmotion']
    63 md.cluster = generic('name',gethostname(),'np',3)
     61md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion']
     62md.cluster = generic('name', gethostname(), 'np', 3)
    6463md.verbose = verbose('111111111')
    65 md = solve(md,'Esa')
     64md = solve(md, 'Esa')
    6665# }}}
    6766#Fields and tolerances to track changes: {{{
    68 field_names     = ['EsaUmotion','EsaNmotion','EsaEmotion','EsaXmotion','EsaYmotion']
    69 field_tolerances = [1e-13,1e-13,1e-13,1e-13,1e-13]
    70 field_values = [
    71         md.results.EsaSolution.EsaUmotion,
    72         md.results.EsaSolution.EsaNmotion,
    73         md.results.EsaSolution.EsaEmotion,
    74         md.results.EsaSolution.EsaXmotion,
    75         md.results.EsaSolution.EsaYmotion,
    76         ]
     67field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion']
     68field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     69field_values = [md.results.EsaSolution.EsaUmotion,
     70                md.results.EsaSolution.EsaNmotion,
     71                md.results.EsaSolution.EsaEmotion,
     72                md.results.EsaSolution.EsaXmotion,
     73                md.results.EsaSolution.EsaYmotion]
    7774# }}}
    78 
  • issm/trunk-jpl/test/NightlyRun/test2113.py

    r22358 r23793  
    11#Test Name: Esa2Dsurface
    2 #Northern hemisphere example for north-south, east-west components of horiz motion 
    3 #Same as test2111.m except that AIS is assumed to have located in Northern Hemisphere 
     2#Northern hemisphere example for north-south, east-west components of horiz motion
     3#Same as test2111.m except that AIS is assumed to have located in Northern Hemisphere
    44
    55import numpy as np
     
    1313#mesh ais: {{{
    1414md = model()
    15 md = triangle(md,'../Exp/Ais.exp',200000); # max element size
     15md = triangle(md, '../Exp/Ais.exp', 200000) # max element size
    1616# }}}
    1717#define load: {{{
    1818md.esa.deltathickness = np.zeros((md.mesh.numberofelements,))
    19 disc_radius = 500 # km
     19disc_radius = 500  # km
    2020index = md.mesh.elements
    2121x_element = np.mean(md.mesh.x[index - 1], 1) - 1.0e6
     
    2525# }}}
    2626#love numbers: {{{
    27 nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
    28 md.esa.love_h = np.array(love_numbers('h','CF'))
     27nlov = 10000    # horizontal displacements do not work for low degree truncation, e.g., 101
     28md.esa.love_h = np.array(love_numbers('h', 'CF'))
    2929md.esa.love_h = np.resize(md.esa.love_h, nlov + 1)
    30 md.esa.love_l = np.array(love_numbers('l','CF'))
     30md.esa.love_l = np.array(love_numbers('l', 'CF'))
    3131md.esa.love_l = np.resize(md.esa.love_l, nlov + 1)
    3232# }}}
    3333#mask:  {{{
    34 #make sure wherever there is an ice load, that the mask is set to ice: 
     34#make sure wherever there is an ice load, that the mask is set to ice:
    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
    39 #is ice grounded? 
     39#is ice grounded?
    4040md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,))
    4141pos = np.where(md.mask.ice_levelset <= 0)
     
    5555# }}}
    5656#additional parameters, miscellaneous: {{{
    57 md.miscellaneous.name='test2113';
    58 md.esa.degacc=0.01;
    59 md.esa.hemisphere = 1; # AIS is placed in Northern Hemisphere
     57md.miscellaneous.name = 'test2113'
     58md.esa.degacc = 0.01
     59md.esa.hemisphere = 1  # AIS is placed in Northern Hemisphere
    6060# }}}
    6161
    6262#solve esa: {{{
    63 md.esa.requested_outputs = ['EsaUmotion','EsaNmotion','EsaEmotion']
    64 md.cluster = generic('name',gethostname(),'np',3)
     63md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion']
     64md.cluster = generic('name', gethostname(), 'np', 3)
    6565md.verbose = verbose('111111111')
    66 md = solve(md,'Esa')
     66md = solve(md, 'Esa')
    6767# }}}
    6868#Fields and tolerances to track changes: {{{
    69 field_names     = ['EsaUmotion','EsaNmotion','EsaEmotion']
    70 field_tolerances = [1e-13,1e-13,1e-13]
    71 field_values = [
    72         md.results.EsaSolution.EsaUmotion,
    73         md.results.EsaSolution.EsaNmotion,
    74         md.results.EsaSolution.EsaEmotion,
    75         ]
     69field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion']
     70field_tolerances = [1e-13, 1e-13, 1e-13]
     71field_values = [md.results.EsaSolution.EsaUmotion,
     72                md.results.EsaSolution.EsaNmotion,
     73                md.results.EsaSolution.EsaEmotion]
    7674# }}}
    77 
  • issm/trunk-jpl/test/NightlyRun/test212.py

    r23785 r23793  
    1010from generic import generic
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
    1616
    1717# control parameters
    1818
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['MaterialsRheologyBbar']
    21 md.inversion.min_parameters=1.0e6*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=2.0e9*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[101]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    26 md.inversion.gradient_scaling=1.0e7*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    27 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    28 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
    29 md.inversion.vx_obs=md.initialization.vx
    30 md.inversion.vy_obs=md.initialization.vy
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['MaterialsRheologyBbar']
     21md.inversion.min_parameters = 1.0e6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 2.0e9 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [101]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     26md.inversion.gradient_scaling = 1.0e7 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     27md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     28md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps))
     29md.inversion.vx_obs = md.initialization.vx
     30md.inversion.vy_obs = md.initialization.vy
    3131
    3232
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3535
    3636
    3737# Fields and tolerances to track changes
    3838
    39 field_names     =['Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy']
    40 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    41 field_values=[md.results.StressbalanceSolution.Gradient1,
    42                                                         md.results.StressbalanceSolution.J,
    43                                                         md.results.StressbalanceSolution.MaterialsRheologyBbar,
    44                                                         md.results.StressbalanceSolution.Pressure,
    45                                                         md.results.StressbalanceSolution.Vel,
    46                                                         md.results.StressbalanceSolution.Vx,
    47                                                         md.results.StressbalanceSolution.Vy]
     39field_names = ['Gradient', 'Misfits', 'MaterialsRheologyBbar', 'Pressure', 'Vel', 'Vx', 'Vy']
     40field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     41field_values = [md.results.StressbalanceSolution.Gradient1,
     42                md.results.StressbalanceSolution.J,
     43                md.results.StressbalanceSolution.MaterialsRheologyBbar,
     44                md.results.StressbalanceSolution.Pressure,
     45                md.results.StressbalanceSolution.Vel,
     46                md.results.StressbalanceSolution.Vx,
     47                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test213.py

    r23785 r23793  
    11#Test Name: SquareShelfCMBSSA3d
    2 
    32from model import *
    43from socket import gethostname
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',200000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
    1817
    1918
    2019# control parameters
     20md.inversion.iscontrol = 1
     21md.inversion.control_parameters = ['MaterialsRheologyBbar']
     22md.inversion.min_parameters = 10**6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.max_parameters = 2. * 10**9 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     24md.inversion.nsteps = 2
     25md.inversion.cost_functions = [101]
     26md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     27md.inversion.gradient_scaling = 10**7 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     29md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps))
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
    2132
    22 md.inversion.iscontrol=1
    23 md.inversion.control_parameters=['MaterialsRheologyBbar']
    24 md.inversion.min_parameters=10**6*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    25 md.inversion.max_parameters=2.*10**9*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    26 md.inversion.nsteps=2
    27 md.inversion.cost_functions=[101]
    28 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    29 md.inversion.gradient_scaling=10**7*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    30 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    31 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
    32 md.inversion.vx_obs=md.initialization.vx
    33 md.inversion.vy_obs=md.initialization.vy
    34 
    35 
    36 md.cluster=generic('name',gethostname(),'np',3)
    37 md=solve(md,'Stressbalance')
    38 
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3935
    4036# Fields and tolerances to track changes
    4137
    42 field_names     =['Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy']
    43 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    44 #field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    45 field_values=[md.results.StressbalanceSolution.Gradient1,
    46                                                         md.results.StressbalanceSolution.J,
    47                                                         md.results.StressbalanceSolution.MaterialsRheologyBbar,
    48                                                         md.results.StressbalanceSolution.Pressure,
    49                                                         md.results.StressbalanceSolution.Vel,
    50                                                         md.results.StressbalanceSolution.Vx,
    51                                                         md.results.StressbalanceSolution.Vy]
     38field_names = ['Gradient', 'Misfits', 'MaterialsRheologyBbar', 'Pressure', 'Vel', 'Vx', 'Vy']
     39field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     40field_values = [md.results.StressbalanceSolution.Gradient1,
     41                md.results.StressbalanceSolution.J,
     42                md.results.StressbalanceSolution.MaterialsRheologyBbar,
     43                md.results.StressbalanceSolution.Pressure,
     44                md.results.StressbalanceSolution.Vel,
     45                md.results.StressbalanceSolution.Vx,
     46                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test214.py

    r23785 r23793  
    1111from generic import generic
    1212
    13 md=triangle(model(),'../Exp/Square.exp',200000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'HO','all')
     13md = triangle(model(), '../Exp/Square.exp', 200000)
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelf.py')
     16md.extrude(3, 1.)
     17md = setflowequation(md, 'HO', 'all')
    1818
    1919
    2020# control parameters
     21md.inversion.iscontrol = 1
     22md.inversion.control_parameters = ['MaterialsRheologyBbar']
     23md.inversion.min_parameters = 1e6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     24md.inversion.max_parameters = 2. * 1e9 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     25md.inversion.nsteps = 2
     26md.inversion.cost_functions = [101]
     27md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     28md.inversion.gradient_scaling = 1e7 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     29md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     30md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps))
     31md.inversion.vx_obs = md.initialization.vx
     32md.inversion.vy_obs = md.initialization.vy
    2133
    22 md.inversion.iscontrol=1
    23 md.inversion.control_parameters=['MaterialsRheologyBbar']
    24 md.inversion.min_parameters=1e6*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    25 md.inversion.max_parameters=2.*1e9*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    26 md.inversion.nsteps=2
    27 md.inversion.cost_functions=[101]
    28 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    29 md.inversion.gradient_scaling=1e7*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    30 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    31 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
    32 md.inversion.vx_obs=md.initialization.vx
    33 md.inversion.vy_obs=md.initialization.vy
    34 
    35 
    36 md.cluster=generic('name',gethostname(),'np',3)
    37 md=solve(md,'Stressbalance')
     34md.cluster = generic('name', gethostname(), 'np', 3)
     35md = solve(md, 'Stressbalance')
    3836
    3937
    4038# Fields and tolerances to track changes
    4139
    42 field_names     =['Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy']
    43 field_tolerances=[1e-07,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08]
    44 field_values=[md.results.StressbalanceSolution.Gradient1,
    45                                                         md.results.StressbalanceSolution.J,
    46                                                         md.results.StressbalanceSolution.MaterialsRheologyBbar,
    47                                                         md.results.StressbalanceSolution.Pressure,
    48                                                         md.results.StressbalanceSolution.Vel,
    49                                                         md.results.StressbalanceSolution.Vx,
    50                                                         md.results.StressbalanceSolution.Vy]
     40field_names = ['Gradient', 'Misfits', 'MaterialsRheologyBbar', 'Pressure', 'Vel', 'Vx', 'Vy']
     41field_tolerances = [1e-07, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08]
     42field_values = [md.results.StressbalanceSolution.Gradient1,
     43                md.results.StressbalanceSolution.J,
     44                md.results.StressbalanceSolution.MaterialsRheologyBbar,
     45                md.results.StressbalanceSolution.Pressure,
     46                md.results.StressbalanceSolution.Vel,
     47                md.results.StressbalanceSolution.Vx,
     48                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test215.py

    r23785 r23793  
    1010from generic import generic
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'FS','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'FS', 'all')
    1717
    1818
    1919# control parameters
    20 md.inversion.iscontrol=1
    21 md.inversion.control_parameters=['MaterialsRheologyBbar']
    22 md.inversion.min_parameters=1e6*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.max_parameters=2e9*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    24 md.inversion.nsteps=2
    25 md.inversion.cost_functions=[101]
    26 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    27 md.inversion.gradient_scaling=1e7*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    29 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
    30 md.inversion.vx_obs=md.initialization.vx
    31 md.inversion.vy_obs=md.initialization.vy
     20md.inversion.iscontrol = 1
     21md.inversion.control_parameters = ['MaterialsRheologyBbar']
     22md.inversion.min_parameters = 1e6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.max_parameters = 2e9 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     24md.inversion.nsteps = 2
     25md.inversion.cost_functions = [101]
     26md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     27md.inversion.gradient_scaling = 1e7 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     29md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps))
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
    3232
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3535
    3636
    3737# Fields and tolerances to track changes
    38 field_names     =['Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy']
    39 field_tolerances=[4.6e-08,1e-08,2e-08,2e-09,3e-09,2e-08,2e-08]
    40 field_values=[md.results.StressbalanceSolution.Gradient1,
    41         md.results.StressbalanceSolution.J,
    42         md.results.StressbalanceSolution.MaterialsRheologyBbar,
    43         md.results.StressbalanceSolution.Pressure,
    44         md.results.StressbalanceSolution.Vel,
    45         md.results.StressbalanceSolution.Vx,
    46         md.results.StressbalanceSolution.Vy]
     38field_names = ['Gradient', 'Misfits', 'MaterialsRheologyBbar', 'Pressure', 'Vel', 'Vx', 'Vy']
     39field_tolerances = [4.6e-08, 1e-08, 2e-08, 2e-09, 3e-09, 2e-08, 2e-08]
     40field_values = [md.results.StressbalanceSolution.Gradient1,
     41                md.results.StressbalanceSolution.J,
     42                md.results.StressbalanceSolution.MaterialsRheologyBbar,
     43                md.results.StressbalanceSolution.Pressure,
     44                md.results.StressbalanceSolution.Vel,
     45                md.results.StressbalanceSolution.Vx,
     46                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test216.py

    r22579 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from meshprocessrifts import *
     
    1211from generic import generic
    1312
    14 md=triangle(model(),'../Exp/SquareHole.exp','../Exp/Rifts.exp',50000.)
    15 md=meshprocessrifts(md,'../Exp/Square.exp')
    16 md=setmask(md,'all','')
    17 md=parameterize(md,'../Par/SquareShelf2.py')
    18 md=setflowequation(md,'SSA','all')
    19 md.cluster=generic('name',gethostname(),'np',3)
     13md = triangle(model(), '../Exp/SquareHole.exp', '../Exp/Rifts.exp', 50000.)
     14md = meshprocessrifts(md, '../Exp/Square.exp')
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelf2.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 3)
    2019
    2120# rift settings
    2221
    23 md.rifts.riftstruct[0]['fill']='Melange'
    24 md.rifts.riftstruct[0]['fraction']=0
    25 md.stressbalance.rift_penalty_lock=2
    26 md.stressbalance.rift_penalty_threshold=0
    27 md.rifts.riftstruct[0]['fractionincrement']=0.1
    28 md=solve(md,'Stressbalance')
     22md.rifts.riftstruct[0]['fill'] = 'Melange'
     23md.rifts.riftstruct[0]['fraction'] = 0
     24md.stressbalance.rift_penalty_lock = 2
     25md.stressbalance.rift_penalty_threshold = 0
     26md.rifts.riftstruct[0]['fractionincrement'] = 0.1
     27md = solve(md, 'Stressbalance')
    2928
    3029# Fields and tolerances to track changes
    3130
    32 field_names     =['Vx','Vy','Vel','Pressure']
    33 field_tolerances=[9e-7,7e-8,9e-8,2e-11]
    34 field_values=[\
    35         md.results.StressbalanceSolution.Vx,\
    36         md.results.StressbalanceSolution.Vy,\
    37         md.results.StressbalanceSolution.Vel,\
    38         md.results.StressbalanceSolution.Pressure,\
    39         ]
     31field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     32field_tolerances = [9e-7, 7e-8, 9e-8, 2e-11]
     33field_values = [md.results.StressbalanceSolution.Vx,
     34                md.results.StressbalanceSolution.Vy,
     35                md.results.StressbalanceSolution.Vel,
     36                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test217.py

    r21411 r23793  
    1111from generic import generic
    1212
    13 md=triangle(model(),'../Exp/Square.exp',150000)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     13md = triangle(model(), '../Exp/Square.exp', 150000)
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelf.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 # redo the parameter file for this special shelf. 
    20 # constant thickness, constrained (vy=0) flow into an icefront,
     19# redo the parameter file for this special shelf.
     20# constant thickness, constrained (vy = 0) flow into an icefront,
    2121# from 0 m/yr at the grounding line.
    2222
    2323# tighten
    24 md.stressbalance.restol=1e-4
     24md.stressbalance.restol = 1e-4
    2525
    2626# needed later
    27 ymin=min(md.mesh.y)
    28 ymax=max(md.mesh.y)
    29 xmin=min(md.mesh.x)
    30 xmax=max(md.mesh.x)
     27ymin = min(md.mesh.y)
     28ymax = max(md.mesh.y)
     29xmin = min(md.mesh.x)
     30xmax = max(md.mesh.x)
    3131
    32 di=md.materials.rho_ice/md.materials.rho_water
     32di = md.materials.rho_ice / md.materials.rho_water
    3333
    34 h=1000.
    35 md.geometry.thickness=h*np.ones((md.mesh.numberofvertices))
    36 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    37 md.geometry.surface=md.geometry.base+md.geometry.thickness
     34h = 1000.
     35md.geometry.thickness = h * np.ones((md.mesh.numberofvertices))
     36md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     37md.geometry.surface = md.geometry.base + md.geometry.thickness
    3838
    3939# Initial velocity and pressure
    40 md.initialization.vx=np.zeros((md.mesh.numberofvertices))
    41 md.initialization.vy=np.zeros((md.mesh.numberofvertices))
    42 md.initialization.vz=np.zeros((md.mesh.numberofvertices))
    43 md.initialization.pressure=np.zeros((md.mesh.numberofvertices))
     40md.initialization.vx = np.zeros((md.mesh.numberofvertices))
     41md.initialization.vy = np.zeros((md.mesh.numberofvertices))
     42md.initialization.vz = np.zeros((md.mesh.numberofvertices))
     43md.initialization.pressure = np.zeros((md.mesh.numberofvertices))
    4444
    4545# Materials
    46 md.initialization.temperature=(273.-20.)*np.ones((md.mesh.numberofvertices))
    47 md.materials.rheology_B=paterson(md.initialization.temperature)
    48 md.materials.rheology_n=3.*np.ones((md.mesh.numberofelements))
     46md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices))
     47md.materials.rheology_B = paterson(md.initialization.temperature)
     48md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements))
    4949
    5050# Boundary conditions:
    51 md.stressbalance.spcvx=np.nan*np.ones((md.mesh.numberofvertices))
    52 md.stressbalance.spcvy=np.nan*np.ones((md.mesh.numberofvertices))
    53 md.stressbalance.spcvz=np.nan*np.ones((md.mesh.numberofvertices))
     51md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices))
     52md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
     53md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    5454
    5555# constrain flanks to 0 normal velocity
    56 pos=np.where(np.logical_or(md.mesh.x==xmin,md.mesh.x==xmax))
    57 md.stressbalance.spcvx[pos]=0
    58 md.stressbalance.spcvz[pos]=np.nan
     56pos = np.where(np.logical_or(md.mesh.x == xmin, md.mesh.x == xmax))
     57md.stressbalance.spcvx[pos] = 0
     58md.stressbalance.spcvz[pos] = np.nan
    5959
    6060# constrain grounding line to 0 velocity
    61 pos=np.where(md.mesh.y==ymin)
    62 md.stressbalance.spcvx[pos]=0
    63 md.stressbalance.spcvy[pos]=0
     61pos = np.where(md.mesh.y == ymin)
     62md.stressbalance.spcvx[pos] = 0
     63md.stressbalance.spcvy[pos] = 0
    6464
    6565# icefront
    66 nodeonicefront=np.zeros(md.mesh.numberofvertices)
    67 pos=np.where(md.mesh.y==ymax)
    68 nodeonicefront[pos]=1
    69 md.mask.ice_levelset=-1+nodeonicefront
     66nodeonicefront = np.zeros(md.mesh.numberofvertices)
     67pos = np.where(md.mesh.y == ymax)
     68nodeonicefront[pos] = 1
     69md.mask.ice_levelset = -1 + nodeonicefront
    7070
    71 md=solve(md,'Stressbalance')
     71md = solve(md, 'Stressbalance')
    7272
    7373# create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
    7474# ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3
    75 # vy_c=ey_c.*md.mesh.y*md.constants.yts
     75# vy_c = ey_c.*md.mesh.y*md.constants.yts
    7676
    7777# Fields and tolerances to track changes
    78 field_names     =['Vy']
    79 field_tolerances=[1e-13]
    80 field_values=[md.results.StressbalanceSolution.Vy]
     78field_names = ['Vy']
     79field_tolerances = [1e-13]
     80field_values = [md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test218.py

    r23130 r23793  
    2222from verbose import *
    2323
    24 md = squaremesh(model(),1000000,1000000,5,5)
    25 md = setmask(md,'all','')
    26 md = parameterize(md,'../Par/SquareShelf2.py')
    27 md = setflowequation(md,'SSA','all')
    28 md.cluster = generic('name',gethostname(),'np',3)
     24md = squaremesh(model(), 1000000, 1000000, 5, 5)
     25md = setmask(md, 'all', '')
     26md = parameterize(md, '../Par/SquareShelf2.py')
     27md = setflowequation(md, 'SSA', 'all')
     28md.cluster = generic('name', gethostname(), 'np', 3)
    2929
    30 #redo the parameter file for this special shelf. 
    31 #constant thickness, constrained (vy=0) flow into an icefront,
     30#redo the parameter file for this special shelf.
     31#constant thickness, constrained (vy = 0) flow into an icefront,
    3232#from 0 m/yr at the grounding line.
    3333
     
    6767
    6868#constrain grounding line to 0 velocity
    69 pos = np.where(md.mesh.y ==ymin)
     69pos = np.where(md.mesh.y == ymin)
    7070md.stressbalance.spcvx[pos] = 0.
    7171md.stressbalance.spcvy[pos] = 0.
     
    7373#partitioning
    7474md.qmu.numberofpartitions = md.mesh.numberofvertices
    75 md = partitioner(md,'package','linear','npart',md.qmu.numberofpartitions)
    76 md.qmu.partition = (md.qmu.partition - 1.).reshape(-1,1).T
     75md = partitioner(md, 'package', 'linear', 'npart', md.qmu.numberofpartitions)
     76md.qmu.partition = (md.qmu.partition - 1.).reshape(-1, 1).T
    7777
    7878#Dakota options
     
    8181version = IssmConfig('_DAKOTA_VERSION_')
    8282# returns tuple "(u'6.2',)" -> unicode string '6.2', convert to float
    83 version=float(version[0])
     83version = float(version[0])
    8484
    8585#variables
    86 md.qmu.variables.rheology_B = normal_uncertain.normal_uncertain('scaled_MaterialsRheologyB',1,.05)
     86md.qmu.variables.rheology_B = normal_uncertain.normal_uncertain('scaled_MaterialsRheologyB', 1, .05)
    8787
    8888#responses
    89 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     89md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    9090
    9191#method
     
    9797
    9898if version >= 6:
    99         md.qmu.params.analysis_driver = 'matlab'
    100         md.qmu.params.evaluation_scheduling = 'master'
    101         md.qmu.params.processors_per_evaluation = 2
     99    md.qmu.params.analysis_driver = 'matlab'
     100    md.qmu.params.evaluation_scheduling = 'master'
     101    md.qmu.params.processors_per_evaluation = 2
    102102else:
    103         md.qmu.params.analysis_driver = 'stressbalance'
    104         md.qmu.params.evaluation_concurrency = 1
     103    md.qmu.params.analysis_driver = 'stressbalance'
     104    md.qmu.params.evaluation_concurrency = 1
    105105
    106106
    107 #imperative! 
    108 md.stressbalance.reltol = 10**-10 #tighten for qmu analysis
     107#imperative!
     108md.stressbalance.reltol = 10**-10  #tighten for qmu analysis
    109109md.qmu.isdakota = 1
    110110
    111111#solve
    112 md.verbose = verbose('000000000')       # this line is recommended
    113 md = solve(md,'Stressbalance','overwrite','y')
     112md.verbose = verbose('000000000')       # this line is recommended
     113md = solve(md, 'Stressbalance', 'overwrite', 'y')
    114114
    115115#Fields and tolerances to track changes
    116116md.qmu.results = md.results.dakota
    117 md.results.dakota.importancefactors = importancefactors(md,'scaled_MaterialsRheologyB','MaxVel').reshape(-1,1)
     117md.results.dakota.importancefactors = importancefactors(md, 'scaled_MaterialsRheologyB', 'MaxVel').reshape(-1, 1)
    118118field_names = ['importancefactors']
    119119field_tolerances = [1e-10]
    120 field_values=[md.results.dakota.importancefactors]
     120field_values = [md.results.dakota.importancefactors]
  • issm/trunk-jpl/test/NightlyRun/test219.py

    r22545 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',150000.)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
    16 md.extrude(3,2.)
    17 md=setflowequation(md,'HO','../Exp/SquareHalfRight.exp','fill','SSA')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', '../Exp/SquareHalfRight.exp', 'fill', 'SSA')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Stressbalance')
    2019
    2120# Fields and tolerances to track changes
    2221
    23 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    24 field_tolerances=[5e-09,5e-09,5e-09,5e-09,1e-13]
    25 field_values=[\
    26         md.results.StressbalanceSolution.Vx,\
    27         md.results.StressbalanceSolution.Vy,\
    28         md.results.StressbalanceSolution.Vz,\
    29         md.results.StressbalanceSolution.Vel,\
    30         md.results.StressbalanceSolution.Pressure,\
    31         ]
     22field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     23field_tolerances = [5e-09, 5e-09, 5e-09, 5e-09, 1e-13]
     24field_values = [md.results.StressbalanceSolution.Vx,
     25                md.results.StressbalanceSolution.Vy,
     26                md.results.StressbalanceSolution.Vz,
     27                md.results.StressbalanceSolution.Vel,
     28                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test220.py

    r21408 r23793  
    33from model import *
    44from socket import gethostname
    5 import numpy as np
    65from triangle import *
    76from setmask import *
     
    1110from generic import generic
    1211
    13 md=triangle(model(),'../Exp/Square.exp',120000.)
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf2.py')
    16 md.extrude(2,1.)
    17 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','HO')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 120000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf2.py')
     15md.extrude(2, 1.)
     16md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'HO')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Stressbalance')
    2019
    2120# Fields and tolerances to track changes
    2221
    23 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    24 field_tolerances=[1e-09,1e-09,5e-06,1e-09,1e-09]
    25 field_values=[\
    26         md.results.StressbalanceSolution.Vx,\
    27         md.results.StressbalanceSolution.Vy,\
    28         md.results.StressbalanceSolution.Vz,\
    29         md.results.StressbalanceSolution.Vel,\
    30         md.results.StressbalanceSolution.Pressure,\
    31         ]
     22field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     23field_tolerances = [1e-09, 1e-09, 5e-06, 1e-09, 1e-09]
     24field_values = [md.results.StressbalanceSolution.Vx,
     25                md.results.StressbalanceSolution.Vy,
     26                md.results.StressbalanceSolution.Vz,
     27                md.results.StressbalanceSolution.Vel,
     28                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test221.py

    r22575 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',120000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf2.py')
    14 md.extrude(2,1.)
    15 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','SSA')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 120000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf2.py')
     14md.extrude(2, 1.)
     15md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'SSA')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-09,1e-09,5e-06,1e-09,1e-09]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-09, 1e-09, 5e-06, 1e-09, 1e-09]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test222.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md.masstransport.hydrostatic_adjustment='Incremental'
    17 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.masstransport.hydrostatic_adjustment = 'Incremental'
     17md = solve(md, 'Transient')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    22 field_values=[\
    23         md.results.TransientSolution[0].Vx,\
    24         md.results.TransientSolution[0].Vy,\
    25         md.results.TransientSolution[0].Vel,\
    26         md.results.TransientSolution[0].Pressure,\
    27         md.results.TransientSolution[0].Base,\
    28         md.results.TransientSolution[0].Surface,\
    29         md.results.TransientSolution[0].Thickness,\
    30         md.results.TransientSolution[1].Vx,\
    31         md.results.TransientSolution[1].Vy,\
    32         md.results.TransientSolution[1].Vel,\
    33         md.results.TransientSolution[1].Pressure,\
    34         md.results.TransientSolution[1].Base,\
    35         md.results.TransientSolution[1].Surface,\
    36         md.results.TransientSolution[1].Thickness,\
    37         md.results.TransientSolution[2].Vx,\
    38         md.results.TransientSolution[2].Vy,\
    39         md.results.TransientSolution[2].Vel,\
    40         md.results.TransientSolution[2].Pressure,\
    41         md.results.TransientSolution[2].Base,\
    42         md.results.TransientSolution[2].Surface,\
    43         md.results.TransientSolution[2].Thickness,\
    44         ]
     20field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1',
     21               'Bed1', 'Surface1', 'Thickness1',
     22               'Vx2', 'Vy2', 'Vel2', 'Pressure2',
     23               'Bed2', 'Surface2', 'Thickness2',
     24               'Vx3', 'Vy3', 'Vel3', 'Pressure3',
     25               'Bed3', 'Surface3', 'Thickness3']
     26field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     27                    1e-13, 1e-13, 1e-13,
     28                    1e-13, 1e-13, 1e-13, 1e-13,
     29                    1e-13, 1e-13, 1e-13,
     30                    1e-13, 1e-13, 1e-13, 1e-13,
     31                    1e-13, 1e-13, 1e-13]
     32field_values = [md.results.TransientSolution[0].Vx,
     33                md.results.TransientSolution[0].Vy,
     34                md.results.TransientSolution[0].Vel,
     35                md.results.TransientSolution[0].Pressure,
     36                md.results.TransientSolution[0].Base,
     37                md.results.TransientSolution[0].Surface,
     38                md.results.TransientSolution[0].Thickness,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vel,
     42                md.results.TransientSolution[1].Pressure,
     43                md.results.TransientSolution[1].Base,
     44                md.results.TransientSolution[1].Surface,
     45                md.results.TransientSolution[1].Thickness,
     46                md.results.TransientSolution[2].Vx,
     47                md.results.TransientSolution[2].Vy,
     48                md.results.TransientSolution[2].Vel,
     49                md.results.TransientSolution[2].Pressure,
     50                md.results.TransientSolution[2].Base,
     51                md.results.TransientSolution[2].Surface,
     52                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test223.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.geometry.base=md.geometry.base+50.
    16 md.geometry.surface=md.geometry.surface+50.
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.masstransport.hydrostatic_adjustment='Incremental'
    19 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.geometry.base = md.geometry.base + 50.
     16md.geometry.surface = md.geometry.surface + 50.
     17md.cluster = generic('name', gethostname(), 'np', 1)
     18md.masstransport.hydrostatic_adjustment = 'Incremental'
     19md = solve(md, 'Transient')
    2020
    2121#Fields and tolerances to track changes
    22 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    23 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    24 field_values=[\
    25         md.results.TransientSolution[0].Vx,\
    26         md.results.TransientSolution[0].Vy,\
    27         md.results.TransientSolution[0].Vel,\
    28         md.results.TransientSolution[0].Pressure,\
    29         md.results.TransientSolution[0].Base,\
    30         md.results.TransientSolution[0].Surface,\
    31         md.results.TransientSolution[0].Thickness,\
    32         md.results.TransientSolution[1].Vx,\
    33         md.results.TransientSolution[1].Vy,\
    34         md.results.TransientSolution[1].Vel,\
    35         md.results.TransientSolution[1].Pressure,\
    36         md.results.TransientSolution[1].Base,\
    37         md.results.TransientSolution[1].Surface,\
    38         md.results.TransientSolution[1].Thickness,\
    39         md.results.TransientSolution[2].Vx,\
    40         md.results.TransientSolution[2].Vy,\
    41         md.results.TransientSolution[2].Vel,\
    42         md.results.TransientSolution[2].Pressure,\
    43         md.results.TransientSolution[2].Base,\
    44         md.results.TransientSolution[2].Surface,\
    45         md.results.TransientSolution[2].Thickness,\
    46         ]
     22field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1',
     23               'Bed1', 'Surface1', 'Thickness1',
     24               'Vx2', 'Vy2', 'Vel2', 'Pressure2',
     25               'Bed2', 'Surface2', 'Thickness2',
     26               'Vx3', 'Vy3', 'Vel3', 'Pressure3',
     27               'Bed3', 'Surface3', 'Thickness3']
     28field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     29                    1e-13, 1e-13, 1e-13,
     30                    1e-13, 1e-13, 1e-13, 1e-13,
     31                    1e-13, 1e-13, 1e-13,
     32                    1e-13, 1e-13, 1e-13, 1e-13,
     33                    1e-13, 1e-13, 1e-13]
     34field_values = [md.results.TransientSolution[0].Vx,
     35                md.results.TransientSolution[0].Vy,
     36                md.results.TransientSolution[0].Vel,
     37                md.results.TransientSolution[0].Pressure,
     38                md.results.TransientSolution[0].Base,
     39                md.results.TransientSolution[0].Surface,
     40                md.results.TransientSolution[0].Thickness,
     41                md.results.TransientSolution[1].Vx,
     42                md.results.TransientSolution[1].Vy,
     43                md.results.TransientSolution[1].Vel,
     44                md.results.TransientSolution[1].Pressure,
     45                md.results.TransientSolution[1].Base,
     46                md.results.TransientSolution[1].Surface,
     47                md.results.TransientSolution[1].Thickness,
     48                md.results.TransientSolution[2].Vx,
     49                md.results.TransientSolution[2].Vy,
     50                md.results.TransientSolution[2].Vel,
     51                md.results.TransientSolution[2].Pressure,
     52                md.results.TransientSolution[2].Base,
     53                md.results.TransientSolution[2].Surface,
     54                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test224.py

    r21938 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',200000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.masstransport.hydrostatic_adjustment='Incremental'
    18 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 200000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.masstransport.hydrostatic_adjustment = 'Incremental'
     18md = solve(md, 'Transient')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    22         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', \
    23         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    24 field_tolerances=[\
    25         2e-09,2e-09,2e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,\
    26         2e-09,5e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06,\
    27         2e-09,5e-09,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05]
    28 field_values=[\
    29         md.results.TransientSolution[0].Vx,\
    30         md.results.TransientSolution[0].Vy,\
    31         md.results.TransientSolution[0].Vz,\
    32         md.results.TransientSolution[0].Vel,\
    33         md.results.TransientSolution[0].Pressure,\
    34         md.results.TransientSolution[0].Base,\
    35         md.results.TransientSolution[0].Surface,\
    36         md.results.TransientSolution[0].Thickness,\
    37         md.results.TransientSolution[0].Temperature,\
    38         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    39         md.results.TransientSolution[1].Vx,\
    40         md.results.TransientSolution[1].Vy,\
    41         md.results.TransientSolution[1].Vz,\
    42         md.results.TransientSolution[1].Vel,\
    43         md.results.TransientSolution[1].Pressure,\
    44         md.results.TransientSolution[1].Base,\
    45         md.results.TransientSolution[1].Surface,\
    46         md.results.TransientSolution[1].Thickness,\
    47         md.results.TransientSolution[1].Temperature,\
    48         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    49         md.results.TransientSolution[2].Vx,\
    50         md.results.TransientSolution[2].Vy,\
    51         md.results.TransientSolution[2].Vz,\
    52         md.results.TransientSolution[2].Vel,\
    53         md.results.TransientSolution[2].Pressure,\
    54         md.results.TransientSolution[2].Base,\
    55         md.results.TransientSolution[2].Surface,\
    56         md.results.TransientSolution[2].Thickness,\
    57         md.results.TransientSolution[2].Temperature,\
    58         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    59         ]
     21field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     22               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     23               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     24field_tolerances = [2e-09, 2e-09, 2e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     25                    2e-09, 5e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-06,
     26                    2e-09, 5e-09, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05]
     27field_values = [md.results.TransientSolution[0].Vx,
     28                md.results.TransientSolution[0].Vy,
     29                md.results.TransientSolution[0].Vz,
     30                md.results.TransientSolution[0].Vel,
     31                md.results.TransientSolution[0].Pressure,
     32                md.results.TransientSolution[0].Base,
     33                md.results.TransientSolution[0].Surface,
     34                md.results.TransientSolution[0].Thickness,
     35                md.results.TransientSolution[0].Temperature,
     36                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     37                md.results.TransientSolution[1].Vx,
     38                md.results.TransientSolution[1].Vy,
     39                md.results.TransientSolution[1].Vz,
     40                md.results.TransientSolution[1].Vel,
     41                md.results.TransientSolution[1].Pressure,
     42                md.results.TransientSolution[1].Base,
     43                md.results.TransientSolution[1].Surface,
     44                md.results.TransientSolution[1].Thickness,
     45                md.results.TransientSolution[1].Temperature,
     46                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     47                md.results.TransientSolution[2].Vx,
     48                md.results.TransientSolution[2].Vy,
     49                md.results.TransientSolution[2].Vz,
     50                md.results.TransientSolution[2].Vel,
     51                md.results.TransientSolution[2].Pressure,
     52                md.results.TransientSolution[2].Base,
     53                md.results.TransientSolution[2].Surface,
     54                md.results.TransientSolution[2].Thickness,
     55                md.results.TransientSolution[2].Temperature,
     56                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test225.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',200000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf.py')
    14 md.geometry.base=md.geometry.base+50.
    15 md.geometry.surface=md.geometry.surface+50.
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'HO','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.masstransport.hydrostatic_adjustment='Incremental'
    20 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 200000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf.py')
     14md.geometry.base = md.geometry.base + 50.
     15md.geometry.surface = md.geometry.surface + 50.
     16md.extrude(3, 1.)
     17md = setflowequation(md, 'HO', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md.masstransport.hydrostatic_adjustment = 'Incremental'
     20md = solve(md, 'Transient')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    24         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', \
    25         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    26 field_tolerances=[\
    27         1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,\
    28         2e-09,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,\
    29         1e-08,1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05]
    30 field_values=[\
    31         md.results.TransientSolution[0].Vx,\
    32         md.results.TransientSolution[0].Vy,\
    33         md.results.TransientSolution[0].Vz,\
    34         md.results.TransientSolution[0].Vel,\
    35         md.results.TransientSolution[0].Pressure,\
    36         md.results.TransientSolution[0].Base,\
    37         md.results.TransientSolution[0].Surface,\
    38         md.results.TransientSolution[0].Thickness,\
    39         md.results.TransientSolution[0].Temperature,\
    40         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    41         md.results.TransientSolution[1].Vx,\
    42         md.results.TransientSolution[1].Vy,\
    43         md.results.TransientSolution[1].Vz,\
    44         md.results.TransientSolution[1].Vel,\
    45         md.results.TransientSolution[1].Pressure,\
    46         md.results.TransientSolution[1].Base,\
    47         md.results.TransientSolution[1].Surface,\
    48         md.results.TransientSolution[1].Thickness,\
    49         md.results.TransientSolution[1].Temperature,\
    50         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    51         md.results.TransientSolution[2].Vx,\
    52         md.results.TransientSolution[2].Vy,\
    53         md.results.TransientSolution[2].Vz,\
    54         md.results.TransientSolution[2].Vel,\
    55         md.results.TransientSolution[2].Pressure,\
    56         md.results.TransientSolution[2].Base,\
    57         md.results.TransientSolution[2].Surface,\
    58         md.results.TransientSolution[2].Thickness,\
    59         md.results.TransientSolution[2].Temperature,\
    60         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    61         ]
     23field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     24               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     25               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     26field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05,
     27                    2e-09, 1e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05,
     28                    1e-08, 1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05]
     29field_values = [md.results.TransientSolution[0].Vx,
     30                md.results.TransientSolution[0].Vy,
     31                md.results.TransientSolution[0].Vz,
     32                md.results.TransientSolution[0].Vel,
     33                md.results.TransientSolution[0].Pressure,
     34                md.results.TransientSolution[0].Base,
     35                md.results.TransientSolution[0].Surface,
     36                md.results.TransientSolution[0].Thickness,
     37                md.results.TransientSolution[0].Temperature,
     38                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vz,
     42                md.results.TransientSolution[1].Vel,
     43                md.results.TransientSolution[1].Pressure,
     44                md.results.TransientSolution[1].Base,
     45                md.results.TransientSolution[1].Surface,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[1].Temperature,
     48                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     49                md.results.TransientSolution[2].Vx,
     50                md.results.TransientSolution[2].Vy,
     51                md.results.TransientSolution[2].Vz,
     52                md.results.TransientSolution[2].Vel,
     53                md.results.TransientSolution[2].Pressure,
     54                md.results.TransientSolution[2].Base,
     55                md.results.TransientSolution[2].Surface,
     56                md.results.TransientSolution[2].Thickness,
     57                md.results.TransientSolution[2].Temperature,
     58                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test226.py

    r21787 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md.timestepping = timesteppingadaptive(md.timestepping);
    17 md.timestepping.final_time=15.
    18 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.timestepping = timesteppingadaptive(md.timestepping)
     17md.timestepping.final_time = 15.
     18md = solve(md, 'Transient')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    22 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    23 field_values=[\
    24         md.results.TransientSolution[0].Vx,\
    25         md.results.TransientSolution[0].Vy,\
    26         md.results.TransientSolution[0].Vel,\
    27         md.results.TransientSolution[0].Pressure,\
    28         md.results.TransientSolution[0].Base,\
    29         md.results.TransientSolution[0].Surface,\
    30         md.results.TransientSolution[0].Thickness,\
    31         md.results.TransientSolution[1].Vx,\
    32         md.results.TransientSolution[1].Vy,\
    33         md.results.TransientSolution[1].Vel,\
    34         md.results.TransientSolution[1].Pressure,\
    35         md.results.TransientSolution[1].Base,\
    36         md.results.TransientSolution[1].Surface,\
    37         md.results.TransientSolution[1].Thickness,\
    38         md.results.TransientSolution[2].Vx,\
    39         md.results.TransientSolution[2].Vy,\
    40         md.results.TransientSolution[2].Vel,\
    41         md.results.TransientSolution[2].Pressure,\
    42         md.results.TransientSolution[2].Base,\
    43         md.results.TransientSolution[2].Surface,\
    44         md.results.TransientSolution[2].Thickness,\
    45         ]
     21field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1',
     22               'Bed1', 'Surface1', 'Thickness1',
     23               'Vx2', 'Vy2', 'Vel2', 'Pressure2',
     24               'Bed2', 'Surface2', 'Thickness2',
     25               'Vx3', 'Vy3', 'Vel3', 'Pressure3',
     26               'Bed3', 'Surface3', 'Thickness3']
     27field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     28                    1e-13, 1e-13, 1e-13,
     29                    1e-13, 1e-13, 1e-13, 1e-13,
     30                    1e-13, 1e-13, 1e-13,
     31                    1e-13, 1e-13, 1e-13, 1e-13,
     32                    1e-13, 1e-13, 1e-13]
     33field_values = [md.results.TransientSolution[0].Vx,
     34                md.results.TransientSolution[0].Vy,
     35                md.results.TransientSolution[0].Vel,
     36                md.results.TransientSolution[0].Pressure,
     37                md.results.TransientSolution[0].Base,
     38                md.results.TransientSolution[0].Surface,
     39                md.results.TransientSolution[0].Thickness,
     40                md.results.TransientSolution[1].Vx,
     41                md.results.TransientSolution[1].Vy,
     42                md.results.TransientSolution[1].Vel,
     43                md.results.TransientSolution[1].Pressure,
     44                md.results.TransientSolution[1].Base,
     45                md.results.TransientSolution[1].Surface,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[2].Vx,
     48                md.results.TransientSolution[2].Vy,
     49                md.results.TransientSolution[2].Vel,
     50                md.results.TransientSolution[2].Pressure,
     51                md.results.TransientSolution[2].Base,
     52                md.results.TransientSolution[2].Surface,
     53                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test227.py

    r23444 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',200000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelf.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 200000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelf.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717md.timestepping = timesteppingadaptive(md.timestepping)
    18 md.timestepping.final_time=20.
    19 md=solve(md,'Transient')
     18md.timestepping.final_time = 20.
     19md = solve(md, 'Transient')
    2020
    2121#Fields and tolerances to track changes
    22 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    23         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', \
    24         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    25 field_tolerances=[\
    26         1e-08,5e-09,1e-09,5e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,\
    27         2e-09,5e-09,1e-08,5e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06,\
    28         1e-08,1e-08,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05]
    29 field_values=[\
    30         md.results.TransientSolution[0].Vx,\
    31         md.results.TransientSolution[0].Vy,\
    32         md.results.TransientSolution[0].Vz,\
    33         md.results.TransientSolution[0].Vel,\
    34         md.results.TransientSolution[0].Pressure,\
    35         md.results.TransientSolution[0].Base,\
    36         md.results.TransientSolution[0].Surface,\
    37         md.results.TransientSolution[0].Thickness,\
    38         md.results.TransientSolution[0].Temperature,\
    39         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    40         md.results.TransientSolution[1].Vx,\
    41         md.results.TransientSolution[1].Vy,\
    42         md.results.TransientSolution[1].Vz,\
    43         md.results.TransientSolution[1].Vel,\
    44         md.results.TransientSolution[1].Pressure,\
    45         md.results.TransientSolution[1].Base,\
    46         md.results.TransientSolution[1].Surface,\
    47         md.results.TransientSolution[1].Thickness,\
    48         md.results.TransientSolution[1].Temperature,\
    49         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    50         md.results.TransientSolution[2].Vx,\
    51         md.results.TransientSolution[2].Vy,\
    52         md.results.TransientSolution[2].Vz,\
    53         md.results.TransientSolution[2].Vel,\
    54         md.results.TransientSolution[2].Pressure,\
    55         md.results.TransientSolution[2].Base,\
    56         md.results.TransientSolution[2].Surface,\
    57         md.results.TransientSolution[2].Thickness,\
    58         md.results.TransientSolution[2].Temperature,\
    59         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    60         ]
     22field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     23               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     24               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     25field_tolerances = [1e-08, 5e-09, 1e-09, 5e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     26                    2e-09, 5e-09, 1e-08, 5e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-06,
     27                    1e-08, 1e-08, 1e-08, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-05]
     28field_values = [md.results.TransientSolution[0].Vx,
     29                md.results.TransientSolution[0].Vy,
     30                md.results.TransientSolution[0].Vz,
     31                md.results.TransientSolution[0].Vel,
     32                md.results.TransientSolution[0].Pressure,
     33                md.results.TransientSolution[0].Base,
     34                md.results.TransientSolution[0].Surface,
     35                md.results.TransientSolution[0].Thickness,
     36                md.results.TransientSolution[0].Temperature,
     37                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     38                md.results.TransientSolution[1].Vx,
     39                md.results.TransientSolution[1].Vy,
     40                md.results.TransientSolution[1].Vz,
     41                md.results.TransientSolution[1].Vel,
     42                md.results.TransientSolution[1].Pressure,
     43                md.results.TransientSolution[1].Base,
     44                md.results.TransientSolution[1].Surface,
     45                md.results.TransientSolution[1].Thickness,
     46                md.results.TransientSolution[1].Temperature,
     47                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     48                md.results.TransientSolution[2].Vx,
     49                md.results.TransientSolution[2].Vy,
     50                md.results.TransientSolution[2].Vz,
     51                md.results.TransientSolution[2].Vel,
     52                md.results.TransientSolution[2].Pressure,
     53                md.results.TransientSolution[2].Base,
     54                md.results.TransientSolution[2].Surface,
     55                md.results.TransientSolution[2].Thickness,
     56                md.results.TransientSolution[2].Temperature,
     57                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test228.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 md.timestepping.time_step=1.
    19 md.settings.output_frequency=1
    20 md.timestepping.final_time=4.
     18md.timestepping.time_step = 1.
     19md.settings.output_frequency = 1
     20md.timestepping.final_time = 4.
    2121
    2222#Set up transient
    23 smb=np.ones((md.mesh.numberofvertices))*3.6
    24 smb=np.vstack((smb,smb*-1.)).T
     23smb = np.ones((md.mesh.numberofvertices)) * 3.6
     24smb = np.vstack((smb, smb * -1.)).T
    2525
    26 md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
    27 md.transient.isthermal=False
     26md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
     27md.transient.isthermal = False
    2828
    29 md=solve(md,'Transient')
     29md = solve(md, 'Transient')
    3030
    3131#Fields and tolerances to track changes
    32 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    33                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    34                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    35                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    36 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    37                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    38                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    39                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    40 field_values=[md.results.TransientSolution[0].Vx,
    41                                                         md.results.TransientSolution[0].Vy,
    42                                                         md.results.TransientSolution[0].Vel,
    43                                                         md.results.TransientSolution[0].Pressure,
    44                                                         md.results.TransientSolution[0].Base,
    45                                                         md.results.TransientSolution[0].Surface,
    46                                                         md.results.TransientSolution[0].Thickness,
    47                                                         md.results.TransientSolution[0].SmbMassBalance,
    48                                                         md.results.TransientSolution[1].Vx,
    49                                                         md.results.TransientSolution[1].Vy,
    50                                                         md.results.TransientSolution[1].Vel,
    51                                                         md.results.TransientSolution[1].Pressure,
    52                                                         md.results.TransientSolution[1].Base,
    53                                                         md.results.TransientSolution[1].Surface,
    54                                                         md.results.TransientSolution[1].Thickness,
    55                                                         md.results.TransientSolution[1].SmbMassBalance,
    56                                                         md.results.TransientSolution[2].Vx,
    57                                                         md.results.TransientSolution[2].Vy,
    58                                                         md.results.TransientSolution[2].Vel,
    59                                                         md.results.TransientSolution[2].Pressure,
    60                                                         md.results.TransientSolution[2].Base,
    61                                                         md.results.TransientSolution[2].Surface,
    62                                                         md.results.TransientSolution[2].Thickness,
    63                                                         md.results.TransientSolution[2].SmbMassBalance,
    64                                                         md.results.TransientSolution[3].Vx,
    65                                                         md.results.TransientSolution[3].Vy,
    66                                                         md.results.TransientSolution[3].Vel,
    67                                                         md.results.TransientSolution[3].Pressure,
    68                                                         md.results.TransientSolution[3].Base,
    69                                                         md.results.TransientSolution[3].Surface,
    70                                                         md.results.TransientSolution[3].Thickness,
    71                                                         md.results.TransientSolution[3].SmbMassBalance]
     32field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     33               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     34               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     35               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     36field_tolerances = [1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     37                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     38                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     39                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     40field_values = [md.results.TransientSolution[0].Vx,
     41                md.results.TransientSolution[0].Vy,
     42                md.results.TransientSolution[0].Vel,
     43                md.results.TransientSolution[0].Pressure,
     44                md.results.TransientSolution[0].Base,
     45                md.results.TransientSolution[0].Surface,
     46                md.results.TransientSolution[0].Thickness,
     47                md.results.TransientSolution[0].SmbMassBalance,
     48                md.results.TransientSolution[1].Vx,
     49                md.results.TransientSolution[1].Vy,
     50                md.results.TransientSolution[1].Vel,
     51                md.results.TransientSolution[1].Pressure,
     52                md.results.TransientSolution[1].Base,
     53                md.results.TransientSolution[1].Surface,
     54                md.results.TransientSolution[1].Thickness,
     55                md.results.TransientSolution[1].SmbMassBalance,
     56                md.results.TransientSolution[2].Vx,
     57                md.results.TransientSolution[2].Vy,
     58                md.results.TransientSolution[2].Vel,
     59                md.results.TransientSolution[2].Pressure,
     60                md.results.TransientSolution[2].Base,
     61                md.results.TransientSolution[2].Surface,
     62                md.results.TransientSolution[2].Thickness,
     63                md.results.TransientSolution[2].SmbMassBalance,
     64                md.results.TransientSolution[3].Vx,
     65                md.results.TransientSolution[3].Vy,
     66                md.results.TransientSolution[3].Vel,
     67                md.results.TransientSolution[3].Pressure,
     68                md.results.TransientSolution[3].Base,
     69                md.results.TransientSolution[3].Surface,
     70                md.results.TransientSolution[3].Thickness,
     71                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test229.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 md.timestepping.time_step=1.
    19 md.settings.output_frequency=1
    20 md.timestepping.final_time=4.
     18md.timestepping.time_step = 1.
     19md.settings.output_frequency = 1
     20md.timestepping.final_time = 4.
    2121
    2222#Set up transient
    23 smb=np.ones((md.mesh.numberofvertices))*3.6
    24 smb=np.vstack((smb,smb*2.)).T
     23smb = np.ones((md.mesh.numberofvertices)) * 3.6
     24smb = np.vstack((smb, smb * 2.)).T
    2525
    26 md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
    27 md.transient.isthermal=False
     26md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
     27md.transient.isthermal = False
    2828
    29 md=solve(md,'Transient')
     29md = solve(md, 'Transient')
    3030
    3131#Fields and tolerances to track changes
    32 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    33                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    34                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    35                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    36 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    37                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    38                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    39                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    40 field_values=[md.results.TransientSolution[0].Vx,
    41                                                         md.results.TransientSolution[0].Vy,
    42                                                         md.results.TransientSolution[0].Vel,
    43                                                         md.results.TransientSolution[0].Pressure,
    44                                                         md.results.TransientSolution[0].Base,
    45                                                         md.results.TransientSolution[0].Surface,
    46                                                         md.results.TransientSolution[0].Thickness,
    47                                                         md.results.TransientSolution[0].SmbMassBalance,
    48                                                         md.results.TransientSolution[1].Vx,
    49                                                         md.results.TransientSolution[1].Vy,
    50                                                         md.results.TransientSolution[1].Vel,
    51                                                         md.results.TransientSolution[1].Pressure,
    52                                                         md.results.TransientSolution[1].Base,
    53                                                         md.results.TransientSolution[1].Surface,
    54                                                         md.results.TransientSolution[1].Thickness,
    55                                                         md.results.TransientSolution[1].SmbMassBalance,
    56                                                         md.results.TransientSolution[2].Vx,
    57                                                         md.results.TransientSolution[2].Vy,
    58                                                         md.results.TransientSolution[2].Vel,
    59                                                         md.results.TransientSolution[2].Pressure,
    60                                                         md.results.TransientSolution[2].Base,
    61                                                         md.results.TransientSolution[2].Surface,
    62                                                         md.results.TransientSolution[2].Thickness,
    63                                                         md.results.TransientSolution[2].SmbMassBalance,
    64                                                         md.results.TransientSolution[3].Vx,
    65                                                         md.results.TransientSolution[3].Vy,
    66                                                         md.results.TransientSolution[3].Vel,
    67                                                         md.results.TransientSolution[3].Pressure,
    68                                                         md.results.TransientSolution[3].Base,
    69                                                         md.results.TransientSolution[3].Surface,
    70                                                         md.results.TransientSolution[3].Thickness,
    71                                                         md.results.TransientSolution[3].SmbMassBalance]
     32field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     33               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     34               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     35               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     36field_tolerances = [1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     37                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     38                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     39                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     40field_values = [md.results.TransientSolution[0].Vx,
     41                md.results.TransientSolution[0].Vy,
     42                md.results.TransientSolution[0].Vel,
     43                md.results.TransientSolution[0].Pressure,
     44                md.results.TransientSolution[0].Base,
     45                md.results.TransientSolution[0].Surface,
     46                md.results.TransientSolution[0].Thickness,
     47                md.results.TransientSolution[0].SmbMassBalance,
     48                md.results.TransientSolution[1].Vx,
     49                md.results.TransientSolution[1].Vy,
     50                md.results.TransientSolution[1].Vel,
     51                md.results.TransientSolution[1].Pressure,
     52                md.results.TransientSolution[1].Base,
     53                md.results.TransientSolution[1].Surface,
     54                md.results.TransientSolution[1].Thickness,
     55                md.results.TransientSolution[1].SmbMassBalance,
     56                md.results.TransientSolution[2].Vx,
     57                md.results.TransientSolution[2].Vy,
     58                md.results.TransientSolution[2].Vel,
     59                md.results.TransientSolution[2].Pressure,
     60                md.results.TransientSolution[2].Base,
     61                md.results.TransientSolution[2].Surface,
     62                md.results.TransientSolution[2].Thickness,
     63                md.results.TransientSolution[2].SmbMassBalance,
     64                md.results.TransientSolution[3].Vx,
     65                md.results.TransientSolution[3].Vy,
     66                md.results.TransientSolution[3].Vel,
     67                md.results.TransientSolution[3].Pressure,
     68                md.results.TransientSolution[3].Base,
     69                md.results.TransientSolution[3].Surface,
     70                md.results.TransientSolution[3].Thickness,
     71                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test230.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',350000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 350000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.timestepping.time_step=1.
    20 md.settings.output_frequency=1
    21 md.timestepping.final_time=4.
     19md.timestepping.time_step = 1.
     20md.settings.output_frequency = 1
     21md.timestepping.final_time = 4.
    2222
    2323#Set up transient
    24 smb=np.ones((md.mesh.numberofvertices))*3.6
    25 smb=np.vstack((smb,smb*-1.)).T
     24smb = np.ones((md.mesh.numberofvertices)) * 3.6
     25smb = np.vstack((smb, smb * -1.)).T
    2626
    27 md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
    28 md.transient.isthermal=False
     27md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
     28md.transient.isthermal = False
    2929
    30 md=solve(md,'Transient')
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    34                                                                         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    35                                                                         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    36                                                                         'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
    37 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    38                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    39                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    40                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    41 field_values=[md.results.TransientSolution[0].Vx,
    42                                                         md.results.TransientSolution[0].Vy,
    43                                                         md.results.TransientSolution[0].Vz,
    44                                                         md.results.TransientSolution[0].Vel,
    45                                                         md.results.TransientSolution[0].Pressure,
    46                                                         md.results.TransientSolution[0].Base,
    47                                                         md.results.TransientSolution[0].Surface,
    48                                                         md.results.TransientSolution[0].Thickness,
    49                                                         md.results.TransientSolution[0].SmbMassBalance,
    50                                                         md.results.TransientSolution[1].Vx,
    51                                                         md.results.TransientSolution[1].Vy,
    52                                                         md.results.TransientSolution[1].Vz,
    53                                                         md.results.TransientSolution[1].Vel,
    54                                                         md.results.TransientSolution[1].Pressure,
    55                                                         md.results.TransientSolution[1].Base,
    56                                                         md.results.TransientSolution[1].Surface,
    57                                                         md.results.TransientSolution[1].Thickness,
    58                                                         md.results.TransientSolution[1].SmbMassBalance,
    59                                                         md.results.TransientSolution[2].Vx,
    60                                                         md.results.TransientSolution[2].Vy,
    61                                                         md.results.TransientSolution[2].Vz,
    62                                                         md.results.TransientSolution[2].Vel,
    63                                                         md.results.TransientSolution[2].Pressure,
    64                                                         md.results.TransientSolution[2].Base,
    65                                                         md.results.TransientSolution[2].Surface,
    66                                                         md.results.TransientSolution[2].Thickness,
    67                                                         md.results.TransientSolution[2].SmbMassBalance,
    68                                                         md.results.TransientSolution[3].Vx,
    69                                                         md.results.TransientSolution[3].Vy,
    70                                                         md.results.TransientSolution[3].Vz,
    71                                                         md.results.TransientSolution[3].Vel,
    72                                                         md.results.TransientSolution[3].Pressure,
    73                                                         md.results.TransientSolution[3].Base,
    74                                                         md.results.TransientSolution[3].Surface,
    75                                                         md.results.TransientSolution[3].Thickness,
    76                                                         md.results.TransientSolution[3].SmbMassBalance]
     33field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     34               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     35               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     36               'Vx4', 'Vy4', 'Vz4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassbalance4']
     37field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     38                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     39                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     40                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     41field_values = [md.results.TransientSolution[0].Vx,
     42                md.results.TransientSolution[0].Vy,
     43                md.results.TransientSolution[0].Vz,
     44                md.results.TransientSolution[0].Vel,
     45                md.results.TransientSolution[0].Pressure,
     46                md.results.TransientSolution[0].Base,
     47                md.results.TransientSolution[0].Surface,
     48                md.results.TransientSolution[0].Thickness,
     49                md.results.TransientSolution[0].SmbMassBalance,
     50                md.results.TransientSolution[1].Vx,
     51                md.results.TransientSolution[1].Vy,
     52                md.results.TransientSolution[1].Vz,
     53                md.results.TransientSolution[1].Vel,
     54                md.results.TransientSolution[1].Pressure,
     55                md.results.TransientSolution[1].Base,
     56                md.results.TransientSolution[1].Surface,
     57                md.results.TransientSolution[1].Thickness,
     58                md.results.TransientSolution[1].SmbMassBalance,
     59                md.results.TransientSolution[2].Vx,
     60                md.results.TransientSolution[2].Vy,
     61                md.results.TransientSolution[2].Vz,
     62                md.results.TransientSolution[2].Vel,
     63                md.results.TransientSolution[2].Pressure,
     64                md.results.TransientSolution[2].Base,
     65                md.results.TransientSolution[2].Surface,
     66                md.results.TransientSolution[2].Thickness,
     67                md.results.TransientSolution[2].SmbMassBalance,
     68                md.results.TransientSolution[3].Vx,
     69                md.results.TransientSolution[3].Vy,
     70                md.results.TransientSolution[3].Vz,
     71                md.results.TransientSolution[3].Vel,
     72                md.results.TransientSolution[3].Pressure,
     73                md.results.TransientSolution[3].Base,
     74                md.results.TransientSolution[3].Surface,
     75                md.results.TransientSolution[3].Thickness,
     76                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test231.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',350000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 350000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.timestepping.time_step=1.
    20 md.settings.output_frequency=1
    21 md.timestepping.final_time=4.
     19md.timestepping.time_step = 1.
     20md.settings.output_frequency = 1
     21md.timestepping.final_time = 4.
    2222
    2323#Set up transient
    24 smb=np.ones((md.mesh.numberofvertices))*3.6
    25 smb=np.vstack((smb,smb*2.)).T
     24smb = np.ones((md.mesh.numberofvertices)) * 3.6
     25smb = np.vstack((smb, smb * 2.)).T
    2626
    27 md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
    28 md.transient.isthermal=False
     27md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
     28md.transient.isthermal = False
    2929
    30 md=solve(md,'Transient')
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    34                                                                         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    35                                                                         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    36                                                                         'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
    37 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    38                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    39                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    40                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    41 field_values=[md.results.TransientSolution[0].Vx,
    42                                                         md.results.TransientSolution[0].Vy,
    43                                                         md.results.TransientSolution[0].Vz,
    44                                                         md.results.TransientSolution[0].Vel,
    45                                                         md.results.TransientSolution[0].Pressure,
    46                                                         md.results.TransientSolution[0].Base,
    47                                                         md.results.TransientSolution[0].Surface,
    48                                                         md.results.TransientSolution[0].Thickness,
    49                                                         md.results.TransientSolution[0].SmbMassBalance,
    50                                                         md.results.TransientSolution[1].Vx,
    51                                                         md.results.TransientSolution[1].Vy,
    52                                                         md.results.TransientSolution[1].Vz,
    53                                                         md.results.TransientSolution[1].Vel,
    54                                                         md.results.TransientSolution[1].Pressure,
    55                                                         md.results.TransientSolution[1].Base,
    56                                                         md.results.TransientSolution[1].Surface,
    57                                                         md.results.TransientSolution[1].Thickness,
    58                                                         md.results.TransientSolution[1].SmbMassBalance,
    59                                                         md.results.TransientSolution[2].Vx,
    60                                                         md.results.TransientSolution[2].Vy,
    61                                                         md.results.TransientSolution[2].Vz,
    62                                                         md.results.TransientSolution[2].Vel,
    63                                                         md.results.TransientSolution[2].Pressure,
    64                                                         md.results.TransientSolution[2].Base,
    65                                                         md.results.TransientSolution[2].Surface,
    66                                                         md.results.TransientSolution[2].Thickness,
    67                                                         md.results.TransientSolution[2].SmbMassBalance,
    68                                                         md.results.TransientSolution[3].Vx,
    69                                                         md.results.TransientSolution[3].Vy,
    70                                                         md.results.TransientSolution[3].Vz,
    71                                                         md.results.TransientSolution[3].Vel,
    72                                                         md.results.TransientSolution[3].Pressure,
    73                                                         md.results.TransientSolution[3].Base,
    74                                                         md.results.TransientSolution[3].Surface,
    75                                                         md.results.TransientSolution[3].Thickness,
    76                                                         md.results.TransientSolution[3].SmbMassBalance]
     33field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     34               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     35               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     36               'Vx4', 'Vy4', 'Vz4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassbalance4']
     37field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     38                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     39                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     40                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     41field_values = [md.results.TransientSolution[0].Vx,
     42                md.results.TransientSolution[0].Vy,
     43                md.results.TransientSolution[0].Vz,
     44                md.results.TransientSolution[0].Vel,
     45                md.results.TransientSolution[0].Pressure,
     46                md.results.TransientSolution[0].Base,
     47                md.results.TransientSolution[0].Surface,
     48                md.results.TransientSolution[0].Thickness,
     49                md.results.TransientSolution[0].SmbMassBalance,
     50                md.results.TransientSolution[1].Vx,
     51                md.results.TransientSolution[1].Vy,
     52                md.results.TransientSolution[1].Vz,
     53                md.results.TransientSolution[1].Vel,
     54                md.results.TransientSolution[1].Pressure,
     55                md.results.TransientSolution[1].Base,
     56                md.results.TransientSolution[1].Surface,
     57                md.results.TransientSolution[1].Thickness,
     58                md.results.TransientSolution[1].SmbMassBalance,
     59                md.results.TransientSolution[2].Vx,
     60                md.results.TransientSolution[2].Vy,
     61                md.results.TransientSolution[2].Vz,
     62                md.results.TransientSolution[2].Vel,
     63                md.results.TransientSolution[2].Pressure,
     64                md.results.TransientSolution[2].Base,
     65                md.results.TransientSolution[2].Surface,
     66                md.results.TransientSolution[2].Thickness,
     67                md.results.TransientSolution[2].SmbMassBalance,
     68                md.results.TransientSolution[3].Vx,
     69                md.results.TransientSolution[3].Vy,
     70                md.results.TransientSolution[3].Vz,
     71                md.results.TransientSolution[3].Vel,
     72                md.results.TransientSolution[3].Pressure,
     73                md.results.TransientSolution[3].Base,
     74                md.results.TransientSolution[3].Surface,
     75                md.results.TransientSolution[3].Thickness,
     76                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test232.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.thermal.spctemperature=np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5., md.thermal.spctemperature+10., md.thermal.spctemperature+15.)).T, [1.5,2.5,3.5,4.]))
    19 md.timestepping.time_step=1.
    20 md.timestepping.final_time=4.
    21 md.transient.isstressbalance=False
    22 md.transient.ismasstransport=False
    23 md.transient.issmb=True
    24 md.transient.isthermal=True
    25 md.transient.isgroundingline=False
    26 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.thermal.spctemperature = np.vstack((np.vstack((md.thermal.spctemperature,
     19                                                  md.thermal.spctemperature + 5.,
     20                                                  md.thermal.spctemperature + 10.,
     21                                                  md.thermal.spctemperature + 15.)).T, [1.5, 2.5, 3.5, 4.]))
     22md.timestepping.time_step = 1.
     23md.timestepping.final_time = 4.
     24md.transient.isstressbalance = False
     25md.transient.ismasstransport = False
     26md.transient.issmb = True
     27md.transient.isthermal = True
     28md.transient.isgroundingline = False
     29md = solve(md, 'Transient')
    2730
    2831#Fields and tolerances to track changes
    29 field_names     =['Temperature1','BasalforcingsGroundediceMeltingRate1',
    30                                                                         'Temperature2','BasalforcingsGroundediceMeltingRate2',
    31                                                                         'Temperature3','BasalforcingsGroundediceMeltingRate3',
    32                                                                         'Temperature4','BasalforcingsGroundediceMeltingRate4']
    33 field_tolerances=[1e-13,1e-6,1e-13,1e-6,1e-13,1e-6,1e-13,1e-6]
    34 field_values=[md.results.TransientSolution[0].Temperature,
    35                                                         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
    36                                                         md.results.TransientSolution[1].Temperature,
    37                                                         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
    38                                                         md.results.TransientSolution[2].Temperature,
    39                                                         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
    40                                                         md.results.TransientSolution[3].Temperature,
    41                                                         md.results.TransientSolution[3].BasalforcingsGroundediceMeltingRate]
     32field_names = ['Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     33               'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     34               'Temperature3', 'BasalforcingsGroundediceMeltingRate3',
     35               'Temperature4', 'BasalforcingsGroundediceMeltingRate4']
     36field_tolerances = [1e-13, 1e-6, 1e-13, 1e-6, 1e-13, 1e-6, 1e-13, 1e-6]
     37field_values = [md.results.TransientSolution[0].Temperature,
     38                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     39                md.results.TransientSolution[1].Temperature,
     40                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     41                md.results.TransientSolution[2].Temperature,
     42                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
     43                md.results.TransientSolution[3].Temperature,
     44                md.results.TransientSolution[3].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test233.py

    r22570 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.thermal.spctemperature=np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5.)).T, [1.,2.]))
    19 md.timestepping.time_step=0.5
    20 md.timestepping.final_time=2.
    21 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.thermal.spctemperature = np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature + 5.)).T, [1., 2.]))
     19md.timestepping.time_step = 0.5
     20md.timestepping.final_time = 2.
     21md = solve(md, 'Transient')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1',
    25         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2',
    26         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3',
    27         'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','Temperature4','BasalforcingsGroundediceMeltingRate4']
    28 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,
    29         1e-09,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06,
    30         1e-08,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06,
    31         1e-08,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06]
    32 field_values=[md.results.TransientSolution[0].Vx,
    33         md.results.TransientSolution[0].Vy,
    34         md.results.TransientSolution[0].Vz,
    35         md.results.TransientSolution[0].Vel,
    36         md.results.TransientSolution[0].Pressure,
    37         md.results.TransientSolution[0].Base,
    38         md.results.TransientSolution[0].Surface,
    39         md.results.TransientSolution[0].Thickness,
    40         md.results.TransientSolution[0].Temperature,
    41         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
    42         md.results.TransientSolution[1].Vx,
    43         md.results.TransientSolution[1].Vy,
    44         md.results.TransientSolution[1].Vz,
    45         md.results.TransientSolution[1].Vel,
    46         md.results.TransientSolution[1].Pressure,
    47         md.results.TransientSolution[1].Base,
    48         md.results.TransientSolution[1].Surface,
    49         md.results.TransientSolution[1].Thickness,
    50         md.results.TransientSolution[1].Temperature,
    51         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
    52         md.results.TransientSolution[2].Vx,
    53         md.results.TransientSolution[2].Vy,
    54         md.results.TransientSolution[2].Vz,
    55         md.results.TransientSolution[2].Vel,
    56         md.results.TransientSolution[2].Pressure,
    57         md.results.TransientSolution[2].Base,
    58         md.results.TransientSolution[2].Surface,
    59         md.results.TransientSolution[2].Thickness,
    60         md.results.TransientSolution[2].Temperature,
    61         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
    62         md.results.TransientSolution[3].Vx,
    63         md.results.TransientSolution[3].Vy,
    64         md.results.TransientSolution[3].Vz,
    65         md.results.TransientSolution[3].Vel,
    66         md.results.TransientSolution[3].Pressure,
    67         md.results.TransientSolution[3].Base,
    68         md.results.TransientSolution[3].Surface,
    69         md.results.TransientSolution[3].Thickness,
    70         md.results.TransientSolution[3].Temperature,
    71         md.results.TransientSolution[3].BasalforcingsGroundediceMeltingRate]
     24field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     25               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     26               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3',
     27               'Vx4', 'Vy4', 'Vz4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'Temperature4', 'BasalforcingsGroundediceMeltingRate4']
     28field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     29                    1e-09, 1e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-06,
     30                    1e-08, 1e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-06,
     31                    1e-08, 1e-09, 1e-08, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-06]
     32field_values = [md.results.TransientSolution[0].Vx,
     33                md.results.TransientSolution[0].Vy,
     34                md.results.TransientSolution[0].Vz,
     35                md.results.TransientSolution[0].Vel,
     36                md.results.TransientSolution[0].Pressure,
     37                md.results.TransientSolution[0].Base,
     38                md.results.TransientSolution[0].Surface,
     39                md.results.TransientSolution[0].Thickness,
     40                md.results.TransientSolution[0].Temperature,
     41                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     42                md.results.TransientSolution[1].Vx,
     43                md.results.TransientSolution[1].Vy,
     44                md.results.TransientSolution[1].Vz,
     45                md.results.TransientSolution[1].Vel,
     46                md.results.TransientSolution[1].Pressure,
     47                md.results.TransientSolution[1].Base,
     48                md.results.TransientSolution[1].Surface,
     49                md.results.TransientSolution[1].Thickness,
     50                md.results.TransientSolution[1].Temperature,
     51                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     52                md.results.TransientSolution[2].Vx,
     53                md.results.TransientSolution[2].Vy,
     54                md.results.TransientSolution[2].Vz,
     55                md.results.TransientSolution[2].Vel,
     56                md.results.TransientSolution[2].Pressure,
     57                md.results.TransientSolution[2].Base,
     58                md.results.TransientSolution[2].Surface,
     59                md.results.TransientSolution[2].Thickness,
     60                md.results.TransientSolution[2].Temperature,
     61                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
     62                md.results.TransientSolution[3].Vx,
     63                md.results.TransientSolution[3].Vy,
     64                md.results.TransientSolution[3].Vz,
     65                md.results.TransientSolution[3].Vel,
     66                md.results.TransientSolution[3].Pressure,
     67                md.results.TransientSolution[3].Base,
     68                md.results.TransientSolution[3].Surface,
     69                md.results.TransientSolution[3].Thickness,
     70                md.results.TransientSolution[3].Temperature,
     71                md.results.TransientSolution[3].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test234.py

    r23707 r23793  
    11#Test Name: SquareShelfTranForceNeg2dDakotaSamp
    22import numpy as np
    3 import scipy.io as spio
    43from os import getcwd
    54from IssmConfig import IssmConfig
     
    1514from dmeth_params_set import *
    1615
    17 md = triangle(model(),'../Exp/Square.exp',180000.)
    18 md = setmask(md,'all','')
    19 md = parameterize(md,'../Par/SquareShelf.py')
    20 md = setflowequation(md,'SSA','all')
    21 md.cluster = generic('name',gethostname(),'np',3)
     16md = triangle(model(), '../Exp/Square.exp', 180000.)
     17md = setmask(md, 'all', '')
     18md = parameterize(md, '../Par/SquareShelf.py')
     19md = setflowequation(md, 'SSA', 'all')
     20md.cluster = generic('name', gethostname(), 'np', 3)
    2221
    2322md.timestepping.time_step = 1
     
    2524md.timestepping.final_time = 4
    2625
    27 smb = np.ones((md.mesh.numberofvertices,))*3.6
    28 smb = np.array([smb,smb*-1]).T
     26smb = np.ones((md.mesh.numberofvertices,)) * 3.6
     27smb = np.array([smb, smb * -1]).T
    2928
    3029md.smb.mass_balance = smb
    31 md.smb.mass_balance = np.concatenate((md.smb.mass_balance,[[1.5,3]]))
     30md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]]))
    3231md.transient.isthermal = 0
    3332
     
    4039#partitioning
    4140md.qmu.numberofpartitions = 20
    42 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
     41md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
    4342md.qmu.partition = md.qmu.partition - 1
    4443
    4544#variables
    46 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance',1,0.1)
     45md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 0.1)
    4746
    4847#responses
    49 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    50 md.qmu.responses.IceVolume = response_function.response_function('IceVolume',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    51 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    52 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    53 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    54 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    55 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    56 md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     48md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     49md.qmu.responses.IceVolume = response_function.response_function('IceVolume', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     50md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     51md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     52md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     53md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     54md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     55md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    5756
    5857#mass flux profiles
    59 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp']
     58md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp']
    6059md.qmu.mass_flux_profile_directory = getcwd()
    6160
    62 ##  nond_sampling study
     61#  nond_sampling study
    6362md.qmu.method = dakota_method.dakota_method('nond_samp')
    64 md.qmu.method = dmeth_params_set(md.qmu.method,'seed',1234,'samples',20,'sample_type','lhs')
     63md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'lhs')
    6564dver = str(version)
    66 if ((int(dver[0]) == 4 and int(dver[2])>2) or int(dver[0])>4):
    67         md.qmu.method = dmeth_params_set(md.qmu.method,'rng','rnum2')
     65if ((int(dver[0]) == 4 and int(dver[2]) > 2) or int(dver[0]) > 4):
     66    md.qmu.method = dmeth_params_set(md.qmu.method, 'rng', 'rnum2')
    6867
    6968#parameters
     
    7574
    7675if version >= 6:
    77         md.qmu.params.analysis_driver = 'matlab'
    78         md.qmu.params.evaluation_scheduling = 'master'
    79         md.qmu.params.processors_per_evaluation = 2
     76    md.qmu.params.analysis_driver = 'matlab'
     77    md.qmu.params.evaluation_scheduling = 'master'
     78    md.qmu.params.processors_per_evaluation = 2
    8079else:
    81         md.qmu.params.analysis_driver = 'stressbalance'
    82         md.qmu.params.evaluation_concurrency = 1
     80    md.qmu.params.analysis_driver = 'stressbalance'
     81    md.qmu.params.evaluation_concurrency = 1
    8382
    84 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     83md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8584md.transient.requested_outputs = ['IceVolume']
    8685
    8786#solve
    88 md.verbose = verbose('000000000')       # this line is recommended
    89 md = solve(md,'Transient','overwrite','y')
     87md.verbose = verbose('000000000')       # this line is recommended
     88md = solve(md, 'Transient', 'overwrite', 'y')
    9089md.qmu.results = md.results.dakota
    9190
     
    9392md.results.dakota.moments = []
    9493for i in range(8):
    95         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
     94    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
    9695
    9796for i in range(8):
    98         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
     97    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
    9998
    100 field_names      = ['moments']
     99field_names = ['moments']
    101100field_tolerances = [1e-11]
    102101field_values = [md.results.dakota.moments]
  • issm/trunk-jpl/test/NightlyRun/test235.py

    r23707 r23793  
    11#Test Name: SquareShelfTranForceNeg2dDakotaLocal
    22import numpy as np
    3 import scipy.io as spio
    43from os import getcwd
    54from model import *
     
    1514from dmeth_params_set import *
    1615
    17 md = triangle(model(),'../Exp/Square.exp',180000.)
    18 md = setmask(md,'all','')
    19 md = parameterize(md,'../Par/SquareShelf.py')
    20 md = setflowequation(md,'SSA','all')
    21 md.cluster = generic('name',gethostname(),'np',3)
     16md = triangle(model(), '../Exp/Square.exp', 180000.)
     17md = setmask(md, 'all', '')
     18md = parameterize(md, '../Par/SquareShelf.py')
     19md = setflowequation(md, 'SSA', 'all')
     20md.cluster = generic('name', gethostname(), 'np', 3)
    2221
    2322md.timestepping.time_step = 1
     
    2524md.timestepping.final_time = 4
    2625
    27 smb = np.ones((md.mesh.numberofvertices,))*3.6
    28 smb = np.array([smb,smb*-1]).T
     26smb = np.ones((md.mesh.numberofvertices,)) * 3.6
     27smb = np.array([smb, smb * -1]).T
    2928
    3029md.smb.mass_balance = smb
    31 md.smb.mass_balance = np.concatenate((md.smb.mass_balance,[[1.5,3]]))
     30md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]]))
    3231md.transient.isthermal = 0
    3332
     
    4039#partitioning
    4140md.qmu.numberofpartitions = 20
    42 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
     41md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
    4342md.qmu.partition = md.qmu.partition - 1
    4443
    4544#variables
    46 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance',1,100)
     45md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 100)
    4746
    4847#responses
    49 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    50 md.qmu.responses.IceVolume = response_function.response_function('IceVolume',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    51 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    52 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    53 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    54 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    55 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    56 md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     48md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     49md.qmu.responses.IceVolume = response_function.response_function('IceVolume', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     50md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     51md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     52md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     53md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     54md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     55md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    5756
    5857#mass flux profiles
    59 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp']
     58md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp']
    6059md.qmu.mass_flux_profile_directory = getcwd()
    6160
     
    7170
    7271if version >= 6:
    73         md.qmu.params.analysis_driver = 'matlab'
    74         md.qmu.params.evaluation_scheduling = 'master'
    75         md.qmu.params.processors_per_evaluation = 2
     72    md.qmu.params.analysis_driver = 'matlab'
     73    md.qmu.params.evaluation_scheduling = 'master'
     74    md.qmu.params.processors_per_evaluation = 2
    7675else:
    77         md.qmu.params.analysis_driver = 'stressbalance'
    78         md.qmu.params.evaluation_concurrency = 1
     76    md.qmu.params.analysis_driver = 'stressbalance'
     77    md.qmu.params.evaluation_concurrency = 1
    7978
    80 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     79md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8180md.transient.requested_outputs = ['IceVolume']
    8281
    8382#solve
    84 md.verbose = verbose('000000000')       # this line is recommended
    85 md = solve(md,'Transient','overwrite','y')
     83md.verbose = verbose('000000000')       # this line is recommended
     84md = solve(md, 'Transient', 'overwrite', 'y')
    8685md.qmu.results = md.results.dakota
    8786
     
    8988md.results.dakota.moments = []
    9089for i in range(8):
    91         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
     90    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
    9291
    9392for i in range(8):
    94         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
     93    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
    9594
    96 field_names      = ['moments']
     95field_names = ['moments']
    9796field_tolerances = [1e-11]
    9897field_values = [md.results.dakota.moments]
  • issm/trunk-jpl/test/NightlyRun/test236.py

    r23707 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
    1515
    1616# Use of ispdd and isdelta18o methods
    1717md.smb = SMBpdd()
    18 md.smb.isdelta18o=1
    19 md.smb.ismungsm=0
     18md.smb.isdelta18o = 1
     19md.smb.ismungsm = 0
    2020
    2121# Add temperature, precipitation and delta18o needed to measure the surface mass balance
    2222# creating delta18o
    23 delta18o=np.loadtxt('../Data/delta18o.data')
    24 md.smb.delta18o=delta18o
     23delta18o = np.loadtxt('../Data/delta18o.data')
     24md.smb.delta18o = delta18o
    2525# creating delta18oSurface
    26 md.smb.delta18o_surface = np.zeros((2,np.size(delta18o,axis=1)))
    27 md.smb.delta18o_surface[1,:] = delta18o[1,:]
     26md.smb.delta18o_surface = np.zeros((2, np.size(delta18o, axis=1)))
     27md.smb.delta18o_surface[1, :] = delta18o[1, :]
    2828
    2929# creating Present day and lgm temperatures
    3030# Same temperature over the all region:
    31 tmonth=np.ones(12)*(238.15+20.)
    32 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    33 md.smb.temperatures_lgm=np.zeros((md.mesh.numberofvertices+1,12))
    34 for imonth in range(0,12):
    35     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
    36     md.smb.temperatures_lgm[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]-20.
     31tmonth = np.ones(12) * (238.15 + 20.)
     32md.smb.temperatures_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     33md.smb.temperatures_lgm = np.zeros((md.mesh.numberofvertices + 1, 12))
     34for imonth in range(0, 12):
     35    md.smb.temperatures_presentday[0:md.mesh.numberofvertices, imonth] = tmonth[imonth]
     36    md.smb.temperatures_lgm[0:md.mesh.numberofvertices, imonth] = tmonth[imonth] - 20.
    3737    # Time for the last line:
    38     md.smb.temperatures_presentday[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
    39     md.smb.temperatures_lgm[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     38    md.smb.temperatures_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
     39    md.smb.temperatures_lgm[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    4040
    4141# creating initialization and spc temperatures initialization and spc
    42 md.thermal.spctemperature=np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1)    #-10*ones(md.mesh.numberofvertices,1)
    43 md.thermal.spctemperature=np.tile(md.thermal.spctemperature,(int(md.timestepping.final_time/md.timestepping.time_step),1)).T
    44 itemp=np.arange(0,md.timestepping.final_time,md.timestepping.time_step)
    45 md.thermal.spctemperature=np.vstack((md.thermal.spctemperature,itemp))
     42md.thermal.spctemperature = np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices, :], axis=1)    #-10*ones(md.mesh.numberofvertices, 1)
     43md.thermal.spctemperature = np.tile(md.thermal.spctemperature, (int(md.timestepping.final_time / md.timestepping.time_step), 1)).T
     44itemp = np.arange(0, md.timestepping.final_time, md.timestepping.time_step)
     45md.thermal.spctemperature = np.vstack((md.thermal.spctemperature, itemp))
    4646
    47 md.initialization.temperature=md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0]    #*ones(md.mesh.numberofvertices,1)
     47md.initialization.temperature = md.smb.temperatures_lgm[0:md.mesh.numberofvertices, 0]    #*ones(md.mesh.numberofvertices, 1)
    4848md.smb.initialize(md)
    4949
    5050# creating precipitation
    51 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    52 md.smb.precipitations_lgm=np.zeros((md.mesh.numberofvertices+1,12))
    53 for imonth in range(0,12):
    54         md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
    55         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
    57         md.smb.precipitations_lgm[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     51md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     52md.smb.precipitations_lgm = np.zeros((md.mesh.numberofvertices + 1, 12))
     53for imonth in range(0, 12):
     54    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
     55    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
     57    md.smb.precipitations_lgm[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    5858
    5959# Interpolation factors
    60 md.smb.Tdiff=0.5*np.ones((2,int(md.timestepping.final_time)))
    61 md.smb.sealev=0.5*np.ones((2,int(md.timestepping.final_time)))
     60md.smb.Tdiff = 0.5 * np.ones((2, int(md.timestepping.final_time)))
     61md.smb.sealev = 0.5 * np.ones((2, int(md.timestepping.final_time)))
    6262# Year of each data point
    63 md.smb.Tdiff[1,1:int(md.timestepping.final_time)]=np.arange(1.,int(md.timestepping.final_time))
    64 md.smb.sealev[1,1:int(md.timestepping.final_time)]=np.arange(1.,int(md.timestepping.final_time))
     63md.smb.Tdiff[1, 1:int(md.timestepping.final_time)] = np.arange(1., int(md.timestepping.final_time))
     64md.smb.sealev[1, 1:int(md.timestepping.final_time)] = np.arange(1., int(md.timestepping.final_time))
    6565
    6666# time steps and resolution
    67 md.timestepping.time_step=20.
    68 md.timestepping.final_time=60.
     67md.timestepping.time_step = 20.
     68md.timestepping.final_time = 60.
    6969
    7070
    7171#
    72 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
    73 md=setflowequation(md,'SSA','all')
    74 md.cluster=generic('name',gethostname(),'np',3)
    75 md=solve(md,'Transient')
     72md.transient.requested_outputs = ['default', 'SmbMonthlytemperatures']
     73md = setflowequation(md, 'SSA', 'all')
     74md.cluster = generic('name', gethostname(), 'np', 3)
     75md = solve(md, 'Transient')
    7676
    7777#Fields and tolerances to track changes
    78 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',
    79                                                                         'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',
    80                                                                         'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
    81 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    82                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    83                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    84 field_values=[md.results.TransientSolution[0].Vx,
    85                                                         md.results.TransientSolution[0].Vy,
    86                                                         md.results.TransientSolution[0].Vel,
    87                                                         md.results.TransientSolution[0].Pressure,
    88                                                         md.results.TransientSolution[0].Base,
    89                                                         md.results.TransientSolution[0].Surface,
    90                                                         md.results.TransientSolution[0].Thickness,
    91                                                         md.results.TransientSolution[0].SmbMonthlytemperatures,
    92                                                         md.results.TransientSolution[0].SmbMassBalance,
    93                                                         md.results.TransientSolution[1].Vx,
    94                                                         md.results.TransientSolution[1].Vy,
    95                                                         md.results.TransientSolution[1].Vel,
    96                                                         md.results.TransientSolution[1].Pressure,
    97                                                         md.results.TransientSolution[1].Base,
    98                                                         md.results.TransientSolution[1].Surface,
    99                                                         md.results.TransientSolution[1].Thickness,
    100                                                         md.results.TransientSolution[1].SmbMonthlytemperatures,
    101                                                         md.results.TransientSolution[1].SmbMassBalance,
    102                                                         md.results.TransientSolution[2].Vx,
    103                                                         md.results.TransientSolution[2].Vy,
    104                                                         md.results.TransientSolution[2].Vel,
    105                                                         md.results.TransientSolution[2].Pressure,
    106                                                         md.results.TransientSolution[2].Base,
    107                                                         md.results.TransientSolution[2].Surface,
    108                                                         md.results.TransientSolution[2].Thickness,
    109                                                         md.results.TransientSolution[2].SmbMonthlytemperatures,
    110                                                         md.results.TransientSolution[2].SmbMassBalance]
     78field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMonthlytemperatures1', 'SmbMassBalance1',
     79               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMonthlytemperatures2', 'SmbMassBalance2',
     80               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMonthlytemperatures3', 'SmbMassBalance3']
     81field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     82                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     83                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     84field_values = [md.results.TransientSolution[0].Vx,
     85                md.results.TransientSolution[0].Vy,
     86                md.results.TransientSolution[0].Vel,
     87                md.results.TransientSolution[0].Pressure,
     88                md.results.TransientSolution[0].Base,
     89                md.results.TransientSolution[0].Surface,
     90                md.results.TransientSolution[0].Thickness,
     91                md.results.TransientSolution[0].SmbMonthlytemperatures,
     92                md.results.TransientSolution[0].SmbMassBalance,
     93                md.results.TransientSolution[1].Vx,
     94                md.results.TransientSolution[1].Vy,
     95                md.results.TransientSolution[1].Vel,
     96                md.results.TransientSolution[1].Pressure,
     97                md.results.TransientSolution[1].Base,
     98                md.results.TransientSolution[1].Surface,
     99                md.results.TransientSolution[1].Thickness,
     100                md.results.TransientSolution[1].SmbMonthlytemperatures,
     101                md.results.TransientSolution[1].SmbMassBalance,
     102                md.results.TransientSolution[2].Vx,
     103                md.results.TransientSolution[2].Vy,
     104                md.results.TransientSolution[2].Vel,
     105                md.results.TransientSolution[2].Pressure,
     106                md.results.TransientSolution[2].Base,
     107                md.results.TransientSolution[2].Surface,
     108                md.results.TransientSolution[2].Thickness,
     109                md.results.TransientSolution[2].SmbMonthlytemperatures,
     110                md.results.TransientSolution[2].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test237.py

    r23707 r23793  
    1111from generic import generic
    1212
    13 md=triangle(model(),'../Exp/Square.exp',600000)    #180000
    14 md=setmask(md,'all','')
    15 md=parameterize(md,'../Par/SquareShelf.py')
     13md = triangle(model(), '../Exp/Square.exp', 600000)    #180000
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelf.py')
    1616
    1717# Use of ispdd and isdelta18o methods
    1818md.smb = SMBpdd()
    19 md.smb.isdelta18o=0
    20 md.smb.ismungsm=1
     19md.smb.isdelta18o = 0
     20md.smb.ismungsm = 1
    2121
    2222# time steps and resolution
    23 md.timestepping.time_step=20.
    24 md.settings.output_frequency=1
    25 md.timestepping.final_time=60.
     23md.timestepping.time_step = 20.
     24md.settings.output_frequency = 1
     25md.timestepping.final_time = 60.
    2626
    2727# creating Present day and lgm temperatures
    2828# Same temperature over the all region:
    29 tmonth=np.ones(12)*(238.15+20.)
    30 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    31 md.smb.temperatures_lgm=np.zeros((md.mesh.numberofvertices+1,12))
    32 for imonth in range(0,12):
    33     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
    34     md.smb.temperatures_lgm[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]-20.
     29tmonth = np.ones(12) * (238.15 + 20.)
     30md.smb.temperatures_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     31md.smb.temperatures_lgm = np.zeros((md.mesh.numberofvertices + 1, 12))
     32for imonth in range(0, 12):
     33    md.smb.temperatures_presentday[0:md.mesh.numberofvertices, imonth] = tmonth[imonth]
     34    md.smb.temperatures_lgm[0:md.mesh.numberofvertices, imonth] = tmonth[imonth] - 20.
    3535    # Time for the last line:
    36     md.smb.temperatures_presentday[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
    37     md.smb.temperatures_lgm[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     36    md.smb.temperatures_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
     37    md.smb.temperatures_lgm[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    3838
    3939# creating initialization and spc temperatures initialization and spc
    40 md.thermal.spctemperature=np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1)    #-10*ones(md.mesh.numberofvertices,1)
    41 md.thermal.spctemperature=np.tile(md.thermal.spctemperature,(int(md.timestepping.final_time/md.timestepping.time_step),1)).T
    42 itemp=np.arange(0,md.timestepping.final_time,md.timestepping.time_step)
    43 md.thermal.spctemperature=np.vstack((md.thermal.spctemperature,itemp))
     40md.thermal.spctemperature = np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices, :], axis=1)    #-10*ones(md.mesh.numberofvertices, 1)
     41md.thermal.spctemperature = np.tile(md.thermal.spctemperature, (int(md.timestepping.final_time / md.timestepping.time_step), 1)).T
     42itemp = np.arange(0, md.timestepping.final_time, md.timestepping.time_step)
     43md.thermal.spctemperature = np.vstack((md.thermal.spctemperature, itemp))
    4444
    45 md.initialization.temperature=md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0]   #*ones(md.mesh.numberofvertices,1)
     45md.initialization.temperature = md.smb.temperatures_lgm[0:md.mesh.numberofvertices, 0]   #*ones(md.mesh.numberofvertices, 1)
    4646md.smb.initialize(md)
    4747
    4848# creating precipitation
    49 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    50 md.smb.precipitations_lgm=np.zeros((md.mesh.numberofvertices+1,12))
    51 for imonth in range(0,12):
    52     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
    53     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
    55     md.smb.precipitations_lgm[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     49md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     50md.smb.precipitations_lgm = np.zeros((md.mesh.numberofvertices + 1, 12))
     51for imonth in range(0, 12):
     52    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
     53    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
     55    md.smb.precipitations_lgm[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    5656
    57 fsize=int(md.timestepping.final_time/md.timestepping.time_step)+2
    58 md.smb.Pfac=np.zeros((2,fsize))
    59 md.smb.Tdiff=np.zeros((2,fsize))
    60 md.smb.sealev=np.zeros((2,fsize))
    61 for iint in range(0,fsize):
     57fsize = int(md.timestepping.final_time / md.timestepping.time_step) + 2
     58md.smb.Pfac = np.zeros((2, fsize))
     59md.smb.Tdiff = np.zeros((2, fsize))
     60md.smb.sealev = np.zeros((2, fsize))
     61for iint in range(0, fsize):
    6262    # Interpolation factors
    63          md.smb.Pfac[0,iint]=0.15*(iint+1)
    64          md.smb.Tdiff[0,iint]=0.15*(iint+1)
    65          md.smb.sealev[0,iint]=0.15*(iint+1)
    66         # Year of each data point
    67          md.smb.Pfac[1,iint]=(float(iint))*20
    68          md.smb.Tdiff[1,iint]=(float(iint))*20
    69          md.smb.sealev[1,iint]=(float(iint))*20
     63    md.smb.Pfac[0, iint] = 0.15 * (iint + 1)
     64    md.smb.Tdiff[0, iint] = 0.15 * (iint + 1)
     65    md.smb.sealev[0, iint] = 0.15 * (iint + 1)
     66    # Year of each data point
     67    md.smb.Pfac[1, iint] = (float(iint)) * 20
     68    md.smb.Tdiff[1, iint] = (float(iint)) * 20
     69    md.smb.sealev[1, iint] = (float(iint)) * 20
    7070
    7171#
    72 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
    73 md.extrude(3,1.)
    74 md=setflowequation(md,'SSA','all')
    75 md.cluster=generic('name',gethostname(),'np',1)
    76 md=solve(md,'Transient')
     72md.transient.requested_outputs = ['default', 'SmbMonthlytemperatures']
     73md.extrude(3, 1.)
     74md = setflowequation(md, 'SSA', 'all')
     75md.cluster = generic('name', gethostname(), 'np', 1)
     76md = solve(md, 'Transient')
    7777
    7878#Fields and tolerances to track changes
    79 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','SmbMonthlytemperatures1','SmbMassBalance1',\
    80                 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','SmbMonthlytemperatures2','SmbMassBalance2',\
    81                 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','SmbMonthlytemperatures3','SmbMassBalance3']
    82 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,1e-13,1e-8,1e-13,1e-13,\
    83                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,1e-7,1e-13,1e-13,\
    84                 1e-13,1e-13,1e-08,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,5e-7,1e-13,1e-13]
    85 field_values=[\
    86         md.results.TransientSolution[0].Vx,\
    87         md.results.TransientSolution[0].Vy,\
    88         md.results.TransientSolution[0].Vz,\
    89         md.results.TransientSolution[0].Vel,\
    90         md.results.TransientSolution[0].Pressure,\
    91         md.results.TransientSolution[0].Base,\
    92         md.results.TransientSolution[0].Surface,\
    93         md.results.TransientSolution[0].Thickness,\
    94         md.results.TransientSolution[0].Temperature,\
    95         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    96         md.results.TransientSolution[0].SmbMonthlytemperatures,\
    97         md.results.TransientSolution[0].SmbMassBalance,\
    98         md.results.TransientSolution[1].Vx,\
    99         md.results.TransientSolution[1].Vy,\
    100         md.results.TransientSolution[1].Vz,\
    101         md.results.TransientSolution[1].Vel,\
    102         md.results.TransientSolution[1].Pressure,\
    103         md.results.TransientSolution[1].Base,\
    104         md.results.TransientSolution[1].Surface,\
    105         md.results.TransientSolution[1].Thickness,\
    106         md.results.TransientSolution[1].Temperature,\
    107         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    108         md.results.TransientSolution[1].SmbMonthlytemperatures,\
    109         md.results.TransientSolution[1].SmbMassBalance,\
    110         md.results.TransientSolution[2].Vx,\
    111         md.results.TransientSolution[2].Vy,\
    112         md.results.TransientSolution[2].Vz,\
    113         md.results.TransientSolution[2].Vel,\
    114         md.results.TransientSolution[2].Pressure,\
    115         md.results.TransientSolution[2].Base,\
    116         md.results.TransientSolution[2].Surface,\
    117         md.results.TransientSolution[2].Thickness,\
    118         md.results.TransientSolution[2].Temperature,\
    119         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    120         md.results.TransientSolution[2].SmbMonthlytemperatures,\
    121         md.results.TransientSolution[2].SmbMassBalance,\
    122         ]
     79field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'SmbMonthlytemperatures1', 'SmbMassBalance1',
     80               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'SmbMonthlytemperatures2', 'SmbMassBalance2',
     81               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3', 'SmbMonthlytemperatures3', 'SmbMassBalance3']
     82field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-8, 1e-8, 1e-8, 1e-13, 1e-8, 1e-13, 1e-13,
     83                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-8, 1e-8, 1e-8, 7e-13, 1e-7, 1e-13, 1e-13,
     84                    1e-13, 1e-13, 1e-08, 1e-13, 1e-13, 1e-8, 1e-8, 1e-8, 7e-13, 5e-7, 1e-13, 1e-13]
     85field_values = [md.results.TransientSolution[0].Vx,
     86                md.results.TransientSolution[0].Vy,
     87                md.results.TransientSolution[0].Vz,
     88                md.results.TransientSolution[0].Vel,
     89                md.results.TransientSolution[0].Pressure,
     90                md.results.TransientSolution[0].Base,
     91                md.results.TransientSolution[0].Surface,
     92                md.results.TransientSolution[0].Thickness,
     93                md.results.TransientSolution[0].Temperature,
     94                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     95                md.results.TransientSolution[0].SmbMonthlytemperatures,
     96                md.results.TransientSolution[0].SmbMassBalance,
     97                md.results.TransientSolution[1].Vx,
     98                md.results.TransientSolution[1].Vy,
     99                md.results.TransientSolution[1].Vz,
     100                md.results.TransientSolution[1].Vel,
     101                md.results.TransientSolution[1].Pressure,
     102                md.results.TransientSolution[1].Base,
     103                md.results.TransientSolution[1].Surface,
     104                md.results.TransientSolution[1].Thickness,
     105                md.results.TransientSolution[1].Temperature,
     106                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     107                md.results.TransientSolution[1].SmbMonthlytemperatures,
     108                md.results.TransientSolution[1].SmbMassBalance,
     109                md.results.TransientSolution[2].Vx,
     110                md.results.TransientSolution[2].Vy,
     111                md.results.TransientSolution[2].Vz,
     112                md.results.TransientSolution[2].Vel,
     113                md.results.TransientSolution[2].Pressure,
     114                md.results.TransientSolution[2].Base,
     115                md.results.TransientSolution[2].Surface,
     116                md.results.TransientSolution[2].Thickness,
     117                md.results.TransientSolution[2].Temperature,
     118                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
     119                md.results.TransientSolution[2].SmbMonthlytemperatures,
     120                md.results.TransientSolution[2].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test238.py

    r23707 r23793  
    1 #Test Name: SquareShelfTranIspddIsdeltaO18pdSSA2d 
     1#Test Name: SquareShelfTranIspddIsdeltaO18pdSSA2d
    22import numpy as np
    33from model import *
     
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
    1515
    1616# Use of ispdd and isdelta18o methods
    1717md.smb = SMBd18opdd()
    18 md.smb.isd18opd=1
     18md.smb.isd18opd = 1
    1919
    2020# Add temperature, precipitation and delta18o needed to measure the surface mass balance
    2121# creating delta18o
    22 delta18o=np.loadtxt('../Data/delta18o.data')
    23 md.smb.delta18o=delta18o
     22delta18o = np.loadtxt('../Data/delta18o.data')
     23md.smb.delta18o = delta18o
    2424
    2525# creating Present day temperatures
    2626# Same temperature over the all region:
    27 tmonth=np.ones(12)*(238.15+20.)
    28 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    29 for imonth in range(0,12):
    30     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
     27tmonth = np.ones(12) * (238.15 + 20.)
     28md.smb.temperatures_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     29for imonth in range(0, 12):
     30    md.smb.temperatures_presentday[0:md.mesh.numberofvertices, imonth] = tmonth[imonth]
    3131    # Time for the last line:
    32     md.smb.temperatures_presentday[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     32    md.smb.temperatures_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    3333
    3434# creating initialization and spc temperatures initialization and spc
    35 md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
    36 md.thermal.spctemperature=md.thermal.spctemperature-10
    37 md.initialization.temperature=md.thermal.spctemperature
     35md.thermal.spctemperature = np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices, :], axis=1).reshape(-1, 1)
     36md.thermal.spctemperature = md.thermal.spctemperature - 10
     37md.initialization.temperature = md.thermal.spctemperature
    3838md.smb.initialize(md)
    3939
    4040# creating precipitation
    41 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    42 for imonth in range(0,12):
    43     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
    44     md.smb.precipitations_presentday[md.mesh.numberofvertices,imonth]=(float(imonth)/12.)
     41md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     42for imonth in range(0, 12):
     43    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
     44    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = (float(imonth) / 12.)
    4545
    4646# time steps and resolution
    47 md.timestepping.time_step=20
    48 md.settings.output_frequency=1
    49 md.timestepping.final_time=60
     47md.timestepping.time_step = 20
     48md.settings.output_frequency = 1
     49md.timestepping.final_time = 60
    5050
    51 # 
    52 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
    53 md=setflowequation(md,'SSA','all')
    54 md.cluster=generic('name',gethostname(),'np',3)
    55 md=solve(md,'Transient')
     51#
     52md.transient.requested_outputs = ['default', 'SmbMonthlytemperatures']
     53md = setflowequation(md, 'SSA', 'all')
     54md.cluster = generic('name', gethostname(), 'np', 3)
     55md = solve(md, 'Transient')
    5656
    5757#Fields and tolerances to track changes
    58 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
    59                             'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
    60                                       'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
    61 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    62                             1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    63                                  1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    64 field_values=[\
    65         md.results.TransientSolution[0].Vx,\
    66         md.results.TransientSolution[0].Vy,\
    67         md.results.TransientSolution[0].Vel,\
    68         md.results.TransientSolution[0].Pressure,\
    69         md.results.TransientSolution[0].Base,\
    70         md.results.TransientSolution[0].Surface,\
    71         md.results.TransientSolution[0].Thickness,\
    72         md.results.TransientSolution[0].SmbMonthlytemperatures,\
    73         md.results.TransientSolution[0].SmbMassBalance,\
    74         md.results.TransientSolution[1].Vx,\
    75         md.results.TransientSolution[1].Vy,\
    76         md.results.TransientSolution[1].Vel,\
    77         md.results.TransientSolution[1].Pressure,\
    78         md.results.TransientSolution[1].Base,\
    79         md.results.TransientSolution[1].Surface,\
    80         md.results.TransientSolution[1].Thickness,\
    81         md.results.TransientSolution[1].SmbMonthlytemperatures,\
    82         md.results.TransientSolution[1].SmbMassBalance,\
    83         md.results.TransientSolution[2].Vx,\
    84         md.results.TransientSolution[2].Vy,\
    85         md.results.TransientSolution[2].Vel,\
    86         md.results.TransientSolution[2].Pressure,\
    87         md.results.TransientSolution[2].Base,\
    88         md.results.TransientSolution[2].Surface,\
    89         md.results.TransientSolution[2].Thickness,\
    90         md.results.TransientSolution[2].SmbMonthlytemperatures,\
    91         md.results.TransientSolution[2].SmbMassBalance,\
    92         ]
     58field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMonthlytemperatures1', 'SmbMassBalance1',
     59               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMonthlytemperatures2', 'SmbMassBalance2',
     60               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMonthlytemperatures3', 'SmbMassBalance3']
     61field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     62                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     63                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     64field_values = [md.results.TransientSolution[0].Vx,
     65                md.results.TransientSolution[0].Vy,
     66                md.results.TransientSolution[0].Vel,
     67                md.results.TransientSolution[0].Pressure,
     68                md.results.TransientSolution[0].Base,
     69                md.results.TransientSolution[0].Surface,
     70                md.results.TransientSolution[0].Thickness,
     71                md.results.TransientSolution[0].SmbMonthlytemperatures,
     72                md.results.TransientSolution[0].SmbMassBalance,
     73                md.results.TransientSolution[1].Vx,
     74                md.results.TransientSolution[1].Vy,
     75                md.results.TransientSolution[1].Vel,
     76                md.results.TransientSolution[1].Pressure,
     77                md.results.TransientSolution[1].Base,
     78                md.results.TransientSolution[1].Surface,
     79                md.results.TransientSolution[1].Thickness,
     80                md.results.TransientSolution[1].SmbMonthlytemperatures,
     81                md.results.TransientSolution[1].SmbMassBalance,
     82                md.results.TransientSolution[2].Vx,
     83                md.results.TransientSolution[2].Vy,
     84                md.results.TransientSolution[2].Vel,
     85                md.results.TransientSolution[2].Pressure,
     86                md.results.TransientSolution[2].Base,
     87                md.results.TransientSolution[2].Surface,
     88                md.results.TransientSolution[2].Thickness,
     89                md.results.TransientSolution[2].SmbMonthlytemperatures,
     90                md.results.TransientSolution[2].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test239.py

    r23707 r23793  
    1 #Test Name: SquareShelfTranIspddIsdeltaO18pdInterpSSA2d 
     1#Test Name: SquareShelfTranIspddIsdeltaO18pdInterpSSA2d
    22import numpy as np
    33from model import *
     
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
    1515
    1616# Use of ispdd and isdelta18o methods
    1717md.smb = SMBd18opdd()
    18 md.smb.isd18opd=1
     18md.smb.isd18opd = 1
    1919
    2020# Add temperature, precipitation and delta18o needed to measure the surface mass balance
    2121# creating delta18o
    22 delta18o=np.loadtxt('../Data/delta18o.data')
    23 md.smb.delta18o=delta18o
     22delta18o = np.loadtxt('../Data/delta18o.data')
     23md.smb.delta18o = delta18o
    2424
    2525# creating Present day temperatures
    2626# Same temperature over the all region:
    27 tmonth=np.ones(12)*(238.15+20.)
    28 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    29 for imonth in range(0,12):
    30     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
     27tmonth = np.ones(12) * (238.15 + 20.)
     28md.smb.temperatures_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     29for imonth in range(0, 12):
     30    md.smb.temperatures_presentday[0:md.mesh.numberofvertices, imonth] = tmonth[imonth]
    3131    # Time for the last line:
    32     md.smb.temperatures_presentday[md.mesh.numberofvertices,imonth]=(float(imonth)/12.)
     32    md.smb.temperatures_presentday[md.mesh.numberofvertices, imonth] = (float(imonth) / 12.)
    3333
    3434# creating initialization and spc temperatures initialization and spc
    35 md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
    36 md.thermal.spctemperature=md.thermal.spctemperature-10
    37 md.initialization.temperature=md.thermal.spctemperature
     35md.thermal.spctemperature = np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices, :], axis=1).reshape(-1, 1)
     36md.thermal.spctemperature = md.thermal.spctemperature - 10
     37md.initialization.temperature = md.thermal.spctemperature
    3838md.smb.initialize(md)
    3939
    4040# creating precipitation
    41 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    42 for imonth in range(0,12):
    43     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
    44     md.smb.precipitations_presentday[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     41md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     42for imonth in range(0, 12):
     43    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
     44    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    4545
    4646# time steps and resolution
    47 md.timestepping.time_step=0.5
    48 md.settings.output_frequency=1
    49 md.timestepping.final_time=2
     47md.timestepping.time_step = 0.5
     48md.settings.output_frequency = 1
     49md.timestepping.final_time = 2
    5050
    51 # 
    52 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
    53 md=setflowequation(md,'SSA','all')
    54 md.cluster=generic('name',gethostname(),'np',3)
    55 md=solve(md,'Transient')
     51#
     52md.transient.requested_outputs = ['default', 'SmbMonthlytemperatures']
     53md = setflowequation(md, 'SSA', 'all')
     54md.cluster = generic('name', gethostname(), 'np', 3)
     55md = solve(md, 'Transient')
    5656
    5757#Fields and tolerances to track changes
    58 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
    59                             'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
    60                                       'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
    61 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    62                             1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    63                                  1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    64 field_values=[\
    65         md.results.TransientSolution[0].Vx,\
    66         md.results.TransientSolution[0].Vy,\
    67         md.results.TransientSolution[0].Vel,\
    68         md.results.TransientSolution[0].Pressure,\
    69         md.results.TransientSolution[0].Base,\
    70         md.results.TransientSolution[0].Surface,\
    71         md.results.TransientSolution[0].Thickness,\
    72         md.results.TransientSolution[0].SmbMonthlytemperatures,\
    73         md.results.TransientSolution[0].SmbMassBalance,\
    74         md.results.TransientSolution[1].Vx,\
    75         md.results.TransientSolution[1].Vy,\
    76         md.results.TransientSolution[1].Vel,\
    77         md.results.TransientSolution[1].Pressure,\
    78         md.results.TransientSolution[1].Base,\
    79         md.results.TransientSolution[1].Surface,\
    80         md.results.TransientSolution[1].Thickness,\
    81         md.results.TransientSolution[1].SmbMonthlytemperatures,\
    82         md.results.TransientSolution[1].SmbMassBalance,\
    83         md.results.TransientSolution[2].Vx,\
    84         md.results.TransientSolution[2].Vy,\
    85         md.results.TransientSolution[2].Vel,\
    86         md.results.TransientSolution[2].Pressure,\
    87         md.results.TransientSolution[2].Base,\
    88         md.results.TransientSolution[2].Surface,\
    89         md.results.TransientSolution[2].Thickness,\
    90         md.results.TransientSolution[2].SmbMonthlytemperatures,\
    91         md.results.TransientSolution[2].SmbMassBalance,\
    92         ]
     58field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMonthlytemperatures1', 'SmbMassBalance1',
     59               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMonthlytemperatures2', 'SmbMassBalance2',
     60               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMonthlytemperatures3', 'SmbMassBalance3']
     61field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     62                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     63                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     64field_values = [md.results.TransientSolution[0].Vx,
     65                md.results.TransientSolution[0].Vy,
     66                md.results.TransientSolution[0].Vel,
     67                md.results.TransientSolution[0].Pressure,
     68                md.results.TransientSolution[0].Base,
     69                md.results.TransientSolution[0].Surface,
     70                md.results.TransientSolution[0].Thickness,
     71                md.results.TransientSolution[0].SmbMonthlytemperatures,
     72                md.results.TransientSolution[0].SmbMassBalance,
     73                md.results.TransientSolution[1].Vx,
     74                md.results.TransientSolution[1].Vy,
     75                md.results.TransientSolution[1].Vel,
     76                md.results.TransientSolution[1].Pressure,
     77                md.results.TransientSolution[1].Base,
     78                md.results.TransientSolution[1].Surface,
     79                md.results.TransientSolution[1].Thickness,
     80                md.results.TransientSolution[1].SmbMonthlytemperatures,
     81                md.results.TransientSolution[1].SmbMassBalance,
     82                md.results.TransientSolution[2].Vx,
     83                md.results.TransientSolution[2].Vy,
     84                md.results.TransientSolution[2].Vel,
     85                md.results.TransientSolution[2].Pressure,
     86                md.results.TransientSolution[2].Base,
     87                md.results.TransientSolution[2].Surface,
     88                md.results.TransientSolution[2].Thickness,
     89                md.results.TransientSolution[2].SmbMonthlytemperatures,
     90                md.results.TransientSolution[2].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test240.py

    r23707 r23793  
    1 #Test Name: SquareShelfTranIspddIsdeltaO18pdNoInterpSSA2d 
     1#Test Name: SquareShelfTranIspddIsdeltaO18pdNoInterpSSA2d
    22import numpy as np
    33from model import *
     
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
    1515
    1616# Use of ispdd and isdelta18o methods
    1717md.smb = SMBd18opdd()
    18 md.smb.isd18opd=1
     18md.smb.isd18opd = 1
    1919
    2020# Add temperature, precipitation and delta18o needed to measure the surface mass balance
    2121# creating delta18o
    22 delta18o=np.loadtxt('../Data/delta18o.data')
    23 md.smb.delta18o=delta18o
     22delta18o = np.loadtxt('../Data/delta18o.data')
     23md.smb.delta18o = delta18o
    2424
    2525# creating Present day temperatures
    2626# Same temperature over the all region:
    27 tmonth=np.ones(12)*(238.15+20.)
    28 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    29 for imonth in range(0,12):
    30     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
     27tmonth = np.ones(12) * (238.15 + 20.)
     28md.smb.temperatures_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     29for imonth in range(0, 12):
     30    md.smb.temperatures_presentday[0:md.mesh.numberofvertices, imonth] = tmonth[imonth]
    3131    # Time for the last line:
    32     md.smb.temperatures_presentday[md.mesh.numberofvertices,imonth]=(float(imonth)/12.)
     32    md.smb.temperatures_presentday[md.mesh.numberofvertices, imonth] = (float(imonth) / 12.)
    3333
    3434# creating initialization and spc temperatures initialization and spc
    35 md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
    36 md.thermal.spctemperature=md.thermal.spctemperature-10
    37 md.initialization.temperature=md.thermal.spctemperature
     35md.thermal.spctemperature = np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices, :], axis=1).reshape(-1, 1)
     36md.thermal.spctemperature = md.thermal.spctemperature - 10
     37md.initialization.temperature = md.thermal.spctemperature
    3838md.smb.initialize(md)
    3939
    4040# creating precipitation
    41 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
    42 for imonth in range(0,12):
    43     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
    44     md.smb.precipitations_presentday[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
     41md.smb.precipitations_presentday = np.zeros((md.mesh.numberofvertices + 1, 12))
     42for imonth in range(0, 12):
     43    md.smb.precipitations_presentday[0:md.mesh.numberofvertices, imonth] = -0.4 * 10**(-6) * md.mesh.y + 0.5
     44    md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth] = ((float(imonth) + 1.) / 12.)
    4545
    4646# time steps and resolution
    47 md.timestepping.time_step=0.5
    48 md.settings.output_frequency=1
    49 md.timestepping.final_time=2
    50 md.timestepping.interp_forcings=0
     47md.timestepping.time_step = 0.5
     48md.settings.output_frequency = 1
     49md.timestepping.final_time = 2
     50md.timestepping.interp_forcings = 0
    5151
    52 # 
    53 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
    54 md=setflowequation(md,'SSA','all')
    55 md.cluster=generic('name',gethostname(),'np',3)
    56 md=solve(md,'Transient')
     52#
     53md.transient.requested_outputs = ['default', 'SmbMonthlytemperatures']
     54md = setflowequation(md, 'SSA', 'all')
     55md.cluster = generic('name', gethostname(), 'np', 3)
     56md = solve(md, 'Transient')
    5757
    5858#Fields and tolerances to track changes
    59 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
    60                             'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
    61                                       'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
    62 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    63                             1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    64                                  1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    65 field_values=[\
    66         md.results.TransientSolution[0].Vx,\
    67         md.results.TransientSolution[0].Vy,\
    68         md.results.TransientSolution[0].Vel,\
    69         md.results.TransientSolution[0].Pressure,\
    70         md.results.TransientSolution[0].Base,\
    71         md.results.TransientSolution[0].Surface,\
    72         md.results.TransientSolution[0].Thickness,\
    73         md.results.TransientSolution[0].SmbMonthlytemperatures,\
    74         md.results.TransientSolution[0].SmbMassBalance,\
    75         md.results.TransientSolution[1].Vx,\
    76         md.results.TransientSolution[1].Vy,\
    77         md.results.TransientSolution[1].Vel,\
    78         md.results.TransientSolution[1].Pressure,\
    79         md.results.TransientSolution[1].Base,\
    80         md.results.TransientSolution[1].Surface,\
    81         md.results.TransientSolution[1].Thickness,\
    82         md.results.TransientSolution[1].SmbMonthlytemperatures,\
    83         md.results.TransientSolution[1].SmbMassBalance,\
    84         md.results.TransientSolution[2].Vx,\
    85         md.results.TransientSolution[2].Vy,\
    86         md.results.TransientSolution[2].Vel,\
    87         md.results.TransientSolution[2].Pressure,\
    88         md.results.TransientSolution[2].Base,\
    89         md.results.TransientSolution[2].Surface,\
    90         md.results.TransientSolution[2].Thickness,\
    91         md.results.TransientSolution[2].SmbMonthlytemperatures,\
    92         md.results.TransientSolution[2].SmbMassBalance,\
    93         ]
     59field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMonthlytemperatures1', 'SmbMassBalance1',
     60               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMonthlytemperatures2', 'SmbMassBalance2',
     61               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMonthlytemperatures3', 'SmbMassBalance3']
     62field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     63                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     64                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     65field_values = [md.results.TransientSolution[0].Vx,
     66                md.results.TransientSolution[0].Vy,
     67                md.results.TransientSolution[0].Vel,
     68                md.results.TransientSolution[0].Pressure,
     69                md.results.TransientSolution[0].Base,
     70                md.results.TransientSolution[0].Surface,
     71                md.results.TransientSolution[0].Thickness,
     72                md.results.TransientSolution[0].SmbMonthlytemperatures,
     73                md.results.TransientSolution[0].SmbMassBalance,
     74                md.results.TransientSolution[1].Vx,
     75                md.results.TransientSolution[1].Vy,
     76                md.results.TransientSolution[1].Vel,
     77                md.results.TransientSolution[1].Pressure,
     78                md.results.TransientSolution[1].Base,
     79                md.results.TransientSolution[1].Surface,
     80                md.results.TransientSolution[1].Thickness,
     81                md.results.TransientSolution[1].SmbMonthlytemperatures,
     82                md.results.TransientSolution[1].SmbMassBalance,
     83                md.results.TransientSolution[2].Vx,
     84                md.results.TransientSolution[2].Vy,
     85                md.results.TransientSolution[2].Vel,
     86                md.results.TransientSolution[2].Pressure,
     87                md.results.TransientSolution[2].Base,
     88                md.results.TransientSolution[2].Surface,
     89                md.results.TransientSolution[2].Thickness,
     90                md.results.TransientSolution[2].SmbMonthlytemperatures,
     91                md.results.TransientSolution[2].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test241.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 md.timestepping.time_step=1.
    19 md.settings.output_frequency=1
    20 md.timestepping.final_time=4.
    21 md.timestepping.interp_forcings=False
     18md.timestepping.time_step = 1.
     19md.settings.output_frequency = 1
     20md.timestepping.final_time = 4.
     21md.timestepping.interp_forcings = False
    2222
    2323#Set up transient
    24 smb=np.ones((md.mesh.numberofvertices))*3.6
    25 smb=np.vstack((smb,smb*-1.)).T
     24smb = np.ones((md.mesh.numberofvertices)) * 3.6
     25smb = np.vstack((smb, smb * -1.)).T
    2626
    27 md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
    28 md.transient.isthermal=False
     27md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
     28md.transient.isthermal = False
    2929
    30 md=solve(md,'Transient')
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    34                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    35                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    36                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    37 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    38                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    39                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    40                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    41 field_values=[md.results.TransientSolution[0].Vx,
    42                                                         md.results.TransientSolution[0].Vy,
    43                                                         md.results.TransientSolution[0].Vel,
    44                                                         md.results.TransientSolution[0].Pressure,
    45                                                         md.results.TransientSolution[0].Base,
    46                                                         md.results.TransientSolution[0].Surface,
    47                                                         md.results.TransientSolution[0].Thickness,
    48                                                         md.results.TransientSolution[0].SmbMassBalance,
    49                                                         md.results.TransientSolution[1].Vx,
    50                                                         md.results.TransientSolution[1].Vy,
    51                                                         md.results.TransientSolution[1].Vel,
    52                                                         md.results.TransientSolution[1].Pressure,
    53                                                         md.results.TransientSolution[1].Base,
    54                                                         md.results.TransientSolution[1].Surface,
    55                                                         md.results.TransientSolution[1].Thickness,
    56                                                         md.results.TransientSolution[1].SmbMassBalance,
    57                                                         md.results.TransientSolution[2].Vx,
    58                                                         md.results.TransientSolution[2].Vy,
    59                                                         md.results.TransientSolution[2].Vel,
    60                                                         md.results.TransientSolution[2].Pressure,
    61                                                         md.results.TransientSolution[2].Base,
    62                                                         md.results.TransientSolution[2].Surface,
    63                                                         md.results.TransientSolution[2].Thickness,
    64                                                         md.results.TransientSolution[2].SmbMassBalance,
    65                                                         md.results.TransientSolution[3].Vx,
    66                                                         md.results.TransientSolution[3].Vy,
    67                                                         md.results.TransientSolution[3].Vel,
    68                                                         md.results.TransientSolution[3].Pressure,
    69                                                         md.results.TransientSolution[3].Base,
    70                                                         md.results.TransientSolution[3].Surface,
    71                                                         md.results.TransientSolution[3].Thickness,
    72                                                         md.results.TransientSolution[3].SmbMassBalance]
     33field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     34               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     35               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     36               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     37field_tolerances = [1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     38                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     39                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     40                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     41field_values = [md.results.TransientSolution[0].Vx,
     42                md.results.TransientSolution[0].Vy,
     43                md.results.TransientSolution[0].Vel,
     44                md.results.TransientSolution[0].Pressure,
     45                md.results.TransientSolution[0].Base,
     46                md.results.TransientSolution[0].Surface,
     47                md.results.TransientSolution[0].Thickness,
     48                md.results.TransientSolution[0].SmbMassBalance,
     49                md.results.TransientSolution[1].Vx,
     50                md.results.TransientSolution[1].Vy,
     51                md.results.TransientSolution[1].Vel,
     52                md.results.TransientSolution[1].Pressure,
     53                md.results.TransientSolution[1].Base,
     54                md.results.TransientSolution[1].Surface,
     55                md.results.TransientSolution[1].Thickness,
     56                md.results.TransientSolution[1].SmbMassBalance,
     57                md.results.TransientSolution[2].Vx,
     58                md.results.TransientSolution[2].Vy,
     59                md.results.TransientSolution[2].Vel,
     60                md.results.TransientSolution[2].Pressure,
     61                md.results.TransientSolution[2].Base,
     62                md.results.TransientSolution[2].Surface,
     63                md.results.TransientSolution[2].Thickness,
     64                md.results.TransientSolution[2].SmbMassBalance,
     65                md.results.TransientSolution[3].Vx,
     66                md.results.TransientSolution[3].Vy,
     67                md.results.TransientSolution[3].Vel,
     68                md.results.TransientSolution[3].Pressure,
     69                md.results.TransientSolution[3].Base,
     70                md.results.TransientSolution[3].Surface,
     71                md.results.TransientSolution[3].Thickness,
     72                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test242.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',350000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 350000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.timestepping.time_step=1.
    20 md.settings.output_frequency=1
    21 md.timestepping.final_time=4.
    22 md.timestepping.interp_forcings=False
     19md.timestepping.time_step = 1.
     20md.settings.output_frequency = 1
     21md.timestepping.final_time = 4.
     22md.timestepping.interp_forcings = False
    2323
    2424#Set up transient
    25 smb=np.ones((md.mesh.numberofvertices))*3.6
    26 smb=np.vstack((smb,smb*-1.)).T
     25smb = np.ones((md.mesh.numberofvertices)) * 3.6
     26smb = np.vstack((smb, smb * -1.)).T
    2727
    28 md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
    29 md.transient.isthermal=False
     28md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
     29md.transient.isthermal = False
    3030
    31 md=solve(md,'Transient')
     31md = solve(md, 'Transient')
    3232
    3333#Fields and tolerances to track changes
    34 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    35                                                                         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    36                                                                         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    37                                                                         'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
    38 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,
    39                                                                         1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,
    40                                                                         1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,
    41                                                                         1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13]
    42 field_values=[md.results.TransientSolution[0].Vx,
    43                                                         md.results.TransientSolution[0].Vy,
    44                                                         md.results.TransientSolution[0].Vz,
    45                                                         md.results.TransientSolution[0].Vel,
    46                                                         md.results.TransientSolution[0].Pressure,
    47                                                         md.results.TransientSolution[0].Base,
    48                                                         md.results.TransientSolution[0].Surface,
    49                                                         md.results.TransientSolution[0].Thickness,
    50                                                         md.results.TransientSolution[0].SmbMassBalance,
    51                                                         md.results.TransientSolution[1].Vx,
    52                                                         md.results.TransientSolution[1].Vy,
    53                                                         md.results.TransientSolution[1].Vz,
    54                                                         md.results.TransientSolution[1].Vel,
    55                                                         md.results.TransientSolution[1].Pressure,
    56                                                         md.results.TransientSolution[1].Base,
    57                                                         md.results.TransientSolution[1].Surface,
    58                                                         md.results.TransientSolution[1].Thickness,
    59                                                         md.results.TransientSolution[1].SmbMassBalance,
    60                                                         md.results.TransientSolution[2].Vx,
    61                                                         md.results.TransientSolution[2].Vy,
    62                                                         md.results.TransientSolution[2].Vz,
    63                                                         md.results.TransientSolution[2].Vel,
    64                                                         md.results.TransientSolution[2].Pressure,
    65                                                         md.results.TransientSolution[2].Base,
    66                                                         md.results.TransientSolution[2].Surface,
    67                                                         md.results.TransientSolution[2].Thickness,
    68                                                         md.results.TransientSolution[2].SmbMassBalance,
    69                                                         md.results.TransientSolution[3].Vx,
    70                                                         md.results.TransientSolution[3].Vy,
    71                                                         md.results.TransientSolution[3].Vz,
    72                                                         md.results.TransientSolution[3].Vel,
    73                                                         md.results.TransientSolution[3].Pressure,
    74                                                         md.results.TransientSolution[3].Base,
    75                                                         md.results.TransientSolution[3].Surface,
    76                                                         md.results.TransientSolution[3].Thickness,
    77                                                         md.results.TransientSolution[3].SmbMassBalance]
     34field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     35               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     36               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     37               'Vx4', 'Vy4', 'Vz4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassbalance4']
     38field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-13,
     39                    1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-13,
     40                    1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-13,
     41                    1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-13]
     42field_values = [md.results.TransientSolution[0].Vx,
     43                md.results.TransientSolution[0].Vy,
     44                md.results.TransientSolution[0].Vz,
     45                md.results.TransientSolution[0].Vel,
     46                md.results.TransientSolution[0].Pressure,
     47                md.results.TransientSolution[0].Base,
     48                md.results.TransientSolution[0].Surface,
     49                md.results.TransientSolution[0].Thickness,
     50                md.results.TransientSolution[0].SmbMassBalance,
     51                md.results.TransientSolution[1].Vx,
     52                md.results.TransientSolution[1].Vy,
     53                md.results.TransientSolution[1].Vz,
     54                md.results.TransientSolution[1].Vel,
     55                md.results.TransientSolution[1].Pressure,
     56                md.results.TransientSolution[1].Base,
     57                md.results.TransientSolution[1].Surface,
     58                md.results.TransientSolution[1].Thickness,
     59                md.results.TransientSolution[1].SmbMassBalance,
     60                md.results.TransientSolution[2].Vx,
     61                md.results.TransientSolution[2].Vy,
     62                md.results.TransientSolution[2].Vz,
     63                md.results.TransientSolution[2].Vel,
     64                md.results.TransientSolution[2].Pressure,
     65                md.results.TransientSolution[2].Base,
     66                md.results.TransientSolution[2].Surface,
     67                md.results.TransientSolution[2].Thickness,
     68                md.results.TransientSolution[2].SmbMassBalance,
     69                md.results.TransientSolution[3].Vx,
     70                md.results.TransientSolution[3].Vy,
     71                md.results.TransientSolution[3].Vz,
     72                md.results.TransientSolution[3].Vel,
     73                md.results.TransientSolution[3].Pressure,
     74                md.results.TransientSolution[3].Base,
     75                md.results.TransientSolution[3].Surface,
     76                md.results.TransientSolution[3].Thickness,
     77                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test2424.py

    r22267 r23793  
    1010from newforcing import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'../Exp/SquareShelf.exp','')
    14 md = parameterize(md,'../Par/SquareSheetShelf.py')
    15 md = setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
    1616md.initialization.vx[:] = 0.
    1717md.initialization.vy[:] = 0.
    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
     
    2727md.transient.isthermal = 0
    2828md.groundingline.migration = 'AggressiveMigration'
    29 md.transient.requested_outputs = ['IceVolume','IceVolumeAboveFloatation','Sealevel']
     29md.transient.requested_outputs = ['IceVolume', 'IceVolumeAboveFloatation', 'Sealevel']
    3030
    3131md.timestepping.time_step = .1
    3232md.slr.sealevel = newforcing(md.timestepping.start_time, md.timestepping.final_time,
    33                              md.timestepping.time_step, -200., 200., md.mesh.numberofvertices)
     33                             md.timestepping.time_step, -200., 200., md.mesh.numberofvertices)
    3434
    35 md.cluster = generic('name',gethostname(),'np',3)
    36 md = solve(md,'Transient')
     35md.cluster = generic('name', gethostname(), 'np', 3)
     36md = solve(md, 'Transient')
    3737
    38 #we are checking that the grounding line position is near the theorical one, which is the 0 contour level 
    39 #of surface - sealevel - (1-di)* thickness 
     38#we are checking that the grounding line position is near the theorical one, which is the 0 contour level
     39#of surface - sealevel - (1-di)* thickness
    4040
    4141nsteps = len(md.results.TransientSolution)
     
    4545#time is off by the year constant
    4646for i in range(nsteps):
    47         field_names.append('Time-' + str(md.results.TransientSolution[i].time) +
    48                 '-yr-ice_levelset-S-sl-(1-di)*H')
    49         field_tolerances.append(1e-12)
    50         field_values.append(md.results.TransientSolution[i].MaskGroundediceLevelset.reshape(-1,) - (md.geometry.surface - md.results.TransientSolution[i].Sealevel.reshape(-1,) - (1 - md.materials.rho_ice / md.materials.rho_water) * md.geometry.thickness))
    51 
     47    field_names.append('Time-' + str(md.results.TransientSolution[i].time) + '-yr-ice_levelset-S-sl-(1-di)*H')
     48    field_tolerances.append(1e-12)
     49    field_values.append(md.results.TransientSolution[i].MaskGroundediceLevelset.reshape(-1,) - (md.geometry.surface - md.results.TransientSolution[i].Sealevel.reshape(-1,) - (1 - md.materials.rho_ice / md.materials.rho_water) * md.geometry.thickness))
  • issm/trunk-jpl/test/NightlyRun/test2425.py

    r22267 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',150000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
    14 md = setflowequation(md,'SSA','all')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md = setflowequation(md, 'SSA', 'all')
    1515md.initialization.vx[:] = 0.
    1616md.initialization.vy[:] = 0.
     
    2626md.timestepping.final_time = 1
    2727
    28 md.cluster = generic('name',gethostname(),'np',3)
    29 md = solve(md,'Transient')
     28md.cluster = generic('name', gethostname(), 'np', 3)
     29md = solve(md, 'Transient')
    3030vel1 = md.results.TransientSolution[-1].Vel
    3131
    32 #get same results with offset in bed and sea level: 
     32#get same results with offset in bed and sea level:
    3333md.geometry.base = -700. - (md.mesh.y - 500000.) / 1000.
    34 md.geometry.bed  = -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
     
    4141md.slr.sealevel = 1000 * np.ones((md.mesh.numberofvertices,))
    4242
    43 md = solve(md,'Transient','checkconsistency','no')
     43md = solve(md, 'Transient', 'checkconsistency', 'no')
    4444vel2 = md.results.TransientSolution[-1].Vel
    4545
    4646#Fields and tolerances to track changes
    47 field_names = ['Vel','Veloffset']
    48 field_tolerances = [1e-13,1e-13]
    49 field_values = [vel1,vel2]
    50 
     47field_names = ['Vel', 'Veloffset']
     48field_tolerances = [1e-13, 1e-13]
     49field_values = [vel1, vel2]
  • issm/trunk-jpl/test/NightlyRun/test243.py

    r23753 r23793  
    1111from SMBgemb import *
    1212
    13 md = triangle(model(),'../Exp/Square.exp',200000.)
    14 md = setmask(md,'all','')
    15 md = parameterize(md,'../Par/SquareShelf.py')
    16 md = setflowequation(md,'SSA','all')
     13md = triangle(model(), '../Exp/Square.exp', 200000.)
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelf.py')
     16md = setflowequation(md, 'SSA', 'all')
    1717md.materials.rho_ice = 910
    18 md.cluster = generic('name',gethostname(),'np',3)
     18md.cluster = generic('name', gethostname(), 'np', 3)
    1919
    2020#Use of Gemb method for SMB computation
    2121md.smb = SMBgemb()
    22 md.smb.setdefaultparameters(md.mesh,md.geometry)
     22md.smb.setdefaultparameters(md.mesh, md.geometry)
    2323md.smb.dsnowIdx = 0
    2424
    2525#load hourly surface forcing date from 1979 to 2009:
    2626if sys.version_info.major == 2:
    27   inputs = np.load('../Data/gemb_input.npy').item()
     27    inputs = np.load('../Data/gemb_input.npy').item()
    2828else:
    29   inputs = np.load('../Data/gemb_input.npy',encoding='bytes').item()
     29    inputs = np.load('../Data/gemb_input.npy', encoding='bytes').item()
    3030
    3131#setup the inputs:
    32 md.smb.Ta = np.append(np.tile(np.conjugate(inputs[b'Ta0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    33 md.smb.V = np.append(np.tile(np.conjugate(inputs[b'V0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    34 md.smb.dswrf = np.append(np.tile(np.conjugate(inputs[b'dsw0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    35 md.smb.dlwrf = np.append(np.tile(np.conjugate(inputs[b'dlw0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    36 md.smb.P = np.append(np.tile(np.conjugate(inputs[b'P0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    37 md.smb.eAir = np.append(np.tile(np.conjugate(inputs[b'eAir0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    38 md.smb.pAir = np.append(np.tile(np.conjugate(inputs[b'pAir0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    39 md.smb.pAir = np.append(np.tile(np.conjugate(inputs[b'pAir0']),(md.mesh.numberofelements,1)),np.conjugate([inputs[b'dateN']]),axis=0)
    40 md.smb.Vz = np.tile(np.conjugate(inputs[b'LP']['Vz']),(md.mesh.numberofelements,1)).flatten()
    41 md.smb.Tz = np.tile(np.conjugate(inputs[b'LP']['Tz']),(md.mesh.numberofelements,1)).flatten()
    42 md.smb.Tmean = np.tile(np.conjugate(inputs[b'LP']['Tmean']),(md.mesh.numberofelements,1)).flatten()
    43 md.smb.C = np.tile(np.conjugate(inputs[b'LP']['C']),(md.mesh.numberofelements,1)).flatten()
     32md.smb.Ta = np.append(np.tile(np.conjugate(inputs[b'Ta0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     33md.smb.V = np.append(np.tile(np.conjugate(inputs[b'V0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     34md.smb.dswrf = np.append(np.tile(np.conjugate(inputs[b'dsw0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     35md.smb.dlwrf = np.append(np.tile(np.conjugate(inputs[b'dlw0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     36md.smb.P = np.append(np.tile(np.conjugate(inputs[b'P0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     37md.smb.eAir = np.append(np.tile(np.conjugate(inputs[b'eAir0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     38md.smb.pAir = np.append(np.tile(np.conjugate(inputs[b'pAir0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     39md.smb.pAir = np.append(np.tile(np.conjugate(inputs[b'pAir0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs[b'dateN']]), axis=0)
     40md.smb.Vz = np.tile(np.conjugate(inputs[b'LP']['Vz']), (md.mesh.numberofelements, 1)).flatten()
     41md.smb.Tz = np.tile(np.conjugate(inputs[b'LP']['Tz']), (md.mesh.numberofelements, 1)).flatten()
     42md.smb.Tmean = np.tile(np.conjugate(inputs[b'LP']['Tmean']), (md.mesh.numberofelements, 1)).flatten()
     43md.smb.C = np.tile(np.conjugate(inputs[b'LP']['C']), (md.mesh.numberofelements, 1)).flatten()
    4444
    4545#smb settings
    46 md.smb.requested_outputs = ['SmbDz','SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbEC','SmbA','SmbMassBalance','SmbMAdd','SmbDzAdd','SmbFAC']
     46md.smb.requested_outputs = ['SmbDz', 'SmbT', 'SmbD', 'SmbRe', 'SmbGdn', 'SmbGsp', 'SmbEC', 'SmbA', 'SmbMassBalance', 'SmbMAdd', 'SmbDzAdd', 'SmbFAC']
    4747
    4848#only run smb core:
     
    5858
    5959#Run transient
    60 md = solve(md,'Transient')
     60md = solve(md, 'Transient')
    6161
    6262#Fields and tolerances to track changes
    63 field_names      = ['SmbDz','SmbT' ,'SmbD' ,'SmbRe','SmbGdn','SmbGsp','SmbA' ,'SmbEC','SmbMassBalance','SmbMAdd','SmbDzAdd','SmbFAC']
    64 field_tolerances = [1e-11,1e-12,1e-11,2e-11,1e-11,1e-11,1e-12,2e-12,1e-12,1e-12,1e-12,1e-11]
     63field_names = ['SmbDz', 'SmbT', 'SmbD', 'SmbRe', 'SmbGdn', 'SmbGsp', 'SmbA', 'SmbEC', 'SmbMassBalance', 'SmbMAdd', 'SmbDzAdd', 'SmbFAC']
     64field_tolerances = [1e-11, 1e-12, 1e-11, 2e-11, 1e-11, 1e-11, 1e-12, 2e-12, 1e-12, 1e-12, 1e-12, 1e-11]
    6565#shape is different in python solution (fixed using reshape) which can cause test failure:
    66 field_values = [
    67         md.results.TransientSolution[-1].SmbDz[0,0:240].reshape(1,-1),
    68         md.results.TransientSolution[-1].SmbT[0,0:240].reshape(1,-1),
    69         md.results.TransientSolution[-1].SmbD[0,0:240].reshape(1,-1),
    70         md.results.TransientSolution[-1].SmbRe[0,0:240].reshape(1,-1),
    71         md.results.TransientSolution[-1].SmbGdn[0,0:240].reshape(1,-1),
    72         md.results.TransientSolution[-1].SmbGsp[0,0:240].reshape(1,-1),
    73         md.results.TransientSolution[-1].SmbA[0,0:240].reshape(1,-1),
    74         md.results.TransientSolution[-1].SmbEC[0],
    75         md.results.TransientSolution[-1].SmbMassBalance[0],
    76         md.results.TransientSolution[-1].SmbMAdd[0],
    77         md.results.TransientSolution[-1].SmbDzAdd[0],
    78         md.results.TransientSolution[-1].SmbFAC[0],
    79         ]
     66field_values = [md.results.TransientSolution[-1].SmbDz[0, 0:240].reshape(1, -1),
     67                md.results.TransientSolution[-1].SmbT[0, 0:240].reshape(1, -1),
     68                md.results.TransientSolution[-1].SmbD[0, 0:240].reshape(1, -1),
     69                md.results.TransientSolution[-1].SmbRe[0, 0:240].reshape(1, -1),
     70                md.results.TransientSolution[-1].SmbGdn[0, 0:240].reshape(1, -1),
     71                md.results.TransientSolution[-1].SmbGsp[0, 0:240].reshape(1, -1),
     72                md.results.TransientSolution[-1].SmbA[0, 0:240].reshape(1, -1),
     73                md.results.TransientSolution[-1].SmbEC[0],
     74                md.results.TransientSolution[-1].SmbMassBalance[0],
     75                md.results.TransientSolution[-1].SmbMAdd[0],
     76                md.results.TransientSolution[-1].SmbDzAdd[0],
     77                md.results.TransientSolution[-1].SmbFAC[0]]
  • issm/trunk-jpl/test/NightlyRun/test244.py

    r23468 r23793  
    1919from dmeth_params_set import *
    2020
    21 md = triangle(model(),'../Exp/Square.exp',200000.)
    22 md = setmask(md,'all','')
    23 md = parameterize(md,'../Par/SquareShelf.py')
    24 md = setflowequation(md,'SSA','all')
     21md = triangle(model(), '../Exp/Square.exp', 200000.)
     22md = setmask(md, 'all', '')
     23md = parameterize(md, '../Par/SquareShelf.py')
     24md = setflowequation(md, 'SSA', 'all')
    2525md.materials.rho_ice = 910
    26 md.cluster = generic('name',gethostname(),'np',3)
     26md.cluster = generic('name', gethostname(), 'np', 3)
    2727md.geometry.bed = md.geometry.base
    2828
    2929# Use of Gemb method for SMB computation
    3030md.smb = SMBgemb()
    31 md.smb.setdefaultparameters(md.mesh,md.geometry)
     31md.smb.setdefaultparameters(md.mesh, md.geometry)
    3232md.smb.dsnowIdx = 0
    3333
    3434#load hourly surface forcing date from 1979 to 2009:
    35 inputs = spio.loadmat('../Data/gemb_input.mat',squeeze_me = True)
     35inputs = spio.loadmat('../Data/gemb_input.mat', squeeze_me=True)
    3636
    37 #setup the inputs: 
    38 md.smb.Ta = np.append(np.tile(np.conjugate(inputs['Ta0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    39 md.smb.V = np.append(np.tile(np.conjugate(inputs['V0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    40 md.smb.dswrf = np.append(np.tile(np.conjugate(inputs['dsw0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    41 md.smb.dlwrf = np.append(np.tile(np.conjugate(inputs['dlw0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    42 md.smb.P = np.append(np.tile(np.conjugate(inputs['P0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    43 md.smb.eAir = np.append(np.tile(np.conjugate(inputs['eAir0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    44 md.smb.pAir = np.append(np.tile(np.conjugate(inputs['pAir0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    45 md.smb.pAir = np.append(np.tile(np.conjugate(inputs['pAir0']),(md.mesh.numberofelements,1)),np.conjugate([inputs['dateN']]),axis=0)
    46 md.smb.Vz = np.tile(np.conjugate(inputs['LP']['Vz']),(md.mesh.numberofelements,1)).flatten()
    47 md.smb.Tz = np.tile(np.conjugate(inputs['LP']['Tz']),(md.mesh.numberofelements,1)).flatten()
    48 md.smb.Tmean = np.tile(np.conjugate(inputs['LP']['Tmean']),(md.mesh.numberofelements,1)).flatten()
    49 md.smb.C = np.tile(np.conjugate(inputs['LP']['C']),(md.mesh.numberofelements,1)).flatten()
     37#setup the inputs:
     38md.smb.Ta = np.append(np.tile(np.conjugate(inputs['Ta0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     39md.smb.V = np.append(np.tile(np.conjugate(inputs['V0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     40md.smb.dswrf = np.append(np.tile(np.conjugate(inputs['dsw0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     41md.smb.dlwrf = np.append(np.tile(np.conjugate(inputs['dlw0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     42md.smb.P = np.append(np.tile(np.conjugate(inputs['P0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     43md.smb.eAir = np.append(np.tile(np.conjugate(inputs['eAir0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     44md.smb.pAir = np.append(np.tile(np.conjugate(inputs['pAir0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     45md.smb.pAir = np.append(np.tile(np.conjugate(inputs['pAir0']), (md.mesh.numberofelements, 1)), np.conjugate([inputs['dateN']]), axis=0)
     46md.smb.Vz = np.tile(np.conjugate(inputs['LP']['Vz']), (md.mesh.numberofelements, 1)).flatten()
     47md.smb.Tz = np.tile(np.conjugate(inputs['LP']['Tz']), (md.mesh.numberofelements, 1)).flatten()
     48md.smb.Tmean = np.tile(np.conjugate(inputs['LP']['Tmean']), (md.mesh.numberofelements, 1)).flatten()
     49md.smb.C = np.tile(np.conjugate(inputs['LP']['C']), (md.mesh.numberofelements, 1)).flatten()
    5050
    5151#smb settings
    52 md.smb.requested_outputs = ['SmbDz','SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbEC','SmbA','SmbMassBalance']
     52md.smb.requested_outputs = ['SmbDz', 'SmbT', 'SmbD', 'SmbRe', 'SmbGdn', 'SmbGsp', 'SmbEC', 'SmbA', 'SmbMassBalance']
    5353
    54 #only run smb core: 
     54#only run smb core:
    5555md.transient.isstressbalance = 0
    5656md.transient.ismasstransport = 1
    5757md.transient.isthermal = 0
    5858
    59 #time stepping: 
     59#time stepping:
    6060md.timestepping.start_time = 1965.
    6161md.timestepping.final_time = 1965.75
    62 md.timestepping.time_step = 1./365.0
     62md.timestepping.time_step = 1. / 365.0
    6363md.timestepping.interp_forcings = 0.
    6464
     
    6969#partitioning
    7070md.qmu.numberofpartitions = md.mesh.numberofelements
    71 md = partitioner(md,'package','linear')
    72 md.qmu.partition = (md.qmu.partition - 1).reshape(-1,1).T
     71md = partitioner(md, 'package', 'linear')
     72md.qmu.partition = (md.qmu.partition - 1).reshape(-1, 1).T
    7373
    7474#variables
    75 md.qmu.variables.surface_mass_balanceC = normal_uncertain.normal_uncertain('scaled_SmbC',1,0.5)
     75md.qmu.variables.surface_mass_balanceC = normal_uncertain.normal_uncertain('scaled_SmbC', 1, 0.5)
    7676Tmin = 273.
    77 telms = np.atleast_2d(np.min(md.smb.Ta[0:-1,:],1))
     77telms = np.atleast_2d(np.min(md.smb.Ta[0:-1, :], 1))
    7878mint_on_partition = telms.flatten()
    7979for pa in range(np.size(mint_on_partition)):
    80         vi = np.where(md.qmu.partition == pa)
    81         mint = telms[vi]*1.05
    82         pos = np.where(mint < Tmin)
    83         mint[pos] = Tmin
    84         mint_on_partition[pa] = max(mint/telms[vi])
     80    vi = np.where(md.qmu.partition == pa)
     81    mint = telms[vi] * 1.05
     82    pos = np.where(mint < Tmin)
     83    mint[pos] = Tmin
     84    mint_on_partition[pa] = max(mint / telms[vi])
    8585
    8686mint_on_partition[np.where(np.isnan(mint_on_partition))] = 10**-10
    87 md.qmu.variables.surface_mass_balanceTa = uniform_uncertain.uniform_uncertain('scaled_SmbTa',1,0.05)
     87md.qmu.variables.surface_mass_balanceTa = uniform_uncertain.uniform_uncertain('scaled_SmbTa', 1, 0.05)
    8888md.qmu.variables.surface_mass_balanceTa[0].lower = 0.95
    89 md.qmu.variables.surface_mass_balanceTa[0].upper = np.maximum(np.minimum(np.maximum(1.05,mint_on_partition),0.9999),0.0001)
     89md.qmu.variables.surface_mass_balanceTa[0].upper = np.maximum(np.minimum(np.maximum(1.05, mint_on_partition), 0.9999), 0.0001)
    9090
    9191#responses
    92 md.qmu.responses.IceVolume = response_function.response_function('IceVolume',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    93 md.qmu.responses.IceMass = response_function.response_function('IceMass',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    94 md.qmu.responses.TotalSmb = response_function.response_function('TotalSmb',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     92md.qmu.responses.IceVolume = response_function.response_function('IceVolume', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     93md.qmu.responses.IceMass = response_function.response_function('IceMass', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     94md.qmu.responses.TotalSmb = response_function.response_function('TotalSmb', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    9595
    9696#  nond_sampling study
    9797md.qmu.method = dakota_method.dakota_method('nond_samp')
    98 md.qmu.method = dmeth_params_set(md.qmu.method,'seed',1234,'samples',3,'sample_type','lhs')
     98md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 3, 'sample_type', 'lhs')
    9999dver = str(version)
    100 if ((int(dver[0]) == 4 and int(dver[2])>2) or int(dver[0])>4):
    101         md.qmu.method = dmeth_params_set(md.qmu.method,'rng','rnum2')
     100if ((int(dver[0]) == 4 and int(dver[2]) > 2) or int(dver[0]) > 4):
     101    md.qmu.method = dmeth_params_set(md.qmu.method, 'rng', 'rnum2')
    102102
    103103#parameters
     
    109109
    110110if version >= 6:
    111         md.qmu.params.analysis_driver = 'matlab'
    112         md.qmu.params.evaluation_scheduling = 'master'
    113         md.qmu.params.processors_per_evaluation = 2
     111    md.qmu.params.analysis_driver = 'matlab'
     112    md.qmu.params.evaluation_scheduling = 'master'
     113    md.qmu.params.processors_per_evaluation = 2
    114114else:
    115         md.qmu.params.analysis_driver = 'stressbalance'
    116         md.qmu.params.evaluation_concurrency = 1
     115    md.qmu.params.analysis_driver = 'stressbalance'
     116    md.qmu.params.evaluation_concurrency = 1
    117117
    118118
    119 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
    120 md.transient.requested_outputs = ['IceVolume','TotalSmb','IceMass']
     119md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
     120md.transient.requested_outputs = ['IceVolume', 'TotalSmb', 'IceMass']
    121121
    122122#solve
    123 md.verbose = verbose('000000000')       # this line is recommended
    124 md = solve(md,'Transient','overwrite','y')
     123md.verbose = verbose('000000000')       # this line is recommended
     124md = solve(md, 'Transient', 'overwrite', 'y')
    125125md.qmu.results = md.results.dakota
    126126
     
    128128md.results.dakota.moments = []
    129129for i in range(3):
    130         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
     130    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
    131131
    132132for i in range(3):
    133         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
     133    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
    134134
    135135field_names = ['moments']
    136136field_tolerances = [1e-11]
    137137field_values = [md.results.dakota.moments]
    138 
  • issm/trunk-jpl/test/NightlyRun/test245.py

    r23785 r23793  
    1111from SMBpddSicopolis import *
    1212
    13 md = triangle(model(),'../Exp/Square.exp',150000.)
    14 md = setmask(md,'all','')
    15 md = parameterize(md,'../Par/SquareShelf.py')
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, 'all', '')
     15md = parameterize(md, '../Par/SquareShelf.py')
    1616
    1717# Use of SMBpddSicopolis
    18 md.smb  = SMBpddSicopolis()
     18md.smb = SMBpddSicopolis()
    1919# initalize pdd fields
    2020md.smb.initialize(md)
    21 md.smb.s0p = md.geometry.surface.reshape(-1,1)
    22 md.smb.s0t = md.geometry.surface.reshape(-1,1)
     21md.smb.s0p = md.geometry.surface.reshape(-1, 1)
     22md.smb.s0t = md.geometry.surface.reshape(-1, 1)
    2323
    24 #
    25 md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices+1,12))
    26 md.smb.precipitation = np.empty((md.mesh.numberofvertices+1,12))
     24
     25md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices + 1, 12))
     26md.smb.precipitation = np.empty((md.mesh.numberofvertices + 1, 12))
    2727temp_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,))
    30 for imonth in range(12): 
    31         md.smb.monthlytemperatures[0:md.mesh.numberofvertices,imonth] = md.materials.meltingpoint + temp_ma_present + (temp_mj_present - temp_ma_present) * np.sin((imonth + 1. - 4.) * np.pi / 6.0)
    32         md.smb.monthlytemperatures[md.mesh.numberofvertices,imonth] = ((imonth+1)/12.)
    33         md.smb.precipitation[0:md.mesh.numberofvertices,imonth] = precipitation
    34         md.smb.precipitation[md.mesh.numberofvertices,imonth] = ((imonth+1)/12.)
     30for imonth in range(12):
     31    md.smb.monthlytemperatures[0:md.mesh.numberofvertices, imonth] = md.materials.meltingpoint + temp_ma_present + (temp_mj_present - temp_ma_present) * np.sin((imonth + 1. - 4.) * np.pi / 6.0)
     32    md.smb.monthlytemperatures[md.mesh.numberofvertices, imonth] = ((imonth + 1) / 12.)
     33    md.smb.precipitation[0:md.mesh.numberofvertices, imonth] = precipitation
     34    md.smb.precipitation[md.mesh.numberofvertices, imonth] = ((imonth + 1) / 12.)
    3535
    3636# time steps and resolution
     
    4444md.transient.isthermal = 0
    4545
    46 md.transient.requested_outputs = ['default','TemperaturePDD']
    47 md.cluster = generic('name',gethostname(),'np',1) # 3 for the cluster
    48 md = solve(md,'Transient')
     46md.transient.requested_outputs = ['default', 'TemperaturePDD']
     47md.cluster = generic('name', gethostname(), 'np', 1) # 3 for the cluster
     48md = solve(md, 'Transient')
    4949
    5050#Fields and tolerances to track changes
    51 field_names      = ['TemperaturePDD1','SmbMassBalance1','TemperaturePDD2','SmbMassBalance2']
    52 field_tolerances = [1e-13,1e-13,1e-13,1e-13]
    53 field_values = [
    54         md.results.TransientSolution[0].TemperaturePDD,
    55         md.results.TransientSolution[0].SmbMassBalance,
    56         md.results.TransientSolution[1].TemperaturePDD,
    57         md.results.TransientSolution[1].SmbMassBalance,
    58         ]
    59 
     51field_names = ['TemperaturePDD1', 'SmbMassBalance1', 'TemperaturePDD2', 'SmbMassBalance2']
     52field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     53field_values = [md.results.TransientSolution[0].TemperaturePDD,
     54                md.results.TransientSolution[0].SmbMassBalance,
     55                md.results.TransientSolution[1].TemperaturePDD,
     56                md.results.TransientSolution[1].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test250.py

    r23130 r23793  
    11#Test Name: SquareShelfTranForceNeg2dDakotaSampLinearPart
    22import numpy as np
    3 import scipy.io as spio
    43from os import getcwd
    54from model import *
     
    1413from dmeth_params_set import *
    1514
    16 md = triangle(model(),'../Exp/Square.exp',180000.)
    17 md = setmask(md,'all','')
    18 md = parameterize(md,'../Par/SquareShelf.py')
    19 md = setflowequation(md,'SSA','all')
    20 md.cluster = generic('name',gethostname(),'np',3)
     15md = triangle(model(), '../Exp/Square.exp', 180000.)
     16md = setmask(md, 'all', '')
     17md = parameterize(md, '../Par/SquareShelf.py')
     18md = setflowequation(md, 'SSA', 'all')
     19md.cluster = generic('name', gethostname(), 'np', 3)
    2120
    2221md.timestepping.time_step = 1
     
    2423md.timestepping.final_time = 4
    2524
    26 smb = np.ones((md.mesh.numberofvertices,))*3.6
    27 smb = np.array([smb,smb*-1]).T
     25smb = np.ones((md.mesh.numberofvertices,)) * 3.6
     26smb = np.array([smb, smb * -1]).T
    2827
    29 md.smb.mass_balance =  smb
    30 md.smb.mass_balance = np.concatenate((md.smb.mass_balance,[[1.5,3]]))
     28md.smb.mass_balance = smb
     29md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]]))
    3130md.transient.isthermal = 0
    3231#Dakota options
     
    3837#partitioning
    3938md.qmu.numberofpartitions = md.mesh.numberofvertices
    40 md = partitioner(md,'package','linear')
    41 md.qmu.partition = md.qmu.partition-1
     39md = partitioner(md, 'package', 'linear')
     40md.qmu.partition = md.qmu.partition - 1
    4241
    4342#variables
    44 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance',1,0.1)
     43md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 0.1)
    4544
    4645#responses
    47 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    48 md.qmu.responses.IceVolume = response_function.response_function('IceVolume',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    49 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    50 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    51 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    52 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    53 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    54 md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     46md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     47md.qmu.responses.IceVolume = response_function.response_function('IceVolume', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     48md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     49md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     50md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     51md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     52md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     53md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    5554
    5655#mass flux profiles
    57 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp']
     56md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp']
    5857md.qmu.mass_flux_profile_directory = getcwd()
    5958
    60 ##  nond_sampling study
     59#  nond_sampling study
    6160md.qmu.method = dakota_method.dakota_method('nond_samp')
    62 md.qmu.method = dmeth_params_set(md.qmu.method,'seed',1234,'samples',20,'sample_type','lhs')
     61md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'lhs')
    6362dver = str(version)
    64 if ((int(dver[0]) == 4 and int(dver[2])>2) or int(dver[0])>4):
    65         md.qmu.method = dmeth_params_set(md.qmu.method,'rng','rnum2')
     63if ((int(dver[0]) == 4 and int(dver[2]) > 2) or int(dver[0]) > 4):
     64    md.qmu.method = dmeth_params_set(md.qmu.method, 'rng', 'rnum2')
    6665
    6766#parameters
     
    7372
    7473if version >= 6:
    75         md.qmu.params.analysis_driver = 'matlab'
    76         md.qmu.params.evaluation_scheduling = 'master'
    77         md.qmu.params.processors_per_evaluation = 2
     74    md.qmu.params.analysis_driver = 'matlab'
     75    md.qmu.params.evaluation_scheduling = 'master'
     76    md.qmu.params.processors_per_evaluation = 2
    7877else:
    79         md.qmu.params.analysis_driver = 'stressbalance'
    80         md.qmu.params.evaluation_concurrency = 1
     78    md.qmu.params.analysis_driver = 'stressbalance'
     79    md.qmu.params.evaluation_concurrency = 1
    8180
    82 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     81md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8382md.transient.requested_outputs = ['IceVolume']
    8483
    8584#solve
    86 md.verbose = verbose('000000000')       # this line is recommended
    87 md = solve(md,'Transient','overwrite','y')
     85md.verbose = verbose('000000000')       # this line is recommended
     86md = solve(md, 'Transient', 'overwrite', 'y')
    8887md.qmu.results = md.results.dakota
    8988
     
    9190md.results.dakota.moments = []
    9291for i in range(8):
    93         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
     92    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
    9493
    9594for i in range(8):
    96         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
     95    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
    9796
    9897field_names = ['moments']
  • issm/trunk-jpl/test/NightlyRun/test251.py

    r23130 r23793  
    11#Test Name: SquareShelfTranForceNeg2dDakotaLocalLinearPart
    22import numpy as np
    3 import scipy.io as spio
    43from os import getcwd
    54from model import *
     
    1413from dmeth_params_set import *
    1514
    16 md = triangle(model(),'../Exp/Square.exp',180000.)
    17 md = setmask(md,'all','')
    18 md = parameterize(md,'../Par/SquareShelf.py')
    19 md = setflowequation(md,'SSA','all')
    20 md.cluster = generic('name',gethostname(),'np',3)
     15md = triangle(model(), '../Exp/Square.exp', 180000.)
     16md = setmask(md, 'all', '')
     17md = parameterize(md, '../Par/SquareShelf.py')
     18md = setflowequation(md, 'SSA', 'all')
     19md.cluster = generic('name', gethostname(), 'np', 3)
    2120
    2221md.timestepping.time_step = 1
     
    2423md.timestepping.final_time = 4
    2524
    26 smb = np.ones((md.mesh.numberofvertices,))*3.6
    27 smb = np.array([smb,smb*-1]).T
     25smb = np.ones((md.mesh.numberofvertices,)) * 3.6
     26smb = np.array([smb, smb * -1]).T
    2827
    29 md.smb.mass_balance =  smb
    30 md.smb.mass_balance = np.concatenate((md.smb.mass_balance,[[1.5,3]]))
     28md.smb.mass_balance = smb
     29md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]]))
    3130md.transient.isthermal = 0
    3231
     
    3938#partitioning
    4039md.qmu.numberofpartitions = md.mesh.numberofvertices
    41 md = partitioner(md,'package','linear')
    42 md.qmu.partition = md.qmu.partition-1
     40md = partitioner(md, 'package', 'linear')
     41md.qmu.partition = md.qmu.partition - 1
    4342
    4443#variables
    45 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance',1,100)
     44md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 100)
    4645
    4746#responses
    48 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    49 md.qmu.responses.IceVolume = response_function.response_function('IceVolume',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    50 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    51 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    52 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    53 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    54 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    55 md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     47md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     48md.qmu.responses.IceVolume = response_function.response_function('IceVolume', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     49md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     50md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     51md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     52md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     53md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     54md.qmu.responses.massFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    5655
    5756#mass flux profiles
    58 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp']
     57md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp']
    5958md.qmu.mass_flux_profile_directory = getcwd()
    6059
     
    7069
    7170if version >= 6:
    72         md.qmu.params.analysis_driver = 'matlab'
    73         md.qmu.params.evaluation_scheduling = 'master'
    74         md.qmu.params.processors_per_evaluation = 2
     71    md.qmu.params.analysis_driver = 'matlab'
     72    md.qmu.params.evaluation_scheduling = 'master'
     73    md.qmu.params.processors_per_evaluation = 2
    7574else:
    76         md.qmu.params.analysis_driver = 'stressbalance'
    77         md.qmu.params.evaluation_concurrency = 1
     75    md.qmu.params.analysis_driver = 'stressbalance'
     76    md.qmu.params.evaluation_concurrency = 1
    7877
    79 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     78md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    8079md.transient.requested_outputs = ['IceVolume']
    8180
    8281#solve
    83 md.verbose = verbose('000000000')       # this line is recommended
    84 md = solve(md,'Transient','overwrite','y')
     82md.verbose = verbose('000000000')       # this line is recommended
     83md = solve(md, 'Transient', 'overwrite', 'y')
    8584md.qmu.results = md.results.dakota
    8685
     
    8887md.results.dakota.moments = []
    8988for i in range(8):
    90         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
     89    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
    9190
    9291for i in range(8):
    93         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
     92    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
    9493
    9594field_names = ['moments']
  • issm/trunk-jpl/test/NightlyRun/test260.py

    r22267 r23793  
    1010from matenhancedice import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'all','')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
    1414md.materials = matenhancedice()
    1515md.materials.rheology_B = 3.15e8 * np.ones(md.mesh.numberofvertices,)
    1616md.materials.rheology_n = 3 * np.ones(md.mesh.numberofelements,)
    1717md.materials.rheology_E = np.ones(md.mesh.numberofvertices,)
    18 md = parameterize(md,'../Par/SquareShelf.py')
    19 md = setflowequation(md,'SSA','all')
    20 md.cluster = generic('name',gethostname(),'np',3)
    21 md = solve(md,'Stressbalance')
     18md = parameterize(md, '../Par/SquareShelf.py')
     19md = setflowequation(md, 'SSA', 'all')
     20md.cluster = generic('name', gethostname(), 'np', 3)
     21md = solve(md, 'Stressbalance')
    2222
    2323#Fields and tolerances to track changes
    24 field_names      = ['Vx','Vy','Vel','Pressure']
    25 field_tolerances = [1e-13,1e-13,1e-13,1e-13]
    26 field_values = [
    27         md.results.StressbalanceSolution.Vx,
    28         md.results.StressbalanceSolution.Vy,
    29         md.results.StressbalanceSolution.Vel,
    30         md.results.StressbalanceSolution.Pressure,
    31         ]
     24field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     25field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     26field_values = [md.results.StressbalanceSolution.Vx,
     27                md.results.StressbalanceSolution.Vy,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test261.py

    r22267 r23793  
    1010from matenhancedice import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',180000.)
    13 md = setmask(md,'all','')
    14 md = parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md = md.extrude(3,1.)
    16 md = setflowequation(md,'SSA','all')
    17 md.cluster = generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818md.materials = matenhancedice()
    1919md.materials.rheology_B = 3.15e8 * np.ones(md.mesh.numberofvertices,)
     
    2525md.transient.isthermal = 1
    2626md.transient.isgroundingline = 0
    27 md = solve(md,'Transient')
     27md = solve(md, 'Transient')
    2828
    2929#Fields and tolerances to track changes
    30 field_names      = ['Vx','Vy','Vel','Temperature','BasalforcingsGroundediceMeltingRate']
    31 field_tolerances = [1e-13,1e-13,1e-13,1e-13,1e-13]
    32 field_values = [
    33         md.results.TransientSolution[0].Vx,
    34         md.results.TransientSolution[0].Vy,
    35         md.results.TransientSolution[0].Vel,
    36         md.results.TransientSolution[0].Temperature,
    37         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
    38         ]
     30field_names = ['Vx', 'Vy', 'Vel', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     31field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     32field_values = [md.results.TransientSolution[0].Vx,
     33                md.results.TransientSolution[0].Vy,
     34                md.results.TransientSolution[0].Vel,
     35                md.results.TransientSolution[0].Temperature,
     36                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test270.py

    r21411 r23793  
    1010from matdamageice import matdamageice
    1111from generic import generic
    12 from socket import gethostname
    1312
    14 md=triangle(model(),'../Exp/Square.exp',150000.)
    15 md=setmask(md,'all','')
    16 md.materials=matdamageice()
    17 md=parameterize(md,'../Par/SquareShelf.py')
    18 md.damage.isdamage=1
    19 md.damage.D=0.5*np.ones(md.mesh.numberofvertices)
    20 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
    21 md=setflowequation(md,'SSA','all')
    22 md.cluster=generic('name',gethostname(),'np',3)
    23 md=solve(md,'Stressbalance')
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, 'all', '')
     15md.materials = matdamageice()
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md.damage.isdamage = 1
     18md.damage.D = 0.5 * np.ones(md.mesh.numberofvertices)
     19md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices)
     20md = setflowequation(md, 'SSA', 'all')
     21md.cluster = generic('name', gethostname(), 'np', 3)
     22md = solve(md, 'Stressbalance')
    2423
    2524#Fields and tolerances to track changes
    26 field_names     =['Vx','Vy','Vel','Pressure']
    27 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    28 field_values=[md.results.StressbalanceSolution.Vx,
    29                                                         md.results.StressbalanceSolution.Vy,
    30                                                         md.results.StressbalanceSolution.Vel,
    31                                                         md.results.StressbalanceSolution.Pressure]
     25field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     26field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     27field_values = [md.results.StressbalanceSolution.Vx,
     28                md.results.StressbalanceSolution.Vy,
     29                md.results.StressbalanceSolution.Vel,
     30                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test272.py

    r23785 r23793  
    88from setflowequation import setflowequation
    99from solve import solve
    10 from socket import gethostname
    1110from matdamageice import matdamageice
    1211from generic import generic
    1312
    14 md=triangle(model(),'../Exp/Square.exp',150000.)
    15 md=setmask(md,'all','')
    16 md.materials=matdamageice()
    17 md=parameterize(md,'../Par/SquareShelf.py')
    18 md.damage.isdamage=1
    19 md.damage.D=0.5*np.ones(md.mesh.numberofvertices)
    20 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
    21 md=setflowequation(md,'SSA','all')
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, 'all', '')
     15md.materials = matdamageice()
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md.damage.isdamage = 1
     18md.damage.D = 0.5 * np.ones(md.mesh.numberofvertices)
     19md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices)
     20md = setflowequation(md, 'SSA', 'all')
    2221
    2322#control parameters
    24 md.inversion.iscontrol=1
    25 md.inversion.control_parameters=['DamageDbar']
    26 md.inversion.min_parameters=10**-13*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    27 md.inversion.max_parameters=np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    28 md.inversion.nsteps=2
    29 md.inversion.cost_functions=[101]
    30 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    31 md.inversion.gradient_scaling=0.9*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    32 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    33 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
    34 md.inversion.vx_obs=md.initialization.vx
    35 md.inversion.vy_obs=md.initialization.vy
     23md.inversion.iscontrol = 1
     24md.inversion.control_parameters = ['DamageDbar']
     25md.inversion.iscontrol = 1
     26md.inversion.control_parameters = ['DamageDbar']
     27md.inversion.min_parameters = 10**-13 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     28md.inversion.max_parameters = np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     29md.inversion.nsteps = 2
     30md.inversion.cost_functions = [101]
     31md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     32md.inversion.gradient_scaling = 0.9 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     33md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     34md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps))
     35md.inversion.vx_obs = md.initialization.vx
     36md.inversion.vy_obs = md.initialization.vy
    3637
    37 md.cluster=generic('name',gethostname(),'np',3)
    38 md=solve(md,'Stressbalance')
     38md.cluster = generic('name', gethostname(), 'np', 3)
     39md = solve(md, 'Stressbalance')
    3940
    4041#Fields and tolerances to track changes
    41 field_names     =['Gradient','Misfits','DamageDbar','Pressure','Vel','Vx','Vy']
    42 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
    43 field_values=[md.results.StressbalanceSolution.Gradient1,
    44                                                         md.results.StressbalanceSolution.J,
    45                                                         md.results.StressbalanceSolution.DamageDbar,
    46                                                         md.results.StressbalanceSolution.Pressure,
    47                                                         md.results.StressbalanceSolution.Vel,
    48                                                         md.results.StressbalanceSolution.Vx,
    49                                                         md.results.StressbalanceSolution.Vy]
     42field_names = ['Gradient', 'Misfits', 'DamageDbar', 'Pressure', 'Vel', 'Vx', 'Vy']
     43field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12]
     44field_values = [md.results.StressbalanceSolution.Gradient1,
     45                md.results.StressbalanceSolution.J,
     46                md.results.StressbalanceSolution.DamageDbar,
     47                md.results.StressbalanceSolution.Pressure,
     48                md.results.StressbalanceSolution.Vel,
     49                md.results.StressbalanceSolution.Vx,
     50                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test273.py

    r21411 r23793  
    1010from matdamageice import matdamageice
    1111from generic import generic
    12 from socket import gethostname
    1312
    14 md=triangle(model(),'../Exp/Square.exp',150000.)
    15 md=setmask(md,'all','')
    16 md.materials=matdamageice()
    17 md=parameterize(md,'../Par/SquareShelf.py')
    18 md.damage.isdamage=1
    19 md.damage.D=0.*np.ones(md.mesh.numberofvertices)
    20 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
    21 md=setflowequation(md,'SSA','all')
    22 md.cluster=generic('name',gethostname(),'np',3)
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, 'all', '')
     15md.materials = matdamageice()
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md.damage.isdamage = 1
     18md.damage.D = 0. * np.ones(md.mesh.numberofvertices)
     19md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices)
     20md = setflowequation(md, 'SSA', 'all')
     21md.cluster = generic('name', gethostname(), 'np', 3)
    2322
    24 md.stressbalance.requested_outputs=['default','NewDamage']
    25 md.damage.stress_threshold=1.3e5
    26 md.damage.kappa=2.8
     23md.stressbalance.requested_outputs = ['default', 'NewDamage']
     24md.damage.stress_threshold = 1.3e5
     25md.damage.kappa = 2.8
    2726
    28 md=solve(md,'Stressbalance')
     27md = solve(md, 'Stressbalance')
    2928
    3029#Fields and tolerances to track changes
    31 field_names     =['Vx','Vy','Vel','Pressure','NewDamage']
    32 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    33 field_values=[md.results.StressbalanceSolution.Vx,
    34                                                         md.results.StressbalanceSolution.Vy,
    35                                                         md.results.StressbalanceSolution.Vel,
    36                                                         md.results.StressbalanceSolution.Pressure,
    37                                                         md.results.StressbalanceSolution.NewDamage]
     30field_names = ['Vx', 'Vy', 'Vel', 'Pressure', 'NewDamage']
     31field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     32field_values = [md.results.StressbalanceSolution.Vx,
     33                md.results.StressbalanceSolution.Vy,
     34                md.results.StressbalanceSolution.Vel,
     35                md.results.StressbalanceSolution.Pressure,
     36                md.results.StressbalanceSolution.NewDamage]
  • issm/trunk-jpl/test/NightlyRun/test274.py

    r23707 r23793  
    88from setflowequation import setflowequation
    99from solve import solve
    10 from socket import gethostname
    1110from matdamageice import matdamageice
    1211from meshprocessrifts import meshprocessrifts
    1312from generic import generic
    1413
    15 md=triangle(model(),'../Exp/SquareHole.exp','../Exp/Rifts.exp',50000.)
    16 md=meshprocessrifts(md,'../Exp/Square.exp')
    17 md=setmask(md,'all','')
    18 md.materials=matdamageice()
    19 md=parameterize(md,'../Par/SquareShelf2.py')
    20 md.damage.isdamage=1
    21 md.damage.D=0.5*np.ones(md.mesh.numberofvertices)
    22 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
    23 md=setflowequation(md,'SSA','all')
     14md = triangle(model(), '../Exp/SquareHole.exp', '../Exp/Rifts.exp', 50000.)
     15md = meshprocessrifts(md, '../Exp/Square.exp')
     16md = setmask(md, 'all', '')
     17md.materials = matdamageice()
     18md = parameterize(md, '../Par/SquareShelf2.py')
     19md.damage.isdamage = 1
     20md.damage.D = 0.5 * np.ones(md.mesh.numberofvertices)
     21md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices)
     22md = setflowequation(md, 'SSA', 'all')
    2423
    25 md.cluster=generic('name',gethostname(),'np',3)
     24md.cluster = generic('name', gethostname(), 'np', 3)
    2625print(md.rifts.riftstruct[0]['fill'])
    27 md=solve(md,'Stressbalance')
     26md = solve(md, 'Stressbalance')
    2827
    2928#Fields and tolerances to track changes
    30 field_names     =['Vx','Vy','Vel','Pressure']
    31 field_tolerances=[7e-8,3e-8,3e-8,1e-11]
    32 field_values=[md.results.StressbalanceSolution.Vx,
    33                                                         md.results.StressbalanceSolution.Vy,
    34                                                         md.results.StressbalanceSolution.Vel,
    35                                                         md.results.StressbalanceSolution.Pressure]
     29field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     30field_tolerances = [7e-8, 3e-8, 3e-8, 1e-11]
     31field_values = [md.results.StressbalanceSolution.Vx,
     32                md.results.StressbalanceSolution.Vy,
     33                md.results.StressbalanceSolution.Vel,
     34                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test275.py

    r21411 r23793  
    1 #Test Name: SquareShelfDamageEvolutionSSA2dPralong 
     1#Test Name: SquareShelfDamageEvolutionSSA2dPralong
    22import numpy as np
    33from triangle import triangle
     
    66from setmask import setmask
    77from parameterize import parameterize
    8 from verbose import verbose
    98from setflowequation import setflowequation
    109from generic import generic
    11 from socket import gethostname
    1210from solve import solve
    1311from matdamageice import matdamageice
    1412
    15 md=triangle(model(),'../Exp/Square.exp',150000.)
    16 md=setmask(md,'all','')
    17 md.materials=matdamageice()
    18 md=parameterize(md,'../Par/SquareShelf.py')
    19 md.damage.isdamage=1
    20 md.damage.D=0.1*np.ones(md.mesh.numberofvertices)
    21 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
    22 md.damage.law=1
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, 'all', '')
     15md.materials = matdamageice()
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md.damage.isdamage = 1
     18md.damage.D = 0.1 * np.ones(md.mesh.numberofvertices)
     19md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices)
     20md.damage.law = 1
    2321
    24 md.damage.c1=1.e-11
    25 md.damage.c2=0.4
    26 md.damage.c3=1.e-3
    27 md.damage.healing=0.4
    28 md.damage.stress_threshold=1.e5
    29 md.damage.stabilization=1
     22md.damage.c1 = 1.e-11
     23md.damage.c2 = 0.4
     24md.damage.c3 = 1.e-3
     25md.damage.healing = 0.4
     26md.damage.stress_threshold = 1.e5
     27md.damage.stabilization = 1
    3028
    31 md.damage.requested_outputs=['default','DamageF']
     29md.damage.requested_outputs = ['default', 'DamageF']
    3230
    33 md=setflowequation(md,'SSA','all')
    34 md.cluster=generic('name',gethostname(),'np',3)
    35 md=solve(md,'DamageEvolution')
     31md = setflowequation(md, 'SSA', 'all')
     32md.cluster = generic('name', gethostname(), 'np', 3)
     33md = solve(md, 'DamageEvolution')
    3634
    37 field_names=['D','F']
    38 field_tolerances=[1.e-13,1.e-13]
    39 field_values=[md.results.DamageEvolutionSolution.DamageDbar,
    40                                                         md.results.DamageEvolutionSolution.DamageF]
     35field_names = ['D', 'F']
     36field_tolerances = [1.e-13, 1.e-13]
     37field_values = [md.results.DamageEvolutionSolution.DamageDbar,
     38                md.results.DamageEvolutionSolution.DamageF]
  • issm/trunk-jpl/test/NightlyRun/test280.py

    r21408 r23793  
    1010from ContourToMesh import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 field_names=[]
    19 field_tolerances=[]
    20 field_values=[]
    21 for i in ['P1bubble','P1bubblecondensed','P2']:
    22         md.flowequation.fe_SSA=i
    23         md=solve(md,'Stressbalance')
    24         field_names     =field_names+['Vx'+i,'Vy'+i,'Vel'+i,'Pressure'+i]
    25         field_tolerances=field_tolerances+[1e-12,1e-13,1e-13,1e-13]
    26         field_values=field_values+[\
    27                 md.results.StressbalanceSolution.Vx,\
    28                 md.results.StressbalanceSolution.Vy,\
    29                 md.results.StressbalanceSolution.Vel,\
    30                 md.results.StressbalanceSolution.Pressure,\
    31                 ]
     18field_names = []
     19field_tolerances = []
     20field_values = []
     21for i in ['P1bubble', 'P1bubblecondensed', 'P2']:
     22    md.flowequation.fe_SSA = i
     23    md = solve(md, 'Stressbalance')
     24    field_names = field_names + ['Vx' + i, 'Vy' + i, 'Vel' + i, 'Pressure' + i]
     25    field_tolerances = field_tolerances + [1e-12, 1e-13, 1e-13, 1e-13]
     26    field_values = field_values + [md.results.StressbalanceSolution.Vx,
     27                                   md.results.StressbalanceSolution.Vy,
     28                                   md.results.StressbalanceSolution.Vel,
     29                                   md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test285.py

    r22525 r23793  
    1010from ContourToMesh import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 field_names=[]
    20 field_tolerances=[]
    21 field_values=[]
    22 for i in ['P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P1xP3','P2xP4']:
    23         md.flowequation.fe_HO=i
    24         md=solve(md,'Stressbalance')
    25         field_names     =field_names+['Vx'+i,'Vy'+i,'Vz'+i,'Vel'+i,'Pressure'+i]
    26         field_tolerances=field_tolerances+[6.7e-08,5e-08,2e-08,5e-08,1e-13]
    27         field_values=field_values+[\
    28                 md.results.StressbalanceSolution.Vx,\
    29                 md.results.StressbalanceSolution.Vy,\
    30                 md.results.StressbalanceSolution.Vz,\
    31                 md.results.StressbalanceSolution.Vel,\
    32                 md.results.StressbalanceSolution.Pressure,\
    33                 ]
     19field_names = []
     20field_tolerances = []
     21field_values = []
     22for i in ['P1bubble', 'P1bubblecondensed', 'P1xP2', 'P2xP1', 'P2', 'P1xP3', 'P2xP4']:
     23    md.flowequation.fe_HO = i
     24    md = solve(md, 'Stressbalance')
     25    field_names = field_names + ['Vx' + i, 'Vy' + i, 'Vz' + i, 'Vel' + i, 'Pressure' + i]
     26    field_tolerances = field_tolerances + [6.7e-08, 5e-08, 2e-08, 5e-08, 1e-13]
     27    field_values = field_values + [md.results.StressbalanceSolution.Vx,
     28                                   md.results.StressbalanceSolution.Vy,
     29                                   md.results.StressbalanceSolution.Vz,
     30                                   md.results.StressbalanceSolution.Vel,
     31                                   md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test290.py

    r23214 r23793  
    1010from ContourToMesh import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'FS','all')
    17 md.flowequation.fe_FS='TaylorHood'
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'FS', 'all')
     17md.flowequation.fe_FS = 'TaylorHood'
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md = solve(md, 'Stressbalance')
    2020
    2121#Fields and tolerances to track changes
    22 field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure']
    23 field_tolerances=[5e-5,5e-5,8e-4,5e-4,2e-7]
    24 field_values=[\
    25         md.results.StressbalanceSolution.Vx,\
    26         md.results.StressbalanceSolution.Vy,\
    27         md.results.StressbalanceSolution.Vz,\
    28         md.results.StressbalanceSolution.Vel,\
    29         md.results.StressbalanceSolution.Pressure,\
    30         ]
     22field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     23field_tolerances = [5e-5, 5e-5, 8e-4, 5e-4, 2e-7]
     24field_values = [md.results.StressbalanceSolution.Vx,
     25                md.results.StressbalanceSolution.Vy,
     26                md.results.StressbalanceSolution.Vz,
     27                md.results.StressbalanceSolution.Vel,
     28                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test291.py

    r21408 r23793  
    1010from ContourToMesh import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(2,1.)
    16 md=setflowequation(md,'FS','all')
    17 md.flowequation.fe_FS='OneLayerP4z'
    18 md.cluster=generic('name',gethostname(),'np',1)
    19 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(2, 1.)
     16md = setflowequation(md, 'FS', 'all')
     17md.flowequation.fe_FS = 'OneLayerP4z'
     18md.cluster = generic('name', gethostname(), 'np', 1)
     19md = solve(md, 'Stressbalance')
    2020
    2121#Fields and tolerances to track changes
    22 field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure']
    23 field_tolerances=[5e-5,5e-5,8e-5,5e-5,1e-7]
    24 field_values=[\
    25         md.results.StressbalanceSolution.Vx,\
    26         md.results.StressbalanceSolution.Vy,\
    27         md.results.StressbalanceSolution.Vz,\
    28         md.results.StressbalanceSolution.Vel,\
    29         md.results.StressbalanceSolution.Pressure,\
    30         ]
     22field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     23field_tolerances = [5e-5, 5e-5, 8e-5, 5e-5, 1e-7]
     24field_values = [md.results.StressbalanceSolution.Vx,
     25                md.results.StressbalanceSolution.Vy,
     26                md.results.StressbalanceSolution.Vz,
     27                md.results.StressbalanceSolution.Vel,
     28                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test292.py

    r22864 r23793  
    1212from linearbasalforcings import linearbasalforcings
    1313
    14 md=triangle(model(),'../Exp/Square.exp',150000)
    15 md=setmask(md,'all','')
    16 md=parameterize(md,'../Par/SquareShelf.py')
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.basalforcings=linearbasalforcings(md.basalforcings)
    20 md.basalforcings.deepwater_melting_rate = np.array([[50.,100.],[0.,5.]])
    21 md.timestepping.interp_forcings=0
    22 md=solve(md,'Transient')
     14md = triangle(model(), '../Exp/Square.exp', 150000)
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelf.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md.basalforcings = linearbasalforcings(md.basalforcings)
     20md.basalforcings.deepwater_melting_rate = np.array([[50., 100.], [0., 5.]])
     21md.timestepping.interp_forcings = 0
     22md = solve(md, 'Transient')
    2323
    2424# Fields and tolerances to track changes
    2525
    26 field_names     =['Vx1','Vy1','Vel1','Pressure1','Base1','Surface1','Thickness1',
    27                                                                         'Vx2','Vy2','Vel2','Pressure2','Base2','Surface2','Thickness2',
    28                                                                         'Vx3','Vy3','Vel3','Pressure3','Base3','Surface3','Thickness3']
    29 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    30                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    31                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    32 field_values=[md.results.TransientSolution[0].Vx,
    33                                                         md.results.TransientSolution[0].Vy,
    34                                                         md.results.TransientSolution[0].Vel,
    35                                                         md.results.TransientSolution[0].Pressure,
    36                                                         md.results.TransientSolution[0].Base,
    37                                                         md.results.TransientSolution[0].Surface,
    38                                                         md.results.TransientSolution[0].Thickness,
    39                                                         md.results.TransientSolution[1].Vx,
    40                                                         md.results.TransientSolution[1].Vy,
    41                                                         md.results.TransientSolution[1].Vel,
    42                                                         md.results.TransientSolution[1].Pressure,
    43                                                         md.results.TransientSolution[1].Base,
    44                                                         md.results.TransientSolution[1].Surface,
    45                                                         md.results.TransientSolution[1].Thickness,
    46                                                         md.results.TransientSolution[2].Vx,
    47                                                         md.results.TransientSolution[2].Vy,
    48                                                         md.results.TransientSolution[2].Vel,
    49                                                         md.results.TransientSolution[2].Pressure,
    50                                                         md.results.TransientSolution[2].Base,
    51                                                         md.results.TransientSolution[2].Surface,
    52                                                         md.results.TransientSolution[2].Thickness]
     26field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Base1', 'Surface1', 'Thickness1',
     27               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Base2', 'Surface2', 'Thickness2',
     28               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Base3', 'Surface3', 'Thickness3']
     29field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     30                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     31                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     32field_values = [md.results.TransientSolution[0].Vx,
     33                md.results.TransientSolution[0].Vy,
     34                md.results.TransientSolution[0].Vel,
     35                md.results.TransientSolution[0].Pressure,
     36                md.results.TransientSolution[0].Base,
     37                md.results.TransientSolution[0].Surface,
     38                md.results.TransientSolution[0].Thickness,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vel,
     42                md.results.TransientSolution[1].Pressure,
     43                md.results.TransientSolution[1].Base,
     44                md.results.TransientSolution[1].Surface,
     45                md.results.TransientSolution[1].Thickness,
     46                md.results.TransientSolution[2].Vx,
     47                md.results.TransientSolution[2].Vy,
     48                md.results.TransientSolution[2].Vel,
     49                md.results.TransientSolution[2].Pressure,
     50                md.results.TransientSolution[2].Base,
     51                md.results.TransientSolution[2].Surface,
     52                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test293.py

    r22268 r23793  
    1010from mismipbasalforcings import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'all','')
    14 md = parameterize(md,'../Par/SquareShelf.py')
    15 md = setflowequation(md,'SSA','all')
    16 md.cluster = generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717md.constants.yts = 365.2422 * 24. * 3600.
    1818md.basalforcings = mismipbasalforcings()
     
    2020md.transient.isgroundingline = 1
    2121md.geometry.bed = min(md.geometry.base) * np.ones(md.mesh.numberofvertices,)
    22 md.transient.requested_outputs = ['default','BasalforcingsFloatingiceMeltingRate']
     22md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']
    2323
    24 md = solve(md,'Transient')
     24md = solve(md, 'Transient')
    2525
    2626#Fields and tolerances to track changes
    27 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','BasalforcingsFloatingiceMeltingRate1',
    28         'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','BasalforcingsFloatingiceMeltingRate2',
    29         'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','BasalforcingsFloatingiceMeltingRate3']
     27field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'BasalforcingsFloatingiceMeltingRate1',
     28               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'BasalforcingsFloatingiceMeltingRate2',
     29               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'BasalforcingsFloatingiceMeltingRate3']
    3030field_tolerances = [
    31         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,2e-13,
    32         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,2e-13,
    33         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,2e-13]
     31    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 2e-13,
     32    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 2e-13,
     33    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 2e-13]
    3434field_values = [
    35         md.results.TransientSolution[0].Vx,
    36         md.results.TransientSolution[0].Vy,
    37         md.results.TransientSolution[0].Vel,
    38         md.results.TransientSolution[0].Pressure,
    39         md.results.TransientSolution[0].Base,
    40         md.results.TransientSolution[0].Surface,
    41         md.results.TransientSolution[0].Thickness,
    42         md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
    43         md.results.TransientSolution[1].Vx,
    44         md.results.TransientSolution[1].Vy,
    45         md.results.TransientSolution[1].Vel,
    46         md.results.TransientSolution[1].Pressure,
    47         md.results.TransientSolution[1].Base,
    48         md.results.TransientSolution[1].Surface,
    49         md.results.TransientSolution[1].Thickness,
    50         md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
    51         md.results.TransientSolution[2].Vx,
    52         md.results.TransientSolution[2].Vy,
    53         md.results.TransientSolution[2].Vel,
    54         md.results.TransientSolution[2].Pressure,
    55         md.results.TransientSolution[2].Base,
    56         md.results.TransientSolution[2].Surface,
    57         md.results.TransientSolution[2].Thickness,
    58         md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate,
    59         ]
     35    md.results.TransientSolution[0].Vx,
     36    md.results.TransientSolution[0].Vy,
     37    md.results.TransientSolution[0].Vel,
     38    md.results.TransientSolution[0].Pressure,
     39    md.results.TransientSolution[0].Base,
     40    md.results.TransientSolution[0].Surface,
     41    md.results.TransientSolution[0].Thickness,
     42    md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
     43    md.results.TransientSolution[1].Vx,
     44    md.results.TransientSolution[1].Vy,
     45    md.results.TransientSolution[1].Vel,
     46    md.results.TransientSolution[1].Pressure,
     47    md.results.TransientSolution[1].Base,
     48    md.results.TransientSolution[1].Surface,
     49    md.results.TransientSolution[1].Thickness,
     50    md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
     51    md.results.TransientSolution[2].Vx,
     52    md.results.TransientSolution[2].Vy,
     53    md.results.TransientSolution[2].Vel,
     54    md.results.TransientSolution[2].Pressure,
     55    md.results.TransientSolution[2].Base,
     56    md.results.TransientSolution[2].Surface,
     57    md.results.TransientSolution[2].Thickness,
     58    md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test3001.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',50000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',1)
    17 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy']
    18 md.autodiff.isautodiff=True
    19 md.toolkits.DefaultAnalysis=issmgslsolver()
    20 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 50000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 1)
     17md.stressbalance.requested_outputs = ['default', 'DeviatoricStressxx', 'DeviatoricStressyy', 'DeviatoricStressxy']
     18md.autodiff.isautodiff = True
     19md.toolkits.DefaultAnalysis = issmgslsolver()
     20md = solve(md, 'Stressbalance')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Vx','Vy','Vel','Pressure',\
    24         'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy']
    25 field_tolerances=[1e-13,1e-13,1e-13,1e-13,\
    26         1e-13,1e-13,1e-13]
    27 field_values=[\
    28         md.results.StressbalanceSolution.Vx,\
    29         md.results.StressbalanceSolution.Vy,\
    30         md.results.StressbalanceSolution.Vel,\
    31         md.results.StressbalanceSolution.Pressure,\
    32         md.results.StressbalanceSolution.DeviatoricStressxx,\
    33         md.results.StressbalanceSolution.DeviatoricStressyy,\
    34         md.results.StressbalanceSolution.DeviatoricStressxy,\
    35         ]
     23field_names = ['Vx', 'Vy', 'Vel', 'Pressure',
     24               'DeviatoricStressxx', 'DeviatoricStressyy', 'DeviatoricStressxy']
     25field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     26                    1e-13, 1e-13, 1e-13]
     27field_values = [md.results.StressbalanceSolution.Vx,
     28                md.results.StressbalanceSolution.Vy,
     29                md.results.StressbalanceSolution.Vel,
     30                md.results.StressbalanceSolution.Pressure,
     31                md.results.StressbalanceSolution.DeviatoricStressxx,
     32                md.results.StressbalanceSolution.DeviatoricStressyy,
     33                md.results.StressbalanceSolution.DeviatoricStressxy]
  • issm/trunk-jpl/test/NightlyRun/test3002.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.autodiff.isautodiff=True
    19 md.toolkits.DefaultAnalysis=issmgslsolver()
    20 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 1)
     18md.autodiff.isautodiff = True
     19md.toolkits.DefaultAnalysis = issmgslsolver()
     20md = solve(md, 'Stressbalance')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    24 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    25 field_values=[\
    26         md.results.StressbalanceSolution.Vx,\
    27         md.results.StressbalanceSolution.Vy,\
    28         md.results.StressbalanceSolution.Vz,\
    29         md.results.StressbalanceSolution.Vel,\
    30         md.results.StressbalanceSolution.Pressure,\
    31         ]
     23field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     24field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     25field_values = [md.results.StressbalanceSolution.Vx,
     26                md.results.StressbalanceSolution.Vy,
     27                md.results.StressbalanceSolution.Vz,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test3003.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
    19 md.autodiff.isautodiff=True
    20 md.toolkits.DefaultAnalysis=issmgslsolver()
    21 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 1)
     18md.stressbalance.requested_outputs = ['default', 'StressTensorxx', 'StressTensoryy', 'StressTensorzz', 'StressTensorxy', 'StressTensorxz', 'StressTensoryz']
     19md.autodiff.isautodiff = True
     20md.toolkits.DefaultAnalysis = issmgslsolver()
     21md = solve(md, 'Stressbalance')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Vx','Vy','Vz','Vel','Pressure',\
    25         'StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
    26 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,\
    27         1e-09,1e-09,1e-09,1e-09,1e-09,2e-09]
    28 field_values=[\
    29         md.results.StressbalanceSolution.Vx,\
    30         md.results.StressbalanceSolution.Vy,\
    31         md.results.StressbalanceSolution.Vz,\
    32         md.results.StressbalanceSolution.Vel,\
    33         md.results.StressbalanceSolution.Pressure,\
    34         md.results.StressbalanceSolution.StressTensorxx,\
    35         md.results.StressbalanceSolution.StressTensoryy,\
    36         md.results.StressbalanceSolution.StressTensorzz,\
    37         md.results.StressbalanceSolution.StressTensorxy,\
    38         md.results.StressbalanceSolution.StressTensorxz,\
    39         md.results.StressbalanceSolution.StressTensoryz,\
    40         ]
     24field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure',
     25               'StressTensorxx', 'StressTensoryy', 'StressTensorzz', 'StressTensorxy', 'StressTensorxz', 'StressTensoryz']
     26field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     27                    1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 2e-09]
     28field_values = [md.results.StressbalanceSolution.Vx,
     29                md.results.StressbalanceSolution.Vy,
     30                md.results.StressbalanceSolution.Vz,
     31                md.results.StressbalanceSolution.Vel,
     32                md.results.StressbalanceSolution.Pressure,
     33                md.results.StressbalanceSolution.StressTensorxx,
     34                md.results.StressbalanceSolution.StressTensoryy,
     35                md.results.StressbalanceSolution.StressTensorzz,
     36                md.results.StressbalanceSolution.StressTensorxy,
     37                md.results.StressbalanceSolution.StressTensorxz,
     38                md.results.StressbalanceSolution.StressTensoryz]
  • issm/trunk-jpl/test/NightlyRun/test3004.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'FS','all')
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.autodiff.isautodiff=True
    19 md.toolkits.DefaultAnalysis=issmgslsolver()
    20 md=solve(md,'Stressbalance')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'FS', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 1)
     18md.autodiff.isautodiff = True
     19md.toolkits.DefaultAnalysis = issmgslsolver()
     20md = solve(md, 'Stressbalance')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    24 field_tolerances=[1e-08,1e-08,3e-07,1e-08,1e-08]
    25 field_values=[\
    26         md.results.StressbalanceSolution.Vx,\
    27         md.results.StressbalanceSolution.Vy,\
    28         md.results.StressbalanceSolution.Vz,\
    29         md.results.StressbalanceSolution.Vel,\
    30         md.results.StressbalanceSolution.Pressure,\
    31         ]
     23field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     24field_tolerances = [1e-08, 1e-08, 3e-07, 1e-08, 1e-08]
     25field_values = [md.results.StressbalanceSolution.Vx,
     26                md.results.StressbalanceSolution.Vy,
     27                md.results.StressbalanceSolution.Vz,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test3005.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',1)
    17 md.autodiff.isautodiff=True
    18 md.toolkits.DefaultAnalysis=issmgslsolver()
    19 md=solve(md,'Masstransport')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 1)
     17md.autodiff.isautodiff = True
     18md.toolkits.DefaultAnalysis = issmgslsolver()
     19md = solve(md, 'Masstransport')
    2020
    2121#Fields and tolerances to track changes
    22 field_names     =['Thickness']
    23 field_tolerances=[1e-13]
    24 field_values=[\
    25         md.results.MasstransportSolution.Thickness,\
    26         ]
     22field_names = ['Thickness']
     23field_tolerances = [1e-13]
     24field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3006.py

    r23746 r23793  
    1111
    1212
    13 md=triangle(model(),'../Exp/Square.exp',150000.)
    14 md=meshconvert(md)
    15 md=setmask(md,'all','')
    16 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',1)
    19 md.masstransport.stabilization=3
    20 md.masstransport.spcthickness=md.geometry.thickness
    21 md.autodiff.isautodiff=True
    22 md.toolkits.DefaultAnalysis=issmgslsolver()
    23 md=solve(md,'Masstransport')
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = meshconvert(md)
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelfConstrained.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 1)
     19md.masstransport.stabilization = 3
     20md.masstransport.spcthickness = md.geometry.thickness
     21md.autodiff.isautodiff = True
     22md.toolkits.DefaultAnalysis = issmgslsolver()
     23md = solve(md, 'Masstransport')
    2424
    2525#Fields and tolerances to track changes
    26 field_names     =['Thickness']
    27 field_tolerances=[1e-13]
    28 field_values=[\
    29         md.results.MasstransportSolution.Thickness,\
    30         ]
     26field_names = ['Thickness']
     27field_tolerances = [1e-13]
     28field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3007.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.extrude(5,3.)
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.autodiff.isautodiff=True
    19 md.toolkits.DefaultAnalysis=issmgslsolver()
    20 md=solve(md,'Masstransport')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.extrude(5, 3.)
     17md.cluster = generic('name', gethostname(), 'np', 1)
     18md.autodiff.isautodiff = True
     19md.toolkits.DefaultAnalysis = issmgslsolver()
     20md = solve(md, 'Masstransport')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Thickness']
    24 field_tolerances=[1e-13]
    25 field_values=[\
    26         md.results.MasstransportSolution.Thickness,\
    27         ]
     23field_names = ['Thickness']
     24field_tolerances = [1e-13]
     25field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3008.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.timestepping.time_step=0
    18 md.cluster=generic('name',gethostname(),'np',1)
    19 md.autodiff.isautodiff=True
    20 md.toolkits.DefaultAnalysis=issmgslsolver()
    21 md=solve(md,'Thermal')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.timestepping.time_step = 0
     18md.cluster = generic('name', gethostname(), 'np', 1)
     19md.autodiff.isautodiff = True
     20md.toolkits.DefaultAnalysis = issmgslsolver()
     21md = solve(md, 'Thermal')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    25 field_tolerances=[1e-13,1e-5]
    26 field_values=[\
    27         md.results.ThermalSolution.Temperature,\
    28         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
    29         ]
     24field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     25field_tolerances = [1e-13, 1e-5]
     26field_values = [md.results.ThermalSolution.Temperature,
     27                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test3009.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',1)
    18 md.transient.isstressbalance=False
    19 md.transient.ismasstransport=False
    20 md.transient.issmb=True
    21 md.transient.isthermal=True
    22 md.transient.isgroundingline=False
    23 md.autodiff.isautodiff=True
    24 md.toolkits.DefaultAnalysis=issmgslsolver()
    25 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 1)
     18md.transient.isstressbalance = False
     19md.transient.ismasstransport = False
     20md.transient.issmb = True
     21md.transient.isthermal = True
     22md.transient.isgroundingline = False
     23md.autodiff.isautodiff = True
     24md.toolkits.DefaultAnalysis = issmgslsolver()
     25md = solve(md, 'Transient')
    2626
    2727#Fields and tolerances to track changes
    28 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    29 field_tolerances=[1e-13,1e-13]
    30 field_values=[\
    31         md.results.TransientSolution[0].Temperature,\
    32         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    33         ]
     28field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     29field_tolerances = [1e-13, 1e-13]
     30field_values = [md.results.TransientSolution[0].Temperature,
     31                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test301.py

    r21965 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Stressbalance')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Vx','Vy','Vel','Pressure']
    20 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    21 field_values=[md.results.StressbalanceSolution.Vx,
    22                                                         md.results.StressbalanceSolution.Vy,
    23                                                         md.results.StressbalanceSolution.Vel,
    24                                                         md.results.StressbalanceSolution.Pressure]
     19field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     20field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     21field_values = [md.results.StressbalanceSolution.Vx,
     22                md.results.StressbalanceSolution.Vy,
     23                md.results.StressbalanceSolution.Vel,
     24                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test3010.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',1)
    17 md.transient.requested_outputs=['IceVolume']
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 1)
     17md.transient.requested_outputs = ['IceVolume']
    1818
    19 md.autodiff.isautodiff=True
    20 md.toolkits.DefaultAnalysis=issmgslsolver()
    21 md=solve(md,'Transient')
     19md.autodiff.isautodiff = True
     20md.toolkits.DefaultAnalysis = issmgslsolver()
     21md = solve(md, 'Transient')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Volume3']
    25 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    26                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    27                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    28 field_values=[\
    29         md.results.TransientSolution[0].Vx,\
    30         md.results.TransientSolution[0].Vy,\
    31         md.results.TransientSolution[0].Vel,\
    32         md.results.TransientSolution[0].Pressure,\
    33         md.results.TransientSolution[0].Base,\
    34         md.results.TransientSolution[0].Surface,\
    35         md.results.TransientSolution[0].Thickness,\
    36         md.results.TransientSolution[0].IceVolume,\
    37         md.results.TransientSolution[1].Vx,\
    38         md.results.TransientSolution[1].Vy,\
    39         md.results.TransientSolution[1].Vel,\
    40         md.results.TransientSolution[1].Pressure,\
    41         md.results.TransientSolution[1].Base,\
    42         md.results.TransientSolution[1].Surface,\
    43         md.results.TransientSolution[1].Thickness,\
    44         md.results.TransientSolution[1].IceVolume,\
    45         md.results.TransientSolution[2].Vx,\
    46         md.results.TransientSolution[2].Vy,\
    47         md.results.TransientSolution[2].Vel,\
    48         md.results.TransientSolution[2].Pressure,\
    49         md.results.TransientSolution[2].Base,\
    50         md.results.TransientSolution[2].Surface,\
    51         md.results.TransientSolution[2].Thickness,\
    52         md.results.TransientSolution[2].IceVolume,\
    53         ]
     24field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Volume1', 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Volume2', 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Volume3']
     25field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     26                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     27                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     28field_values = [md.results.TransientSolution[0].Vx,
     29                md.results.TransientSolution[0].Vy,
     30                md.results.TransientSolution[0].Vel,
     31                md.results.TransientSolution[0].Pressure,
     32                md.results.TransientSolution[0].Base,
     33                md.results.TransientSolution[0].Surface,
     34                md.results.TransientSolution[0].Thickness,
     35                md.results.TransientSolution[0].IceVolume,
     36                md.results.TransientSolution[1].Vx,
     37                md.results.TransientSolution[1].Vy,
     38                md.results.TransientSolution[1].Vel,
     39                md.results.TransientSolution[1].Pressure,
     40                md.results.TransientSolution[1].Base,
     41                md.results.TransientSolution[1].Surface,
     42                md.results.TransientSolution[1].Thickness,
     43                md.results.TransientSolution[1].IceVolume,
     44                md.results.TransientSolution[2].Vx,
     45                md.results.TransientSolution[2].Vy,
     46                md.results.TransientSolution[2].Vel,
     47                md.results.TransientSolution[2].Pressure,
     48                md.results.TransientSolution[2].Base,
     49                md.results.TransientSolution[2].Surface,
     50                md.results.TransientSolution[2].Thickness,
     51                md.results.TransientSolution[2].IceVolume]
  • issm/trunk-jpl/test/NightlyRun/test3015.py

    r23707 r23793  
    11#Test Name: SquareShelfConstrainedMasstransp2dAdolcForwardDifference
    2 import numpy as np
    32import copy
    43from model import *
     
    1413
    1514
    16 #This test runs test3005 with autodiff on, and checks that 
     15#This test runs test3005 with autodiff on, and checks that
    1716#the value of the scalar forward difference match a step-wise differential
    1817
    1918#First configure
    20 md=triangle(model(),'../Exp/Square.exp',50000.)
    21 md=setmask(md,'all','')
    22 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    23 md=setflowequation(md,'SSA','all')
    24 md.cluster=generic('name',gethostname(),'np',1)
    25 md.masstransport.requested_outputs=['IceVolume']
    26 md.verbose=verbose('autodiff',True)
     19md = triangle(model(), '../Exp/Square.exp', 50000.)
     20md = setmask(md, 'all', '')
     21md = parameterize(md, '../Par/SquareShelfConstrained.py')
     22md = setflowequation(md, 'SSA', 'all')
     23md.cluster = generic('name', gethostname(), 'np', 1)
     24md.masstransport.requested_outputs = ['IceVolume']
     25md.verbose = verbose('autodiff', True)
    2726
    2827#setup autodiff parameters
    29 index=1 #this is the scalar component we are checking against
    30 md.autodiff.independents=[\
    31         independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
    32         ]
    33 
    34 md.autodiff.dependents=[\
    35         dependent('name','IceVolume','type','scalar')\
    36         ]
    37 md.autodiff.driver='fos_forward'
     28index = 1  #this is the scalar component we are checking against
     29md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices, 'fos_forward_index', index)]
     30md.autodiff.dependents = [dependent('name', 'IceVolume', 'type', 'scalar')]
     31md.autodiff.driver = 'fos_forward'
    3832
    3933#PYTHON: indices start at 0, make sure to offset index
    40 index=index-1
     34index = index - 1
    4135
    4236#parameters for the step-wise derivative
    43 delta=0.001
    44 h1=md.geometry.thickness[index]
    45 h0=h1*(1.-delta)
    46 h2=h1*(1.+delta)
    47 deltaH=(h2-h0)
     37delta = 0.001
     38h1 = md.geometry.thickness[index]
     39h0 = h1 * (1. - delta)
     40h2 = h1 * (1. + delta)
     41deltaH = (h2 - h0)
    4842
    4943#save model
    50 md2=copy.deepcopy(md)
     44md2 = copy.deepcopy(md)
    5145
    52 #evaluate derivative by forward and backward stepping 
     46#evaluate derivative by forward and backward stepping
    5347#forward
    54 md=copy.deepcopy(md2)
    55 md.autodiff.isautodiff=False
    56 md.geometry.thickness[index]=h0
    57 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    58 md.geometry.surface=md.geometry.base+md.geometry.thickness
    59 md=SetIceShelfBC(md)
     48md = copy.deepcopy(md2)
     49md.autodiff.isautodiff = False
     50md.geometry.thickness[index] = h0
     51md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     52md.geometry.surface = md.geometry.base + md.geometry.thickness
     53md = SetIceShelfBC(md)
    6054
    61 md=solve(md,'Masstransport')
    62 V0=md.results.MasstransportSolution.IceVolume
     55md = solve(md, 'Masstransport')
     56V0 = md.results.MasstransportSolution.IceVolume
    6357
    6458#backward
    65 md=copy.deepcopy(md2)
    66 md.autodiff.isautodiff=False
    67 md.geometry.thickness[index]=h2
    68 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    69 md.geometry.surface=md.geometry.base+md.geometry.thickness
    70 md=SetIceShelfBC(md)
     59md = copy.deepcopy(md2)
     60md.autodiff.isautodiff = False
     61md.geometry.thickness[index] = h2
     62md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     63md.geometry.surface = md.geometry.base + md.geometry.thickness
     64md = SetIceShelfBC(md)
    7165
    72 md=solve(md,'Masstransport')
    73 V2=md.results.MasstransportSolution.IceVolume
     66md = solve(md, 'Masstransport')
     67V2 = md.results.MasstransportSolution.IceVolume
    7468
    7569#compute resulting derivative
    76 dVdh_an=(V2-V0)/deltaH
     70dVdh_an = (V2 - V0) / deltaH
    7771
    78 #evaluate derivative using ADOLC 
    79 md=md2
    80 md.autodiff.isautodiff=True
    81 md.geometry.thickness[index]=h1
    82 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    83 md.geometry.surface=md.geometry.base+md.geometry.thickness
    84 md=SetIceShelfBC(md)
     72#evaluate derivative using ADOLC
     73md = md2
     74md.autodiff.isautodiff = True
     75md.geometry.thickness[index] = h1
     76md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     77md.geometry.surface = md.geometry.base + md.geometry.thickness
     78md = SetIceShelfBC(md)
    8579
    86 md=solve(md,'Masstransport')
     80md = solve(md, 'Masstransport')
    8781#retrieve directly
    88 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian
     82dVdh_ad = md.results.MasstransportSolution.AutodiffJacobian
    8983
    90 print("dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dVdh_an,dVdh_ad))
     84print("dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dVdh_an, dVdh_ad))
    9185
    9286#Fields and tolerances to track changes
    93 field_names     =['dV/dh']
    94 field_tolerances=[1e-8]
    95 field_values=[dVdh_ad]
     87field_names = ['dV/dh']
     88field_tolerances = [1e-8]
     89field_values = [dVdh_ad]
  • issm/trunk-jpl/test/NightlyRun/test3019.py

    r23751 r23793  
    1313
    1414#test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup.
    15 md=triangle(model(),'../Exp/Square.exp',100000.)
    16 md=setmask(md,'all','')
    17 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    18 md=setflowequation(md,'SSA','all')
    19 md.cluster=generic('name',gethostname(),'np',1)
    20 #md.toolkits.DefaultAnalysis=issmgslsolver()
     15md = triangle(model(), '../Exp/Square.exp', 100000.)
     16md = setmask(md, 'all', '')
     17md = parameterize(md, '../Par/SquareShelfConstrained.py')
     18md = setflowequation(md, 'SSA', 'all')
     19md.cluster = generic('name', gethostname(), 'np', 1)
     20#md.toolkits.DefaultAnalysis = issmgslsolver()
    2121
    22 md.autodiff.isautodiff=True
    23 md.verbose.autodiff=True
     22md.autodiff.isautodiff = True
     23md.verbose.autodiff = True
    2424
    25 #first run scalar reverse mode: 
    26 md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices)]
    27 md.autodiff.dependents=[dependent('name','MaxVel','type','scalar','fos_reverse_index',1)]
    28 md.autodiff.driver='fos_reverse'
     25#first run scalar reverse mode:
     26md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices)]
     27md.autodiff.dependents = [dependent('name', 'MaxVel', 'type', 'scalar', 'fos_reverse_index', 1)]
     28md.autodiff.driver = 'fos_reverse'
    2929
    30 md=solve(md,'Transient')
     30md = solve(md, 'Transient')
    3131
    32 #recover jacobian: 
    33 jac_reverse=md.results.TransientSolution[0].AutodiffJacobian
     32#recover jacobian:
     33jac_reverse = md.results.TransientSolution[0].AutodiffJacobian
    3434
    3535#now run vectorial forward mode
    36 md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',np.arange(1,md.mesh.numberofvertices+1))]
    37 md.autodiff.dependents=[dependent('name','MaxVel','type','scalar')]
    38 md.autodiff.driver='fov_forward'
     36md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices, 'fov_forward_indices', np.arange(1, md.mesh.numberofvertices + 1))]
     37md.autodiff.dependents = [dependent('name', 'MaxVel', 'type', 'scalar')]
     38md.autodiff.driver = 'fov_forward'
    3939
    40 md=solve(md,'Transient')
     40md = solve(md, 'Transient')
    4141
    42 #recover jacobian: 
    43 jac_forward=md.results.TransientSolution[0].AutodiffJacobian
     42#recover jacobian:
     43jac_forward = md.results.TransientSolution[0].AutodiffJacobian
    4444
    4545#Fields and tolerances to track changes
    46 field_names     =['Jac Forward','Jac Reverse','Jac Forward - Reverse']
    47 field_tolerances=[1e-8,1e-8,5e-6]
    48 field_values=[jac_forward,jac_reverse,jac_forward-jac_reverse]
     46field_names = ['Jac Forward', 'Jac Reverse', 'Jac Forward - Reverse']
     47field_tolerances = [1e-8, 1e-8, 5e-6]
     48field_values = [jac_forward, jac_reverse, jac_forward - jac_reverse]
  • issm/trunk-jpl/test/NightlyRun/test302.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SIA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SIA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Stressbalance')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Vx','Vy','Vel','Pressure']
    20 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    21 field_values=[\
    22         md.results.StressbalanceSolution.Vx,\
    23         md.results.StressbalanceSolution.Vy,\
    24         md.results.StressbalanceSolution.Vel,\
    25         md.results.StressbalanceSolution.Pressure,\
    26         ]
     19field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     20field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     21field_values = [md.results.StressbalanceSolution.Vx,
     22                md.results.StressbalanceSolution.Vy,
     23                md.results.StressbalanceSolution.Vel,
     24                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test3020.py

    r23707 r23793  
    11#Test Name: SquareShelfConstrainedTranAdolcReverseVsForward
    2 import numpy as np
    32import copy
    43from model import *
     
    1413
    1514
    16 #This test runs test3020 with autodiff on, and checks that 
     15#This test runs test3020 with autodiff on, and checks that
    1716#the value of the scalar forward difference match a step-wise differential
    1817
    1918#First configure
    20 md=triangle(model(),'../Exp/Square.exp',150000.)
    21 md=setmask(md,'all','')
    22 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    23 md=setflowequation(md,'SSA','all')
    24 md.cluster=generic('name',gethostname(),'np',1)
    25 md.transient.requested_outputs=['IceVolume','MaxVel']
    26 md.verbose=verbose('autodiff',True)
    27 md.stressbalance.restol=0.000001
     19md = triangle(model(), '../Exp/Square.exp', 150000.)
     20md = setmask(md, 'all', '')
     21md = parameterize(md, '../Par/SquareShelfConstrained.py')
     22md = setflowequation(md, 'SSA', 'all')
     23md.cluster = generic('name', gethostname(), 'np', 1)
     24md.transient.requested_outputs = ['IceVolume', 'MaxVel']
     25md.verbose = verbose('autodiff', True)
     26md.stressbalance.restol = 0.000001
    2827
    2928#setup autodiff parameters
    30 index=1 #this is the scalar component we are checking against
    31 md.autodiff.independents=[\
    32         independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
    33         ]
    34 
    35 md.autodiff.dependents=[\
    36         dependent('name','IceVolume','type','scalar'),\
    37         dependent('name','MaxVel','type','scalar')\
    38         ]
    39 md.autodiff.driver='fos_forward'
     29index = 1  #this is the scalar component we are checking against
     30md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices, 'fos_forward_index', index)]
     31md.autodiff.dependents = [dependent('name', 'IceVolume', 'type', 'scalar'),
     32                          dependent('name', 'MaxVel', 'type', 'scalar')]
     33md.autodiff.driver = 'fos_forward'
    4034
    4135#PYTHON: indices start at 0, make sure to offset index
    42 index=index-1
     36index = index - 1
    4337
    4438#parameters for the step-wise derivative
    45 delta=0.00001
    46 h1=md.geometry.thickness[index]
    47 h0=h1*(1.-delta)
    48 h2=h1*(1.+delta)
    49 deltaH=(h2-h0)
     39delta = 0.00001
     40h1 = md.geometry.thickness[index]
     41h0 = h1 * (1. - delta)
     42h2 = h1 * (1. + delta)
     43deltaH = (h2 - h0)
    5044
    5145#save model:
    52 md2=copy.deepcopy(md)
     46md2 = copy.deepcopy(md)
    5347
    54 #evaluate derivative by forward and backward stepping 
     48#evaluate derivative by forward and backward stepping
    5549#forward
    56 md=copy.deepcopy(md2)
    57 md.autodiff.isautodiff=False
    58 md.geometry.thickness[index]=h0
    59 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    60 md.geometry.surface=md.geometry.base+md.geometry.thickness
    61 md=SetIceShelfBC(md)
     50md = copy.deepcopy(md2)
     51md.autodiff.isautodiff = False
     52md.geometry.thickness[index] = h0
     53md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     54md.geometry.surface = md.geometry.base + md.geometry.thickness
     55md = SetIceShelfBC(md)
    6256
    63 md=solve(md,'Transient')
    64 V0=md.results.TransientSolution[-1].IceVolume
    65 MaxV0=md.results.TransientSolution[-1].MaxVel
     57md = solve(md, 'Transient')
     58V0 = md.results.TransientSolution[-1].IceVolume
     59MaxV0 = md.results.TransientSolution[-1].MaxVel
    6660
    6761#backward
    68 md=copy.deepcopy(md2)
    69 md.autodiff.isautodiff=False
    70 md.geometry.thickness[index]=h2
    71 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    72 md.geometry.surface=md.geometry.base+md.geometry.thickness
    73 md=SetIceShelfBC(md)
     62md = copy.deepcopy(md2)
     63md.autodiff.isautodiff = False
     64md.geometry.thickness[index] = h2
     65md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     66md.geometry.surface = md.geometry.base + md.geometry.thickness
     67md = SetIceShelfBC(md)
    7468
    75 md=solve(md,'Transient')
    76 V2=md.results.TransientSolution[-1].IceVolume
    77 MaxV2=md.results.TransientSolution[-1].MaxVel
     69md = solve(md, 'Transient')
     70V2 = md.results.TransientSolution[-1].IceVolume
     71MaxV2 = md.results.TransientSolution[-1].MaxVel
    7872
    7973#compute resulting derivative
    80 dVdh_an=(V2-V0)/deltaH
    81 dMaxVdh_an=(MaxV2-MaxV0)/deltaH
     74dVdh_an = (V2 - V0) / deltaH
     75dMaxVdh_an = (MaxV2 - MaxV0) / deltaH
    8276
    83 #evaluate derivative using ADOLC 
    84 md=copy.deepcopy(md2)
    85 md.autodiff.isautodiff=True
    86 md.geometry.thickness[index]=h1
    87 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    88 md.geometry.surface=md.geometry.base+md.geometry.thickness
    89 md=SetIceShelfBC(md)
     77#evaluate derivative using ADOLC
     78md = copy.deepcopy(md2)
     79md.autodiff.isautodiff = True
     80md.geometry.thickness[index] = h1
     81md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     82md.geometry.surface = md.geometry.base + md.geometry.thickness
     83md = SetIceShelfBC(md)
    9084
    91 md=solve(md,'Transient')
     85md = solve(md, 'Transient')
    9286#retrieve directly
    93 dVdh_ad=md.results.TransientSolution[0].AutodiffJacobian[0]
    94 dMaxVdh_ad=md.results.TransientSolution[0].AutodiffJacobian[1]
     87dVdh_ad = md.results.TransientSolution[0].AutodiffJacobian[0]
     88dMaxVdh_ad = md.results.TransientSolution[0].AutodiffJacobian[1]
    9589
    96 print("dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dVdh_an,dVdh_ad))
    97 print("dMaxV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dMaxVdh_an,dMaxVdh_ad))
     90print("dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dVdh_an, dVdh_ad))
     91print("dMaxV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dMaxVdh_an, dMaxVdh_ad))
    9892
    9993#Fields and tolerances to track changes
    100 field_names     =['dV/dh-dV/dh0','dMaxV/dh-dMaxV/dh0']
    101 field_tolerances=[1e-13,1e-13]
    102 field_values=[dVdh_ad-dVdh_an,dMaxVdh_an-dMaxVdh_ad]
     94field_names = ['dV/dh-dV/dh0', 'dMaxV/dh-dMaxV/dh0']
     95field_tolerances = [1e-13, 1e-13]
     96field_values = [dVdh_ad - dVdh_an, dMaxVdh_an - dMaxVdh_ad]
  • issm/trunk-jpl/test/NightlyRun/test303.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SIA','../Exp/SquareHalfRight.exp','fill','SSA')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SIA', '../Exp/SquareHalfRight.exp', 'fill', 'SSA')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Stressbalance')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Vx','Vy','Vel','Pressure']
    20 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    21 field_values=[\
    22         md.results.StressbalanceSolution.Vx,\
    23         md.results.StressbalanceSolution.Vy,\
    24         md.results.StressbalanceSolution.Vel,\
    25         md.results.StressbalanceSolution.Pressure,\
    26         ]
     19field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     20field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     21field_values = [md.results.StressbalanceSolution.Vx,
     22                md.results.StressbalanceSolution.Vy,
     23                md.results.StressbalanceSolution.Vel,
     24                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test304.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test305.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(5,2.)
    15 md=setflowequation(md,'SIA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(5, 2.)
     15md = setflowequation(md, 'SIA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test306.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(4,2.)
    15 md=setflowequation(md,'SIA','../Exp/SquareHalfRight.exp','fill','SSA')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(4, 2.)
     15md = setflowequation(md, 'SIA', '../Exp/SquareHalfRight.exp', 'fill', 'SSA')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test307.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-09,1e-09,2e-10,2e-10,1e-10]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-09, 1e-09, 2e-10, 2e-10, 1e-10]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test308.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'FS','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'FS', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test309.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Masstransport')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Masstransport')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Thickness']
    20 field_tolerances=[1e-13]
    21 field_values=[\
    22         md.results.MasstransportSolution.Thickness,\
    23         ]
     19field_names = ['Thickness']
     20field_tolerances = [1e-13]
     21field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test310.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=meshconvert(md)
    14 md=setmask(md,'','')
    15 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    16 md=setflowequation(md,'SSA','all')
    17 md.masstransport.stabilization=3
    18 md.masstransport.spcthickness=md.geometry.thickness
    19 md.cluster=generic('name',gethostname(),'np',3)
    20 md=solve(md,'Masstransport')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = meshconvert(md)
     14md = setmask(md, '', '')
     15md = parameterize(md, '../Par/SquareSheetConstrained.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.masstransport.stabilization = 3
     18md.masstransport.spcthickness = md.geometry.thickness
     19md.cluster = generic('name', gethostname(), 'np', 3)
     20md = solve(md, 'Masstransport')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Thickness']
    24 field_tolerances=[1e-13]
    25 field_values=[\
    26         md.results.MasstransportSolution.Thickness,\
    27         ]
     23field_names = ['Thickness']
     24field_tolerances = [1e-13]
     25field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3101.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',50000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy']
     12md = triangle(model(), '../Exp/Square.exp', 50000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.stressbalance.requested_outputs = ['default', 'DeviatoricStressxx', 'DeviatoricStressyy', 'DeviatoricStressxy']
    1818
    19 md.autodiff.isautodiff=True
    20 md.toolkits.DefaultAnalysis=issmmumpssolver()
    21 md=solve(md,'Stressbalance')
     19md.autodiff.isautodiff = True
     20md.toolkits.DefaultAnalysis = issmmumpssolver()
     21md = solve(md, 'Stressbalance')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Vx','Vy','Vel','Pressure',\
    25         'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy']
    26 field_tolerances=[1e-12,1e-12,1e-12,1e-12,\
    27         1e-12,1e-12,1e-12]
    28 field_values=[\
    29         md.results.StressbalanceSolution.Vx,\
    30         md.results.StressbalanceSolution.Vy,\
    31         md.results.StressbalanceSolution.Vel,\
    32         md.results.StressbalanceSolution.Pressure,\
    33         md.results.StressbalanceSolution.DeviatoricStressxx,\
    34         md.results.StressbalanceSolution.DeviatoricStressyy,\
    35         md.results.StressbalanceSolution.DeviatoricStressxy,\
    36         ]
     24field_names = ['Vx', 'Vy', 'Vel', 'Pressure',
     25               'DeviatoricStressxx', 'DeviatoricStressyy', 'DeviatoricStressxy']
     26field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12,
     27                    1e-12, 1e-12, 1e-12]
     28field_values = [md.results.StressbalanceSolution.Vx,
     29                md.results.StressbalanceSolution.Vy,
     30                md.results.StressbalanceSolution.Vel,
     31                md.results.StressbalanceSolution.Pressure,
     32                md.results.StressbalanceSolution.DeviatoricStressxx,
     33                md.results.StressbalanceSolution.DeviatoricStressyy,
     34                md.results.StressbalanceSolution.DeviatoricStressxy]
  • issm/trunk-jpl/test/NightlyRun/test3102.py

    r23746 r23793  
    99from issmmumpssolver import issmmumpssolver
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.autodiff.isautodiff=True
    18 md.toolkits.DefaultAnalysis=issmmumpssolver()
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.autodiff.isautodiff = True
     18md.toolkits.DefaultAnalysis = issmmumpssolver()
    1919
    20 md=solve(md,'Stressbalance')
     20md = solve(md, 'Stressbalance')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    24 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    25 field_values=[\
    26         md.results.StressbalanceSolution.Vx,\
    27         md.results.StressbalanceSolution.Vy,\
    28         md.results.StressbalanceSolution.Vz,\
    29         md.results.StressbalanceSolution.Vel,\
    30         md.results.StressbalanceSolution.Pressure,\
    31         ]
     23field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     24field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     25field_values = [md.results.StressbalanceSolution.Vx,
     26                md.results.StressbalanceSolution.Vy,
     27                md.results.StressbalanceSolution.Vz,
     28                md.results.StressbalanceSolution.Vel,
     29                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test3103.py

    r23789 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.stressbalance.requested_outputs = ['default', 'StressTensorxx', 'StressTensoryy', 'StressTensorzz', 'StressTensorxy', 'StressTensorxz', 'StressTensoryz']
    1919
    20 md.autodiff.isautodiff=True
    21 md.toolkits.DefaultAnalysis=issmmumpssolver()
    22 md=solve(md,'Stressbalance')
     20md.autodiff.isautodiff = True
     21md.toolkits.DefaultAnalysis = issmmumpssolver()
     22md = solve(md, 'Stressbalance')
    2323
    2424#Fields and tolerances to track changes
    25 field_names     =['Vx','Vy','Vz','Vel','Pressure',\
    26         'StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
    27 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,\
    28         1e-09,1e-09,1e-09,1e-09,1e-09,2e-09]
    29 field_values=[\
    30         md.results.StressbalanceSolution.Vx,\
    31         md.results.StressbalanceSolution.Vy,\
    32         md.results.StressbalanceSolution.Vz,\
    33         md.results.StressbalanceSolution.Vel,\
    34         md.results.StressbalanceSolution.Pressure,\
    35         md.results.StressbalanceSolution.StressTensorxx,\
    36         md.results.StressbalanceSolution.StressTensoryy,\
    37         md.results.StressbalanceSolution.StressTensorzz,\
    38         md.results.StressbalanceSolution.StressTensorxy,\
    39         md.results.StressbalanceSolution.StressTensorxz,\
    40         md.results.StressbalanceSolution.StressTensoryz,\
    41         ]
     25field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure',
     26               'StressTensorxx', 'StressTensoryy', 'StressTensorzz', 'StressTensorxy', 'StressTensorxz', 'StressTensoryz']
     27field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     28                    1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 2e-09]
     29field_values = [md.results.StressbalanceSolution.Vx,
     30                md.results.StressbalanceSolution.Vy,
     31                md.results.StressbalanceSolution.Vz,
     32                md.results.StressbalanceSolution.Vel,
     33                md.results.StressbalanceSolution.Pressure,
     34                md.results.StressbalanceSolution.StressTensorxx,
     35                md.results.StressbalanceSolution.StressTensoryy,
     36                md.results.StressbalanceSolution.StressTensorzz,
     37                md.results.StressbalanceSolution.StressTensorxy,
     38                md.results.StressbalanceSolution.StressTensorxz,
     39                md.results.StressbalanceSolution.StressTensoryz]
  • issm/trunk-jpl/test/NightlyRun/test3104.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'FS','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'FS', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.autodiff.isautodiff=True
    20 md.toolkits.DefaultAnalysis=issmmumpssolver()
    21 md=solve(md,'Stressbalance')
     19md.autodiff.isautodiff = True
     20md.toolkits.DefaultAnalysis = issmmumpssolver()
     21md = solve(md, 'Stressbalance')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    25 field_tolerances=[1e-08,1e-08,2e-07,1e-08,1e-08]
    26 field_values=[\
    27         md.results.StressbalanceSolution.Vx,\
    28         md.results.StressbalanceSolution.Vy,\
    29         md.results.StressbalanceSolution.Vz,\
    30         md.results.StressbalanceSolution.Vel,\
    31         md.results.StressbalanceSolution.Pressure,\
    32         ]
     24field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     25field_tolerances = [1e-08, 1e-08, 2e-07, 1e-08, 1e-08]
     26field_values = [md.results.StressbalanceSolution.Vx,
     27                md.results.StressbalanceSolution.Vy,
     28                md.results.StressbalanceSolution.Vz,
     29                md.results.StressbalanceSolution.Vel,
     30                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test3105.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 md.autodiff.isautodiff=True
    19 md.toolkits.DefaultAnalysis=issmmumpssolver()
    20 md=solve(md,'Masstransport')
     18md.autodiff.isautodiff = True
     19md.toolkits.DefaultAnalysis = issmmumpssolver()
     20md = solve(md, 'Masstransport')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Thickness']
    24 field_tolerances=[1e-13]
    25 field_values=[\
    26         md.results.MasstransportSolution.Thickness,\
    27         ]
     23field_names = ['Thickness']
     24field_tolerances = [1e-13]
     25field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3106.py

    r23746 r23793  
    1111
    1212
    13 md=triangle(model(),'../Exp/Square.exp',150000.)
    14 md=meshconvert(md)
    15 md=setmask(md,'all','')
    16 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    17 md=setflowequation(md,'SSA','all')
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.masstransport.stabilization=3
    20 md.masstransport.spcthickness=md.geometry.thickness
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = meshconvert(md)
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelfConstrained.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md.masstransport.stabilization = 3
     20md.masstransport.spcthickness = md.geometry.thickness
    2121
    22 md.autodiff.isautodiff=True
    23 md.toolkits.DefaultAnalysis=issmmumpssolver()
    24 md=solve(md,'Masstransport')
     22md.autodiff.isautodiff = True
     23md.toolkits.DefaultAnalysis = issmmumpssolver()
     24md = solve(md, 'Masstransport')
    2525
    2626#Fields and tolerances to track changes
    27 field_names     =['Thickness']
    28 field_tolerances=[1e-13]
    29 field_values=[\
    30         md.results.MasstransportSolution.Thickness,\
    31         ]
     27field_names = ['Thickness']
     28field_tolerances = [1e-13]
     29field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3107.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.extrude(5,3.)
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.extrude(5, 3.)
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.autodiff.isautodiff=True
    20 md.toolkits.DefaultAnalysis=issmmumpssolver()
    21 md=solve(md,'Masstransport')
     19md.autodiff.isautodiff = True
     20md.toolkits.DefaultAnalysis = issmmumpssolver()
     21md = solve(md, 'Masstransport')
    2222
    2323#Fields and tolerances to track changes
    24 field_names     =['Thickness']
    25 field_tolerances=[1e-13]
    26 field_values=[\
    27         md.results.MasstransportSolution.Thickness,\
    28         ]
     24field_names = ['Thickness']
     25field_tolerances = [1e-13]
     26field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3108.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.timestepping.time_step=0
    18 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.timestepping.time_step = 0
     18md.cluster = generic('name', gethostname(), 'np', 3)
    1919
    20 md.autodiff.isautodiff=True
    21 md.toolkits.DefaultAnalysis=issmmumpssolver()
    22 md=solve(md,'Thermal')
     20md.autodiff.isautodiff = True
     21md.toolkits.DefaultAnalysis = issmmumpssolver()
     22md = solve(md, 'Thermal')
    2323
    2424#Fields and tolerances to track changes
    25 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    26 field_tolerances=[1e-13,1e-5]
    27 field_values=[\
    28         md.results.ThermalSolution.Temperature,\
    29         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
    30         ]
     25field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     26field_tolerances = [1e-13, 1e-5]
     27field_values = [md.results.ThermalSolution.Temperature,
     28                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test3109.py

    r23746 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.transient.isstressbalance=False
    19 md.transient.ismasstransport=False
    20 md.transient.issmb=True
    21 md.transient.isthermal=True
    22 md.transient.isgroundingline=False
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelfConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.transient.isstressbalance = False
     19md.transient.ismasstransport = False
     20md.transient.issmb = True
     21md.transient.isthermal = True
     22md.transient.isgroundingline = False
    2323
    24 md.autodiff.isautodiff=True
    25 md.toolkits.DefaultAnalysis=issmmumpssolver()
    26 md=solve(md,'Transient')
     24md.autodiff.isautodiff = True
     25md.toolkits.DefaultAnalysis = issmmumpssolver()
     26md = solve(md, 'Transient')
    2727
    2828#Fields and tolerances to track changes
    29 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    30 field_tolerances=[1e-13,1e-13]
    31 field_values=[\
    32         md.results.TransientSolution[0].Temperature,\
    33         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    34         ]
     29field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     30field_tolerances = [1e-13, 1e-13]
     31field_values = [md.results.TransientSolution[0].Temperature,
     32                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test311.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.extrude(5,0.5)
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Masstransport')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.extrude(5, 0.5)
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Masstransport')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Thickness']
    21 field_tolerances=[1e-13]
    22 field_values=[\
    23         md.results.MasstransportSolution.Thickness,\
    24         ]
     20field_names = ['Thickness']
     21field_tolerances = [1e-13]
     22field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test3110.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'all','')
    13 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, 'all', '')
     13md = parameterize(md, '../Par/SquareShelfConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
    1616
    17 md.transient.requested_outputs=['IceVolume']
     17md.transient.requested_outputs = ['IceVolume']
    1818
    19 md.autodiff.isautodiff=True
    20 md=solve(md,'Transient')
     19md.autodiff.isautodiff = True
     20md = solve(md, 'Transient')
    2121
    2222#Fields and tolerances to track changes
    23 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Volume3']
    24 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    25                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    26                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    27 field_values=[\
    28         md.results.TransientSolution[0].Vx,\
    29         md.results.TransientSolution[0].Vy,\
    30         md.results.TransientSolution[0].Vel,\
    31         md.results.TransientSolution[0].Pressure,\
    32         md.results.TransientSolution[0].Base,\
    33         md.results.TransientSolution[0].Surface,\
    34         md.results.TransientSolution[0].Thickness,\
    35         md.results.TransientSolution[0].IceVolume,\
    36         md.results.TransientSolution[1].Vx,\
    37         md.results.TransientSolution[1].Vy,\
    38         md.results.TransientSolution[1].Vel,\
    39         md.results.TransientSolution[1].Pressure,\
    40         md.results.TransientSolution[1].Base,\
    41         md.results.TransientSolution[1].Surface,\
    42         md.results.TransientSolution[1].Thickness,\
    43         md.results.TransientSolution[1].IceVolume,\
    44         md.results.TransientSolution[2].Vx,\
    45         md.results.TransientSolution[2].Vy,\
    46         md.results.TransientSolution[2].Vel,\
    47         md.results.TransientSolution[2].Pressure,\
    48         md.results.TransientSolution[2].Base,\
    49         md.results.TransientSolution[2].Surface,\
    50         md.results.TransientSolution[2].Thickness,\
    51         md.results.TransientSolution[2].IceVolume,\
    52         ]
     23field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Volume1', 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Volume2', 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Volume3']
     24field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     25                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     26                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     27field_values = [md.results.TransientSolution[0].Vx,
     28                md.results.TransientSolution[0].Vy,
     29                md.results.TransientSolution[0].Vel,
     30                md.results.TransientSolution[0].Pressure,
     31                md.results.TransientSolution[0].Base,
     32                md.results.TransientSolution[0].Surface,
     33                md.results.TransientSolution[0].Thickness,
     34                md.results.TransientSolution[0].IceVolume,
     35                md.results.TransientSolution[1].Vx,
     36                md.results.TransientSolution[1].Vy,
     37                md.results.TransientSolution[1].Vel,
     38                md.results.TransientSolution[1].Pressure,
     39                md.results.TransientSolution[1].Base,
     40                md.results.TransientSolution[1].Surface,
     41                md.results.TransientSolution[1].Thickness,
     42                md.results.TransientSolution[1].IceVolume,
     43                md.results.TransientSolution[2].Vx,
     44                md.results.TransientSolution[2].Vy,
     45                md.results.TransientSolution[2].Vel,
     46                md.results.TransientSolution[2].Pressure,
     47                md.results.TransientSolution[2].Base,
     48                md.results.TransientSolution[2].Surface,
     49                md.results.TransientSolution[2].Thickness,
     50                md.results.TransientSolution[2].IceVolume]
  • issm/trunk-jpl/test/NightlyRun/test3119.py

    r23747 r23793  
    1 import numpy as np
    21from model import *
    32from socket import gethostname
     
    1312
    1413#test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup.
    15 md=triangle(model(),'../Exp/Square.exp',100000.)
    16 md=setmask(md,'all','')
    17 md=parameterize(md,'../Par/SquareShelfConstrained.py')
    18 md=setflowequation(md,'SSA','all')
    19 md.cluster=generic('name',gethostname(),'np',1)
     14md = triangle(model(), '../Exp/Square.exp', 100000.)
     15md = setmask(md, 'all', '')
     16md = parameterize(md, '../Par/SquareShelfConstrained.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 1)
    2019
    21 md.autodiff.isautodiff=True
    22 md.toolkits.DefaultAnalysis=issmgslsolver()
     20md.autodiff.isautodiff = True
     21md.toolkits.DefaultAnalysis = issmgslsolver()
    2322
    2423#first run scalar reverse mode:
    25 md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices)]
    26 md.autodiff.dependents=[dependent('name','MaxVel','type','scalar','fos_reverse_index',1)]
    27 md.autodiff.driver='fos_reverse'
     24md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices)]
     25md.autodiff.dependents = [dependent('name', 'MaxVel', 'type', 'scalar', 'fos_reverse_index', 1)]
     26md.autodiff.driver = 'fos_reverse'
    2827
    29 md=solve(md,'Transient')
     28md = solve(md, 'Transient')
    3029
    3130#recover jacobian:
    32 jac_reverse=md.results.TransientSolution[0].AutodiffJacobian
     31jac_reverse = md.results.TransientSolution[0].AutodiffJacobian
    3332
    3433#Fields and tolerances to track changes
    35 field_names     =['Jac Reverse']
    36 field_tolerances=[1e-13]
    37 field_values=[jac_reverse]
     34field_names = ['Jac Reverse']
     35field_tolerances = [1e-13]
     36field_values = [jac_reverse]
  • issm/trunk-jpl/test/NightlyRun/test312.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.timestepping.time_step=0.
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Thermal')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.timestepping.time_step = 0.
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Thermal')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    22 field_tolerances=[1e-13,1e-8]
    23 field_values=[\
    24         md.results.ThermalSolution.Temperature,\
    25         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
    26         ]
     21field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [1e-13, 1e-8]
     23field_values = [md.results.ThermalSolution.Temperature,
     24                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test313.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.verbose=verbose('convergence',True,'solution',True)
    18 md.transient.isstressbalance=False
    19 md.transient.ismasstransport=False
    20 md.transient.issmb=True
    21 md.transient.isthermal=True
    22 md.transient.isgroundingline=False
    23 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.verbose = verbose('convergence', True, 'solution', True)
     18md.transient.isstressbalance = False
     19md.transient.ismasstransport = False
     20md.transient.issmb = True
     21md.transient.isthermal = True
     22md.transient.isgroundingline = False
     23md = solve(md, 'Transient')
    2424
    2525#Fields and tolerances to track changes
    26 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    27 field_tolerances=[1e-13,1e-13]
    28 field_values=[\
    29         md.results.TransientSolution[0].Temperature,\
    30         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    31         ]
     26field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     27field_tolerances = [1e-13, 1e-13]
     28field_values = [md.results.TransientSolution[0].Temperature,
     29                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test314.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SIA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','IceVolume']
    17 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SIA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.transient.requested_outputs = ['default', 'GroundedArea', 'FloatingArea', 'IceVolume']
     17md = solve(md, 'Transient')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =[
    21 'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','GroundedArea1','FloatingArea1',
    22 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','GroundedArea2','FloatingArea2',
    23 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','GroundedArea3','FloatingArea3']
    24 field_tolerances=[
    25                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    26                 1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    27                 1e-10,1.5e-13,1.5e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    28 field_values=[\
    29         md.results.TransientSolution[0].Vx,\
    30         md.results.TransientSolution[0].Vy,\
    31         md.results.TransientSolution[0].Vel,\
    32         md.results.TransientSolution[0].Pressure,\
    33         md.results.TransientSolution[0].Base,\
    34         md.results.TransientSolution[0].Surface,\
    35         md.results.TransientSolution[0].Thickness,\
    36         md.results.TransientSolution[0].GroundedArea,\
    37         md.results.TransientSolution[0].FloatingArea,\
    38         md.results.TransientSolution[1].Vx,\
    39         md.results.TransientSolution[1].Vy,\
    40         md.results.TransientSolution[1].Vel,\
    41         md.results.TransientSolution[1].Pressure,\
    42         md.results.TransientSolution[1].Base,\
    43         md.results.TransientSolution[1].Surface,\
    44         md.results.TransientSolution[1].Thickness,\
    45         md.results.TransientSolution[1].GroundedArea,\
    46         md.results.TransientSolution[1].FloatingArea,\
    47         md.results.TransientSolution[2].Vx,\
    48         md.results.TransientSolution[2].Vy,\
    49         md.results.TransientSolution[2].Vel,\
    50         md.results.TransientSolution[2].Pressure,\
    51         md.results.TransientSolution[2].Base,\
    52         md.results.TransientSolution[2].Surface,\
    53         md.results.TransientSolution[2].Thickness,\
    54         md.results.TransientSolution[2].GroundedArea,\
    55         md.results.TransientSolution[2].FloatingArea,\
    56         ]
     20field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'GroundedArea1', 'FloatingArea1',
     21               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'GroundedArea2', 'FloatingArea2',
     22               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'GroundedArea3', 'FloatingArea3']
     23field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     24                    1e-10, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     25                    1e-10, 1.5e-13, 1.5e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     26field_values = [md.results.TransientSolution[0].Vx,
     27                md.results.TransientSolution[0].Vy,
     28                md.results.TransientSolution[0].Vel,
     29                md.results.TransientSolution[0].Pressure,
     30                md.results.TransientSolution[0].Base,
     31                md.results.TransientSolution[0].Surface,
     32                md.results.TransientSolution[0].Thickness,
     33                md.results.TransientSolution[0].GroundedArea,
     34                md.results.TransientSolution[0].FloatingArea,
     35                md.results.TransientSolution[1].Vx,
     36                md.results.TransientSolution[1].Vy,
     37                md.results.TransientSolution[1].Vel,
     38                md.results.TransientSolution[1].Pressure,
     39                md.results.TransientSolution[1].Base,
     40                md.results.TransientSolution[1].Surface,
     41                md.results.TransientSolution[1].Thickness,
     42                md.results.TransientSolution[1].GroundedArea,
     43                md.results.TransientSolution[1].FloatingArea,
     44                md.results.TransientSolution[2].Vx,
     45                md.results.TransientSolution[2].Vy,
     46                md.results.TransientSolution[2].Vel,
     47                md.results.TransientSolution[2].Pressure,
     48                md.results.TransientSolution[2].Base,
     49                md.results.TransientSolution[2].Surface,
     50                md.results.TransientSolution[2].Thickness,
     51                md.results.TransientSolution[2].GroundedArea,
     52                md.results.TransientSolution[2].FloatingArea]
  • issm/trunk-jpl/test/NightlyRun/test315.py

    r21841 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(5,1.2)
    15 md=setflowequation(md,'SIA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(5, 1.2)
     15md = setflowequation(md, 'SIA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Transient')
    1818
    1919#Fields and tolerances to track changes
    20 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1',\
    21         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2',\
    22         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    23 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    24         1e-10,1e-13,5e-13,5e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    25         1e-10,2e-13,5e-13,2e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    26 field_values=[\
    27         md.results.TransientSolution[0].Vx,\
    28         md.results.TransientSolution[0].Vy,\
    29         md.results.TransientSolution[0].Vz,\
    30         md.results.TransientSolution[0].Vel,\
    31         md.results.TransientSolution[0].Pressure,\
    32         md.results.TransientSolution[0].Base,\
    33         md.results.TransientSolution[0].Surface,\
    34         md.results.TransientSolution[0].Thickness,\
    35         md.results.TransientSolution[0].Temperature,\
    36         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    37         md.results.TransientSolution[1].Vx,\
    38         md.results.TransientSolution[1].Vy,\
    39         md.results.TransientSolution[1].Vz,\
    40         md.results.TransientSolution[1].Vel,\
    41         md.results.TransientSolution[1].Pressure,\
    42         md.results.TransientSolution[1].Base,\
    43         md.results.TransientSolution[1].Surface,\
    44         md.results.TransientSolution[1].Thickness,\
    45         md.results.TransientSolution[1].Temperature,\
    46         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    47         md.results.TransientSolution[2].Vx,\
    48         md.results.TransientSolution[2].Vy,\
    49         md.results.TransientSolution[2].Vz,\
    50         md.results.TransientSolution[2].Vel,\
    51         md.results.TransientSolution[2].Pressure,\
    52         md.results.TransientSolution[2].Base,\
    53         md.results.TransientSolution[2].Surface,\
    54         md.results.TransientSolution[2].Thickness,\
    55         md.results.TransientSolution[2].Temperature,\
    56         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    57         ]
     20field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     21               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     22               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     23field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     24                    1e-10, 1e-13, 5e-13, 5e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     25                    1e-10, 2e-13, 5e-13, 2e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     26field_values = [md.results.TransientSolution[0].Vx,
     27                md.results.TransientSolution[0].Vy,
     28                md.results.TransientSolution[0].Vz,
     29                md.results.TransientSolution[0].Vel,
     30                md.results.TransientSolution[0].Pressure,
     31                md.results.TransientSolution[0].Base,
     32                md.results.TransientSolution[0].Surface,
     33                md.results.TransientSolution[0].Thickness,
     34                md.results.TransientSolution[0].Temperature,
     35                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     36                md.results.TransientSolution[1].Vx,
     37                md.results.TransientSolution[1].Vy,
     38                md.results.TransientSolution[1].Vz,
     39                md.results.TransientSolution[1].Vel,
     40                md.results.TransientSolution[1].Pressure,
     41                md.results.TransientSolution[1].Base,
     42                md.results.TransientSolution[1].Surface,
     43                md.results.TransientSolution[1].Thickness,
     44                md.results.TransientSolution[1].Temperature,
     45                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     46                md.results.TransientSolution[2].Vx,
     47                md.results.TransientSolution[2].Vy,
     48                md.results.TransientSolution[2].Vz,
     49                md.results.TransientSolution[2].Vel,
     50                md.results.TransientSolution[2].Pressure,
     51                md.results.TransientSolution[2].Base,
     52                md.results.TransientSolution[2].Surface,
     53                md.results.TransientSolution[2].Thickness,
     54                md.results.TransientSolution[2].Temperature,
     55                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test316.py

    r21841 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Transient')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    20 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    21                                                 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    22                                                 2e-13,1e-13,1e-13,2e-13,1e-13,1e-13,1e-13]
    23 field_values=[\
    24         md.results.TransientSolution[0].Vx,\
    25         md.results.TransientSolution[0].Vy,\
    26         md.results.TransientSolution[0].Vel,\
    27         md.results.TransientSolution[0].Pressure,\
    28         md.results.TransientSolution[0].Base,\
    29         md.results.TransientSolution[0].Surface,\
    30         md.results.TransientSolution[0].Thickness,\
    31         md.results.TransientSolution[1].Vx,\
    32         md.results.TransientSolution[1].Vy,\
    33         md.results.TransientSolution[1].Vel,\
    34         md.results.TransientSolution[1].Pressure,\
    35         md.results.TransientSolution[1].Base,\
    36         md.results.TransientSolution[1].Surface,\
    37         md.results.TransientSolution[1].Thickness,\
    38         md.results.TransientSolution[2].Vx,\
    39         md.results.TransientSolution[2].Vy,\
    40         md.results.TransientSolution[2].Vel,\
    41         md.results.TransientSolution[2].Pressure,\
    42         md.results.TransientSolution[2].Base,\
    43         md.results.TransientSolution[2].Surface,\
    44         md.results.TransientSolution[2].Thickness,\
    45         ]
     19field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3']
     20field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     21                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     22                    2e-13, 1e-13, 1e-13, 2e-13, 1e-13, 1e-13, 1e-13]
     23field_values = [md.results.TransientSolution[0].Vx,
     24                md.results.TransientSolution[0].Vy,
     25                md.results.TransientSolution[0].Vel,
     26                md.results.TransientSolution[0].Pressure,
     27                md.results.TransientSolution[0].Base,
     28                md.results.TransientSolution[0].Surface,
     29                md.results.TransientSolution[0].Thickness,
     30                md.results.TransientSolution[1].Vx,
     31                md.results.TransientSolution[1].Vy,
     32                md.results.TransientSolution[1].Vel,
     33                md.results.TransientSolution[1].Pressure,
     34                md.results.TransientSolution[1].Base,
     35                md.results.TransientSolution[1].Surface,
     36                md.results.TransientSolution[1].Thickness,
     37                md.results.TransientSolution[2].Vx,
     38                md.results.TransientSolution[2].Vy,
     39                md.results.TransientSolution[2].Vel,
     40                md.results.TransientSolution[2].Pressure,
     41                md.results.TransientSolution[2].Base,
     42                md.results.TransientSolution[2].Surface,
     43                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test317.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',200000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.basalforcings.groundedice_melting_rate[:]=5.
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','TotalFloatingBmb','TotalGroundedBmb']
    19 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 200000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.basalforcings.groundedice_melting_rate[:] = 5.
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.transient.requested_outputs = ['default', 'GroundedArea', 'FloatingArea', 'TotalFloatingBmb', 'TotalGroundedBmb']
     19md = solve(md, 'Transient')
    2020
    2121#Fields and tolerances to track changes
    22 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','GroundedArea1','FloatingArea1','TotalFloatingBmb1','TotalGroundedBmb1'\
    23         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','GroundedArea2','FloatingArea2','TotalFloatingBmb2','TotalGroundedBmb2',\
    24         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','GroundedArea3','FloatingArea3','TotalFloatingBmb2','TotalGroundedBmb2']
    25 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-12,1e-12,1e-12,1e-12,\
    26                 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-12,1e-12,1e-12,1e-12,\
    27                 1e-09,5e-10,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-12,1e-12,1e-12,1e-12]
    28 field_values=[\
    29         md.results.TransientSolution[0].Vx,\
    30         md.results.TransientSolution[0].Vy,\
    31         md.results.TransientSolution[0].Vz,\
    32         md.results.TransientSolution[0].Vel,\
    33         md.results.TransientSolution[0].Pressure,\
    34         md.results.TransientSolution[0].Base,\
    35         md.results.TransientSolution[0].Surface,\
    36         md.results.TransientSolution[0].Thickness,\
    37         md.results.TransientSolution[0].Temperature,\
    38         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    39         md.results.TransientSolution[0].GroundedArea,\
    40         md.results.TransientSolution[0].FloatingArea,\
    41         md.results.TransientSolution[0].TotalFloatingBmb,\
    42         md.results.TransientSolution[0].TotalGroundedBmb,\
    43         md.results.TransientSolution[1].Vx,\
    44         md.results.TransientSolution[1].Vy,\
    45         md.results.TransientSolution[1].Vz,\
    46         md.results.TransientSolution[1].Vel,\
    47         md.results.TransientSolution[1].Pressure,\
    48         md.results.TransientSolution[1].Base,\
    49         md.results.TransientSolution[1].Surface,\
    50         md.results.TransientSolution[1].Thickness,\
    51         md.results.TransientSolution[1].Temperature,\
    52         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    53         md.results.TransientSolution[1].GroundedArea,\
    54         md.results.TransientSolution[1].FloatingArea,\
    55         md.results.TransientSolution[1].TotalFloatingBmb,\
    56         md.results.TransientSolution[1].TotalGroundedBmb,\
    57         md.results.TransientSolution[2].Vx,\
    58         md.results.TransientSolution[2].Vy,\
    59         md.results.TransientSolution[2].Vz,\
    60         md.results.TransientSolution[2].Vel,\
    61         md.results.TransientSolution[2].Pressure,\
    62         md.results.TransientSolution[2].Base,\
    63         md.results.TransientSolution[2].Surface,\
    64         md.results.TransientSolution[2].Thickness,\
    65         md.results.TransientSolution[2].Temperature,\
    66         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    67         md.results.TransientSolution[2].GroundedArea,\
    68         md.results.TransientSolution[2].FloatingArea,\
    69         md.results.TransientSolution[2].TotalFloatingBmb,\
    70         md.results.TransientSolution[2].TotalGroundedBmb,\
    71         ]
     22field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1'
     23               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'GroundedArea2', 'FloatingArea2', 'TotalFloatingBmb2', 'TotalGroundedBmb2',
     24               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3', 'GroundedArea3', 'FloatingArea3', 'TotalFloatingBmb2', 'TotalGroundedBmb2']
     25field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-12, 1e-12, 1e-12, 1e-12,
     26                    1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-12, 1e-12, 1e-12, 1e-12,
     27                    1e-09, 5e-10, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-12, 1e-12, 1e-12, 1e-12]
     28field_values = [md.results.TransientSolution[0].Vx,
     29                md.results.TransientSolution[0].Vy,
     30                md.results.TransientSolution[0].Vz,
     31                md.results.TransientSolution[0].Vel,
     32                md.results.TransientSolution[0].Pressure,
     33                md.results.TransientSolution[0].Base,
     34                md.results.TransientSolution[0].Surface,
     35                md.results.TransientSolution[0].Thickness,
     36                md.results.TransientSolution[0].Temperature,
     37                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     38                md.results.TransientSolution[0].GroundedArea,
     39                md.results.TransientSolution[0].FloatingArea,
     40                md.results.TransientSolution[0].TotalFloatingBmb,
     41                md.results.TransientSolution[0].TotalGroundedBmb,
     42                md.results.TransientSolution[1].Vx,
     43                md.results.TransientSolution[1].Vy,
     44                md.results.TransientSolution[1].Vz,
     45                md.results.TransientSolution[1].Vel,
     46                md.results.TransientSolution[1].Pressure,
     47                md.results.TransientSolution[1].Base,
     48                md.results.TransientSolution[1].Surface,
     49                md.results.TransientSolution[1].Thickness,
     50                md.results.TransientSolution[1].Temperature,
     51                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     52                md.results.TransientSolution[1].GroundedArea,
     53                md.results.TransientSolution[1].FloatingArea,
     54                md.results.TransientSolution[1].TotalFloatingBmb,
     55                md.results.TransientSolution[1].TotalGroundedBmb,
     56                md.results.TransientSolution[2].Vx,
     57                md.results.TransientSolution[2].Vy,
     58                md.results.TransientSolution[2].Vz,
     59                md.results.TransientSolution[2].Vel,
     60                md.results.TransientSolution[2].Pressure,
     61                md.results.TransientSolution[2].Base,
     62                md.results.TransientSolution[2].Surface,
     63                md.results.TransientSolution[2].Thickness,
     64                md.results.TransientSolution[2].Temperature,
     65                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
     66                md.results.TransientSolution[2].GroundedArea,
     67                md.results.TransientSolution[2].FloatingArea,
     68                md.results.TransientSolution[2].TotalFloatingBmb,
     69                md.results.TransientSolution[2].TotalGroundedBmb]
  • issm/trunk-jpl/test/NightlyRun/test318.py

    r23757 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',180000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(4,1.)
    15 md=setflowequation(md,'SIA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.timestepping.time_step=0
    18 md=solve(md,'Steadystate')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(4, 1.)
     15md = setflowequation(md, 'SIA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping.time_step = 0
     18md = solve(md, 'Steadystate')
    1919
    2020#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsGroundediceMeltingRate']
    22 field_tolerances=[1e-13,1e-13,2.6e-10,1e-10,1e-13,1e-11,1e-6]
    23 field_values=[\
    24         md.results.SteadystateSolution.Vx,\
    25         md.results.SteadystateSolution.Vy,\
    26         md.results.SteadystateSolution.Vz,\
    27         md.results.SteadystateSolution.Vel,\
    28         md.results.SteadystateSolution.Pressure,\
    29         md.results.SteadystateSolution.Temperature,\
    30         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate,\
    31         ]
     21field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [1e-13, 1e-13, 2.6e-10, 1e-10, 1e-13, 1e-11, 1e-6]
     23field_values = [md.results.SteadystateSolution.Vx,
     24                md.results.SteadystateSolution.Vy,
     25                md.results.SteadystateSolution.Vz,
     26                md.results.SteadystateSolution.Vel,
     27                md.results.SteadystateSolution.Pressure,
     28                md.results.SteadystateSolution.Temperature,
     29                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test319.py

    r23784 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md=setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
    1616
    1717#control parameters
    18 md.inversion.iscontrol=1
    19 md.inversion.control_parameters=['FrictionCoefficient']
    20 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    21 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.nsteps=2
    23 md.inversion.cost_functions=[103,501]
    24 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    25 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    26 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    27 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
    28 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
    29 md.inversion.vx_obs=md.initialization.vx
    30 md.inversion.vy_obs=md.initialization.vy
    3118
    32 md.cluster=generic('name',gethostname(),'np',3)
    33 md=solve(md,'Stressbalance')
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['FrictionCoefficient']
     21md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [103, 501]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     27md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
     29md.inversion.step_threshold = 0.3 * np.ones(md.inversion.nsteps)
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
     32
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3435
    3536#Fields and tolerances to track changes
    36 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    37 field_tolerances=[1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    38 field_values=[\
    39         md.results.StressbalanceSolution.Gradient1,\
    40         md.results.StressbalanceSolution.J,\
    41         md.results.StressbalanceSolution.FrictionCoefficient,\
    42         md.results.StressbalanceSolution.Pressure,\
    43         md.results.StressbalanceSolution.Vel,\
    44         md.results.StressbalanceSolution.Vx,\
    45         md.results.StressbalanceSolution.Vy,\
    46 ]
     37field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     38field_tolerances = [1e-12, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     39field_values = [md.results.StressbalanceSolution.Gradient1,
     40                md.results.StressbalanceSolution.J,
     41                md.results.StressbalanceSolution.FrictionCoefficient,
     42                md.results.StressbalanceSolution.Pressure,
     43                md.results.StressbalanceSolution.Vel,
     44                md.results.StressbalanceSolution.Vx,
     45                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test320.py

    r23785 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
    1717
    1818#control parameters
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['FrictionCoefficient']
    21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[103,501]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
    29 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
    30 md.inversion.vx_obs=md.initialization.vx
    31 md.inversion.vy_obs=md.initialization.vy
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['FrictionCoefficient']
     21md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [103, 501]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     27md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
     29md.inversion.step_threshold = 0.3 * np.ones(md.inversion.nsteps)
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
    3232
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3535
    3636#Fields and tolerances to track changes
    37 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    38 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
    39 field_values=[\
    40         md.results.StressbalanceSolution.Gradient1,\
    41         md.results.StressbalanceSolution.J,\
    42         md.results.StressbalanceSolution.FrictionCoefficient,\
    43         md.results.StressbalanceSolution.Pressure,\
    44         md.results.StressbalanceSolution.Vel,\
    45         md.results.StressbalanceSolution.Vx,\
    46         md.results.StressbalanceSolution.Vy,\
    47 ]
     37field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     38field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12]
     39field_values = [md.results.StressbalanceSolution.Gradient1,
     40                md.results.StressbalanceSolution.J,
     41                md.results.StressbalanceSolution.FrictionCoefficient,
     42                md.results.StressbalanceSolution.Pressure,
     43                md.results.StressbalanceSolution.Vel,
     44                md.results.StressbalanceSolution.Vx,
     45                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test321.py

    r23785 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
    1717
    1818#control parameters
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['FrictionCoefficient']
    21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[102,501]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    26 md.inversion.cost_functions_coefficients[:,1]=2*10**-7
    27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
    29 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
    30 md.inversion.vx_obs=md.initialization.vx
    31 md.inversion.vy_obs=md.initialization.vy
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['FrictionCoefficient']
     21md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [102, 501]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     26md.inversion.cost_functions_coefficients[:, 1] = 2 * 10**-7
     27md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
     29md.inversion.step_threshold = 0.3 * np.ones(md.inversion.nsteps)
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
    3232
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3535
    3636#Fields and tolerances to track changes
    37 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    38 field_tolerances=[1e-08,1e-07,1e-10,1e-10,1e-09,1e-09,1e-09]
    39 field_values=[\
    40         md.results.StressbalanceSolution.Gradient1,\
    41         md.results.StressbalanceSolution.J,\
    42         md.results.StressbalanceSolution.FrictionCoefficient,\
    43         md.results.StressbalanceSolution.Pressure,\
    44         md.results.StressbalanceSolution.Vel,\
    45         md.results.StressbalanceSolution.Vx,\
    46         md.results.StressbalanceSolution.Vy,\
    47 ]
     37field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     38field_tolerances = [1e-08, 1e-07, 1e-10, 1e-10, 1e-09, 1e-09, 1e-09]
     39field_values = [md.results.StressbalanceSolution.Gradient1,
     40                md.results.StressbalanceSolution.J,
     41                md.results.StressbalanceSolution.FrictionCoefficient,
     42                md.results.StressbalanceSolution.Pressure,
     43                md.results.StressbalanceSolution.Vel,
     44                md.results.StressbalanceSolution.Vx,
     45                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test322.py

    r23791 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'FS','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'FS', 'all')
    1717
    1818#control parameters
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['FrictionCoefficient']
    21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[104,501]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
    29 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
    30 md.inversion.vx_obs=md.initialization.vx
    31 md.inversion.vy_obs=md.initialization.vy
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['FrictionCoefficient']
     21md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [104, 501]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     27md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2 * np.ones(md.inversion.nsteps)
     29md.inversion.step_threshold = 0.3 * np.ones(md.inversion.nsteps)
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
    3232
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3535
    3636#Fields and tolerances to track changes
    37 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    38 field_tolerances=[5e-05,1e-07,2e-06,8e-08,8e-07,9e-07,8e-07]
    39 field_values=[\
    40         md.results.StressbalanceSolution.Gradient1,\
    41         md.results.StressbalanceSolution.J,\
    42         md.results.StressbalanceSolution.FrictionCoefficient,\
    43         md.results.StressbalanceSolution.Pressure,\
    44         md.results.StressbalanceSolution.Vel,\
    45         md.results.StressbalanceSolution.Vx,\
    46         md.results.StressbalanceSolution.Vy,\
    47 ]
     37field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     38field_tolerances = [5e-05, 1e-07, 2e-06, 8e-08, 8e-07, 9e-07, 8e-07]
     39field_values = [md.results.StressbalanceSolution.Gradient1,
     40                md.results.StressbalanceSolution.J,
     41                md.results.StressbalanceSolution.FrictionCoefficient,
     42                md.results.StressbalanceSolution.Pressure,
     43                md.results.StressbalanceSolution.Vel,
     44                md.results.StressbalanceSolution.Vx,
     45                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test323.py

    r22449 r23793  
    11#Test Name: SquareSheetConstrainedTranCflSSA2d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.timestepping = timesteppingadaptive(md.timestepping);
    18 md.timestepping.time_step_max = 10000.;
    19 md.timestepping.final_time=1120.
    20 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.timestepping = timesteppingadaptive(md.timestepping)
     17md.timestepping.time_step_max = 10000.
     18md.timestepping.final_time = 1120.
     19md = solve(md, 'Transient')
    2120
    2221#Fields and tolerances to track changes
    23 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    24 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-12,1e-12]
    25 field_values=[\
    26         md.results.TransientSolution[0].Vx,\
    27         md.results.TransientSolution[0].Vy,\
    28         md.results.TransientSolution[0].Vel,\
    29         md.results.TransientSolution[0].Pressure,\
    30         md.results.TransientSolution[0].Base,\
    31         md.results.TransientSolution[0].Surface,\
    32         md.results.TransientSolution[0].Thickness,\
    33         md.results.TransientSolution[1].Vx,\
    34         md.results.TransientSolution[1].Vy,\
    35         md.results.TransientSolution[1].Vel,\
    36         md.results.TransientSolution[1].Pressure,\
    37         md.results.TransientSolution[1].Base,\
    38         md.results.TransientSolution[1].Surface,\
    39         md.results.TransientSolution[1].Thickness,\
    40         md.results.TransientSolution[2].Vx,\
    41         md.results.TransientSolution[2].Vy,\
    42         md.results.TransientSolution[2].Vel,\
    43         md.results.TransientSolution[2].Pressure,\
    44         md.results.TransientSolution[2].Base,\
    45         md.results.TransientSolution[2].Surface,\
    46         md.results.TransientSolution[2].Thickness,\
    47         ]
     22field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3']
     23field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-12, 1e-12]
     24field_values = [md.results.TransientSolution[0].Vx,
     25                md.results.TransientSolution[0].Vy,
     26                md.results.TransientSolution[0].Vel,
     27                md.results.TransientSolution[0].Pressure,
     28                md.results.TransientSolution[0].Base,
     29                md.results.TransientSolution[0].Surface,
     30                md.results.TransientSolution[0].Thickness,
     31                md.results.TransientSolution[1].Vx,
     32                md.results.TransientSolution[1].Vy,
     33                md.results.TransientSolution[1].Vel,
     34                md.results.TransientSolution[1].Pressure,
     35                md.results.TransientSolution[1].Base,
     36                md.results.TransientSolution[1].Surface,
     37                md.results.TransientSolution[1].Thickness,
     38                md.results.TransientSolution[2].Vx,
     39                md.results.TransientSolution[2].Vy,
     40                md.results.TransientSolution[2].Vel,
     41                md.results.TransientSolution[2].Pressure,
     42                md.results.TransientSolution[2].Base,
     43                md.results.TransientSolution[2].Surface,
     44                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test324.py

    r21839 r23793  
    11#Test Name: SquareSheetConstrainedTranCflSIA3d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(5,1.2)
    16 md=setflowequation(md,'SIA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.timestepping = timesteppingadaptive(md.timestepping);
    19 md.timestepping.time_step_max = 10000.;
    20 md.timestepping.final_time=16000.
    21 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(5, 1.2)
     15md = setflowequation(md, 'SIA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping = timesteppingadaptive(md.timestepping)
     18md.timestepping.time_step_max = 10000.
     19md.timestepping.final_time = 16000.
     20md = solve(md, 'Transient')
    2221
    2322#Fields and tolerances to track changes
    24 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1',\
    25         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2',\
    26         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    27 field_tolerances=[1e-13,  1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    28         5e-11,1e-13,5e-13,5e-11,1e-13,1e-13,5e-13,1e-13,1e-13,1e-13,\
    29         1e-10,  1e-12,1e-12,1e-12,1e-13,1e-13,1e-12,1e-12,1e-13,1e-13]
    30 field_values=[\
    31         md.results.TransientSolution[0].Vx,\
    32         md.results.TransientSolution[0].Vy,\
    33         md.results.TransientSolution[0].Vz,\
    34         md.results.TransientSolution[0].Vel,\
    35         md.results.TransientSolution[0].Pressure,\
    36         md.results.TransientSolution[0].Base,\
    37         md.results.TransientSolution[0].Surface,\
    38         md.results.TransientSolution[0].Thickness,\
    39         md.results.TransientSolution[0].Temperature,\
    40         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    41         md.results.TransientSolution[1].Vx,\
    42         md.results.TransientSolution[1].Vy,\
    43         md.results.TransientSolution[1].Vz,\
    44         md.results.TransientSolution[1].Vel,\
    45         md.results.TransientSolution[1].Pressure,\
    46         md.results.TransientSolution[1].Base,\
    47         md.results.TransientSolution[1].Surface,\
    48         md.results.TransientSolution[1].Thickness,\
    49         md.results.TransientSolution[1].Temperature,\
    50         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    51         md.results.TransientSolution[2].Vx,\
    52         md.results.TransientSolution[2].Vy,\
    53         md.results.TransientSolution[2].Vz,\
    54         md.results.TransientSolution[2].Vel,\
    55         md.results.TransientSolution[2].Pressure,\
    56         md.results.TransientSolution[2].Base,\
    57         md.results.TransientSolution[2].Surface,\
    58         md.results.TransientSolution[2].Thickness,\
    59         md.results.TransientSolution[2].Temperature,\
    60         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    61         ]
     23field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     24               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2',
     25               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3']
     26field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     27                    5e-11, 1e-13, 5e-13, 5e-11, 1e-13, 1e-13, 5e-13, 1e-13, 1e-13, 1e-13,
     28                    1e-10, 1e-12, 1e-12, 1e-12, 1e-13, 1e-13, 1e-12, 1e-12, 1e-13, 1e-13]
     29field_values = [md.results.TransientSolution[0].Vx,
     30                md.results.TransientSolution[0].Vy,
     31                md.results.TransientSolution[0].Vz,
     32                md.results.TransientSolution[0].Vel,
     33                md.results.TransientSolution[0].Pressure,
     34                md.results.TransientSolution[0].Base,
     35                md.results.TransientSolution[0].Surface,
     36                md.results.TransientSolution[0].Thickness,
     37                md.results.TransientSolution[0].Temperature,
     38                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vz,
     42                md.results.TransientSolution[1].Vel,
     43                md.results.TransientSolution[1].Pressure,
     44                md.results.TransientSolution[1].Base,
     45                md.results.TransientSolution[1].Surface,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[1].Temperature,
     48                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     49                md.results.TransientSolution[2].Vx,
     50                md.results.TransientSolution[2].Vy,
     51                md.results.TransientSolution[2].Vz,
     52                md.results.TransientSolution[2].Vel,
     53                md.results.TransientSolution[2].Pressure,
     54                md.results.TransientSolution[2].Base,
     55                md.results.TransientSolution[2].Surface,
     56                md.results.TransientSolution[2].Thickness,
     57                md.results.TransientSolution[2].Temperature,
     58                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test325.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.timestepping.time_step=0.
    18 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    19 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.timestepping.time_step = 0.
     18md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     19md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
    2020md.thermal.isenthalpy = 1
    2121md.thermal.isdynamicbasalspc = 1
    2222
    23 md.cluster=generic('name',gethostname(),'np',3)
    24 md=solve(md,'Thermal')
     23md.cluster = generic('name', gethostname(), 'np', 3)
     24md = solve(md, 'Thermal')
    2525
    2626#Fields and tolerances to track changes
    27 field_names     =['Enthalpy','Waterfraction','Temperature']
    28 field_tolerances=[1e-13,5e-13,1e-13]
    29 field_values=[\
    30         md.results.ThermalSolution.Enthalpy,\
    31         md.results.ThermalSolution.Waterfraction,\
    32         md.results.ThermalSolution.Temperature,\
    33         ]
     27field_names = ['Enthalpy', 'Waterfraction', 'Temperature']
     28field_tolerances = [1e-13, 5e-13, 1e-13]
     29field_values = [md.results.ThermalSolution.Enthalpy,
     30                md.results.ThermalSolution.Waterfraction,
     31                md.results.ThermalSolution.Temperature]
  • issm/trunk-jpl/test/NightlyRun/test326.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    19 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
    20 md.transient.isstressbalance=False
    21 md.transient.ismasstransport=False
    22 md.transient.issmb=True
    23 md.transient.isthermal=True
    24 md.transient.isgroundingline=False
    25 md.thermal.isenthalpy=1
    26 md.thermal.isdynamicbasalspc=1
    27 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     19md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
     20md.transient.isstressbalance = False
     21md.transient.ismasstransport = False
     22md.transient.issmb = True
     23md.transient.isthermal = True
     24md.transient.isgroundingline = False
     25md.thermal.isenthalpy = 1
     26md.thermal.isdynamicbasalspc = 1
     27md = solve(md, 'Transient')
    2828
    2929#Fields and tolerances to track changes
    30 field_names     =['Enthalpy1','Waterfraction1','Temperature1',\
    31         'Enthalpy2','Waterfraction2','Temperature2',\
    32         'Enthalpy3','Waterfraction3','Temperature3']
    33 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    34 field_values=[\
    35         md.results.TransientSolution[0].Enthalpy,\
    36         md.results.TransientSolution[0].Waterfraction,\
    37         md.results.TransientSolution[0].Temperature,\
    38         md.results.TransientSolution[1].Enthalpy,\
    39         md.results.TransientSolution[1].Waterfraction,\
    40         md.results.TransientSolution[1].Temperature,\
    41         md.results.TransientSolution[2].Enthalpy,\
    42         md.results.TransientSolution[2].Waterfraction,\
    43         md.results.TransientSolution[2].Temperature,\
    44         ]
     30field_names = ['Enthalpy1', 'Waterfraction1', 'Temperature1',
     31               'Enthalpy2', 'Waterfraction2', 'Temperature2',
     32               'Enthalpy3', 'Waterfraction3', 'Temperature3']
     33field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     34field_values = [md.results.TransientSolution[0].Enthalpy,
     35                md.results.TransientSolution[0].Waterfraction,
     36                md.results.TransientSolution[0].Temperature,
     37                md.results.TransientSolution[1].Enthalpy,
     38                md.results.TransientSolution[1].Waterfraction,
     39                md.results.TransientSolution[1].Temperature,
     40                md.results.TransientSolution[2].Enthalpy,
     41                md.results.TransientSolution[2].Waterfraction,
     42                md.results.TransientSolution[2].Temperature]
  • issm/trunk-jpl/test/NightlyRun/test327.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',200000.)
    13 md=setmask(md,'','')
    14 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    19 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
    20 md.initialization.temperature[:]=272.
    21 md.thermal.spctemperature[np.nonzero(md.mesh.vertexonsurface)[0]]=272.
    22 md.thermal.isenthalpy=1
    23 md.thermal.isdynamicbasalspc=1
    24 md.basalforcings.geothermalflux[:]=5.
    25 md=solve(md,'Transient')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     19md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
     20md.initialization.temperature[:] = 272.
     21md.thermal.spctemperature[np.nonzero(md.mesh.vertexonsurface)[0]] = 272.
     22md.thermal.isenthalpy = 1
     23md.thermal.isdynamicbasalspc = 1
     24md.basalforcings.geothermalflux[:] = 5.
     25md = solve(md, 'Transient')
    2626
    2727#Fields and tolerances to track changes
    28 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','Enthalpy1','Waterfraction1',\
    29         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','Enthalpy2','Waterfraction2',\
    30         'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','Enthalpy3','Waterfraction3']
    31 field_tolerances=[1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
    32         1e-09,1e-09,1e-10,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
    33         1e-09,5e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-4,1e-10]
    34 field_values=[\
    35         md.results.TransientSolution[0].Vx,\
    36         md.results.TransientSolution[0].Vy,\
    37         md.results.TransientSolution[0].Vz,\
    38         md.results.TransientSolution[0].Vel,\
    39         md.results.TransientSolution[0].Pressure,\
    40         md.results.TransientSolution[0].Base,\
    41         md.results.TransientSolution[0].Surface,\
    42         md.results.TransientSolution[0].Thickness,\
    43         md.results.TransientSolution[0].Temperature,\
    44         md.results.TransientSolution[0].Enthalpy,\
    45         md.results.TransientSolution[0].Waterfraction,\
    46         md.results.TransientSolution[1].Vx,\
    47         md.results.TransientSolution[1].Vy,\
    48         md.results.TransientSolution[1].Vz,\
    49         md.results.TransientSolution[1].Vel,\
    50         md.results.TransientSolution[1].Pressure,\
    51         md.results.TransientSolution[1].Base,\
    52         md.results.TransientSolution[1].Surface,\
    53         md.results.TransientSolution[1].Thickness,\
    54         md.results.TransientSolution[1].Temperature,\
    55         md.results.TransientSolution[1].Enthalpy,\
    56         md.results.TransientSolution[1].Waterfraction,\
    57         md.results.TransientSolution[2].Vx,\
    58         md.results.TransientSolution[2].Vy,\
    59         md.results.TransientSolution[2].Vz,\
    60         md.results.TransientSolution[2].Vel,\
    61         md.results.TransientSolution[2].Pressure,\
    62         md.results.TransientSolution[2].Base,\
    63         md.results.TransientSolution[2].Surface,\
    64         md.results.TransientSolution[2].Thickness,\
    65         md.results.TransientSolution[2].Temperature,\
    66         md.results.TransientSolution[2].Enthalpy,\
    67         md.results.TransientSolution[2].Waterfraction,\
    68         ]
     28field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'Enthalpy1', 'Waterfraction1',
     29               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'Enthalpy2', 'Waterfraction2',
     30               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'Enthalpy3', 'Waterfraction3']
     31field_tolerances = [1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     32                    1e-09, 1e-09, 1e-10, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     33                    1e-09, 5e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-4, 1e-10]
     34field_values = [md.results.TransientSolution[0].Vx,
     35                md.results.TransientSolution[0].Vy,
     36                md.results.TransientSolution[0].Vz,
     37                md.results.TransientSolution[0].Vel,
     38                md.results.TransientSolution[0].Pressure,
     39                md.results.TransientSolution[0].Base,
     40                md.results.TransientSolution[0].Surface,
     41                md.results.TransientSolution[0].Thickness,
     42                md.results.TransientSolution[0].Temperature,
     43                md.results.TransientSolution[0].Enthalpy,
     44                md.results.TransientSolution[0].Waterfraction,
     45                md.results.TransientSolution[1].Vx,
     46                md.results.TransientSolution[1].Vy,
     47                md.results.TransientSolution[1].Vz,
     48                md.results.TransientSolution[1].Vel,
     49                md.results.TransientSolution[1].Pressure,
     50                md.results.TransientSolution[1].Base,
     51                md.results.TransientSolution[1].Surface,
     52                md.results.TransientSolution[1].Thickness,
     53                md.results.TransientSolution[1].Temperature,
     54                md.results.TransientSolution[1].Enthalpy,
     55                md.results.TransientSolution[1].Waterfraction,
     56                md.results.TransientSolution[2].Vx,
     57                md.results.TransientSolution[2].Vy,
     58                md.results.TransientSolution[2].Vz,
     59                md.results.TransientSolution[2].Vel,
     60                md.results.TransientSolution[2].Pressure,
     61                md.results.TransientSolution[2].Base,
     62                md.results.TransientSolution[2].Surface,
     63                md.results.TransientSolution[2].Thickness,
     64                md.results.TransientSolution[2].Temperature,
     65                md.results.TransientSolution[2].Enthalpy,
     66                md.results.TransientSolution[2].Waterfraction]
  • issm/trunk-jpl/test/NightlyRun/test328.py

    r21408 r23793  
    99from solve import *
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md=setflowequation(md,'SSA','all')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md = setflowequation(md, 'SSA', 'all')
    1515md.smb = SMBgradients()
    16 md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y
    17 md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y
    18 md.transient.requested_outputs=['default','TotalSmb']
    19 md.smb.href=copy.deepcopy(md.geometry.surface)
    20 md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y
    21 md.cluster=generic('name',gethostname(),'np',3)
    22 md=solve(md,'Transient')
     16md.smb.b_pos = -100. + 0.00005 * md.mesh.x - 0.0001 * md.mesh.y
     17md.smb.b_neg = 250. + 0.000051 * md.mesh.x - 0.00011 * md.mesh.y
     18md.transient.requested_outputs = ['default', 'TotalSmb']
     19md.smb.href = copy.deepcopy(md.geometry.surface)
     20md.smb.smbref = 1000. - 0.001 * md.mesh.x - 0.005 * md.mesh.y
     21md.cluster = generic('name', gethostname(), 'np', 3)
     22md = solve(md, 'Transient')
    2323
    2424#Fields and tolerances to track changes
    25 field_names     =['Vx1','Vy1','Vel1',
    26                                                                         'Bed1','Surface1','Thickness1',
    27                                                                         'SMB1','TotalSmb1',
    28                                                                         'Vx2','Vy2','Vel2','Bed2',
    29                                                                         'Surface2','Thickness2',
    30                                                                         'SMB2','TotalSmb2','Vx3','Vy3',
    31                                                                         'Vel3','Bed3','Surface3',
    32                                                                         'Thickness3','SMB3','TotalSmb3']
    33 field_tolerances=[1e-13,1e-13,1e-13,
    34                                                                         1e-13,1e-13,1e-13,
    35                                                                         1e-13,1e-13,1e-13,
    36                                                                         1e-13,1e-13,1e-13,
    37                                                                         1e-13,1e-13,1e-13,
    38                                                                         1e-13,1e-13,1e-13,
    39                                                                         1e-13,1e-13,1e-13,
    40                                                                         1e-13,1e-13,1e-13]
    41 field_values=[md.results.TransientSolution[0].Vx,
    42                                                         md.results.TransientSolution[0].Vy,
    43                                                         md.results.TransientSolution[0].Vel,
    44                                                         md.results.TransientSolution[0].Base,
    45                                                         md.results.TransientSolution[0].Surface,
    46                                                         md.results.TransientSolution[0].Thickness,
    47                                                         md.results.TransientSolution[0].SmbMassBalance,
    48                                                         md.results.TransientSolution[0].TotalSmb,
    49                                                         md.results.TransientSolution[1].Vx,
    50                                                         md.results.TransientSolution[1].Vy,
    51                                                         md.results.TransientSolution[1].Vel,
    52                                                         md.results.TransientSolution[1].Base,
    53                                                         md.results.TransientSolution[1].Surface,
    54                                                         md.results.TransientSolution[1].Thickness,
    55                                                         md.results.TransientSolution[1].TotalSmb,
    56                                                         md.results.TransientSolution[1].SmbMassBalance,
    57                                                         md.results.TransientSolution[2].Vx,
    58                                                         md.results.TransientSolution[2].Vy,
    59                                                         md.results.TransientSolution[2].Vel,
    60                                                         md.results.TransientSolution[2].Base,
    61                                                         md.results.TransientSolution[2].Surface,
    62                                                         md.results.TransientSolution[2].Thickness,
    63                                                         md.results.TransientSolution[2].SmbMassBalance,
    64                                                         md.results.TransientSolution[2].TotalSmb]
     25field_names = ['Vx1', 'Vy1', 'Vel1',
     26               'Bed1', 'Surface1', 'Thickness1',
     27               'SMB1', 'TotalSmb1',
     28               'Vx2', 'Vy2', 'Vel2', 'Bed2',
     29               'Surface2', 'Thickness2',
     30               'SMB2', 'TotalSmb2', 'Vx3', 'Vy3',
     31               'Vel3', 'Bed3', 'Surface3',
     32               'Thickness3', 'SMB3', 'TotalSmb3']
     33field_tolerances = [1e-13, 1e-13, 1e-13,
     34                    1e-13, 1e-13, 1e-13,
     35                    1e-13, 1e-13, 1e-13,
     36                    1e-13, 1e-13, 1e-13,
     37                    1e-13, 1e-13, 1e-13,
     38                    1e-13, 1e-13, 1e-13,
     39                    1e-13, 1e-13, 1e-13,
     40                    1e-13, 1e-13, 1e-13]
     41field_values = [md.results.TransientSolution[0].Vx,
     42                md.results.TransientSolution[0].Vy,
     43                md.results.TransientSolution[0].Vel,
     44                md.results.TransientSolution[0].Base,
     45                md.results.TransientSolution[0].Surface,
     46                md.results.TransientSolution[0].Thickness,
     47                md.results.TransientSolution[0].SmbMassBalance,
     48                md.results.TransientSolution[0].TotalSmb,
     49                md.results.TransientSolution[1].Vx,
     50                md.results.TransientSolution[1].Vy,
     51                md.results.TransientSolution[1].Vel,
     52                md.results.TransientSolution[1].Base,
     53                md.results.TransientSolution[1].Surface,
     54                md.results.TransientSolution[1].Thickness,
     55                md.results.TransientSolution[1].TotalSmb,
     56                md.results.TransientSolution[1].SmbMassBalance,
     57                md.results.TransientSolution[2].Vx,
     58                md.results.TransientSolution[2].Vy,
     59                md.results.TransientSolution[2].Vel,
     60                md.results.TransientSolution[2].Base,
     61                md.results.TransientSolution[2].Surface,
     62                md.results.TransientSolution[2].Thickness,
     63                md.results.TransientSolution[2].SmbMassBalance,
     64                md.results.TransientSolution[2].TotalSmb]
  • issm/trunk-jpl/test/NightlyRun/test329.py

    r21408 r23793  
    99from solve import *
    1010
    11 md=triangle(model(),'../Exp/Square.exp',150000.)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    14 md.extrude(3,1)
    15 md=setflowequation(md,'HO','all')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareSheetConstrained.py')
     14md.extrude(3, 1)
     15md = setflowequation(md, 'HO', 'all')
    1616md.smb = SMBgradients()
    17 md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y
    18 md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y
    19 md.smb.href=copy.deepcopy(md.geometry.surface)
    20 md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y
    21 md.transient.requested_outputs=['default','TotalSmb']
    22 md.cluster=generic('name',gethostname(),'np',3)
    23 md=solve(md,'Transient')
     17md.smb.b_pos = - 100. + 0.00005 * md.mesh.x - 0.0001 * md.mesh.y
     18md.smb.b_neg = 250. + 0.000051 * md.mesh.x - 0.00011 * md.mesh.y
     19md.smb.href = copy.deepcopy(md.geometry.surface)
     20md.smb.smbref = 1000. - 0.001 * md.mesh.x - 0.005 * md.mesh.y
     21md.transient.requested_outputs = ['default', 'TotalSmb']
     22md.cluster = generic('name', gethostname(), 'np', 3)
     23md = solve(md, 'Transient')
    2424
    2525#Fields and tolerances to track changes
    26 field_names     =['Vx1','Vy1','Vz1','Vel1',
    27                                                                         'Bed1','Surface1','Thickness1',
    28                                                                         'Temperature1','SMB1','TotalSmb1',
    29                                                                         'Vx2','Vy2','Vz2','Vel2',
    30                                                                         'Bed2','Surface2','Thickness2',
    31                                                                         'Temperature2','SMB2','TotalSmb2',
    32                                                                         'Vx3','Vy3','Vz3','Vel3',
    33                                                                         'Bed3','Surface3','Thickness3',
    34                                                                         'Temperature3','SMB3','TotalSmb3']
    35 field_tolerances=[1e-09,1e-09,1e-09,1e-09,
    36                                                                         1e-10,1e-10,1e-10,
    37                                                                         1e-10,1e-10,1e-10,
    38                                                                         1e-09,1e-09,1e-10,1e-09,
    39                                                                         1e-10,1e-10,1e-10,
    40                                                                         1e-10,1e-10,1e-10,
    41                                                                         1e-09,5e-09,1e-09,1e-09,
    42                                                                         1e-10,1e-10,1e-10,
    43                                                                         1e-10,1e-10,1e-10]
    44 field_values=[md.results.TransientSolution[0].Vx,
    45                                                         md.results.TransientSolution[0].Vy,
    46                                                         md.results.TransientSolution[0].Vz,
    47                                                         md.results.TransientSolution[0].Vel,
    48                                                         md.results.TransientSolution[0].Base,
    49                                                         md.results.TransientSolution[0].Surface,
    50                                                         md.results.TransientSolution[0].Thickness,
    51                                                         md.results.TransientSolution[0].Temperature,
    52                                                         md.results.TransientSolution[0].SmbMassBalance,
    53                                                         md.results.TransientSolution[0].TotalSmb,
    54                                                         md.results.TransientSolution[1].Vx,
    55                                                         md.results.TransientSolution[1].Vy,
    56                                                         md.results.TransientSolution[1].Vz,
    57                                                         md.results.TransientSolution[1].Vel,
    58                                                         md.results.TransientSolution[1].Base,
    59                                                         md.results.TransientSolution[1].Surface,
    60                                                         md.results.TransientSolution[1].Thickness,
    61                                                         md.results.TransientSolution[1].Temperature,
    62                                                         md.results.TransientSolution[1].SmbMassBalance,
    63                                                         md.results.TransientSolution[1].TotalSmb,
    64                                                         md.results.TransientSolution[2].Vx,
    65                                                         md.results.TransientSolution[2].Vy,
    66                                                         md.results.TransientSolution[2].Vz,
    67                                                         md.results.TransientSolution[2].Vel,
    68                                                         md.results.TransientSolution[2].Base,
    69                                                         md.results.TransientSolution[2].Surface,
    70                                                         md.results.TransientSolution[2].Thickness,
    71                                                         md.results.TransientSolution[2].Temperature,
    72                                                         md.results.TransientSolution[2].SmbMassBalance,
    73                                                         md.results.TransientSolution[2].TotalSmb]
     26field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1',
     27               'Bed1', 'Surface1', 'Thickness1',
     28               'Temperature1', 'SMB1', 'TotalSmb1',
     29               'Vx2', 'Vy2', 'Vz2', 'Vel2',
     30               'Bed2', 'Surface2', 'Thickness2',
     31               'Temperature2', 'SMB2', 'TotalSmb2',
     32               'Vx3', 'Vy3', 'Vz3', 'Vel3',
     33               'Bed3', 'Surface3', 'Thickness3',
     34               'Temperature3', 'SMB3', 'TotalSmb3']
     35field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09,
     36                    1e-10, 1e-10, 1e-10,
     37                    1e-10, 1e-10, 1e-10,
     38                    1e-09, 1e-09, 1e-10, 1e-09,
     39                    1e-10, 1e-10, 1e-10,
     40                    1e-10, 1e-10, 1e-10,
     41                    1e-09, 5e-09, 1e-09, 1e-09,
     42                    1e-10, 1e-10, 1e-10,
     43                    1e-10, 1e-10, 1e-10]
     44field_values = [md.results.TransientSolution[0].Vx,
     45                md.results.TransientSolution[0].Vy,
     46                md.results.TransientSolution[0].Vz,
     47                md.results.TransientSolution[0].Vel,
     48                md.results.TransientSolution[0].Base,
     49                md.results.TransientSolution[0].Surface,
     50                md.results.TransientSolution[0].Thickness,
     51                md.results.TransientSolution[0].Temperature,
     52                md.results.TransientSolution[0].SmbMassBalance,
     53                md.results.TransientSolution[0].TotalSmb,
     54                md.results.TransientSolution[1].Vx,
     55                md.results.TransientSolution[1].Vy,
     56                md.results.TransientSolution[1].Vz,
     57                md.results.TransientSolution[1].Vel,
     58                md.results.TransientSolution[1].Base,
     59                md.results.TransientSolution[1].Surface,
     60                md.results.TransientSolution[1].Thickness,
     61                md.results.TransientSolution[1].Temperature,
     62                md.results.TransientSolution[1].SmbMassBalance,
     63                md.results.TransientSolution[1].TotalSmb,
     64                md.results.TransientSolution[2].Vx,
     65                md.results.TransientSolution[2].Vy,
     66                md.results.TransientSolution[2].Vz,
     67                md.results.TransientSolution[2].Vel,
     68                md.results.TransientSolution[2].Base,
     69                md.results.TransientSolution[2].Surface,
     70                md.results.TransientSolution[2].Thickness,
     71                md.results.TransientSolution[2].Temperature,
     72                md.results.TransientSolution[2].SmbMassBalance,
     73                md.results.TransientSolution[2].TotalSmb]
  • issm/trunk-jpl/test/NightlyRun/test330.py

    r22900 r23793  
    11#Test Name:UnConfinedHydroDC
    22import numpy as np
    3 import inspect
    43from model import *
    54from setmask import *
     
    1211from generic import generic
    1312
    14 md=triangle(model(),'../Exp/Strip.exp',10000.)
    15 md=setmask(md,'','')
     13md = triangle(model(), '../Exp/Strip.exp', 10000.)
     14md = setmask(md, '', '')
    1615#reduced slab (20m long)
    17 md.mesh.x=md.mesh.x/5.0e3
    18 md.mesh.y=md.mesh.y/5.0e3
    19 md=parameterize(md,'../Par/IceCube.py')
    20 md.transient=transient.setallnullparameters(md.transient)
    21 md.transient.ishydrology=True
    22 md=setflowequation(md,'SSA','all')
    23 md.cluster=generic('name',gethostname(),'np',1)
    24 md.hydrology=hydrologydc()
    25 md.hydrology=md.hydrology.initialize(md)
     16md.mesh.x = md.mesh.x / 5.0e3
     17md.mesh.y = md.mesh.y / 5.0e3
     18md = parameterize(md, '../Par/IceCube.py')
     19md.transient = transient.setallnullparameters(md.transient)
     20md.transient.ishydrology = True
     21md = setflowequation(md, 'SSA', 'all')
     22md.cluster = generic('name', gethostname(), 'np', 1)
     23md.hydrology = hydrologydc()
     24md.hydrology = md.hydrology.initialize(md)
    2625
    2726#Hydro Model Parameters
    28 md.hydrology.isefficientlayer=0
    29 md.hydrology.sedimentlimit_flag=0
    30 md.hydrology.mask_thawed_node=np.ones((md.mesh.numberofvertices))
    31 md.hydrology.rel_tol=1.0e-6
    32 md.hydrology.penalty_lock=0
    33 md.hydrology.max_iter=200
    34 md.hydrology.transfer_flag=0
    35 md.hydrology.unconfined_flag=1
    36 md.hydrology.sediment_porosity=0.1
     27md.hydrology.isefficientlayer = 0
     28md.hydrology.sedimentlimit_flag = 0
     29md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
     30md.hydrology.rel_tol = 1.0e-6
     31md.hydrology.penalty_lock = 0
     32md.hydrology.max_iter = 200
     33md.hydrology.transfer_flag = 0
     34md.hydrology.unconfined_flag = 1
     35md.hydrology.sediment_porosity = 0.1
    3736#Sediment
    38 md.hydrology.sediment_thickness=10.0
    39 md.hydrology.sediment_transmitivity=(1.0e-3*md.hydrology.sediment_thickness)*np.ones((md.mesh.numberofvertices))
     37md.hydrology.sediment_thickness = 10.0
     38md.hydrology.sediment_transmitivity = (1.0e-3 * md.hydrology.sediment_thickness) * np.ones((md.mesh.numberofvertices))
    4039#init
    41 md.initialization.sediment_head=-5.0*np.ones((md.mesh.numberofvertices))
     40md.initialization.sediment_head = -5.0 * np.ones((md.mesh.numberofvertices))
    4241#BC
    43 md.hydrology.spcsediment_head=np.nan*np.ones((md.mesh.numberofvertices))
    44 md.hydrology.spcsediment_head[np.where(md.mesh.x==0)]=0.5
     42md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
     43md.hydrology.spcsediment_head[np.where(md.mesh.x == 0)] = 0.5
    4544
    46 md.timestepping.time_step=5/md.constants.yts #5s steppin
    47 md.settings.output_frequency=2
    48 md.timestepping.final_time=300/md.constants.yts #500s run
     45md.timestepping.time_step = 5 / md.constants.yts #5s steppin
     46md.settings.output_frequency = 2
     47md.timestepping.final_time = 300 / md.constants.yts #500s run
    4948
    50 md=solve(md,'Transient')
     49md = solve(md, 'Transient')
    5150
    5251#fields to track, results can also be found in
    5352#Wang 2009 Fig 6b (jouranl of Hydrology)
    54 field_names=['SedimentWaterHead1',
    55                                                  'SedimentWaterHead2']
    56 field_tolerances=[1e-13,
    57                                                                         1e-13]
    58 field_values=[md.results.TransientSolution[10].SedimentHeadHydrostep,
    59                                                         md.results.TransientSolution[30].SedimentHeadHydrostep]
     53field_names = ['SedimentWaterHead1', 'SedimentWaterHead2']
     54field_tolerances = [1e-13, 1e-13]
     55field_values = [md.results.TransientSolution[10].SedimentHeadHydrostep, md.results.TransientSolution[30].SedimentHeadHydrostep]
  • issm/trunk-jpl/test/NightlyRun/test3300.py

    r22900 r23793  
    1212from generic import generic
    1313
    14 md=triangle(model(),'../Exp/Square.exp',100000.)
    15 md=setmask(md,'','')
    16 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    17 md.transient=transient.setallnullparameters(md.transient)
    18 md.transient.ishydrology=True
    19 md.transient.issmb=True
    20 md=setflowequation(md,'SSA','all')
    21 md.cluster=generic('name',gethostname(),'np',1)
    22 md.hydrology=hydrologydc()
    23 md.hydrology=md.hydrology.initialize(md)
     14md = triangle(model(), '../Exp/Square.exp', 100000.)
     15md = setmask(md, '', '')
     16md = parameterize(md, '../Par/SquareSheetConstrained.py')
     17md.transient = transient.setallnullparameters(md.transient)
     18md.transient.ishydrology = True
     19md.transient.issmb = True
     20md = setflowequation(md, 'SSA', 'all')
     21md.cluster = generic('name', gethostname(), 'np', 1)
     22md.hydrology = hydrologydc()
     23md.hydrology = md.hydrology.initialize(md)
    2424
    25 md.hydrology.isefficientlayer=1
    26 md.hydrology.sedimentlimit_flag=1
    27 md.hydrology.sedimentlimit=400.0
    28 md.hydrology.mask_thawed_node=np.ones((md.mesh.numberofvertices))
    29 md.hydrology.sediment_thickness=20.0
    30 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
    31 md.hydrology.spcsediment_head=np.nan*np.ones((md.mesh.numberofvertices))
    32 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
    33 md.hydrology.sediment_transmitivity=1.5e-4*np.ones((md.mesh.numberofvertices))
     25md.hydrology.isefficientlayer = 1
     26md.hydrology.sedimentlimit_flag = 1
     27md.hydrology.sedimentlimit = 400.0
     28md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
     29md.hydrology.sediment_thickness = 20.0
     30md.initialization.sediment_head = np.zeros((md.mesh.numberofvertices))
     31md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
     32md.basalforcings.groundedice_melting_rate = 2.0 * np.ones((md.mesh.numberofvertices))
     33md.hydrology.sediment_transmitivity = 1.5e-4 * np.ones((md.mesh.numberofvertices))
    3434
    35 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices))
    36 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices))
    37 md.hydrology.spcepl_head=np.nan*np.ones((md.mesh.numberofvertices))
    38 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices))
     35md.initialization.epl_head = np.zeros((md.mesh.numberofvertices))
     36md.initialization.epl_thickness = np.ones((md.mesh.numberofvertices))
     37md.hydrology.spcepl_head = np.nan * np.ones((md.mesh.numberofvertices))
     38md.hydrology.mask_eplactive_node = np.zeros((md.mesh.numberofvertices))
    3939
    40 md.hydrology.epl_conductivity=1.5e-2
    41 md.hydrology.epl_initial_thickness=1.0
    42 md.hydrology.epl_colapse_thickness=1.0e-6
    43 md.hydrology.epl_thick_comp=1
    44 md.hydrology.epl_max_thickness=5.0
     40md.hydrology.epl_conductivity = 1.5e-2
     41md.hydrology.epl_initial_thickness = 1.0
     42md.hydrology.epl_colapse_thickness = 1.0e-6
     43md.hydrology.epl_thick_comp = 1
     44md.hydrology.epl_max_thickness = 5.0
    4545
    46 md.hydrology.transfer_flag=1.0
    47 md.hydrology.leakage_factor=3.9e-13
     46md.hydrology.transfer_flag = 1.0
     47md.hydrology.leakage_factor = 3.9e-13
    4848
    49 times=np.arange(0,8.001,0.002)
    50 md.basalforcings.groundedice_melting_rate=np.zeros((md.mesh.numberofvertices+1,len(times)))
     49times = np.arange(0, 8.001, 0.002)
     50md.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
    53 md.basalforcings.groundedice_melting_rate[:,np.where(times<=1.0)]=1.0
    54 md.basalforcings.groundedice_melting_rate[-1,:]=times
     52md.basalforcings.groundedice_melting_rate[:, np.where(times <= 6.0)] = -0.2
     53md.basalforcings.groundedice_melting_rate[:, np.where(times <= 1.0)] = 1.0
     54md.basalforcings.groundedice_melting_rate[-1, :] = times
    5555
    56 md.timestepping.time_step=0.002
    57 md.timestepping.final_time=8.0
     56md.timestepping.time_step = 0.002
     57md.timestepping.final_time = 8.0
    5858
    59 md=solve(md,'Transient')
     59md = solve(md, 'Transient')
    6060
    61 # sedvol=np.zeros(4000)
    62 # eplvol=np.zeros(4000)
    63 # totvol=np.zeros(4001)
    64 # time=np.arange(0.002,8.001,0.002)
    65 # store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility)
    66 # sedstore=20.0*store
    67 # for i in range(0,4000):
    68 #       sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore
    69 #       eplvol[i]=np.mean(md.results.TransientSolution[i].EplHead)*store*np.mean(md.results.TransientSolution[i].HydrologydcEplThicknessHydrostep)
    70 #       totvol[i+1]=totvol[i]+md.basalforcings.groundedice_melting_rate[0,i]*0.002
     61# sedvol = np.zeros(4000)
     62# eplvol = np.zeros(4000)
     63# totvol = np.zeros(4001)
     64# time = np.arange(0.002, 8.001, 0.002)
     65# store = md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility)
     66# sedstore = 20.0*store
     67# for i in range(0, 4000):
     68#       sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore
     69#       eplvol[i]=np.mean(md.results.TransientSolution[i].EplHead)*store*np.mean(md.results.TransientSolution[i].HydrologydcEplThicknessHydrostep)
     70#       totvol[i+1]=totvol[i]+md.basalforcings.groundedice_melting_rate[0, i]*0.002
    7171
    72 field_names     =['SedimentWaterHead5','EplWaterHead5','SedimentWaterHead40','EplWaterHead40']
    73 field_tolerances=[1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
    74 field_values=[md.results.TransientSolution[5].SedimentHeadHydrostep,
    75                                                         md.results.TransientSolution[5].EplHeadHydrostep,
    76                                                         md.results.TransientSolution[40].SedimentHeadHydrostep,
    77                                                         md.results.TransientSolution[40].EplHeadHydrostep]
     72field_names = ['SedimentWaterHead5', 'EplWaterHead5', 'SedimentWaterHead40', 'EplWaterHead40']
     73field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     74field_values = [md.results.TransientSolution[5].SedimentHeadHydrostep,
     75                md.results.TransientSolution[5].EplHeadHydrostep,
     76                md.results.TransientSolution[40].SedimentHeadHydrostep,
     77                md.results.TransientSolution[40].EplHeadHydrostep]
  • issm/trunk-jpl/test/NightlyRun/test332.py

    r22900 r23793  
    1313from generic import generic
    1414
    15 md=triangle(model(),'../Exp/Square.exp',100000.)
    16 md=setmask(md,'','')
    17 md=parameterize(md,'../Par/IceCube.py')
     15md = triangle(model(), '../Exp/Square.exp', 100000.)
     16md = setmask(md, '', '')
     17md = parameterize(md, '../Par/IceCube.py')
    1818
    19 md.transient=transient.setallnullparameters(md.transient)
    20 md.transient.ishydrology=True
     19md.transient = transient.setallnullparameters(md.transient)
     20md.transient.ishydrology = True
    2121
    22 md=setflowequation(md,'SSA','all')
    23 md.cluster=generic('name',gethostname(),'np',1)
    24 md.hydrology=hydrologydc()
    25 md.hydrology=md.hydrology.initialize(md)
     22md = setflowequation(md, 'SSA', 'all')
     23md.cluster = generic('name', gethostname(), 'np', 1)
     24md.hydrology = hydrologydc()
     25md.hydrology = md.hydrology.initialize(md)
    2626
    27 md.hydrology.isefficientlayer=0
    28 md.hydrology.mask_thawed_node=np.ones((md.mesh.numberofvertices))
    29 md.hydrology.sedimentlimit_flag=1
    30 md.hydrology.sedimentlimit=8000.0
    31 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
    32 md.hydrology.spcsediment_head=np.nan*np.ones((md.mesh.numberofvertices))
    33 pos=np.nonzero(md.mesh.y==0.)[0]
    34 md.hydrology.spcsediment_head[pos]=0.0
    35 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
    36 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices))
    37 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices))
    38 md.timestepping.time_step=0
    39 md.timestepping.final_time=1.0
    40 md=solve(md,'Hydrology')
     27md.hydrology.isefficientlayer = 0
     28md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
     29md.hydrology.sedimentlimit_flag = 1
     30md.hydrology.sedimentlimit = 8000.0
     31md.initialization.sediment_head = np.zeros((md.mesh.numberofvertices))
     32md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
     33pos = np.nonzero(md.mesh.y == 0.)[0]
     34md.hydrology.spcsediment_head[pos] = 0.0
     35md.basalforcings.groundedice_melting_rate = 2.0 * np.ones((md.mesh.numberofvertices))
     36md.basalforcings.floatingice_melting_rate = 0.0 * np.ones((md.mesh.numberofvertices))
     37md.hydrology.sediment_transmitivity = 3.0 * np.ones((md.mesh.numberofvertices))
     38md.timestepping.time_step = 0
     39md.timestepping.final_time = 1.0
     40md = solve(md, 'Hydrology')
    4141
    4242#Fields and tolerances to track changes
     
    4444#only if no limits are applied
    4545#analitic=(md.mesh.y**2-2*md.mesh.y*1.0e6)*(-2.0/(2*md.constants.yts*md.hydrology.sediment_transmitivity))
    46 field_names     =['SedimentWaterHead','SedimentHeadResidual']
    47 field_tolerances=[1e-13, 3e-10]
    48 field_values=[md.results.HydrologySolution.SedimentHeadHydrostep,md.results.HydrologySolution.SedimentHeadResidual]
     46field_names = ['SedimentWaterHead', 'SedimentHeadResidual']
     47field_tolerances = [1e-13, 3e-10]
     48field_values = [md.results.HydrologySolution.SedimentHeadHydrostep, md.results.HydrologySolution.SedimentHeadResidual]
  • issm/trunk-jpl/test/NightlyRun/test333.py

    r23707 r23793  
    1111from generic import generic
    1212
    13 md=triangle(model(),'../Exp/Square.exp',100000.)
    14 md=setmask(md,'','')
    15 md=parameterize(md,'../Par/IceCube.py')
     13md = triangle(model(), '../Exp/Square.exp', 100000.)
     14md = setmask(md, '', '')
     15md = parameterize(md, '../Par/IceCube.py')
    1616
    17 md.transient=transient.setallnullparameters(md.transient)
    18 md.transient.ishydrology=True
    19 #md.transient.issmb=True
    20 md=setflowequation(md,'SSA','all')
    21 md.cluster=generic('name',gethostname(),'np',1)
    22 md.hydrology=hydrologydc()
    23 md.hydrology=md.hydrology.initialize(md)
     17md.transient = transient.setallnullparameters(md.transient)
     18md.transient.ishydrology = True
     19#md.transient.issmb = True
     20md = setflowequation(md, 'SSA', 'all')
     21md.cluster = generic('name', gethostname(), 'np', 1)
     22md.hydrology = hydrologydc()
     23md.hydrology = md.hydrology.initialize(md)
    2424
    25 md.hydrology.isefficientlayer=1
    26 md.hydrology.sedimentlimit_flag=1
    27 md.hydrology.sedimentlimit=800.0
    28 md.hydrology.mask_thawed_node=np.ones((md.mesh.numberofvertices))
    29 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
    30 md.hydrology.spcsediment_head=np.nan*np.ones((md.mesh.numberofvertices))
     25md.hydrology.isefficientlayer = 1
     26md.hydrology.sedimentlimit_flag = 1
     27md.hydrology.sedimentlimit = 800.0
     28md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
     29md.initialization.sediment_head = np.zeros((md.mesh.numberofvertices))
     30md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
    3131
    32 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
    33 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices))
    34 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices))
     32md.basalforcings.groundedice_melting_rate = 2.0 * np.ones((md.mesh.numberofvertices))
     33md.basalforcings.floatingice_melting_rate = 0.0 * np.ones((md.mesh.numberofvertices))
     34md.hydrology.sediment_transmitivity = 3.0 * np.ones((md.mesh.numberofvertices))
    3535
    36 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices))
    37 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices))
    38 md.hydrology.spcepl_head=np.nan*np.ones((md.mesh.numberofvertices))
    39 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices))
    40 md.hydrology.epl_conductivity=30
    41 md.hydrology.epl_initial_thickness=1
    42 md.hydrology.epl_colapse_thickness=1.0e-3
    43 md.hydrology.epl_thick_comp=1
    44 md.hydrology.epl_max_thickness=1
    45 md.hydrology.steps_per_step=10
    46 md.timestepping.time_step=2.0
    47 md.timestepping.final_time=2.0
     36md.initialization.epl_head = np.zeros((md.mesh.numberofvertices))
     37md.initialization.epl_thickness = np.ones((md.mesh.numberofvertices))
     38md.hydrology.spcepl_head = np.nan * np.ones((md.mesh.numberofvertices))
     39md.hydrology.mask_eplactive_node = np.zeros((md.mesh.numberofvertices))
     40md.hydrology.epl_conductivity = 30
     41md.hydrology.epl_initial_thickness = 1
     42md.hydrology.epl_colapse_thickness = 1.0e-3
     43md.hydrology.epl_thick_comp = 1
     44md.hydrology.epl_max_thickness = 1
     45md.hydrology.steps_per_step = 10
     46md.timestepping.time_step = 2.0
     47md.timestepping.final_time = 2.0
    4848
    49 #md.debug.valgrind=True
    50 md=solve(md,'Transient')
     49#md.debug.valgrind = True
     50md = solve(md, 'Transient')
    5151
    5252#re-run with no substeps
    53 mdfine=copy.deepcopy(md)
    54 mdfine.result=[]
    55 mdfine.hydrology.steps_per_step=1
    56 mdfine.timestepping.time_step=0.2
    57 mdfine=solve(mdfine,'Transient')
     53mdfine = copy.deepcopy(md)
     54mdfine.result = []
     55mdfine.hydrology.steps_per_step = 1
     56mdfine.timestepping.time_step = 0.2
     57mdfine = solve(mdfine, 'Transient')
    5858
    5959
    60 sedmean=mdfine.results.TransientSolution[0].SedimentHeadHydrostep
    61 eplmean=mdfine.results.TransientSolution[0].EplHeadHydrostep
    62 for i in range(1,10):
    63         sedmean=sedmean+(mdfine.results.TransientSolution[i].SedimentHeadHydrostep)
    64         eplmean=eplmean+(mdfine.results.TransientSolution[i].EplHeadHydrostep)
     60sedmean = mdfine.results.TransientSolution[0].SedimentHeadHydrostep
     61eplmean = mdfine.results.TransientSolution[0].EplHeadHydrostep
     62for i in range(1, 10):
     63    sedmean = sedmean + (mdfine.results.TransientSolution[i].SedimentHeadHydrostep)
     64    eplmean = eplmean + (mdfine.results.TransientSolution[i].EplHeadHydrostep)
    6565
    66 field_names=['SedimentWaterHead1','EplWaterHead1','SedimentHeadResidual1',
    67                                                  'SedimentWaterHead4','EplWaterHead4','SedimentHeadResidual4',
    68                                                  'SedimentWaterHead5','EplWaterHead5','SedimentHeadResidual5',
    69                                                  'SedimentWaterHead9','EplWaterHead9','SedimentHeadResidual9',
    70                                                 'EplWaterHead10']
    71 field_tolerances=[1e-13, 1e-13, 1e-13,
    72                                                                         1e-13, 1e-13, 1e-13,
    73                                                                         1e-13, 5e-12, 1e-11,
    74                                                                         1e-13, 5e-12, 1e-11,
    75                                                                         1e-13]
    76 field_values=[mdfine.results.TransientSolution[0].SedimentHeadHydrostep,
    77                                                         mdfine.results.TransientSolution[0].EplHeadHydrostep,
    78                                                         mdfine.results.TransientSolution[0].SedimentHeadResidual,
    79                                                         mdfine.results.TransientSolution[3].SedimentHeadHydrostep,
    80                                                         mdfine.results.TransientSolution[3].EplHeadHydrostep,
    81                                                         mdfine.results.TransientSolution[3].SedimentHeadResidual,
    82                                                         mdfine.results.TransientSolution[4].SedimentHeadHydrostep,
    83                                                         mdfine.results.TransientSolution[4].EplHeadHydrostep,
    84                                                         mdfine.results.TransientSolution[4].SedimentHeadResidual,
    85                                                         mdfine.results.TransientSolution[8].SedimentHeadHydrostep,
    86                                                         mdfine.results.TransientSolution[8].EplHeadHydrostep,
    87                                                         mdfine.results.TransientSolution[8].SedimentHeadResidual,
    88                                                         md.results.TransientSolution[-1].EplHead]
     66field_names = ['SedimentWaterHead1', 'EplWaterHead1', 'SedimentHeadResidual1',
     67               'SedimentWaterHead4', 'EplWaterHead4', 'SedimentHeadResidual4',
     68               'SedimentWaterHead5', 'EplWaterHead5', 'SedimentHeadResidual5',
     69               'SedimentWaterHead9', 'EplWaterHead9', 'SedimentHeadResidual9',
     70              'EplWaterHead10']
     71field_tolerances = [1e-13, 1e-13, 1e-13,
     72                    1e-13, 1e-13, 1e-13,
     73                    1e-13, 5e-12, 1e-11,
     74                    1e-13, 5e-12, 1e-11,
     75                    1e-13]
     76field_values = [mdfine.results.TransientSolution[0].SedimentHeadHydrostep,
     77                mdfine.results.TransientSolution[0].EplHeadHydrostep,
     78                mdfine.results.TransientSolution[0].SedimentHeadResidual,
     79                mdfine.results.TransientSolution[3].SedimentHeadHydrostep,
     80                mdfine.results.TransientSolution[3].EplHeadHydrostep,
     81                mdfine.results.TransientSolution[3].SedimentHeadResidual,
     82                mdfine.results.TransientSolution[4].SedimentHeadHydrostep,
     83                mdfine.results.TransientSolution[4].EplHeadHydrostep,
     84                mdfine.results.TransientSolution[4].SedimentHeadResidual,
     85                mdfine.results.TransientSolution[8].SedimentHeadHydrostep,
     86                mdfine.results.TransientSolution[8].EplHeadHydrostep,
     87                mdfine.results.TransientSolution[8].SedimentHeadResidual,
     88                md.results.TransientSolution[-1].EplHead]
  • issm/trunk-jpl/test/NightlyRun/test334.py

    r22900 r23793  
    1313from generic import generic
    1414
    15 md=triangle(model(),'../Exp/Square.exp',100000.)
    16 md=setmask(md,'','')
    17 md=parameterize(md,'../Par/IceCube.py')
    18 md.transient=transient.setallnullparameters(md.transient)
    19 md.transient.ishydrology=True
    20 md=setflowequation(md,'SSA','all')
    21 md.cluster=generic('name',gethostname(),'np',1)
    22 md.hydrology=hydrologydc()
    23 md.hydrology=md.hydrology.initialize(md)
     15md = triangle(model(), '../Exp/Square.exp', 100000.)
     16md = setmask(md, '', '')
     17md = parameterize(md, '../Par/IceCube.py')
     18md.transient = transient.setallnullparameters(md.transient)
     19md.transient.ishydrology = True
     20md = setflowequation(md, 'SSA', 'all')
     21md.cluster = generic('name', gethostname(), 'np', 1)
     22md.hydrology = hydrologydc()
     23md.hydrology = md.hydrology.initialize(md)
    2424
    25 md.hydrology.isefficientlayer=0
    26 md.hydrology.sedimentlimit_flag=1
    27 md.hydrology.sedimentlimit=8000.0
    28 md.hydrology.mask_thawed_node=np.ones((md.mesh.numberofvertices))
    29 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
    30 md.hydrology.spcsediment_head=np.nan*np.ones((md.mesh.numberofvertices))
    31 md.hydrology.spcsediment_head[np.where(md.mesh.y==0)]=0.0
     25md.hydrology.isefficientlayer = 0
     26md.hydrology.sedimentlimit_flag = 1
     27md.hydrology.sedimentlimit = 8000.0
     28md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
     29md.initialization.sediment_head = np.zeros((md.mesh.numberofvertices))
     30md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
     31md.hydrology.spcsediment_head[np.where(md.mesh.y == 0)] = 0.0
    3232
    33 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
    34 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices))
    35 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices))
     33md.basalforcings.groundedice_melting_rate = 2.0 * np.ones((md.mesh.numberofvertices))
     34md.basalforcings.floatingice_melting_rate = 0.0 * np.ones((md.mesh.numberofvertices))
     35md.hydrology.sediment_transmitivity = 3.0 * np.ones((md.mesh.numberofvertices))
    3636
    37 md.timestepping.time_step=0
    38 md.timestepping.final_time=1.0
    39 md.extrude(3,1.)
    40 md=solve(md,'Hydrology')
     37md.timestepping.time_step = 0
     38md.timestepping.final_time = 1.0
     39md.extrude(3, 1.)
     40md = solve(md, 'Hydrology')
    4141
    4242#Fields and tolerances to track changes
     
    4444#only if no limits are applied
    4545#analitic=(md.mesh.y.^2-2*md.mesh.y*1.0e6)*(-2.0/(2*md.constants.yts*md.hydrology.sediment_transmitivity))
    46 field_names     =['SedimentWaterHead','SedimentHeadResidual']
    47 field_tolerances=[1e-13, 3e-10]
    48 field_values=[md.results.HydrologySolution.SedimentHeadHydrostep,
    49                                                         md.results.HydrologySolution.SedimentHeadResidual]
     46field_names = ['SedimentWaterHead', 'SedimentHeadResidual']
     47field_tolerances = [1e-13, 3e-10]
     48field_values = [md.results.HydrologySolution.SedimentHeadHydrostep, md.results.HydrologySolution.SedimentHeadResidual]
  • issm/trunk-jpl/test/NightlyRun/test335.py

    r22900 r23793  
    1313from generic import generic
    1414
    15 md=triangle(model(),'../Exp/Square.exp',100000.)
    16 md=setmask(md,'','')
    17 md=parameterize(md,'../Par/IceCube.py')
    18 md.transient=transient.setallnullparameters(md.transient)
    19 md.transient.ishydrology=True
    20 md.transient.issmb=True
    21 md=setflowequation(md,'SSA','all')
    22 md.cluster=generic('name',gethostname(),'np',1)
    23 md.hydrology=hydrologydc()
    24 md.hydrology=md.hydrology.initialize(md)
     15md = triangle(model(), '../Exp/Square.exp', 100000.)
     16md = setmask(md, '', '')
     17md = parameterize(md, '../Par/IceCube.py')
     18md.transient = transient.setallnullparameters(md.transient)
     19md.transient.ishydrology = True
     20md.transient.issmb = True
     21md = setflowequation(md, 'SSA', 'all')
     22md.cluster = generic('name', gethostname(), 'np', 1)
     23md.hydrology = hydrologydc()
     24md.hydrology = md.hydrology.initialize(md)
    2525
    26 md.hydrology.isefficientlayer=1
    27 md.hydrology.sedimentlimit_flag=1
    28 md.hydrology.sedimentlimit=800.0
    29 md.hydrology.mask_thawed_node=np.ones((md.mesh.numberofvertices))
    30 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
    31 md.hydrology.spcsediment_head=np.nan*np.ones((md.mesh.numberofvertices))
    32 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
     26md.hydrology.isefficientlayer = 1
     27md.hydrology.sedimentlimit_flag = 1
     28md.hydrology.sedimentlimit = 800.0
     29md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
     30md.initialization.sediment_head = np.zeros((md.mesh.numberofvertices))
     31md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices))
     32md.basalforcings.groundedice_melting_rate = 2.0 * np.ones((md.mesh.numberofvertices))
    3333md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices))
    34 md.hydrology.sediment_transmitivity=3*np.ones((md.mesh.numberofvertices))
     34md.hydrology.sediment_transmitivity = 3 * np.ones((md.mesh.numberofvertices))
    3535
    36 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices))
    37 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices))
    38 md.hydrology.spcepl_head=np.nan*np.ones((md.mesh.numberofvertices))
    39 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices))
    40 md.hydrology.epl_conductivity=30
    41 md.hydrology.epl_initial_thickness=1
    42 md.hydrology.epl_colapse_thickness=1.0e-3
    43 md.hydrology.epl_thick_comp=1
    44 md.hydrology.epl_max_thickness=1
    45 md.timestepping.time_step=0.2
    46 md.timestepping.final_time=2.0
     36md.initialization.epl_head = np.zeros((md.mesh.numberofvertices))
     37md.initialization.epl_thickness = np.ones((md.mesh.numberofvertices))
     38md.hydrology.spcepl_head = np.nan * np.ones((md.mesh.numberofvertices))
     39md.hydrology.mask_eplactive_node = np.zeros((md.mesh.numberofvertices))
     40md.hydrology.epl_conductivity = 30
     41md.hydrology.epl_initial_thickness = 1
     42md.hydrology.epl_colapse_thickness = 1.0e-3
     43md.hydrology.epl_thick_comp = 1
     44md.hydrology.epl_max_thickness = 1
     45md.timestepping.time_step = 0.2
     46md.timestepping.final_time = 2.0
    4747
    48 md.extrude(3,1.)
    49 md=solve(md,'Transient')
     48md.extrude(3, 1.)
     49md = solve(md, 'Transient')
    5050
    5151#Fields and tolerances to track changes
    52 field_names=['SedimentWaterHead1','EplWaterHead1','SedimentHeadResidual1',
    53                                                  'SedimentWaterHead4','EplWaterHead4','SedimentHeadResidual4',
    54                                                  'SedimentWaterHead5','EplWaterHead5','SedimentHeadResidual5',
    55                                                  'SedimentWaterHead9','EplWaterHead9','SedimentHeadResidual9']
    56 field_tolerances=[1e-13, 1e-13, 1e-13,
    57                                                                         1e-13, 1e-13, 1e-13,
    58                                                                         1e-13, 5e-12, 2e-11,
    59                                                                         1e-13, 5e-12, 2e-11]
    60 field_values=[md.results.TransientSolution[0].SedimentHeadHydrostep,
    61                                                         md.results.TransientSolution[0].EplHeadHydrostep,
    62                                                         md.results.TransientSolution[0].SedimentHeadResidual,
    63                                                         md.results.TransientSolution[3].SedimentHeadHydrostep,
    64                                                         md.results.TransientSolution[3].EplHeadHydrostep,
    65                                                         md.results.TransientSolution[3].SedimentHeadResidual,
    66                                                         md.results.TransientSolution[4].SedimentHeadHydrostep,
    67                                                         md.results.TransientSolution[4].EplHeadHydrostep,
    68                                                         md.results.TransientSolution[4].SedimentHeadResidual,
    69                                                         md.results.TransientSolution[8].SedimentHeadHydrostep,
    70                                                         md.results.TransientSolution[8].EplHeadHydrostep,
    71                                                         md.results.TransientSolution[8].SedimentHeadResidual]
     52field_names = ['SedimentWaterHead1', 'EplWaterHead1', 'SedimentHeadResidual1',
     53               'SedimentWaterHead4', 'EplWaterHead4', 'SedimentHeadResidual4',
     54               'SedimentWaterHead5', 'EplWaterHead5', 'SedimentHeadResidual5',
     55               'SedimentWaterHead9', 'EplWaterHead9', 'SedimentHeadResidual9']
     56field_tolerances = [1e-13, 1e-13, 1e-13,
     57                    1e-13, 1e-13, 1e-13,
     58                    1e-13, 5e-12, 2e-11,
     59                    1e-13, 5e-12, 2e-11]
     60field_values = [md.results.TransientSolution[0].SedimentHeadHydrostep,
     61                md.results.TransientSolution[0].EplHeadHydrostep,
     62                md.results.TransientSolution[0].SedimentHeadResidual,
     63                md.results.TransientSolution[3].SedimentHeadHydrostep,
     64                md.results.TransientSolution[3].EplHeadHydrostep,
     65                md.results.TransientSolution[3].SedimentHeadResidual,
     66                md.results.TransientSolution[4].SedimentHeadHydrostep,
     67                md.results.TransientSolution[4].EplHeadHydrostep,
     68                md.results.TransientSolution[4].SedimentHeadResidual,
     69                md.results.TransientSolution[8].SedimentHeadHydrostep,
     70                md.results.TransientSolution[8].EplHeadHydrostep,
     71                md.results.TransientSolution[8].SedimentHeadResidual]
  • issm/trunk-jpl/test/NightlyRun/test336.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 md.timestepping.time_step=1.
    19 md.settings.output_frequency=1
    20 md.timestepping.final_time=4.
     18md.timestepping.time_step = 1.
     19md.settings.output_frequency = 1
     20md.timestepping.final_time = 4.
    2121
    2222#Set up transient
    23 smb=np.ones((md.mesh.numberofvertices))*3.6
    24 smb=np.vstack((smb,smb*-1.)).T
     23smb = np.ones((md.mesh.numberofvertices)) * 3.6
     24smb = np.vstack((smb, smb * -1.)).T
    2525
    26 md.smb=SMBcomponents()
    27 md.smb.accumulation=np.vstack((smb*2, [1.5,3.]))
    28 md.smb.runoff=np.vstack((smb/2, [1.5,3.]))
    29 md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
    30 md.transient.isthermal=False
     26md.smb = SMBcomponents()
     27md.smb.accumulation = np.vstack((smb * 2, [1.5, 3.]))
     28md.smb.runoff = np.vstack((smb / 2, [1.5, 3.]))
     29md.smb.evaporation = np.vstack((smb / 2, [1.5, 3.]))
     30md.transient.isthermal = False
    3131
    32 md=solve(md,'Transient')
     32md = solve(md, 'Transient')
    3333
    3434#Fields and tolerances to track changes
    35 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    36                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    37                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    38                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    39 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    40                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    41                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    42                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    43 field_values=[md.results.TransientSolution[0].Vx,
    44                                                         md.results.TransientSolution[0].Vy,
    45                                                         md.results.TransientSolution[0].Vel,
    46                                                         md.results.TransientSolution[0].Pressure,
    47                                                         md.results.TransientSolution[0].Base,
    48                                                         md.results.TransientSolution[0].Surface,
    49                                                         md.results.TransientSolution[0].Thickness,
    50                                                         md.results.TransientSolution[0].SmbMassBalance,
    51                                                         md.results.TransientSolution[1].Vx,
    52                                                         md.results.TransientSolution[1].Vy,
    53                                                         md.results.TransientSolution[1].Vel,
    54                                                         md.results.TransientSolution[1].Pressure,
    55                                                         md.results.TransientSolution[1].Base,
    56                                                         md.results.TransientSolution[1].Surface,
    57                                                         md.results.TransientSolution[1].Thickness,
    58                                                         md.results.TransientSolution[1].SmbMassBalance,
    59                                                         md.results.TransientSolution[2].Vx,
    60                                                         md.results.TransientSolution[2].Vy,
    61                                                         md.results.TransientSolution[2].Vel,
    62                                                         md.results.TransientSolution[2].Pressure,
    63                                                         md.results.TransientSolution[2].Base,
    64                                                         md.results.TransientSolution[2].Surface,
    65                                                         md.results.TransientSolution[2].Thickness,
    66                                                         md.results.TransientSolution[2].SmbMassBalance,
    67                                                         md.results.TransientSolution[3].Vx,
    68                                                         md.results.TransientSolution[3].Vy,
    69                                                         md.results.TransientSolution[3].Vel,
    70                                                         md.results.TransientSolution[3].Pressure,
    71                                                         md.results.TransientSolution[3].Base,
    72                                                         md.results.TransientSolution[3].Surface,
    73                                                         md.results.TransientSolution[3].Thickness,
    74                                                         md.results.TransientSolution[3].SmbMassBalance]
     35field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     36               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     37               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     38               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     39field_tolerances = [1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     40                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     41                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     42                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     43field_values = [md.results.TransientSolution[0].Vx,
     44                md.results.TransientSolution[0].Vy,
     45                md.results.TransientSolution[0].Vel,
     46                md.results.TransientSolution[0].Pressure,
     47                md.results.TransientSolution[0].Base,
     48                md.results.TransientSolution[0].Surface,
     49                md.results.TransientSolution[0].Thickness,
     50                md.results.TransientSolution[0].SmbMassBalance,
     51                md.results.TransientSolution[1].Vx,
     52                md.results.TransientSolution[1].Vy,
     53                md.results.TransientSolution[1].Vel,
     54                md.results.TransientSolution[1].Pressure,
     55                md.results.TransientSolution[1].Base,
     56                md.results.TransientSolution[1].Surface,
     57                md.results.TransientSolution[1].Thickness,
     58                md.results.TransientSolution[1].SmbMassBalance,
     59                md.results.TransientSolution[2].Vx,
     60                md.results.TransientSolution[2].Vy,
     61                md.results.TransientSolution[2].Vel,
     62                md.results.TransientSolution[2].Pressure,
     63                md.results.TransientSolution[2].Base,
     64                md.results.TransientSolution[2].Surface,
     65                md.results.TransientSolution[2].Thickness,
     66                md.results.TransientSolution[2].SmbMassBalance,
     67                md.results.TransientSolution[3].Vx,
     68                md.results.TransientSolution[3].Vy,
     69                md.results.TransientSolution[3].Vel,
     70                md.results.TransientSolution[3].Pressure,
     71                md.results.TransientSolution[3].Base,
     72                md.results.TransientSolution[3].Surface,
     73                md.results.TransientSolution[3].Thickness,
     74                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test337.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.timestepping.time_step=1.
    20 md.settings.output_frequency=1
    21 md.timestepping.final_time=4.
     19md.timestepping.time_step = 1.
     20md.settings.output_frequency = 1
     21md.timestepping.final_time = 4.
    2222
    2323#Set up transient
    24 smb=np.ones((md.mesh.numberofvertices))*3.6
    25 smb=np.vstack((smb,smb*-1.)).T
     24smb = np.ones((md.mesh.numberofvertices)) * 3.6
     25smb = np.vstack((smb, smb * -1.)).T
    2626
    27 md.smb=SMBcomponents()
    28 md.smb.accumulation=np.vstack((smb*2, [1.5,3.]))
    29 md.smb.runoff=np.vstack((smb/2, [1.5,3.]))
    30 md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
    31 md.transient.isthermal=False
     27md.smb = SMBcomponents()
     28md.smb.accumulation = np.vstack((smb * 2, [1.5, 3.]))
     29md.smb.runoff = np.vstack((smb / 2, [1.5, 3.]))
     30md.smb.evaporation = np.vstack((smb / 2, [1.5, 3.]))
     31md.transient.isthermal = False
    3232
    33 md=solve(md,'Transient')
     33md = solve(md, 'Transient')
    3434
    3535#Fields and tolerances to track changes
    36 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    37                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    38                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    39                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    40 field_tolerances=[5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
    41                                                                         5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
    42                                                                         5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
    43                                                                         5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
    44 field_values=[md.results.TransientSolution[0].Vx,
    45                                                         md.results.TransientSolution[0].Vy,
    46                                                         md.results.TransientSolution[0].Vel,
    47                                                         md.results.TransientSolution[0].Pressure,
    48                                                         md.results.TransientSolution[0].Base,
    49                                                         md.results.TransientSolution[0].Surface,
    50                                                         md.results.TransientSolution[0].Thickness,
    51                                                         md.results.TransientSolution[0].SmbMassBalance,
    52                                                         md.results.TransientSolution[1].Vx,
    53                                                         md.results.TransientSolution[1].Vy,
    54                                                         md.results.TransientSolution[1].Vel,
    55                                                         md.results.TransientSolution[1].Pressure,
    56                                                         md.results.TransientSolution[1].Base,
    57                                                         md.results.TransientSolution[1].Surface,
    58                                                         md.results.TransientSolution[1].Thickness,
    59                                                         md.results.TransientSolution[1].SmbMassBalance,
    60                                                         md.results.TransientSolution[2].Vx,
    61                                                         md.results.TransientSolution[2].Vy,
    62                                                         md.results.TransientSolution[2].Vel,
    63                                                         md.results.TransientSolution[2].Pressure,
    64                                                         md.results.TransientSolution[2].Base,
    65                                                         md.results.TransientSolution[2].Surface,
    66                                                         md.results.TransientSolution[2].Thickness,
    67                                                         md.results.TransientSolution[2].SmbMassBalance,
    68                                                         md.results.TransientSolution[3].Vx,
    69                                                         md.results.TransientSolution[3].Vy,
    70                                                         md.results.TransientSolution[3].Vel,
    71                                                         md.results.TransientSolution[3].Pressure,
    72                                                         md.results.TransientSolution[3].Base,
    73                                                         md.results.TransientSolution[3].Surface,
    74                                                         md.results.TransientSolution[3].Thickness,
    75                                                         md.results.TransientSolution[3].SmbMassBalance]
     36field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     37               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     38               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     39               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     40field_tolerances = [5e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     41                    5e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     42                    5e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     43                    5e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     44field_values = [md.results.TransientSolution[0].Vx,
     45                md.results.TransientSolution[0].Vy,
     46                md.results.TransientSolution[0].Vel,
     47                md.results.TransientSolution[0].Pressure,
     48                md.results.TransientSolution[0].Base,
     49                md.results.TransientSolution[0].Surface,
     50                md.results.TransientSolution[0].Thickness,
     51                md.results.TransientSolution[0].SmbMassBalance,
     52                md.results.TransientSolution[1].Vx,
     53                md.results.TransientSolution[1].Vy,
     54                md.results.TransientSolution[1].Vel,
     55                md.results.TransientSolution[1].Pressure,
     56                md.results.TransientSolution[1].Base,
     57                md.results.TransientSolution[1].Surface,
     58                md.results.TransientSolution[1].Thickness,
     59                md.results.TransientSolution[1].SmbMassBalance,
     60                md.results.TransientSolution[2].Vx,
     61                md.results.TransientSolution[2].Vy,
     62                md.results.TransientSolution[2].Vel,
     63                md.results.TransientSolution[2].Pressure,
     64                md.results.TransientSolution[2].Base,
     65                md.results.TransientSolution[2].Surface,
     66                md.results.TransientSolution[2].Thickness,
     67                md.results.TransientSolution[2].SmbMassBalance,
     68                md.results.TransientSolution[3].Vx,
     69                md.results.TransientSolution[3].Vy,
     70                md.results.TransientSolution[3].Vel,
     71                md.results.TransientSolution[3].Pressure,
     72                md.results.TransientSolution[3].Base,
     73                md.results.TransientSolution[3].Surface,
     74                md.results.TransientSolution[3].Thickness,
     75                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test338.py

    r21408 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    18 md.timestepping.time_step=1.
    19 md.settings.output_frequency=1
    20 md.timestepping.final_time=400.
     18md.timestepping.time_step = 1.
     19md.settings.output_frequency = 1
     20md.timestepping.final_time = 400.
    2121
    2222#Set up transient
    23 smb=np.ones((md.mesh.numberofvertices))*3.6
    24 smb=np.vstack((smb,smb*-1.)).T
     23smb = np.ones((md.mesh.numberofvertices)) * 3.6
     24smb = np.vstack((smb, smb * -1.)).T
    2525
    26 md.smb=SMBmeltcomponents()
    27 md.smb.accumulation=np.vstack((smb, [1.5,3.]))
    28 md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
    29 md.smb.melt=np.vstack((smb/2, [1.5,3.]))
    30 md.smb.refreeze=np.vstack((smb, [1.5,3.]))
    31 md.transient.isthermal=False
     26md.smb = SMBmeltcomponents()
     27md.smb.accumulation = np.vstack((smb, [1.5, 3.]))
     28md.smb.evaporation = np.vstack((smb / 2, [1.5, 3.]))
     29md.smb.melt = np.vstack((smb / 2, [1.5, 3.]))
     30md.smb.refreeze = np.vstack((smb, [1.5, 3.]))
     31md.transient.isthermal = False
    3232
    33 md=solve(md,'Transient')
     33md = solve(md, 'Transient')
    3434
    3535#Fields and tolerances to track changes
    36 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    37                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    38                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    39                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    40 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    41                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    42                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    43                                                                         1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    44 field_values=[md.results.TransientSolution[0].Vx,
    45                                                         md.results.TransientSolution[0].Vy,
    46                                                         md.results.TransientSolution[0].Vel,
    47                                                         md.results.TransientSolution[0].Pressure,
    48                                                         md.results.TransientSolution[0].Base,
    49                                                         md.results.TransientSolution[0].Surface,
    50                                                         md.results.TransientSolution[0].Thickness,
    51                                                         md.results.TransientSolution[0].SmbMassBalance,
    52                                                         md.results.TransientSolution[1].Vx,
    53                                                         md.results.TransientSolution[1].Vy,
    54                                                         md.results.TransientSolution[1].Vel,
    55                                                         md.results.TransientSolution[1].Pressure,
    56                                                         md.results.TransientSolution[1].Base,
    57                                                         md.results.TransientSolution[1].Surface,
    58                                                         md.results.TransientSolution[1].Thickness,
    59                                                         md.results.TransientSolution[1].SmbMassBalance,
    60                                                         md.results.TransientSolution[2].Vx,
    61                                                         md.results.TransientSolution[2].Vy,
    62                                                         md.results.TransientSolution[2].Vel,
    63                                                         md.results.TransientSolution[2].Pressure,
    64                                                         md.results.TransientSolution[2].Base,
    65                                                         md.results.TransientSolution[2].Surface,
    66                                                         md.results.TransientSolution[2].Thickness,
    67                                                         md.results.TransientSolution[2].SmbMassBalance,
    68                                                         md.results.TransientSolution[3].Vx,
    69                                                         md.results.TransientSolution[3].Vy,
    70                                                         md.results.TransientSolution[3].Vel,
    71                                                         md.results.TransientSolution[3].Pressure,
    72                                                         md.results.TransientSolution[3].Base,
    73                                                         md.results.TransientSolution[3].Surface,
    74                                                         md.results.TransientSolution[3].Thickness,
    75                                                         md.results.TransientSolution[3].SmbMassBalance]
     36field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     37               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     38               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     39               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     40field_tolerances = [1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     41                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     42                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     43                    1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     44field_values = [md.results.TransientSolution[0].Vx,
     45                md.results.TransientSolution[0].Vy,
     46                md.results.TransientSolution[0].Vel,
     47                md.results.TransientSolution[0].Pressure,
     48                md.results.TransientSolution[0].Base,
     49                md.results.TransientSolution[0].Surface,
     50                md.results.TransientSolution[0].Thickness,
     51                md.results.TransientSolution[0].SmbMassBalance,
     52                md.results.TransientSolution[1].Vx,
     53                md.results.TransientSolution[1].Vy,
     54                md.results.TransientSolution[1].Vel,
     55                md.results.TransientSolution[1].Pressure,
     56                md.results.TransientSolution[1].Base,
     57                md.results.TransientSolution[1].Surface,
     58                md.results.TransientSolution[1].Thickness,
     59                md.results.TransientSolution[1].SmbMassBalance,
     60                md.results.TransientSolution[2].Vx,
     61                md.results.TransientSolution[2].Vy,
     62                md.results.TransientSolution[2].Vel,
     63                md.results.TransientSolution[2].Pressure,
     64                md.results.TransientSolution[2].Base,
     65                md.results.TransientSolution[2].Surface,
     66                md.results.TransientSolution[2].Thickness,
     67                md.results.TransientSolution[2].SmbMassBalance,
     68                md.results.TransientSolution[3].Vx,
     69                md.results.TransientSolution[3].Vy,
     70                md.results.TransientSolution[3].Vel,
     71                md.results.TransientSolution[3].Pressure,
     72                md.results.TransientSolution[3].Base,
     73                md.results.TransientSolution[3].Surface,
     74                md.results.TransientSolution[3].Thickness,
     75                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test339.py

    r22572 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
    1818
    19 md.timestepping.time_step=1.
    20 md.settings.output_frequency=1
    21 md.timestepping.final_time=4.
     19md.timestepping.time_step = 1.
     20md.settings.output_frequency = 1
     21md.timestepping.final_time = 4.
    2222
    2323#Set up transient
    24 smb=np.ones((md.mesh.numberofvertices))*3.6
    25 smb=np.vstack((smb,smb*-1.)).T
     24smb = np.ones((md.mesh.numberofvertices)) * 3.6
     25smb = np.vstack((smb, smb * - 1.)).T
    2626
    27 md.smb=SMBmeltcomponents()
    28 md.smb.accumulation=np.vstack((smb, [1.5,3.]))
    29 md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
    30 md.smb.melt=np.vstack((smb/2, [1.5,3.]))
    31 md.smb.refreeze=np.vstack((smb, [1.5,3.]))
    32 md.transient.isthermal=False
     27md.smb = SMBmeltcomponents()
     28md.smb.accumulation = np.vstack((smb, [1.5, 3.]))
     29md.smb.evaporation = np.vstack((smb / 2, [1.5, 3.]))
     30md.smb.melt = np.vstack((smb / 2, [1.5, 3.]))
     31md.smb.refreeze = np.vstack((smb, [1.5, 3.]))
     32md.transient.isthermal = False
    3333
    34 md=solve(md,'Transient')
     34md = solve(md, 'Transient')
    3535
    3636#Fields and tolerances to track changes
    37 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
    38                                                  'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
    39                                                  'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
    40                                                  'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
    41 field_tolerances=[2e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
    42                                                                         2e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
    43                                                                         1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
    44                                                                         1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
    45 field_values=[md.results.TransientSolution[0].Vx,
    46                                                         md.results.TransientSolution[0].Vy,
    47                                                         md.results.TransientSolution[0].Vel,
    48                                                         md.results.TransientSolution[0].Pressure,
    49                                                         md.results.TransientSolution[0].Base,
    50                                                         md.results.TransientSolution[0].Surface,
    51                                                         md.results.TransientSolution[0].Thickness,
    52                                                         md.results.TransientSolution[0].SmbMassBalance,
    53                                                         md.results.TransientSolution[1].Vx,
    54                                                         md.results.TransientSolution[1].Vy,
    55                                                         md.results.TransientSolution[1].Vel,
    56                                                         md.results.TransientSolution[1].Pressure,
    57                                                         md.results.TransientSolution[1].Base,
    58                                                         md.results.TransientSolution[1].Surface,
    59                                                         md.results.TransientSolution[1].Thickness,
    60                                                         md.results.TransientSolution[1].SmbMassBalance,
    61                                                         md.results.TransientSolution[2].Vx,
    62                                                         md.results.TransientSolution[2].Vy,
    63                                                         md.results.TransientSolution[2].Vel,
    64                                                         md.results.TransientSolution[2].Pressure,
    65                                                         md.results.TransientSolution[2].Base,
    66                                                         md.results.TransientSolution[2].Surface,
    67                                                         md.results.TransientSolution[2].Thickness,
    68                                                         md.results.TransientSolution[2].SmbMassBalance,
    69                                                         md.results.TransientSolution[3].Vx,
    70                                                         md.results.TransientSolution[3].Vy,
    71                                                         md.results.TransientSolution[3].Vel,
    72                                                         md.results.TransientSolution[3].Pressure,
    73                                                         md.results.TransientSolution[3].Base,
    74                                                         md.results.TransientSolution[3].Surface,
    75                                                         md.results.TransientSolution[3].Thickness,
    76                                                         md.results.TransientSolution[3].SmbMassBalance]
     37field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'SmbMassBalance1',
     38               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'SmbMassBalance2',
     39               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'SmbMassBalance3',
     40               'Vx4', 'Vy4', 'Vel4', 'Pressure4', 'Bed4', 'Surface4', 'Thickness4', 'SmbMassBalance4']
     41field_tolerances = [2e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     42                    2e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     43                    1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     44                    1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     45field_values = [md.results.TransientSolution[0].Vx,
     46                md.results.TransientSolution[0].Vy,
     47                md.results.TransientSolution[0].Vel,
     48                md.results.TransientSolution[0].Pressure,
     49                md.results.TransientSolution[0].Base,
     50                md.results.TransientSolution[0].Surface,
     51                md.results.TransientSolution[0].Thickness,
     52                md.results.TransientSolution[0].SmbMassBalance,
     53                md.results.TransientSolution[1].Vx,
     54                md.results.TransientSolution[1].Vy,
     55                md.results.TransientSolution[1].Vel,
     56                md.results.TransientSolution[1].Pressure,
     57                md.results.TransientSolution[1].Base,
     58                md.results.TransientSolution[1].Surface,
     59                md.results.TransientSolution[1].Thickness,
     60                md.results.TransientSolution[1].SmbMassBalance,
     61                md.results.TransientSolution[2].Vx,
     62                md.results.TransientSolution[2].Vy,
     63                md.results.TransientSolution[2].Vel,
     64                md.results.TransientSolution[2].Pressure,
     65                md.results.TransientSolution[2].Base,
     66                md.results.TransientSolution[2].Surface,
     67                md.results.TransientSolution[2].Thickness,
     68                md.results.TransientSolution[2].SmbMassBalance,
     69                md.results.TransientSolution[3].Vx,
     70                md.results.TransientSolution[3].Vy,
     71                md.results.TransientSolution[3].Vel,
     72                md.results.TransientSolution[3].Pressure,
     73                md.results.TransientSolution[3].Base,
     74                md.results.TransientSolution[3].Surface,
     75                md.results.TransientSolution[3].Thickness,
     76                md.results.TransientSolution[3].SmbMassBalance]
  • issm/trunk-jpl/test/NightlyRun/test340.py

    r23785 r23793  
    1010from taoinversion import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',200000.)
    13 md = setmask(md,'','')
    14 md = parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md.extrude(3,1.)
    16 md = setflowequation(md,'HO','all')
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
    1717
    1818#control parameters
     
    2020md.inversion.iscontrol = 1
    2121md.inversion.control_parameters = ['FrictionCoefficient']
    22 md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
     22md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
    2424md.inversion.maxsteps = 2
    2525md.inversion.maxiter = 6
    26 md.inversion.cost_functions = [102,501]
    27 md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices,2))
    28 md.inversion.cost_functions_coefficients[:,1] = 2. * 1e-7
     26md.inversion.cost_functions = [102, 501]
     27md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     28md.inversion.cost_functions_coefficients[:, 1] = 2. * 1e-7
    2929md.inversion.vx_obs = md.initialization.vx
    3030md.inversion.vy_obs = md.initialization.vy
    3131
    32 md.cluster = generic('name',gethostname(),'np',3)
    33 md = solve(md,'Stressbalance')
     32md.cluster = generic('name', gethostname(), 'np', 3)
     33md = solve(md, 'Stressbalance')
    3434
    3535#Fields and tolerances to track changes
    36 field_names      = ['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    37 field_tolerances = [3e-08,1e-07,5e-10,1e-10,1e-09,1e-09,1e-09]
    38 field_values = [
    39         md.results.StressbalanceSolution.Gradient1,
    40         md.results.StressbalanceSolution.J,
    41         md.results.StressbalanceSolution.FrictionCoefficient,
    42         md.results.StressbalanceSolution.Pressure,
    43         md.results.StressbalanceSolution.Vel,
    44         md.results.StressbalanceSolution.Vx,
    45         md.results.StressbalanceSolution.Vy
    46 ]
     36field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     37field_tolerances = [3e-08, 1e-07, 5e-10, 1e-10, 1e-09, 1e-09, 1e-09]
     38field_values = [md.results.StressbalanceSolution.Gradient1,
     39                md.results.StressbalanceSolution.J,
     40                md.results.StressbalanceSolution.FrictionCoefficient,
     41                md.results.StressbalanceSolution.Pressure,
     42                md.results.StressbalanceSolution.Vel,
     43                md.results.StressbalanceSolution.Vx,
     44                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test341.py

    r23785 r23793  
    1111
    1212
    13 md=triangle(model(),'../Exp/Square.exp',200000.)
    14 md=setmask(md,'','')
    15 md=parameterize(md,'../Par/SquareSheetConstrained.py')
    16 md.extrude(3,1.)
    17 md=setflowequation(md,'HO','all')
     13md = triangle(model(), '../Exp/Square.exp', 200000.)
     14md = setmask(md, '', '')
     15md = parameterize(md, '../Par/SquareSheetConstrained.py')
     16md.extrude(3, 1.)
     17md = setflowequation(md, 'HO', 'all')
    1818
    1919#control parameters
    20 md.inversion=m1qn3inversion(md.inversion)
    21 md.inversion.iscontrol=1
    22 md.inversion.control_parameters=['FrictionCoefficient']
    23 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    24 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    25 md.inversion.maxsteps=2
    26 md.inversion.maxiter=6
    27 md.inversion.cost_functions=[102,501]
    28 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    29 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    30 md.inversion.vx_obs=md.initialization.vx
    31 md.inversion.vy_obs=md.initialization.vy
     20md.inversion = m1qn3inversion(md.inversion)
     21md.inversion.iscontrol = 1
     22md.inversion.control_parameters = ['FrictionCoefficient']
     23md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     24md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     25md.inversion.maxsteps = 2
     26md.inversion.maxiter = 6
     27md.inversion.cost_functions = [102, 501]
     28md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     29md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     30md.inversion.vx_obs = md.initialization.vx
     31md.inversion.vy_obs = md.initialization.vy
    3232
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Stressbalance')
    3535
    3636#Fields and tolerances to track changes
    37 field_names     =['Gradient','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    38 field_tolerances=[1e-08,1e-9,1e-10,1e-09,1e-09,1e-09]
    39 field_values=[\
    40         md.results.StressbalanceSolution.Gradient1,\
    41         md.results.StressbalanceSolution.FrictionCoefficient,\
    42         md.results.StressbalanceSolution.Pressure,\
    43         md.results.StressbalanceSolution.Vel,\
    44         md.results.StressbalanceSolution.Vx,\
    45         md.results.StressbalanceSolution.Vy,\
    46 ]
     37field_names = ['Gradient', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     38field_tolerances = [1e-08, 1e-9, 1e-10, 1e-09, 1e-09, 1e-09]
     39field_values = [md.results.StressbalanceSolution.Gradient1,
     40                md.results.StressbalanceSolution.FrictionCoefficient,
     41                md.results.StressbalanceSolution.Pressure,
     42                md.results.StressbalanceSolution.Vel,
     43                md.results.StressbalanceSolution.Vx,
     44                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test342.py

    r22267 r23793  
    1010from plumebasalforcings import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',180000.)
    13 md = setmask(md,'','')
    14 md = parameterize(md,'../Par/SquareSheetConstrained.py')
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
    1515md.basalforcings = plumebasalforcings()
    1616md.basalforcings = md.basalforcings.setdefaultparameters()
     
    1919md.basalforcings.plumex = 500000
    2020md.basalforcings.plumey = 500000
    21 md.extrude(3,1.)
    22 md = setflowequation(md,'SSA','all')
     21md.extrude(3, 1.)
     22md = setflowequation(md, 'SSA', 'all')
    2323md.timestepping.time_step = 0.
    24 md.thermal.requested_outputs = ['default','BasalforcingsGeothermalflux']
    25 md.cluster = generic('name',gethostname(),'np',3)
    26 md = solve(md,'Thermal')
     24md.thermal.requested_outputs = ['default', 'BasalforcingsGeothermalflux']
     25md.cluster = generic('name', gethostname(), 'np', 3)
     26md = solve(md, 'Thermal')
    2727
    2828#Fields and tolerances to track changes
    29 field_names      = ['Temperature','BasalforcingsGroundediceMeltingRate','BasalforcingsGeothermalflux']
    30 field_tolerances = [1e-13,1e-8,1e-13]
    31 field_values = [
    32         md.results.ThermalSolution.Temperature,
    33         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,
    34         md.results.ThermalSolution.BasalforcingsGeothermalflux,
    35         ]
     29field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate', 'BasalforcingsGeothermalflux']
     30field_tolerances = [1e-13, 1e-8, 1e-13]
     31field_values = [md.results.ThermalSolution.Temperature,
     32                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,
     33                md.results.ThermalSolution.BasalforcingsGeothermalflux]
  • issm/trunk-jpl/test/NightlyRun/test343.py

    r22267 r23793  
    1010from SMBgradientsela import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'','')
    14 md = parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md = setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
    1616md.smb = SMBgradientsela()
    17 md.smb.ela = 1500. * np.ones((md.mesh.numberofvertices+1,))
    18 md.smb.b_pos = 0.002 * np.ones((md.mesh.numberofvertices+1,))
    19 md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices+1,))
    20 md.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,))
     17md.smb.ela = 1500. * np.ones((md.mesh.numberofvertices + 1,))
     18md.smb.b_pos = 0.002 * np.ones((md.mesh.numberofvertices + 1,))
     19md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices + 1,))
     20md.smb.b_max = 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
     
    2626
    2727#Transient options
    28 md.transient.requested_outputs = ['default','TotalSmb']
    29 md.cluster = generic('name',gethostname(),'np',3)
    30 md = solve(md,'Transient')
     28md.transient.requested_outputs = ['default', 'TotalSmb']
     29md.cluster = generic('name', gethostname(), 'np', 3)
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names     = [
    34         'Vx1','Vy1','Vel1','Bed1','Surface1','Thickness1','SMB1','TotalSmb1',
    35         'Vx2','Vy2','Vel2','Bed2','Surface2','Thickness2','SMB2','TotalSmb2',
    36         'Vx3','Vy3','Vel3','Bed3','Surface3','Thickness3','SMB3','TotalSmb3']
    37 field_tolerances = [
    38         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    39         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    40         1e-12,1e-12,1e-12,1e-13,1e-13,1e-13,1.5e-13,1e-13]
    41 field_values = [
    42         md.results.TransientSolution[0].Vx,
    43         md.results.TransientSolution[0].Vy,
    44         md.results.TransientSolution[0].Vel,
    45         md.results.TransientSolution[0].Base,
    46         md.results.TransientSolution[0].Surface,
    47         md.results.TransientSolution[0].Thickness,
    48         md.results.TransientSolution[0].SmbMassBalance,
    49         md.results.TransientSolution[0].TotalSmb,
    50         md.results.TransientSolution[1].Vx,
    51         md.results.TransientSolution[1].Vy,
    52         md.results.TransientSolution[1].Vel,
    53         md.results.TransientSolution[1].Base,
    54         md.results.TransientSolution[1].Surface,
    55         md.results.TransientSolution[1].Thickness,
    56         md.results.TransientSolution[1].TotalSmb,
    57         md.results.TransientSolution[1].SmbMassBalance,
    58         md.results.TransientSolution[2].Vx,
    59         md.results.TransientSolution[2].Vy,
    60         md.results.TransientSolution[2].Vel,
    61         md.results.TransientSolution[2].Base,
    62         md.results.TransientSolution[2].Surface,
    63         md.results.TransientSolution[2].Thickness,
    64         md.results.TransientSolution[2].SmbMassBalance,
    65         md.results.TransientSolution[2].TotalSmb
    66         ]
     33field_names = ['Vx1', 'Vy1', 'Vel1', 'Bed1', 'Surface1', 'Thickness1', 'SMB1', 'TotalSmb1',
     34               'Vx2', 'Vy2', 'Vel2', 'Bed2', 'Surface2', 'Thickness2', 'SMB2', 'TotalSmb2',
     35               'Vx3', 'Vy3', 'Vel3', 'Bed3', 'Surface3', 'Thickness3', 'SMB3', 'TotalSmb3']
     36field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     37                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     38                    1e-12, 1e-12, 1e-12, 1e-13, 1e-13, 1e-13, 1.5e-13, 1e-13]
     39field_values = [md.results.TransientSolution[0].Vx,
     40                md.results.TransientSolution[0].Vy,
     41                md.results.TransientSolution[0].Vel,
     42                md.results.TransientSolution[0].Base,
     43                md.results.TransientSolution[0].Surface,
     44                md.results.TransientSolution[0].Thickness,
     45                md.results.TransientSolution[0].SmbMassBalance,
     46                md.results.TransientSolution[0].TotalSmb,
     47                md.results.TransientSolution[1].Vx,
     48                md.results.TransientSolution[1].Vy,
     49                md.results.TransientSolution[1].Vel,
     50                md.results.TransientSolution[1].Base,
     51                md.results.TransientSolution[1].Surface,
     52                md.results.TransientSolution[1].Thickness,
     53                md.results.TransientSolution[1].TotalSmb,
     54                md.results.TransientSolution[1].SmbMassBalance,
     55                md.results.TransientSolution[2].Vx,
     56                md.results.TransientSolution[2].Vy,
     57                md.results.TransientSolution[2].Vel,
     58                md.results.TransientSolution[2].Base,
     59                md.results.TransientSolution[2].Surface,
     60                md.results.TransientSolution[2].Thickness,
     61                md.results.TransientSolution[2].SmbMassBalance,
     62                md.results.TransientSolution[2].TotalSmb]
  • issm/trunk-jpl/test/NightlyRun/test344.py

    r22267 r23793  
    1010from SMBgradientsela import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'','')
    14 md = parameterize(md,'../Par/SquareSheetConstrained.py')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
    1515
    1616#Change geometry
     
    1818md.geometry.surface = md.geometry.base + md.geometry.thickness
    1919
    20 md = md.extrude(3,1.)
    21 md = setflowequation(md,'HO','all')
     20md = md.extrude(3, 1.)
     21md = setflowequation(md, 'HO', 'all')
    2222md.smb = SMBgradientsela()
    23 md.smb.ela = 1500. * np.ones((md.mesh.numberofvertices+1,))
    24 md.smb.b_pos = 0.002 * np.ones((md.mesh.numberofvertices+1,))
    25 md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices+1,))
    26 md.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,))
     23md.smb.ela = 1500. * np.ones((md.mesh.numberofvertices + 1,))
     24md.smb.b_pos = 0.002 * np.ones((md.mesh.numberofvertices + 1,))
     25md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices + 1,))
     26md.smb.b_max = 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
    3030#Transient options
    31 md.transient.requested_outputs = ['default','TotalSmb']
    32 md.cluster = generic('name',gethostname(),'np',3)
    33 md = solve(md,'Transient')
     31md.transient.requested_outputs = ['default', 'TotalSmb']
     32md.cluster = generic('name', gethostname(), 'np', 3)
     33md = solve(md, 'Transient')
    3434
    3535#Fields and tolerances to track changes
    36 field_names     = ['Vx1','Vy1','Vz1','Vel1','Bed1','Surface1','Thickness1','Temperature1','SMB1','TotalSmb1',
    37  'Vx2','Vy2','Vz2','Vel2','Bed2','Surface2','Thickness2','Temperature2','SMB2','TotalSmb2',
    38  'Vx3','Vy3','Vz3','Vel3','Bed3','Surface3','Thickness3','Temperature3','SMB3','TotalSmb3']
    39 field_tolerances = [1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    40         1e-09,1e-09,1e-10,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
    41         1e-09,5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    42 field_values = [
    43         md.results.TransientSolution[0].Vx,
    44         md.results.TransientSolution[0].Vy,
    45         md.results.TransientSolution[0].Vz,
    46         md.results.TransientSolution[0].Vel,
    47         md.results.TransientSolution[0].Base,
    48         md.results.TransientSolution[0].Surface,
    49         md.results.TransientSolution[0].Thickness,
    50         md.results.TransientSolution[0].Temperature,
    51         md.results.TransientSolution[0].SmbMassBalance,
    52         md.results.TransientSolution[0].TotalSmb,
    53         md.results.TransientSolution[1].Vx,
    54         md.results.TransientSolution[1].Vy,
    55         md.results.TransientSolution[1].Vz,
    56         md.results.TransientSolution[1].Vel,
    57         md.results.TransientSolution[1].Base,
    58         md.results.TransientSolution[1].Surface,
    59         md.results.TransientSolution[1].Thickness,
    60         md.results.TransientSolution[1].Temperature,
    61         md.results.TransientSolution[1].SmbMassBalance,
    62         md.results.TransientSolution[1].TotalSmb,
    63         md.results.TransientSolution[2].Vx,
    64         md.results.TransientSolution[2].Vy,
    65         md.results.TransientSolution[2].Vz,
    66         md.results.TransientSolution[2].Vel,
    67         md.results.TransientSolution[2].Base,
    68         md.results.TransientSolution[2].Surface,
    69         md.results.TransientSolution[2].Thickness,
    70         md.results.TransientSolution[2].Temperature,
    71         md.results.TransientSolution[2].SmbMassBalance,
    72         md.results.TransientSolution[2].TotalSmb,
    73         ]
     36field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'SMB1', 'TotalSmb1',
     37               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'SMB2', 'TotalSmb2',
     38               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'SMB3', 'TotalSmb3']
     39field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     40                    1e-09, 1e-09, 1e-10, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
     41                    1e-09, 5e-09, 1e-09, 1e-09, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     42field_values = [md.results.TransientSolution[0].Vx,
     43                md.results.TransientSolution[0].Vy,
     44                md.results.TransientSolution[0].Vz,
     45                md.results.TransientSolution[0].Vel,
     46                md.results.TransientSolution[0].Base,
     47                md.results.TransientSolution[0].Surface,
     48                md.results.TransientSolution[0].Thickness,
     49                md.results.TransientSolution[0].Temperature,
     50                md.results.TransientSolution[0].SmbMassBalance,
     51                md.results.TransientSolution[0].TotalSmb,
     52                md.results.TransientSolution[1].Vx,
     53                md.results.TransientSolution[1].Vy,
     54                md.results.TransientSolution[1].Vz,
     55                md.results.TransientSolution[1].Vel,
     56                md.results.TransientSolution[1].Base,
     57                md.results.TransientSolution[1].Surface,
     58                md.results.TransientSolution[1].Thickness,
     59                md.results.TransientSolution[1].Temperature,
     60                md.results.TransientSolution[1].SmbMassBalance,
     61                md.results.TransientSolution[1].TotalSmb,
     62                md.results.TransientSolution[2].Vx,
     63                md.results.TransientSolution[2].Vy,
     64                md.results.TransientSolution[2].Vz,
     65                md.results.TransientSolution[2].Vel,
     66                md.results.TransientSolution[2].Base,
     67                md.results.TransientSolution[2].Surface,
     68                md.results.TransientSolution[2].Thickness,
     69                md.results.TransientSolution[2].Temperature,
     70                md.results.TransientSolution[2].SmbMassBalance,
     71                md.results.TransientSolution[2].TotalSmb]
  • issm/trunk-jpl/test/NightlyRun/test350.py

    r23024 r23793  
    1313from transient import *
    1414
    15 md = triangle(model(),'../Exp/Square.exp',50000.)
     15md = triangle(model(), '../Exp/Square.exp', 50000.)
    1616md.mesh.x = md.mesh.x / 1000
    1717md.mesh.y = md.mesh.y / 1000
    18 md = setmask(md,'','')
    19 md = parameterize(md,'../Par/SquareSheetConstrained.py')
     18md = setmask(md, '', '')
     19md = parameterize(md, '../Par/SquareSheetConstrained.py')
    2020md.transient = transient().deactivateall()
    2121md.transient.ishydrology = 1
    22 md = setflowequation(md,'SSA','all')
    23 md.cluster = generic('name',gethostname(),'np',2)
     22md = setflowequation(md, 'SSA', 'all')
     23md.cluster = generic('name', gethostname(), 'np', 2)
    2424
    2525#Use hydroogy coupled friciton law
     
    4141md.hydrology.bump_height = 0.05 * np.ones((md.mesh.numberofelements,))
    4242md.hydrology.englacial_input = 0.5 * np.ones((md.mesh.numberofvertices,))
    43 md.hydrology.reynolds= 1000. * np.ones((md.mesh.numberofelements,))
     43md.hydrology.reynolds = 1000. * np.ones((md.mesh.numberofelements,))
    4444md.hydrology.spchead = float('NaN') * np.ones((md.mesh.numberofvertices,))
    4545pos = np.intersect1d(np.array(np.where(md.mesh.vertexonboundary)), np.array(np.where(md.mesh.x == 1000)))
     
    5757a = np.sqrt((md.mesh.x - 500.)**2 + (md.mesh.y - 500.)**2)
    5858pos = min(enumerate(a), key=itemgetter(1))[0]
    59 time = np.arange(0,md.timestepping.final_time+1,md.timestepping.time_step)
    60 md.hydrology.moulin_input = np.zeros((md.mesh.numberofvertices+1,np.size(time)))
    61 md.hydrology.moulin_input[-1,:] = time
    62 md.hydrology.moulin_input[pos,:] = 5. * (1. - np.sin(2. * np.pi / (1. / 365.) * time))
    63 md.hydrology.neumannflux = np.zeros((md.mesh.numberofelements+1,np.size(time)))
    64 md.hydrology.neumannflux[-1,:] = time
    65 segx = md.mesh.x[md.mesh.segments[:,0]-1]
    66 segy = md.mesh.y[md.mesh.segments[:,0]-1]
    67 posA = np.intersect1d(np.intersect1d(np.array(np.where(segx < 1.)),np.array(np.where(segy > 400.))), np.array(np.where(segy < 600.)))
    68 pos = (md.mesh.segments[posA]-1)[:,2]
    69 md.hydrology.neumannflux[pos,:] = np.tile(0.05*(1.-np.sin(2.*np.pi/(1./365.)*time)),(len(pos),1))
     59time = np.arange(0, md.timestepping.final_time + 1, md.timestepping.time_step)
     60md.hydrology.moulin_input = np.zeros((md.mesh.numberofvertices + 1, np.size(time)))
     61md.hydrology.moulin_input[-1, :] = time
     62md.hydrology.moulin_input[pos, :] = 5. * (1. - np.sin(2. * np.pi / (1. / 365.) * time))
     63md.hydrology.neumannflux = np.zeros((md.mesh.numberofelements + 1, np.size(time)))
     64md.hydrology.neumannflux[-1, :] = time
     65segx = md.mesh.x[md.mesh.segments[:, 0] - 1]
     66segy = md.mesh.y[md.mesh.segments[:, 0] - 1]
     67posA = np.intersect1d(np.intersect1d(np.array(np.where(segx < 1.)), np.array(np.where(segy > 400.))), np.array(np.where(segy < 600.)))
     68pos = (md.mesh.segments[posA] - 1)[:, 2]
     69md.hydrology.neumannflux[pos, :] = np.tile(0.05 * (1. - np.sin(2. * np.pi / (1. / 365.) * time)), (len(pos), 1))
    7070
    71 md = solve(md,'Transient')
     71md = solve(md, 'Transient')
    7272
    7373#Fields and tolerances to track changes
    74 field_names = [
    75         'HydrologyHead1','HydrologyGapHeight1',
    76         'HydrologyHead2','HydrologyGapHeight2',
    77         'HydrologyHead3','HydrologyGapHeight3',
    78         'HydrologyHead4','HydrologyGapHeight4']
    79 field_tolerances = [
    80         1e-13, 1e-13,
    81         1e-13, 1e-13,
    82         1e-13, 1e-13,
    83         1e-13, 1e-12]
    84 field_values = [
    85         md.results.TransientSolution[0].HydrologyHead,
    86         md.results.TransientSolution[0].HydrologyGapHeight,
    87         md.results.TransientSolution[1].HydrologyHead,
    88         md.results.TransientSolution[1].HydrologyGapHeight,
    89         md.results.TransientSolution[2].HydrologyHead,
    90         md.results.TransientSolution[2].HydrologyGapHeight,
    91         md.results.TransientSolution[3].HydrologyHead,
    92         md.results.TransientSolution[3].HydrologyGapHeight
    93         ]
    94 
     74field_names = ['HydrologyHead1', 'HydrologyGapHeight1',
     75               'HydrologyHead2', 'HydrologyGapHeight2',
     76               'HydrologyHead3', 'HydrologyGapHeight3',
     77               'HydrologyHead4', 'HydrologyGapHeight4']
     78field_tolerances = [1e-13, 1e-13,
     79                    1e-13, 1e-13,
     80                    1e-13, 1e-13,
     81                    1e-13, 1e-12]
     82field_values = [md.results.TransientSolution[0].HydrologyHead,
     83                md.results.TransientSolution[0].HydrologyGapHeight,
     84                md.results.TransientSolution[1].HydrologyHead,
     85                md.results.TransientSolution[1].HydrologyGapHeight,
     86                md.results.TransientSolution[2].HydrologyHead,
     87                md.results.TransientSolution[2].HydrologyGapHeight,
     88                md.results.TransientSolution[3].HydrologyHead,
     89                md.results.TransientSolution[3].HydrologyGapHeight]
  • issm/trunk-jpl/test/NightlyRun/test401.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressSSA2d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Stressbalance')
    1817
    1918#Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vel','Pressure']
    21 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vel,\
    26         md.results.StressbalanceSolution.Pressure,\
    27         ]
     19field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     20field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     21field_values = [md.results.StressbalanceSolution.Vx,
     22                md.results.StressbalanceSolution.Vy,
     23                md.results.StressbalanceSolution.Vel,
     24                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test402.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressSSA3d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(4,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(4, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test403.py

    r23181 r23793  
    11#Test Name: SquareSheetShelfStressHO
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[3e-09,3e-09,3e-09,3e-09,3e-09]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [3e-09, 3e-09, 3e-09, 3e-09, 3e-09]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test404.py

    r22835 r23793  
    11#Test Name: SquareSheetShelfStressFS
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'FS','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'FS', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[2e-06,2e-06,2e-06,1e-06,6e-07]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [2e-06, 2e-06, 2e-06, 1e-06, 6e-07]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test405.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressMHOPenalties
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'SSA', '../Exp/SquareHalfRight.exp', 'fill', 'HO', 'coupling', 'penalties')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[5e-05,5e-05,5e-05,5e-05,1e-05]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [5e-05, 5e-05, 5e-05, 5e-05, 1e-05]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test406.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfTherStea
    2 import numpy as np
    32from model import *
    43from socket import gethostname
    5 
    64from triangle import *
    75from setmask import *
     
    108from solve import *
    119
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(4,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.timestepping.time_step=0.
    19 md=solve(md,'Thermal')
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md.extrude(4, 1.)
     14md = setflowequation(md, 'HO', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.timestepping.time_step = 0.
     17md = solve(md, 'Thermal')
    2018
    2119#Fields and tolerances to track changes
    22 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    23 field_tolerances=[1e-13,1e-5]
    24 field_values=[\
    25         md.results.ThermalSolution.Temperature,\
    26         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
    27         ]
     20field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     21field_tolerances = [1e-13, 1e-5]
     22field_values = [md.results.ThermalSolution.Temperature,
     23                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test407.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfTherTran
    2 import numpy as np
    32from model import *
    43from socket import gethostname
    5 
    64from triangle import *
    75from setmask import *
     
    108from solve import *
    119
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(4,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.transient.isstressbalance=False
    19 md.transient.ismasstransport=False
    20 md.transient.issmb=True
    21 md.transient.isthermal=True
    22 md.transient.isgroundingline=False
    23 md=solve(md,'Transient')
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md.extrude(4, 1.)
     14md = setflowequation(md, 'HO', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md.transient.isstressbalance = False
     17md.transient.ismasstransport = False
     18md.transient.issmb = True
     19md.transient.isthermal = True
     20md.transient.isgroundingline = False
     21md = solve(md, 'Transient')
    2422
    2523#Fields and tolerances to track changes
    26 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    27 field_tolerances=[1e-13,1e-13]
    28 field_values=[\
    29         md.results.TransientSolution[0].Temperature,\
    30         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    31         ]
     24field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     25field_tolerances = [1e-13, 1e-13]
     26field_values = [md.results.TransientSolution[0].Temperature,
     27                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test408.py

    r21827 r23793  
    1111from frictioncoulomb import frictioncoulomb
    1212
    13 md=triangle(model(),'../Exp/Square.exp',150000.)
    14 md=setmask(md,'../Exp/SquareShelf.exp','')
    15 md=parameterize(md,'../Par/SquareSheetShelf.py')
    16 md.geometry.bed=copy.deepcopy(md.geometry.base)
    17 pos=np.nonzero(md.mask.groundedice_levelset<0.)
    18 md.geometry.bed[pos]=md.geometry.bed[pos]-10
    19 md.friction=frictioncoulomb()
    20 md.friction.coefficient=20*np.ones(md.mesh.numberofvertices)
    21 md.friction.p=1*np.ones(md.mesh.numberofelements)
    22 md.friction.q=1*np.ones(md.mesh.numberofelements)
    23 md.friction.coefficientcoulomb=0.02*np.ones(md.mesh.numberofvertices)
    24 md.transient.isthermal=False
    25 md.transient.isgroundingline=True
    26 md=setflowequation(md,'SSA','all')
    27 md.cluster=generic('name',gethostname(),'np',3)
    28 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','TotalFloatingBmb','TotalGroundedBmb','TotalSmb']
    29 md.extrude(3,1.)
    30 md=solve(md,'Transient')
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, '../Exp/SquareShelf.exp', '')
     15md = parameterize(md, '../Par/SquareSheetShelf.py')
     16md.geometry.bed = copy.deepcopy(md.geometry.base)
     17pos = np.nonzero(md.mask.groundedice_levelset < 0.)
     18md.geometry.bed[pos] = md.geometry.bed[pos] - 10
     19md.friction = frictioncoulomb()
     20md.friction.coefficient = 20 * np.ones(md.mesh.numberofvertices)
     21md.friction.p = 1 * np.ones(md.mesh.numberofelements)
     22md.friction.q = 1 * np.ones(md.mesh.numberofelements)
     23md.friction.coefficientcoulomb = 0.02 * np.ones(md.mesh.numberofvertices)
     24md.transient.isthermal = False
     25md.transient.isgroundingline = True
     26md = setflowequation(md, 'SSA', 'all')
     27md.cluster = generic('name', gethostname(), 'np', 3)
     28md.transient.requested_outputs = ['default', 'GroundedArea', 'FloatingArea', 'TotalFloatingBmb', 'TotalGroundedBmb', 'TotalSmb']
     29md.extrude(3, 1.)
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','GroundedArea1','FloatingArea1','TotalFloatingBmb1','TotalGroundedBmb1','TotalSmb1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','GroundedArea2','FloatingArea2','TotalFloatingBmb2','TotalGroundedBmb2','TotalSmb2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','GroundedArea3','FloatingArea3','TotalFloatingBmb3','TotalGroundedBmb3','TotalSmb3']
    34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    35 field_values=[\
    36         md.results.TransientSolution[0].Vx,\
    37         md.results.TransientSolution[0].Vy,\
    38         md.results.TransientSolution[0].Vel,\
    39         md.results.TransientSolution[0].Pressure,\
    40         md.results.TransientSolution[0].Base,\
    41         md.results.TransientSolution[0].Surface,\
    42         md.results.TransientSolution[0].Thickness,\
    43         md.results.TransientSolution[0].GroundedArea,\
    44         md.results.TransientSolution[0].FloatingArea,\
    45         md.results.TransientSolution[0].TotalFloatingBmb,\
    46         md.results.TransientSolution[0].TotalGroundedBmb,\
    47         md.results.TransientSolution[0].TotalSmb,\
    48         md.results.TransientSolution[1].Vx,\
    49         md.results.TransientSolution[1].Vy,\
    50         md.results.TransientSolution[1].Vel,\
    51         md.results.TransientSolution[1].Pressure,\
    52         md.results.TransientSolution[1].Base,\
    53         md.results.TransientSolution[1].Surface,\
    54         md.results.TransientSolution[1].Thickness,\
    55         md.results.TransientSolution[1].GroundedArea,\
    56         md.results.TransientSolution[1].FloatingArea,\
    57         md.results.TransientSolution[1].TotalFloatingBmb,\
    58         md.results.TransientSolution[1].TotalGroundedBmb,\
    59         md.results.TransientSolution[1].TotalSmb,\
    60         md.results.TransientSolution[2].Vx,\
    61         md.results.TransientSolution[2].Vy,\
    62         md.results.TransientSolution[2].Vel,\
    63         md.results.TransientSolution[2].Pressure,\
    64         md.results.TransientSolution[2].Base,\
    65         md.results.TransientSolution[2].Surface,\
    66         md.results.TransientSolution[2].Thickness,\
    67         md.results.TransientSolution[2].GroundedArea,\
    68         md.results.TransientSolution[2].FloatingArea,\
    69         md.results.TransientSolution[2].TotalFloatingBmb,\
    70         md.results.TransientSolution[2].TotalGroundedBmb,\
    71         md.results.TransientSolution[2].TotalSmb,\
    72         ]
     33field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1', 'TotalSmb1', 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'GroundedArea2', 'FloatingArea2', 'TotalFloatingBmb2', 'TotalGroundedBmb2', 'TotalSmb2', 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'GroundedArea3', 'FloatingArea3', 'TotalFloatingBmb3', 'TotalGroundedBmb3', 'TotalSmb3']
     34field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     35field_values = [md.results.TransientSolution[0].Vx,
     36                md.results.TransientSolution[0].Vy,
     37                md.results.TransientSolution[0].Vel,
     38                md.results.TransientSolution[0].Pressure,
     39                md.results.TransientSolution[0].Base,
     40                md.results.TransientSolution[0].Surface,
     41                md.results.TransientSolution[0].Thickness,
     42                md.results.TransientSolution[0].GroundedArea,
     43                md.results.TransientSolution[0].FloatingArea,
     44                md.results.TransientSolution[0].TotalFloatingBmb,
     45                md.results.TransientSolution[0].TotalGroundedBmb,
     46                md.results.TransientSolution[0].TotalSmb,
     47                md.results.TransientSolution[1].Vx,
     48                md.results.TransientSolution[1].Vy,
     49                md.results.TransientSolution[1].Vel,
     50                md.results.TransientSolution[1].Pressure,
     51                md.results.TransientSolution[1].Base,
     52                md.results.TransientSolution[1].Surface,
     53                md.results.TransientSolution[1].Thickness,
     54                md.results.TransientSolution[1].GroundedArea,
     55                md.results.TransientSolution[1].FloatingArea,
     56                md.results.TransientSolution[1].TotalFloatingBmb,
     57                md.results.TransientSolution[1].TotalGroundedBmb,
     58                md.results.TransientSolution[1].TotalSmb,
     59                md.results.TransientSolution[2].Vx,
     60                md.results.TransientSolution[2].Vy,
     61                md.results.TransientSolution[2].Vel,
     62                md.results.TransientSolution[2].Pressure,
     63                md.results.TransientSolution[2].Base,
     64                md.results.TransientSolution[2].Surface,
     65                md.results.TransientSolution[2].Thickness,
     66                md.results.TransientSolution[2].GroundedArea,
     67                md.results.TransientSolution[2].FloatingArea,
     68                md.results.TransientSolution[2].TotalFloatingBmb,
     69                md.results.TransientSolution[2].TotalGroundedBmb,
     70                md.results.TransientSolution[2].TotalSmb]
  • issm/trunk-jpl/test/NightlyRun/test409.py

    r23011 r23793  
    11#Test Name: SquareSheetShelfTranMHOPenalties
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.transient.requested_outputs=['default','GroundedArea']
    19 md.groundingline.melt_interpolation='SubelementMelt1'
    20 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', '../Exp/SquareHalfRight.exp', 'fill', 'HO', 'coupling', 'penalties')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.transient.requested_outputs = ['default', 'GroundedArea']
     18md.groundingline.melt_interpolation = 'SubelementMelt1'
     19md = solve(md, 'Transient')
    2120
    2221#Fields and tolerances to track changes
    23 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','GroundedArea1', \
    24                                       'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','GroundedArea2', \
    25                                            'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','GroundedArea3']
    26 field_tolerances=[\
    27         1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-6,\
    28         1e-03,1e-03,1e-02,1e-03,1e-02,1e-04,1e-01,1e-03,1e-01,1e-01,1e-6,\
    29         1e-02,1e-02,1e-01,1e-02,1e-01,1e-04,1e-04,1e-04,1e-04,1e-01,1e-6]
    30 field_values=[\
    31         md.results.TransientSolution[0].Vx,\
    32         md.results.TransientSolution[0].Vy,\
    33         md.results.TransientSolution[0].Vz,\
    34         md.results.TransientSolution[0].Vel,\
    35         md.results.TransientSolution[0].Pressure,\
    36         md.results.TransientSolution[0].Base,\
    37         md.results.TransientSolution[0].Surface,\
    38         md.results.TransientSolution[0].Thickness,\
    39         md.results.TransientSolution[0].Temperature,\
    40         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    41         md.results.TransientSolution[0].GroundedArea,\
    42         md.results.TransientSolution[1].Vx,\
    43         md.results.TransientSolution[1].Vy,\
    44         md.results.TransientSolution[1].Vz,\
    45         md.results.TransientSolution[1].Vel,\
    46         md.results.TransientSolution[1].Pressure,\
    47         md.results.TransientSolution[1].Base,\
    48         md.results.TransientSolution[1].Surface,\
    49         md.results.TransientSolution[1].Thickness,\
    50         md.results.TransientSolution[1].Temperature,\
    51         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    52         md.results.TransientSolution[1].GroundedArea,\
    53         md.results.TransientSolution[2].Vx,\
    54         md.results.TransientSolution[2].Vy,\
    55         md.results.TransientSolution[2].Vz,\
    56         md.results.TransientSolution[2].Vel,\
    57         md.results.TransientSolution[2].Pressure,\
    58         md.results.TransientSolution[2].Base,\
    59         md.results.TransientSolution[2].Surface,\
    60         md.results.TransientSolution[2].Thickness,\
    61         md.results.TransientSolution[2].Temperature,\
    62         md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,\
    63         md.results.TransientSolution[2].GroundedArea,\
    64         ]
     22field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'GroundedArea1',
     23               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'GroundedArea2',
     24               'Vx3', 'Vy3', 'Vz3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3', 'GroundedArea3']
     25field_tolerances = [1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-6,
     26                    1e-03, 1e-03, 1e-02, 1e-03, 1e-02, 1e-04, 1e-01, 1e-03, 1e-01, 1e-01, 1e-6,
     27                    1e-02, 1e-02, 1e-01, 1e-02, 1e-01, 1e-04, 1e-04, 1e-04, 1e-04, 1e-01, 1e-6]
     28field_values = [md.results.TransientSolution[0].Vx,
     29                md.results.TransientSolution[0].Vy,
     30                md.results.TransientSolution[0].Vz,
     31                md.results.TransientSolution[0].Vel,
     32                md.results.TransientSolution[0].Pressure,
     33                md.results.TransientSolution[0].Base,
     34                md.results.TransientSolution[0].Surface,
     35                md.results.TransientSolution[0].Thickness,
     36                md.results.TransientSolution[0].Temperature,
     37                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     38                md.results.TransientSolution[0].GroundedArea,
     39                md.results.TransientSolution[1].Vx,
     40                md.results.TransientSolution[1].Vy,
     41                md.results.TransientSolution[1].Vz,
     42                md.results.TransientSolution[1].Vel,
     43                md.results.TransientSolution[1].Pressure,
     44                md.results.TransientSolution[1].Base,
     45                md.results.TransientSolution[1].Surface,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[1].Temperature,
     48                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     49                md.results.TransientSolution[1].GroundedArea,
     50                md.results.TransientSolution[2].Vx,
     51                md.results.TransientSolution[2].Vy,
     52                md.results.TransientSolution[2].Vz,
     53                md.results.TransientSolution[2].Vel,
     54                md.results.TransientSolution[2].Pressure,
     55                md.results.TransientSolution[2].Base,
     56                md.results.TransientSolution[2].Surface,
     57                md.results.TransientSolution[2].Thickness,
     58                md.results.TransientSolution[2].Temperature,
     59                md.results.TransientSolution[2].BasalforcingsGroundediceMeltingRate,
     60                md.results.TransientSolution[2].GroundedArea]
  • issm/trunk-jpl/test/NightlyRun/test410.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfSteaSSA3d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.timestepping.time_step=0
    19 md=solve(md,'Steadystate')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping.time_step = 0
     18md = solve(md, 'Steadystate')
    2019
    2120#Fields and tolerances to track changes
    22 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsGroundediceMeltingRate']
    23 field_tolerances=[1e-09,1e-09,1e-08,1e-09,1e-13,5e-10,1e-06]
    24 field_values=[\
    25         md.results.SteadystateSolution.Vx,\
    26         md.results.SteadystateSolution.Vy,\
    27         md.results.SteadystateSolution.Vz,\
    28         md.results.SteadystateSolution.Vel,\
    29         md.results.SteadystateSolution.Pressure,\
    30         md.results.SteadystateSolution.Temperature,\
    31         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate,\
    32         ]
     21field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [1e-09, 1e-09, 1e-08, 1e-09, 1e-13, 5e-10, 1e-06]
     23field_values = [md.results.SteadystateSolution.Vx,
     24                md.results.SteadystateSolution.Vy,
     25                md.results.SteadystateSolution.Vz,
     26                md.results.SteadystateSolution.Vel,
     27                md.results.SteadystateSolution.Pressure,
     28                md.results.SteadystateSolution.Temperature,
     29                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test411.py

    r22578 r23793  
    11#Test Name: SquareSheetShelfSteaHO
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.timestepping.time_step=0.
    19 md=solve(md,'Steadystate')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping.time_step = 0.
     18md = solve(md, 'Steadystate')
    2019
    2120#Fields and tolerances to track changes
    22 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsGroundediceMeltingRate']
    23 field_tolerances=[2e-09,1e-09,1e-08,1e-09,1e-09,1e-08,1e-05
    24 ]
    25 field_values=[\
    26         md.results.SteadystateSolution.Vx,\
    27         md.results.SteadystateSolution.Vy,\
    28         md.results.SteadystateSolution.Vz,\
    29         md.results.SteadystateSolution.Vel,\
    30         md.results.SteadystateSolution.Pressure,\
    31         md.results.SteadystateSolution.Temperature,\
    32         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate,\
    33         ]
     21field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [2e-09, 1e-09, 1e-08, 1e-09, 1e-09, 1e-08, 1e-05]
     23field_values = [md.results.SteadystateSolution.Vx,
     24                md.results.SteadystateSolution.Vy,
     25                md.results.SteadystateSolution.Vz,
     26                md.results.SteadystateSolution.Vel,
     27                md.results.SteadystateSolution.Pressure,
     28                md.results.SteadystateSolution.Temperature,
     29                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test412.py

    r23130 r23793  
    11#Test Name: SquareSheetShelfDiadSSA3dDakota
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from partitioner import *
    1110from importancefactors import *
    12 
    1311from normal_uncertain import *
    1412from response_function import *
    1513
    16 md = triangle(model(),'../Exp/Square.exp',300000.)
    17 md = setmask(md,'../Exp/SquareShelf.exp','')
    18 md = parameterize(md,'../Par/SquareSheetShelf.py')
    19 md = setflowequation(md,'SSA','all')
    20 md.cluster = generic('name',gethostname(),'np',3)
     14md = triangle(model(), '../Exp/Square.exp', 300000.)
     15md = setmask(md, '../Exp/SquareShelf.exp', '')
     16md = parameterize(md, '../Par/SquareSheetShelf.py')
     17md = setflowequation(md, 'SSA', 'all')
     18md.cluster = generic('name', gethostname(), 'np', 3)
    2119
    2220#partitioning
    2321md.qmu.numberofpartitions = md.mesh.numberofvertices
    24 md = partitioner(md,'package','linear','npart',md.qmu.numberofpartitions)
    25 md.qmu.partition = md.qmu.partition-1
     22md = partitioner(md, 'package', 'linear', 'npart', md.qmu.numberofpartitions)
     23md.qmu.partition = md.qmu.partition - 1
    2624md.qmu.isdakota = 1
    2725
     
    3331
    3432#variables
    35 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01)
    36 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient',1,0.01)
     33md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01)
     34md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01)
    3735
    3836#responses
    39 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     37md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    4038
    4139#method
     
    4745
    4846if version >= 6:
    49         md.qmu.params.analysis_driver = 'matlab'
    50         md.qmu.params.evaluation_scheduling = 'master'
    51         md.qmu.params.processors_per_evaluation = 2
     47    md.qmu.params.analysis_driver = 'matlab'
     48    md.qmu.params.evaluation_scheduling = 'master'
     49    md.qmu.params.processors_per_evaluation = 2
    5250else:
    53         md.qmu.params.analysis_driver = 'stressbalance'
    54         md.qmu.params.evaluation_concurrency = 1
     51    md.qmu.params.analysis_driver = 'stressbalance'
     52    md.qmu.params.evaluation_concurrency = 1
    5553
    56 #imperative! 
    57 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     54#imperative!
     55md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    5856
    5957#solve
    60 md.verbose = verbose('000000000')       # this line is recommended
    61 md = solve(md,'Stressbalance','overwrite','y')
     58md.verbose = verbose('000000000')       # this line is recommended
     59md = solve(md, 'Stressbalance', 'overwrite', 'y')
    6260
    6361#Fields and tolerances to track changes
    6462md.qmu.results = md.results.dakota
    65 md.results.dakota.importancefactors = importancefactors(md,'scaled_FrictionCoefficient','MaxVel').T
     63md.results.dakota.importancefactors = importancefactors(md, 'scaled_FrictionCoefficient', 'MaxVel').T
    6664field_names = ['importancefactors']
    6765field_tolerances = [1e-10]
  • issm/trunk-jpl/test/NightlyRun/test413.py

    r23231 r23793  
    11#Test Name: SquareSheetShelfDiadSSA3dDakotaPart
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    1110from importancefactors import *
    1211
    13 md = triangle(model(),'../Exp/Square.exp',150000.)
    14 md = setmask(md,'../Exp/SquareShelf.exp','')
    15 md = parameterize(md,'../Par/SquareSheetShelf.py')
    16 md = setflowequation(md,'SSA','all')
    17 md.cluster = generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1817
    1918#Dakota options
     
    2524#partitioning
    2625md.qmu.numberofpartitions = 20
    27 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
    28 md.qmu.partition = md.qmu.partition-1
     26md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
     27md.qmu.partition = md.qmu.partition - 1
    2928
    3029#variables
    31 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01)
    32 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient',1,0.01)
     30md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01)
     31md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01)
    3332
    3433#responses
    35 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     34md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    3635
    3736#method
     
    4342
    4443if version >= 6:
    45         md.qmu.params.analysis_driver = 'matlab'
    46         md.qmu.params.evaluation_scheduling = 'master'
    47         md.qmu.params.processors_per_evaluation = 2
     44    md.qmu.params.analysis_driver = 'matlab'
     45    md.qmu.params.evaluation_scheduling = 'master'
     46    md.qmu.params.processors_per_evaluation = 2
    4847else:
    49         md.qmu.params.analysis_driver = 'stressbalance'
    50         md.qmu.params.evaluation_concurrency = 1
     48    md.qmu.params.analysis_driver = 'stressbalance'
     49    md.qmu.params.evaluation_concurrency = 1
    5150
    5251
    5352#imperative!
    54 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     53md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    5554md.qmu.isdakota = 1
    5655
    5756#solve
    58 md.verbose = verbose('000000000')       # this line is recommended
    59 md = solve(md,'Stressbalance','overwrite','y')
     57md.verbose = verbose('000000000')       # this line is recommended
     58md = solve(md, 'Stressbalance', 'overwrite', 'y')
    6059
    6160#Fields and tolerances to track changes
    6261md.qmu.results = md.results.dakota
    63 md.results.dakota.importancefactors = importancefactors(md,'scaled_FrictionCoefficient','MaxVel').T
     62md.results.dakota.importancefactors = importancefactors(md, 'scaled_FrictionCoefficient', 'MaxVel').T
    6463field_names = ['importancefactors']
    6564field_tolerances = [1e-10]
  • issm/trunk-jpl/test/NightlyRun/test414.py

    r23231 r23793  
    1111from partitioner import *
    1212
    13 md = triangle(model(),'../Exp/Square.exp',150000.)
    14 md = setmask(md,'../Exp/SquareShelf.exp','')
    15 md = parameterize(md,'../Par/SquareSheetShelf.py')
    16 md = setflowequation(md,'SSA','all')
    17 md.cluster = generic('name',gethostname(),'np',3)
    18 md.materials.rho_ice = 10**7 #involved in the mass flux, make it easy
    19 md.geometry.thickness[:] = 1 #make it easy
    20 md.geometry.surface = md.geometry.base+md.geometry.thickness
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, '../Exp/SquareShelf.exp', '')
     15md = parameterize(md, '../Par/SquareSheetShelf.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.materials.rho_ice = 10**7  #involved in the mass flux, make it easy
     19md.geometry.thickness[:] = 1  #make it easy
     20md.geometry.surface = md.geometry.base + md.geometry.thickness
    2121
    2222#constrain all velocities to 1 m/yr, in the y-direction
     
    3333#partitioning
    3434md.qmu.numberofpartitions = 20
    35 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
    36 md.qmu.partition = md.qmu.partition-1
     35md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
     36md.qmu.partition = md.qmu.partition - 1
    3737
    3838#variables
    39 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient',1,0.01)
     39md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01)
    4040
    4141#responses
    42 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    43 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    44 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    45 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    46 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    47 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    48 md.qmu.responses.MassFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    49 md.qmu.responses.MassFlux7 = response_function.response_function('indexed_MassFlux_7',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     42md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     43md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     44md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     45md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     46md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     47md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     48md.qmu.responses.MassFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     49md.qmu.responses.MassFlux7 = response_function.response_function('indexed_MassFlux_7', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    5050
    5151#mass flux profiles
    52 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp','../Exp/Square.exp']
     52md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp', '../Exp/Square.exp']
    5353md.qmu.mass_flux_profile_directory = getcwd()
    5454
     
    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:
    65         md.qmu.params.analysis_driver = 'matlab'
    66         md.qmu.params.evaluation_scheduling = 'master'
    67         md.qmu.params.processors_per_evaluation = 2
     65    md.qmu.params.analysis_driver = 'matlab'
     66    md.qmu.params.evaluation_scheduling = 'master'
     67    md.qmu.params.processors_per_evaluation = 2
    6868else:
    69         md.qmu.params.analysis_driver = 'stressbalance'
    70         md.qmu.params.evaluation_concurrency = 1
     69    md.qmu.params.analysis_driver = 'stressbalance'
     70    md.qmu.params.evaluation_concurrency = 1
    7171
    7272#solve
    73 md.verbose = verbose('000000000')       # this line is recommended
    74 md = solve(md,'Stressbalance','overwrite','y')
     73md.verbose = verbose('000000000')       # this line is recommended
     74md = solve(md, 'Stressbalance', 'overwrite', 'y')
    7575md.qmu.results = md.results.dakota
    7676
     
    7878#ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr
    7979#we recover those mass fluxes through the mean of the response.
    80 #also, we recover the max velo, which should be 1m/yr. 
     80#also, we recover the max velo, which should be 1m/yr.
    8181#we put all that data in the moments, which we will use to test for success.
    8282#also, check that the stddev are 0.
    8383md.results.dakota.moments = []
    8484for i in range(8):
    85         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
     85    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean)
    8686
    8787for i in range(8):
    88         md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
     88    md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev)
    8989
    90 field_names      = ['moments']
     90field_names = ['moments']
    9191field_tolerances = [1e-11]
    9292field_values = [md.results.dakota.moments]
  • issm/trunk-jpl/test/NightlyRun/test415.py

    r23785 r23793  
    1010from solve import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',170000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 170000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'SSA', 'all')
    1717
    1818#control parameters
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['FrictionCoefficient']
    21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[103,501]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2*np.ones((md.inversion.nsteps))
    29 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
    30 md.timestepping.time_step=0.
    31 md.inversion.vx_obs=md.initialization.vx
    32 md.inversion.vy_obs=md.initialization.vy
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['FrictionCoefficient']
     21md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [103, 501]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     27md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2 * np.ones((md.inversion.nsteps))
     29md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps))
     30md.timestepping.time_step = 0.
     31md.inversion.vx_obs = md.initialization.vx
     32md.inversion.vy_obs = md.initialization.vy
    3333
    34 md.cluster=generic('name',gethostname(),'np',3)
    35 md=solve(md,'Steadystate')
     34md.cluster = generic('name', gethostname(), 'np', 3)
     35md = solve(md, 'Steadystate')
    3636
    3737#Fields and tolerances to track changes
    38 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy','Vz','Temperature','BasalforcingsGroundediceMeltingRate']
    39 field_tolerances=[1e-9,1e-9,2e-10,1e-13,1e-09,1e-09,1e-09,1e-8,1e-09,1e-6]
    40 field_values=[\
    41         md.results.SteadystateSolution.Gradient1,\
    42         md.results.SteadystateSolution.J,\
    43         md.results.SteadystateSolution.FrictionCoefficient,\
    44         md.results.SteadystateSolution.Pressure,\
    45         md.results.SteadystateSolution.Vel,\
    46         md.results.SteadystateSolution.Vx,\
    47         md.results.SteadystateSolution.Vy,\
    48         md.results.SteadystateSolution.Vz,\
    49         md.results.SteadystateSolution.Temperature,\
    50         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate
    51 ]
     38field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy', 'Vz', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     39field_tolerances = [1e-9, 1e-9, 2e-10, 1e-13, 1e-09, 1e-09, 1e-09, 1e-8, 1e-09, 1e-6]
     40field_values = [md.results.SteadystateSolution.Gradient1,
     41                md.results.SteadystateSolution.J,
     42                md.results.SteadystateSolution.FrictionCoefficient,
     43                md.results.SteadystateSolution.Pressure,
     44                md.results.SteadystateSolution.Vel,
     45                md.results.SteadystateSolution.Vx,
     46                md.results.SteadystateSolution.Vy,
     47                md.results.SteadystateSolution.Vz,
     48                md.results.SteadystateSolution.Temperature,
     49                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test416.py

    r23785 r23793  
    1010from solve import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',170000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
     12md = triangle(model(), '../Exp/Square.exp', 170000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
    1717
    1818#control parameters
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['FrictionCoefficient']
    21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[102,501]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2*np.ones((md.inversion.nsteps))
    29 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
    30 md.timestepping.time_step=0.
    31 md.inversion.vx_obs=md.initialization.vx
    32 md.inversion.vy_obs=md.initialization.vy
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['FrictionCoefficient']
     21md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.nsteps = 2
     24md.inversion.cost_functions = [102, 501]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     26md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     27md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     28md.inversion.maxiter_per_step = 2 * np.ones((md.inversion.nsteps))
     29md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps))
     30md.timestepping.time_step = 0.
     31md.inversion.vx_obs = md.initialization.vx
     32md.inversion.vy_obs = md.initialization.vy
    3333
    34 md.cluster=generic('name',gethostname(),'np',3)
    35 md=solve(md,'Steadystate')
     34
     35md.cluster = generic('name', gethostname(), 'np', 3)
     36md = solve(md, 'Steadystate')
    3637
    3738#Fields and tolerances to track changes
    38 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy','Vz','Temperature','BasalforcingsGroundediceMeltingRate']
    39 field_tolerances=[1e-08,1e-07,1e-08,1e-08,1e-08,1e-08,1e-08,1e-07,1e-08,1e-05]
    40 field_values=[\
    41         md.results.SteadystateSolution.Gradient1,\
    42         md.results.SteadystateSolution.J,\
    43         md.results.SteadystateSolution.FrictionCoefficient,\
    44         md.results.SteadystateSolution.Pressure,\
    45         md.results.SteadystateSolution.Vel,\
    46         md.results.SteadystateSolution.Vx,\
    47         md.results.SteadystateSolution.Vy,\
    48         md.results.SteadystateSolution.Vz,\
    49         md.results.SteadystateSolution.Temperature,\
    50         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate
    51 ]
     39field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy', 'Vz', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     40field_tolerances = [1e-08, 1e-07, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-07, 1e-08, 1e-05]
     41field_values = [md.results.SteadystateSolution.Gradient1,
     42                md.results.SteadystateSolution.J,
     43                md.results.SteadystateSolution.FrictionCoefficient,
     44                md.results.SteadystateSolution.Pressure,
     45                md.results.SteadystateSolution.Vel,
     46                md.results.SteadystateSolution.Vx,
     47                md.results.SteadystateSolution.Vy,
     48                md.results.SteadystateSolution.Vz,
     49                md.results.SteadystateSolution.Temperature,
     50                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test417.py

    r23258 r23793  
    11#Test Name: SquareSheetShelfDiadSSA3dDakotaSamp
    2 import numpy as np
    32from os import getcwd
    43from model import *
     
    1211from dmeth_params_set import *
    1312
    14 md = triangle(model(),'../Exp/Square.exp',150000.)
    15 md = setmask(md,'../Exp/SquareShelf.exp','')
    16 md = parameterize(md,'../Par/SquareSheetShelf.py')
    17 md = setflowequation(md,'SSA','all')
    18 md.cluster = generic('name',gethostname(),'np',3)
    19 md.materials.rho_ice = 10**7 #involved in the mass flux, make it easy
    20 md.geometry.thickness[:] = 1 #make it easy
    21 md.geometry.surface = md.geometry.base+md.geometry.thickness
     13md = triangle(model(), '../Exp/Square.exp', 150000.)
     14md = setmask(md, '../Exp/SquareShelf.exp', '')
     15md = parameterize(md, '../Par/SquareSheetShelf.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.materials.rho_ice = 10**7  #involved in the mass flux, make it easy
     19md.geometry.thickness[:] = 1  #make it easy
     20md.geometry.surface = md.geometry.base + md.geometry.thickness
    2221
    2322#constrain all velocities to 1 m/yr, in the y-direction
     
    3433#partitioning
    3534md.qmu.numberofpartitions = 20
    36 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
    37 md.qmu.partition = md.qmu.partition-1
     35md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
     36md.qmu.partition = md.qmu.partition - 1
    3837
    3938#variables
    40 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient',1,0.01)
     39md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01)
    4140
    4241#responses
    43 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    44 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    45 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    46 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    47 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    48 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    49 md.qmu.responses.MassFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    50 md.qmu.responses.MassFlux7 = response_function.response_function('indexed_MassFlux_7',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     42md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     43md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     44md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     45md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     46md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     47md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     48md.qmu.responses.MassFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     49md.qmu.responses.MassFlux7 = response_function.response_function('indexed_MassFlux_7', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    5150
    5251#mass flux profiles
    53 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp','../Exp/Square.exp']
     52md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp', '../Exp/Square.exp']
    5453md.qmu.mass_flux_profile_directory = getcwd()
    5554
    5655#method
    5756md.qmu.method = dakota_method.dakota_method('nond_samp')
    58 md.qmu.method = dmeth_params_set(md.qmu.method,'seed',1234,'samples',20,'sample_type','lhs')
     57md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'lhs')
    5958
    6059#parameters
    6160md.qmu.params.direct = True
    6261md.qmu.params.analysis_components = ''
    63 md.qmu.params.tabular_graphics_data = True;
     62md.qmu.params.tabular_graphics_data = True
    6463
    6564if version >= 6:
    66         md.qmu.params.analysis_driver = 'matlab'
    67         md.qmu.params.evaluation_scheduling = 'master'
    68         md.qmu.params.processors_per_evaluation = 2
     65    md.qmu.params.analysis_driver = 'matlab'
     66    md.qmu.params.evaluation_scheduling = 'master'
     67    md.qmu.params.processors_per_evaluation = 2
    6968else:
    70         md.qmu.params.analysis_driver = 'stressbalance'
    71         md.qmu.params.evaluation_concurrency = 1
     69    md.qmu.params.analysis_driver = 'stressbalance'
     70    md.qmu.params.evaluation_concurrency = 1
    7271
    7372#partitioning
    7473md.qmu.numberofpartitions = 20
    75 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
    76 md.qmu.partition = md.qmu.partition-1
     74md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
     75md.qmu.partition = md.qmu.partition - 1
    7776md.qmu.isdakota = 1
    7877
    79 md.stressbalance.reltol = 10**-5        #tighten for qmu analyses
     78md.stressbalance.reltol = 10**-5        #tighten for qmu analyses
    8079
    8180#solve
    82 md.verbose = verbose('000000000')       # this line is recommended
     81md.verbose = verbose('000000000')       # this line is recommended
    8382
    8483# There may be a pair of numpy warnings in the function true_divide,
    85 #       this is normal and will not affect the results
    86 #       See src/m/qmu/dakota_out_parse.py, function "dak_tab_out" for details
    87 md = solve(md,'Stressbalance','overwrite','y')
     84#       this is normal and will not affect the results
     85#       See src/m/qmu/dakota_out_parse.py, function "dak_tab_out" for details
     86md = solve(md, 'Stressbalance', 'overwrite', 'y')
    8887
    8988#Fields and tolerances to track changes
     
    9291#ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr
    9392#we recover those mass fluxes through the mean of the response.
    94 #also, we recover the max velo, which should be 1m/yr. 
     93#also, we recover the max velo, which should be 1m/yr.
    9594#we put all that data in the montecarlo field, which we will use to test for success.
    9695#also, check that the stddev are 0.
    9796md.results.dakota.montecarlo = []
    9897for i in range(8):
    99         md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean)
     98    md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean)
    10099
    101100for i in range(8):
    102         md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev)
     101    md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev)
    103102
    104 field_names      = ['moments']
     103field_names = ['moments']
    105104field_tolerances = [1e-11]
    106 field_values     = [md.results.dakota.montecarlo]
     105field_values = [md.results.dakota.montecarlo]
  • issm/trunk-jpl/test/NightlyRun/test418.py

    r23464 r23793  
    1616#test partitioning, and partition averaging
    1717# python cannot handle resolutions greater than 30010
    18 md = triangle(model(),'../Exp/Square.exp',30000.)
     18md = triangle(model(), '../Exp/Square.exp', 30000.)
    1919#print md.mesh.numberofvertices
    20 md = setmask(md,'../Exp/SquareShelf.exp','')
    21 md = parameterize(md,'../Par/SquareSheetShelf.py')
    22 md = setflowequation(md,'SSA','all')
    23 md.cluster = generic('name',gethostname(),'np',3)
     20md = setmask(md, '../Exp/SquareShelf.exp', '')
     21md = parameterize(md, '../Par/SquareSheetShelf.py')
     22md = setflowequation(md, 'SSA', 'all')
     23md.cluster = generic('name', gethostname(), 'np', 3)
    2424
    2525#partitioning
     
    2828#corrupted size vs. prev_size
    2929#Aborted (core dumped)
    30 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions)
     30md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions)
    3131
     32md.qmu.partition = md.qmu.partition - 1
    3233
    33 md.qmu.partition=md.qmu.partition-1
    34 
    35 vector = np.arange(1,1+md.mesh.numberofvertices,1).reshape(-1,1)
     34vector = np.arange(1, 1 + md.mesh.numberofvertices, 1).reshape(-1, 1)
    3635# double check this before committing:
    3736#print 'before AreaAverageOntoPartition'
    38 vector_on_partition = AreaAverageOntoPartition(md,vector)
     37vector_on_partition = AreaAverageOntoPartition(md, vector)
    3938vector_on_nodes = vector_on_partition[md.qmu.partition]
    4039
    41 field_names      = ['vector_on_nodes']
     40field_names = ['vector_on_nodes']
    4241field_tolerances = [1e-11]
    43 field_values     = [vector_on_nodes]
     42field_values = [vector_on_nodes]
  • issm/trunk-jpl/test/NightlyRun/test419.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressSSAHOTiling
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'SSA', '../Exp/SquareHalfRight.exp', 'fill', 'HO')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[2e-09,1e-09,1e-09,1e-09,1e-09]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [2e-09, 1e-09, 1e-09, 1e-09, 1e-09]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test420.py

    r23257 r23793  
    11#Test Name: SquareSheetShelfDakotaScaledResponse
    2 
    32import numpy as np
    43from model import *
     
    1110from partitioner import *
    1211
    13 md = triangle(model(),'../Exp/Square.exp',200000.)
    14 md = setmask(md,'../Exp/SquareShelf.exp','')
    15 md = parameterize(md,'../Par/SquareSheetShelf.py')
    16 md = setflowequation(md,'SSA','all')
    17 md.cluster = generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 200000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1817
    1918#partitioning
    2019md.qmu.numberofpartitions = 10
    21 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions)
    22 md.qmu.partition = md.qmu.partition-1
     20md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions)
     21md.qmu.partition = md.qmu.partition - 1
    2322md.qmu.isdakota = 1
    2423
     
    3029
    3130#variables
    32 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01)
     31md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01)
    3332
    3433#responses
    35 md.qmu.responses.MaxVel = response_function.response_function('scaled_Thickness',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     34md.qmu.responses.MaxVel = response_function.response_function('scaled_Thickness', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    3635
    3736#method
     
    4342
    4443if version >= 6:
    45         md.qmu.params.analysis_driver = 'matlab'
    46         md.qmu.params.evaluation_scheduling = 'master'
    47         md.qmu.params.processors_per_evaluation = 2
     44    md.qmu.params.analysis_driver = 'matlab'
     45    md.qmu.params.evaluation_scheduling = 'master'
     46    md.qmu.params.processors_per_evaluation = 2
    4847else:
    49         md.qmu.params.analysis_driver = 'stressbalance'
    50         md.qmu.params.evaluation_concurrency = 1
     48    md.qmu.params.analysis_driver = 'stressbalance'
     49    md.qmu.params.evaluation_concurrency = 1
    5150
    52 #imperative! 
    53 md.stressbalance.reltol = 10**-5 #tighten for qmu analysese
     51#imperative!
     52md.stressbalance.reltol = 10**-5  #tighten for qmu analysese
    5453
    5554#solve
    56 md.verbose = verbose('000000000')       # this line is recommended
    57 md = solve(md,'Stressbalance','overwrite','y')
     55md.verbose = verbose('000000000')       # this line is recommended
     56md = solve(md, 'Stressbalance', 'overwrite', 'y')
    5857md.qmu.results = md.results.dakota
    5958
     
    6160h = np.zeros((md.qmu.numberofpartitions,))
    6261for i in range(md.qmu.numberofpartitions):
    63         h[i] = md.qmu.results.dresp_out[i].mean
     62    h[i] = md.qmu.results.dresp_out[i].mean
    6463
    6564#project onto grid
     
    6766
    6867#Fields and tolerances to track changes
    69 field_names      = ['Thickness']
     68field_names = ['Thickness']
    7069field_tolerances = [1e-10]
    71 field_values     = [thickness]
     70field_values = [thickness]
  • issm/trunk-jpl/test/NightlyRun/test421.py

    r23470 r23793  
    11#Test Name: SquareSheetShelfStressHOFS3dTiling
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','HO')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'HO')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[2e-06,2e-06,2e-05,2e-06,2e-06]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [2e-06, 2e-06, 2e-05, 2e-06, 2e-06]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test422.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressSSAFS3dTiling
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','SSA')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.stressbalance.reltol=0.4
    19 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'SSA')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.stressbalance.reltol = 0.4
     18md = solve(md, 'Stressbalance')
    2019
    2120#Fields and tolerances to track changes
    22 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    23 field_tolerances=[4e-07,4e-07,2e-06,4e-07,5e-07]
    24 field_values=[\
    25         md.results.StressbalanceSolution.Vx,\
    26         md.results.StressbalanceSolution.Vy,\
    27         md.results.StressbalanceSolution.Vz,\
    28         md.results.StressbalanceSolution.Vel,\
    29         md.results.StressbalanceSolution.Pressure,\
    30         ]
     21field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     22field_tolerances = [4e-07, 4e-07, 2e-06, 4e-07, 5e-07]
     23field_values = [md.results.StressbalanceSolution.Vx,
     24                md.results.StressbalanceSolution.Vy,
     25                md.results.StressbalanceSolution.Vz,
     26                md.results.StressbalanceSolution.Vel,
     27                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test423.py

    r22993 r23793  
    1010
    1111
    12 radius=1.e6
    13 shelfextent=2.e5
     12radius = 1.e6
     13shelfextent = 2.e5
    1414
    15 md=roundmesh(model(),radius,50000.)
    16 #fix center node to 0,0
    17 rad=np.sqrt(md.mesh.x**2+md.mesh.y**2)
    18 pos=np.argmin(rad)
    19 md.mesh.x[pos]=0.
    20 md.mesh.y[pos]=0.    #the closest node to the center is changed to be exactly at the center
    21 xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
    22 yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
    23 rad=np.sqrt(xelem**2+yelem**2)
    24 flags=np.zeros(md.mesh.numberofelements)
    25 pos=np.nonzero(rad>=(radius-shelfextent))
    26 flags[pos]=1
    27 md=setmask(md,flags,'')
    28 md=parameterize(md,'../Par/RoundSheetShelf.py')
    29 md=setflowequation(md,'SSA','all')
    30 md.cluster=generic('name',gethostname(),'np',3)
     15md = roundmesh(model(), radius, 50000.)
     16#fix center node to 0, 0
     17rad = np.sqrt(md.mesh.x**2 + md.mesh.y**2)
     18pos = np.argmin(rad)
     19md.mesh.x[pos] = 0.
     20md.mesh.y[pos] = 0.    #the closest node to the center is changed to be exactly at the center
     21xelem = np.mean(md.mesh.x[md.mesh.elements.astype(int) - 1], axis=1)
     22yelem = np.mean(md.mesh.y[md.mesh.elements.astype(int) - 1], axis=1)
     23rad = np.sqrt(xelem**2 + yelem**2)
     24flags = np.zeros(md.mesh.numberofelements)
     25pos = np.nonzero(rad >= (radius - shelfextent))
     26flags[pos] = 1
     27md = setmask(md, flags, '')
     28md = parameterize(md, '../Par/RoundSheetShelf.py')
     29md = setflowequation(md, 'SSA', 'all')
     30md.cluster = generic('name', gethostname(), 'np', 3)
    3131
    32 md.transient.isthermal=False
    33 md.transient.ismasstransport=False
    34 md.transient.issmb=True
    35 md.transient.isstressbalance=True
    36 md.transient.isgroundingline=True
     32md.transient.isthermal = False
     33md.transient.ismasstransport = False
     34md.transient.issmb = True
     35md.transient.isstressbalance = True
     36md.transient.isgroundingline = True
    3737
    3838#test different grounding line dynamics.
    39 md.groundingline.migration='AggressiveMigration'
    40 md=solve(md,'Transient')
    41 element_on_iceshelf_agressive=md.results.TransientSolution[0].MaskGroundediceLevelset
    42 vel_agressive=md.results.TransientSolution[0].Vel
     39md.groundingline.migration = 'AggressiveMigration'
     40md = solve(md, 'Transient')
     41element_on_iceshelf_agressive = md.results.TransientSolution[0].MaskGroundediceLevelset
     42vel_agressive = md.results.TransientSolution[0].Vel
    4343
    44 md.groundingline.migration='SoftMigration'
    45 md=solve(md,'Transient')
    46 element_on_iceshelf_soft=md.results.TransientSolution[0].MaskGroundediceLevelset
    47 vel_soft=md.results.TransientSolution[0].Vel
     44md.groundingline.migration = 'SoftMigration'
     45md = solve(md, 'Transient')
     46element_on_iceshelf_soft = md.results.TransientSolution[0].MaskGroundediceLevelset
     47vel_soft = md.results.TransientSolution[0].Vel
    4848
    49 md.mask.groundedice_levelset=md.geometry.thickness + md.materials.rho_water/md.materials.rho_ice*md.geometry.bed
    50 md.groundingline.migration='SubelementMigration'
    51 md.groundingline.friction_interpolation='SubelementFriction1'
    52 md=solve(md,'Transient')
    53 element_on_iceshelf_subelement=md.results.TransientSolution[0].MaskGroundediceLevelset
    54 vel_subelement=md.results.TransientSolution[0].Vel
     49md.mask.groundedice_levelset = md.geometry.thickness + md.materials.rho_water / md.materials.rho_ice * md.geometry.bed
     50md.groundingline.migration = 'SubelementMigration'
     51md.groundingline.friction_interpolation = 'SubelementFriction1'
     52md = solve(md, 'Transient')
     53element_on_iceshelf_subelement = md.results.TransientSolution[0].MaskGroundediceLevelset
     54vel_subelement = md.results.TransientSolution[0].Vel
    5555
    56 md.groundingline.friction_interpolation='SubelementFriction2'
    57 md=solve(md,'Transient')
    58 element_on_iceshelf_subelement2=md.results.TransientSolution[0].MaskGroundediceLevelset
    59 vel_subelement2=md.results.TransientSolution[0].Vel
     56md.groundingline.friction_interpolation = 'SubelementFriction2'
     57md = solve(md, 'Transient')
     58element_on_iceshelf_subelement2 = md.results.TransientSolution[0].MaskGroundediceLevelset
     59vel_subelement2 = md.results.TransientSolution[0].Vel
    6060
    6161#Fields and tolerances to track changes
    62 field_names     =['ElementOnIceShelfAggressive','VelAggressive','ElementOnIceShelfSoft','VelSoft','ElementOnIceShelfSubelement','VelSubelement','ElementOnIceShelfSubelement2','VelSubelement2']
    63 field_tolerances=[1e-13,2e-13,1e-13,2e-13,1e-13,2e-13,1e-13,2e-13]
    64 field_values=[element_on_iceshelf_agressive,vel_agressive,element_on_iceshelf_soft,vel_soft,element_on_iceshelf_subelement,vel_subelement,element_on_iceshelf_subelement2,vel_subelement2]
     62field_names = ['ElementOnIceShelfAggressive', 'VelAggressive', 'ElementOnIceShelfSoft', 'VelSoft', 'ElementOnIceShelfSubelement', 'VelSubelement', 'ElementOnIceShelfSubelement2', 'VelSubelement2']
     63field_tolerances = [1e-13, 2e-13, 1e-13, 2e-13, 1e-13, 2e-13, 1e-13, 2e-13]
     64field_values = [element_on_iceshelf_agressive, vel_agressive, element_on_iceshelf_soft, vel_soft, element_on_iceshelf_subelement, vel_subelement, element_on_iceshelf_subelement2, vel_subelement2]
  • issm/trunk-jpl/test/NightlyRun/test424.py

    r22337 r23793  
    88from solve import *
    99
    10 md=triangle(model(),'../Exp/Square.exp',150000.)
    11 md=setmask(md,'../Exp/SquareShelf.exp','')
    12 md=parameterize(md,'../Par/SquareSheetShelf.py')
    13 md=setflowequation(md,'SSA','all')
    14 md.initialization.vx[:]=0.
    15 md.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.
    18 md.geometry.thickness[:]=1000.
    19 md.geometry.surface=md.geometry.base+md.geometry.thickness
    20 md.smb.mass_balance[:]=100.
    21 md.transient.isstressbalance=False
    22 md.transient.isgroundingline=True
    23 md.groundingline.migration='AggressiveMigration'
    24 md.transient.requested_outputs=['IceVolume','IceVolumeAboveFloatation','IceVolumeAboveFloatationScaled','GroundedArea','FloatingArea','GroundedAreaScaled','FloatingAreaScaled']
    25 md.mesh.scale_factor=1.1*np.ones((md.mesh.numberofvertices))
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.initialization.vx[:] = 0.
     15md.initialization.vy[:] = 0.
     16md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     17md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
     18md.geometry.thickness[:] = 1000.
     19md.geometry.surface = md.geometry.base + md.geometry.thickness
     20md.smb.mass_balance[:] = 100.
     21md.transient.isstressbalance = False
     22md.transient.isgroundingline = True
     23md.groundingline.migration = 'AggressiveMigration'
     24md.transient.requested_outputs = ['IceVolume', 'IceVolumeAboveFloatation', 'IceVolumeAboveFloatationScaled', 'GroundedArea', 'FloatingArea', 'GroundedAreaScaled', 'FloatingAreaScaled']
     25md.mesh.scale_factor = 1.1 * np.ones((md.mesh.numberofvertices))
    2626
    27 md.cluster=generic('name',gethostname(),'np',3)
    28 md=solve(md,'Transient')
     27md.cluster = generic('name', gethostname(), 'np', 3)
     28md = solve(md, 'Transient')
    2929
    3030#Fields and tolerances to track changes
    31 field_names     =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1','IceVolumeAboveFloatationScaled1','GroundedArea1','GroundedAreaScaled1','FloatingArea1','FloatingAreaScaled1',
    32                                                                         'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2','IceVolumeAboveFloatationScaled2','GroundedAred2','GroundedAreaScaled2','FloatingArea2','FloatingAreaScaled2',
    33                                                                         'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3','IceVolumeAboveFloatationScaled3','GroundedArea3','GroundedAreaScaled3','FloatingArea3','FloatingAreaScaled3']
    34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    35                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    36                                                                         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    37 field_values=[md.results.TransientSolution[0].Base,
    38                                                         md.results.TransientSolution[0].Surface,
    39                                                         md.results.TransientSolution[0].Thickness,
    40                                                         md.results.TransientSolution[0].MaskGroundediceLevelset,
    41                                                         md.results.TransientSolution[0].IceVolume,
    42                                                         md.results.TransientSolution[0].IceVolumeAboveFloatation,
    43                                                         md.results.TransientSolution[0].IceVolumeAboveFloatationScaled,
    44                                                         md.results.TransientSolution[0].GroundedArea,
    45                                                         md.results.TransientSolution[0].GroundedAreaScaled,
    46                                                         md.results.TransientSolution[0].FloatingArea,
    47                                                         md.results.TransientSolution[0].FloatingAreaScaled,
    48                                                         md.results.TransientSolution[1].Base,
    49                                                         md.results.TransientSolution[1].Surface,
    50                                                         md.results.TransientSolution[1].Thickness,
    51                                                         md.results.TransientSolution[1].MaskGroundediceLevelset,
    52                                                         md.results.TransientSolution[1].IceVolume,
    53                                                         md.results.TransientSolution[1].IceVolumeAboveFloatation,
    54                                                         md.results.TransientSolution[1].IceVolumeAboveFloatationScaled,
    55                                                         md.results.TransientSolution[1].GroundedArea,
    56                                                         md.results.TransientSolution[1].GroundedAreaScaled,
    57                                                         md.results.TransientSolution[1].FloatingArea,
    58                                                         md.results.TransientSolution[1].FloatingAreaScaled,
    59                                                         md.results.TransientSolution[2].Base,
    60                                                         md.results.TransientSolution[2].Surface,
    61                                                         md.results.TransientSolution[2].Thickness,
    62                                                         md.results.TransientSolution[2].MaskGroundediceLevelset,
    63                                                         md.results.TransientSolution[2].IceVolume,
    64                                                         md.results.TransientSolution[2].IceVolumeAboveFloatation,
    65                                                         md.results.TransientSolution[2].IceVolumeAboveFloatationScaled,
    66                                                         md.results.TransientSolution[2].GroundedArea,
    67                                                         md.results.TransientSolution[2].GroundedAreaScaled,
    68                                                         md.results.TransientSolution[2].FloatingArea,
    69                                                         md.results.TransientSolution[2].FloatingAreaScaled]
     31field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceVolumeAboveFloatationScaled1', 'GroundedArea1', 'GroundedAreaScaled1', 'FloatingArea1', 'FloatingAreaScaled1',
     32               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2', 'IceVolume2', 'IceVolumeAboveFloatation2', 'IceVolumeAboveFloatationScaled2', 'GroundedAred2', 'GroundedAreaScaled2', 'FloatingArea2', 'FloatingAreaScaled2',
     33               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3', 'IceVolume3', 'IceVolumeAboveFloatation3', 'IceVolumeAboveFloatationScaled3', 'GroundedArea3', 'GroundedAreaScaled3', 'FloatingArea3', 'FloatingAreaScaled3']
     34field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     35                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     36                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     37field_values = [md.results.TransientSolution[0].Base,
     38                md.results.TransientSolution[0].Surface,
     39                md.results.TransientSolution[0].Thickness,
     40                md.results.TransientSolution[0].MaskGroundediceLevelset,
     41                md.results.TransientSolution[0].IceVolume,
     42                md.results.TransientSolution[0].IceVolumeAboveFloatation,
     43                md.results.TransientSolution[0].IceVolumeAboveFloatationScaled,
     44                md.results.TransientSolution[0].GroundedArea,
     45                md.results.TransientSolution[0].GroundedAreaScaled,
     46                md.results.TransientSolution[0].FloatingArea,
     47                md.results.TransientSolution[0].FloatingAreaScaled,
     48                md.results.TransientSolution[1].Base,
     49                md.results.TransientSolution[1].Surface,
     50                md.results.TransientSolution[1].Thickness,
     51                md.results.TransientSolution[1].MaskGroundediceLevelset,
     52                md.results.TransientSolution[1].IceVolume,
     53                md.results.TransientSolution[1].IceVolumeAboveFloatation,
     54                md.results.TransientSolution[1].IceVolumeAboveFloatationScaled,
     55                md.results.TransientSolution[1].GroundedArea,
     56                md.results.TransientSolution[1].GroundedAreaScaled,
     57                md.results.TransientSolution[1].FloatingArea,
     58                md.results.TransientSolution[1].FloatingAreaScaled,
     59                md.results.TransientSolution[2].Base,
     60                md.results.TransientSolution[2].Surface,
     61                md.results.TransientSolution[2].Thickness,
     62                md.results.TransientSolution[2].MaskGroundediceLevelset,
     63                md.results.TransientSolution[2].IceVolume,
     64                md.results.TransientSolution[2].IceVolumeAboveFloatation,
     65                md.results.TransientSolution[2].IceVolumeAboveFloatationScaled,
     66                md.results.TransientSolution[2].GroundedArea,
     67                md.results.TransientSolution[2].GroundedAreaScaled,
     68                md.results.TransientSolution[2].FloatingArea,
     69                md.results.TransientSolution[2].FloatingAreaScaled]
  • issm/trunk-jpl/test/NightlyRun/test425.py

    r21408 r23793  
    88from solve import *
    99
    10 md=triangle(model(),'../Exp/Square.exp',150000.)
    11 md=setmask(md,'../Exp/SquareShelf.exp','')
    12 md=parameterize(md,'../Par/SquareSheetShelf.py')
    13 md=setflowequation(md,'SSA','all')
    14 md.initialization.vx[:]=0.
    15 md.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.
    18 md.geometry.thickness[:]=1300.
    19 md.geometry.surface=md.geometry.base+md.geometry.thickness
    20 md.smb.mass_balance[:]=-150.
    21 md.transient.isstressbalance=False
    22 md.transient.isgroundingline=True
    23 md.groundingline.migration='SoftMigration'
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.initialization.vx[:] = 0.
     15md.initialization.vy[:] = 0.
     16md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     17md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
     18md.geometry.thickness[:] = 1300.
     19md.geometry.surface = md.geometry.base + md.geometry.thickness
     20md.smb.mass_balance[:] = -150.
     21md.transient.isstressbalance = False
     22md.transient.isgroundingline = True
     23md.groundingline.migration = 'SoftMigration'
    2424
    25 md.cluster=generic('name',gethostname(),'np',3)
    26 md=solve(md,'Transient')
     25md.cluster = generic('name', gethostname(), 'np', 3)
     26md = solve(md, 'Transient')
    2727
    2828#Fields and tolerances to track changes
    29 field_names     =['Bed1','Surface1','Thickness1','Floatingice1',
    30                                                                         'Bed2','Surface2','Thickness2','Floatingice2',
    31                                                                         'Bed3','Surface3','Thickness3','Floatingice3']
    32 field_tolerances=[1e-13,1e-13,1e-13,1e-13,
    33                                                                         1e-13,1e-13,1e-13,1e-13,
    34                                                                         1e-13,1e-13,1e-13,1e-13]
    35 field_values=[md.results.TransientSolution[0].Base,
    36                                                         md.results.TransientSolution[0].Surface,
    37                                                         md.results.TransientSolution[0].Thickness,
    38                                                         md.results.TransientSolution[0].MaskGroundediceLevelset,
    39                                                         md.results.TransientSolution[1].Base,
    40                                                         md.results.TransientSolution[1].Surface,
    41                                                         md.results.TransientSolution[1].Thickness,
    42                                                         md.results.TransientSolution[1].MaskGroundediceLevelset,
    43                                                         md.results.TransientSolution[2].Base,
    44                                                         md.results.TransientSolution[2].Surface,
    45                                                         md.results.TransientSolution[2].Thickness,
    46                                                         md.results.TransientSolution[2].MaskGroundediceLevelset]
     29field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1',
     30               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2',
     31               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3']
     32field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     33                    1e-13, 1e-13, 1e-13, 1e-13,
     34                    1e-13, 1e-13, 1e-13, 1e-13]
     35field_values = [md.results.TransientSolution[0].Base,
     36                md.results.TransientSolution[0].Surface,
     37                md.results.TransientSolution[0].Thickness,
     38                md.results.TransientSolution[0].MaskGroundediceLevelset,
     39                md.results.TransientSolution[1].Base,
     40                md.results.TransientSolution[1].Surface,
     41                md.results.TransientSolution[1].Thickness,
     42                md.results.TransientSolution[1].MaskGroundediceLevelset,
     43                md.results.TransientSolution[2].Base,
     44                md.results.TransientSolution[2].Surface,
     45                md.results.TransientSolution[2].Thickness,
     46                md.results.TransientSolution[2].MaskGroundediceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test426.py

    r23757 r23793  
    88from solve import *
    99
    10 md=triangle(model(),'../Exp/Square.exp',350000.)
    11 md=setmask(md,'../Exp/SquareShelf.exp','')
    12 md=parameterize(md,'../Par/SquareSheetShelf.py')
    13 md.initialization.vx[:]=0.
    14 md.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.
    17 md.geometry.thickness[:]=1000.
    18 md.geometry.surface=md.geometry.base+md.geometry.thickness
    19 md.smb.mass_balance[:]=100.
    20 md=setflowequation(md,'SSA','all')
    21 md.transient.isstressbalance=False
    22 md.transient.isgroundingline=True
    23 md.groundingline.migration='AggressiveMigration'
    24 md.groundingline.melt_interpolation='SubelementMelt1'
    25 md.transient.requested_outputs=['IceVolume','IceVolumeAboveFloatation','IceMass','IceVolumeAboveFloatationScaled','GroundedArea','FloatingArea','GroundedAreaScaled','FloatingAreaScaled']
    26 md.mesh.scale_factor=1.1*np.ones((md.mesh.numberofvertices))
    27 md.extrude(3,1.)
    28 md.cluster=generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 350000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md.initialization.vx[:] = 0.
     14md.initialization.vy[:] = 0.
     15md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     16md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
     17md.geometry.thickness[:] = 1000.
     18md.geometry.surface = md.geometry.base + md.geometry.thickness
     19md.smb.mass_balance[:] = 100.
     20md = setflowequation(md, 'SSA', 'all')
     21md.transient.isstressbalance = False
     22md.transient.isgroundingline = True
     23md.groundingline.migration = 'AggressiveMigration'
     24md.groundingline.melt_interpolation = 'SubelementMelt1'
     25md.transient.requested_outputs = ['IceVolume', 'IceVolumeAboveFloatation', 'IceMass', 'IceVolumeAboveFloatationScaled', 'GroundedArea', 'FloatingArea', 'GroundedAreaScaled', 'FloatingAreaScaled']
     26md.mesh.scale_factor = 1.1 * np.ones((md.mesh.numberofvertices))
     27md.extrude(3, 1.)
     28md.cluster = generic('name', gethostname(), 'np', 3)
    2929
    30 md=solve(md,'Transient')
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names     =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1','IceMass1','IceVolumeAboveFloatationScaled1','GroundedArea1','GroundedAreaScaled1','FloatingArea1','FloatingAreaScaled1',
    34         'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2','IceMass2','IceVolumeAboveFloatationScaled2','GroundedArea2','GroundedAreaScaled2','FloatingArea2','FloatingAreaScaled2',
    35         'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3','IceMass3','IceVolumeAboveFloatationScaled3','GroundedArea3','GroundedAreaScaled3','FloatingArea3','FloatingAreaScaled3']
     33field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceMass1', 'IceVolumeAboveFloatationScaled1', 'GroundedArea1', 'GroundedAreaScaled1', 'FloatingArea1', 'FloatingAreaScaled1',
     34               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2', 'IceVolume2', 'IceVolumeAboveFloatation2', 'IceMass2', 'IceVolumeAboveFloatationScaled2', 'GroundedArea2', 'GroundedAreaScaled2', 'FloatingArea2', 'FloatingAreaScaled2',
     35               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3', 'IceVolume3', 'IceVolumeAboveFloatation3', 'IceMass3', 'IceVolumeAboveFloatationScaled3', 'GroundedArea3', 'GroundedAreaScaled3', 'FloatingArea3', 'FloatingAreaScaled3']
    3636
    37 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    38         1e-11,1e-10,2e-11,3e-11,2e-12,6e-12,2e-12,6e-12,2.5e-12,2.5e-12,8e-12,8e-12,
    39         1e-10,1e-10,1e-10,5e-11,2e-12,5e-12,2e-12,5e-12,5e-11,7e-12,7e-11,7e-11]
     37field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     38                    1e-11, 1e-10, 2e-11, 3e-11, 2e-12, 6e-12, 2e-12, 6e-12, 2.5e-12, 2.5e-12, 8e-12, 8e-12,
     39                    1e-10, 1e-10, 1e-10, 5e-11, 2e-12, 5e-12, 2e-12, 5e-12, 5e-11, 7e-12, 7e-11, 7e-11]
    4040
    41 field_values=[md.results.TransientSolution[0].Base,
    42         md.results.TransientSolution[0].Surface,
    43         md.results.TransientSolution[0].Thickness,
    44         md.results.TransientSolution[0].MaskGroundediceLevelset,
    45         md.results.TransientSolution[0].IceVolume,
    46         md.results.TransientSolution[0].IceVolumeAboveFloatation,
    47         md.results.TransientSolution[0].IceMass,
    48         md.results.TransientSolution[0].IceVolumeAboveFloatationScaled,
    49         md.results.TransientSolution[0].GroundedArea,
    50         md.results.TransientSolution[0].GroundedAreaScaled,
    51         md.results.TransientSolution[0].FloatingArea,
    52         md.results.TransientSolution[0].FloatingAreaScaled,
    53         md.results.TransientSolution[1].Base,
    54         md.results.TransientSolution[1].Surface,
    55         md.results.TransientSolution[1].Thickness,
    56         md.results.TransientSolution[1].MaskGroundediceLevelset,
    57         md.results.TransientSolution[1].IceVolume,
    58         md.results.TransientSolution[1].IceVolumeAboveFloatation,
    59         md.results.TransientSolution[1].IceMass,
    60         md.results.TransientSolution[1].IceVolumeAboveFloatationScaled,
    61         md.results.TransientSolution[1].GroundedArea,
    62         md.results.TransientSolution[1].GroundedAreaScaled,
    63         md.results.TransientSolution[1].FloatingArea,
    64         md.results.TransientSolution[1].FloatingAreaScaled,
    65         md.results.TransientSolution[2].Base,
    66         md.results.TransientSolution[2].Surface,
    67         md.results.TransientSolution[2].Thickness,
    68         md.results.TransientSolution[2].MaskGroundediceLevelset,
    69         md.results.TransientSolution[2].IceVolume,
    70         md.results.TransientSolution[2].IceVolumeAboveFloatation,
    71         md.results.TransientSolution[2].IceMass,
    72         md.results.TransientSolution[2].IceVolumeAboveFloatationScaled,
    73         md.results.TransientSolution[2].GroundedArea,
    74         md.results.TransientSolution[2].GroundedAreaScaled,
    75         md.results.TransientSolution[2].FloatingArea,
    76         md.results.TransientSolution[2].FloatingAreaScaled]
     41field_values = [md.results.TransientSolution[0].Base,
     42                md.results.TransientSolution[0].Surface,
     43                md.results.TransientSolution[0].Thickness,
     44                md.results.TransientSolution[0].MaskGroundediceLevelset,
     45                md.results.TransientSolution[0].IceVolume,
     46                md.results.TransientSolution[0].IceVolumeAboveFloatation,
     47                md.results.TransientSolution[0].IceMass,
     48                md.results.TransientSolution[0].IceVolumeAboveFloatationScaled,
     49                md.results.TransientSolution[0].GroundedArea,
     50                md.results.TransientSolution[0].GroundedAreaScaled,
     51                md.results.TransientSolution[0].FloatingArea,
     52                md.results.TransientSolution[0].FloatingAreaScaled,
     53                md.results.TransientSolution[1].Base,
     54                md.results.TransientSolution[1].Surface,
     55                md.results.TransientSolution[1].Thickness,
     56                md.results.TransientSolution[1].MaskGroundediceLevelset,
     57                md.results.TransientSolution[1].IceVolume,
     58                md.results.TransientSolution[1].IceVolumeAboveFloatation,
     59                md.results.TransientSolution[1].IceMass,
     60                md.results.TransientSolution[1].IceVolumeAboveFloatationScaled,
     61                md.results.TransientSolution[1].GroundedArea,
     62                md.results.TransientSolution[1].GroundedAreaScaled,
     63                md.results.TransientSolution[1].FloatingArea,
     64                md.results.TransientSolution[1].FloatingAreaScaled,
     65                md.results.TransientSolution[2].Base,
     66                md.results.TransientSolution[2].Surface,
     67                md.results.TransientSolution[2].Thickness,
     68                md.results.TransientSolution[2].MaskGroundediceLevelset,
     69                md.results.TransientSolution[2].IceVolume,
     70                md.results.TransientSolution[2].IceVolumeAboveFloatation,
     71                md.results.TransientSolution[2].IceMass,
     72                md.results.TransientSolution[2].IceVolumeAboveFloatationScaled,
     73                md.results.TransientSolution[2].GroundedArea,
     74                md.results.TransientSolution[2].GroundedAreaScaled,
     75                md.results.TransientSolution[2].FloatingArea,
     76                md.results.TransientSolution[2].FloatingAreaScaled]
  • issm/trunk-jpl/test/NightlyRun/test427.py

    r23011 r23793  
    88from solve import *
    99
    10 md=triangle(model(),'../Exp/Square.exp',150000.)
    11 md=setmask(md,'../Exp/SquareShelf.exp','')
    12 md=parameterize(md,'../Par/SquareSheetShelf.py')
    13 md.initialization.vx[:]=0.
    14 md.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.
    17 md.geometry.thickness[:]=1300
    18 md.geometry.surface=md.geometry.base+md.geometry.thickness
    19 md=setflowequation(md,'SSA','all')
    20 md.extrude(3,1.)
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md.initialization.vx[:] = 0.
     14md.initialization.vy[:] = 0.
     15md.geometry.base = -700. - abs(md.mesh.y - 500000.) / 1000.
     16md.geometry.bed = -700. - abs(md.mesh.y - 500000.) / 1000.
     17md.geometry.thickness[:] = 1300
     18md.geometry.surface = md.geometry.base + md.geometry.thickness
     19md = setflowequation(md, 'SSA', 'all')
     20md.extrude(3, 1.)
    2121
    22 md.smb.mass_balance[:]=-150
    23 md.transient.isstressbalance=False
    24 md.transient.isgroundingline=True
    25 md.groundingline.migration='SoftMigration'
    26 md.groundingline.melt_interpolation='SubelementMelt1'
    27 md.cluster=generic('name',gethostname(),'np',3)
    28 md=solve(md,'Transient')
     22md.smb.mass_balance[:] = -150
     23md.transient.isstressbalance = False
     24md.transient.isgroundingline = True
     25md.groundingline.migration = 'SoftMigration'
     26md.groundingline.melt_interpolation = 'SubelementMelt1'
     27md.cluster = generic('name', gethostname(), 'np', 3)
     28md = solve(md, 'Transient')
    2929
    3030#Fields and tolerances to track changes
    31 field_names     =['Bed1','Surface1','Thickness1','Floatingice1',
    32                                                                         'Bed2','Surface2','Thickness2','Floatingice2',
    33                                                                         'Bed3','Surface3','Thickness3','Floatingice3']
    34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,
    35                                                                         5e-12,4e-12,7e-12,2e-11,
    36                                                                         1e-10,5e-11,1e-10,7e-10]
    37 field_values=[md.results.TransientSolution[0].Base,
    38                                                         md.results.TransientSolution[0].Surface,
    39                                                         md.results.TransientSolution[0].Thickness,
    40                                                         md.results.TransientSolution[0].MaskGroundediceLevelset,
    41                                                         md.results.TransientSolution[1].Base,
    42                                                         md.results.TransientSolution[1].Surface,
    43                                                         md.results.TransientSolution[1].Thickness,
    44                                                         md.results.TransientSolution[1].MaskGroundediceLevelset,
    45                                                         md.results.TransientSolution[2].Base,
    46                                                         md.results.TransientSolution[2].Surface,
    47                                                         md.results.TransientSolution[2].Thickness,
    48                                                         md.results.TransientSolution[2].MaskGroundediceLevelset]
     31field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1',
     32               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2',
     33               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3']
     34field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13,
     35                    5e-12, 4e-12, 7e-12, 2e-11,
     36                    1e-10, 5e-11, 1e-10, 7e-10]
     37field_values = [md.results.TransientSolution[0].Base,
     38                md.results.TransientSolution[0].Surface,
     39                md.results.TransientSolution[0].Thickness,
     40                md.results.TransientSolution[0].MaskGroundediceLevelset,
     41                md.results.TransientSolution[1].Base,
     42                md.results.TransientSolution[1].Surface,
     43                md.results.TransientSolution[1].Thickness,
     44                md.results.TransientSolution[1].MaskGroundediceLevelset,
     45                md.results.TransientSolution[2].Base,
     46                md.results.TransientSolution[2].Surface,
     47                md.results.TransientSolution[2].Thickness,
     48                md.results.TransientSolution[2].MaskGroundediceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test428.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressSSA2dNewton
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.stressbalance.isnewton=1
    17 md.stressbalance.restol=0.0001
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.stressbalance.isnewton = 1
     16md.stressbalance.restol = 0.0001
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Stressbalance')
    2019
    2120#Fields and tolerances to track changes
    22 field_names     =['Vx','Vy','Vel','Pressure']
    23 field_tolerances=[1e-13,1e-13,1e-13,1e-13]
    24 field_values=[\
    25         md.results.StressbalanceSolution.Vx,\
    26         md.results.StressbalanceSolution.Vy,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     21field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     22field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     23field_values = [md.results.StressbalanceSolution.Vx,
     24                md.results.StressbalanceSolution.Vy,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test429.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressHONewton
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.stressbalance.isnewton=1
    18 md.stressbalance.restol=0.0001
    19 md.cluster=generic('name',gethostname(),'np',3)
    20 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.stressbalance.isnewton = 1
     17md.stressbalance.restol = 0.0001
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md = solve(md, 'Stressbalance')
    2120
    2221#Fields and tolerances to track changes
    23 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    24 field_tolerances=[2e-06,2e-06,1e-06,2e-06,1e-06]
    25 field_values=[\
    26         md.results.StressbalanceSolution.Vx,\
    27         md.results.StressbalanceSolution.Vy,\
    28         md.results.StressbalanceSolution.Vz,\
    29         md.results.StressbalanceSolution.Vel,\
    30         md.results.StressbalanceSolution.Pressure,\
    31         ]
     22field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     23field_tolerances = [2e-06, 2e-06, 1e-06, 2e-06, 1e-06]
     24field_values = [md.results.StressbalanceSolution.Vx,
     25                md.results.StressbalanceSolution.Vy,
     26                md.results.StressbalanceSolution.Vz,
     27                md.results.StressbalanceSolution.Vel,
     28                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test430.py

    r22999 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',100000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
     11md = triangle(model(), '../Exp/Square.exp', 100000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
    1414md.initialization.vx[:] = 1.
    1515md.initialization.vy[:] = 1.
     
    2121md.geometry.base[pos] = md.geometry.bed[pos]
    2222md.geometry.surface = md.geometry.base + md.geometry.thickness
    23 md = setflowequation(md,'SSA','all')
     23md = setflowequation(md, 'SSA', 'all')
    2424
    2525#Boundary conditions:
     
    2929md.stressbalance.spcvy[:] = float('NaN')
    3030md.stressbalance.spcvz[:] = float('NaN')
    31 posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)),np.array(np.where(md.mesh.y > 999999.9)))
    32 posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)),np.array(np.where(md.mesh.y > -0.1)))
    33 pos = np.unique(np.concatenate((posA,posB)))
     31posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)), np.array(np.where(md.mesh.y > 999999.9)))
     32posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)), np.array(np.where(md.mesh.y > -0.1)))
     33pos = np.unique(np.concatenate((posA, posB)))
    3434md.stressbalance.spcvy[pos] = 0.
    3535pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1)))
     
    4949md.transient.ismasstransport = 1
    5050md.transient.issmb = 1
    51 md.transient.requested_outputs = ['default','BasalforcingsFloatingiceMeltingRate']
     51md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']
    5252md.groundingline.migration = 'SubelementMigration'
    53 md.groundingline.melt_interpolation= 'SubelementMelt1'
     53md.groundingline.melt_interpolation = 'SubelementMelt1'
    5454md.timestepping.final_time = 30
    5555md.timestepping.time_step = 10
    5656
    57 md.cluster = generic('name',gethostname(),'np',3)
    58 md = solve(md,'Transient')
     57md.cluster = generic('name', gethostname(), 'np', 3)
     58md = solve(md, 'Transient')
    5959#print md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate
    6060#print md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate
     
    6262
    6363#Fields and tolerances to track changes
    64 field_names     = [
    65         'Bed1','Surface1','Thickness1','Floatingice1','Vx1','Vy1','Pressure1','FloatingiceMeltingrate1',
    66         'Bed2','Surface2','Thickness2','Floatingice2','Vx2','Vy2','Pressure2','FloatingiceMeltingrate2',
    67         'Bed3','Surface3','Thickness3','Floatingice3','Vx3','Vy3','Pressure3','FloatingiceMeltingrate3']
    68 field_tolerances = [2e-11,5e-12,2e-11,1e-11,5e-10,1e-08,1e-13,1e-13,
    69         3e-11,3e-11,9e-10,7e-11,1e-09,5e-08,1e-10,1e-13,
    70         1e-10,3e-11,1e-10,7e-11,1e-09,5e-08,1e-10,1e-13]
    71 field_values = [
    72         md.results.TransientSolution[0].Base,
    73         md.results.TransientSolution[0].Surface,
    74         md.results.TransientSolution[0].Thickness,
    75         md.results.TransientSolution[0].MaskGroundediceLevelset,
    76         md.results.TransientSolution[0].Vx,
    77         md.results.TransientSolution[0].Vy,
    78         md.results.TransientSolution[0].Pressure,
    79         md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
    80         md.results.TransientSolution[1].Base,
    81         md.results.TransientSolution[1].Surface,
    82         md.results.TransientSolution[1].Thickness,
    83         md.results.TransientSolution[1].MaskGroundediceLevelset,
    84         md.results.TransientSolution[1].Vx,
    85         md.results.TransientSolution[1].Vy,
    86         md.results.TransientSolution[1].Pressure,
    87         md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
    88         md.results.TransientSolution[2].Base,
    89         md.results.TransientSolution[2].Surface,
    90         md.results.TransientSolution[2].Thickness,
    91         md.results.TransientSolution[2].MaskGroundediceLevelset,
    92         md.results.TransientSolution[2].Vx,
    93         md.results.TransientSolution[2].Vy,
    94         md.results.TransientSolution[2].Pressure,
    95         md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate,
    96         ]
     64field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1', 'Vx1', 'Vy1', 'Pressure1', 'FloatingiceMeltingrate1',
     65               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2', 'Vx2', 'Vy2', 'Pressure2', 'FloatingiceMeltingrate2',
     66               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3', 'Vx3', 'Vy3', 'Pressure3', 'FloatingiceMeltingrate3']
     67field_tolerances = [2e-11, 5e-12, 2e-11, 1e-11, 5e-10, 1e-08, 1e-13, 1e-13,
     68                    3e-11, 3e-11, 9e-10, 7e-11, 1e-09, 5e-08, 1e-10, 1e-13,
     69                    1e-10, 3e-11, 1e-10, 7e-11, 1e-09, 5e-08, 1e-10, 1e-13]
     70field_values = [md.results.TransientSolution[0].Base,
     71                md.results.TransientSolution[0].Surface,
     72                md.results.TransientSolution[0].Thickness,
     73                md.results.TransientSolution[0].MaskGroundediceLevelset,
     74                md.results.TransientSolution[0].Vx,
     75                md.results.TransientSolution[0].Vy,
     76                md.results.TransientSolution[0].Pressure,
     77                md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
     78                md.results.TransientSolution[1].Base,
     79                md.results.TransientSolution[1].Surface,
     80                md.results.TransientSolution[1].Thickness,
     81                md.results.TransientSolution[1].MaskGroundediceLevelset,
     82                md.results.TransientSolution[1].Vx,
     83                md.results.TransientSolution[1].Vy,
     84                md.results.TransientSolution[1].Pressure,
     85                md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
     86                md.results.TransientSolution[2].Base,
     87                md.results.TransientSolution[2].Surface,
     88                md.results.TransientSolution[2].Thickness,
     89                md.results.TransientSolution[2].MaskGroundediceLevelset,
     90                md.results.TransientSolution[2].Vx,
     91                md.results.TransientSolution[2].Vy,
     92                md.results.TransientSolution[2].Pressure,
     93                md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test431.py

    r21408 r23793  
    1010from solve import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.timestepping.time_step=0.
    19 md.thermal.isenthalpy=1
    20 md.thermal.isdynamicbasalspc=1
    21 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    22 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
    23 md=solve(md,'Steadystate')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.timestepping.time_step = 0.
     19md.thermal.isenthalpy = 1
     20md.thermal.isdynamicbasalspc = 1
     21md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     22md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
     23md = solve(md, 'Steadystate')
    2424
    2525#Fields and tolerances to track changes
    26 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','Waterfraction','Enthalpy']
    27 field_tolerances=[8e-4,5e-4,5e-4,5e-4,1e-13,1e-4,5e-4,5e-4]
    28 field_values=[\
    29         md.results.SteadystateSolution.Vx,\
    30         md.results.SteadystateSolution.Vy,\
    31         md.results.SteadystateSolution.Vz,\
    32         md.results.SteadystateSolution.Vel,\
    33         md.results.SteadystateSolution.Pressure,\
    34         md.results.SteadystateSolution.Temperature,\
    35         md.results.SteadystateSolution.Waterfraction,\
    36         md.results.SteadystateSolution.Enthalpy,\
    37         ]
     26field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'Waterfraction', 'Enthalpy']
     27field_tolerances = [8e-4, 5e-4, 5e-4, 5e-4, 1e-13, 1e-4, 5e-4, 5e-4]
     28field_values = [md.results.SteadystateSolution.Vx,
     29                md.results.SteadystateSolution.Vy,
     30                md.results.SteadystateSolution.Vz,
     31                md.results.SteadystateSolution.Vel,
     32                md.results.SteadystateSolution.Pressure,
     33                md.results.SteadystateSolution.Temperature,
     34                md.results.SteadystateSolution.Waterfraction,
     35                md.results.SteadystateSolution.Enthalpy]
  • issm/trunk-jpl/test/NightlyRun/test432.py

    r23180 r23793  
    1010from solve import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(3,2.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.timestepping.time_step=0.
    19 md.thermal.isenthalpy=1
    20 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    21 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
    22 md=solve(md,'Steadystate')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md.extrude(3, 2.)
     16md = setflowequation(md, 'HO', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.timestepping.time_step = 0.
     19md.thermal.isenthalpy = 1
     20md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     21md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
     22md = solve(md, 'Steadystate')
    2323
    2424#Fields and tolerances to track changes
    25 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','Waterfraction','Enthalpy']
    26 field_tolerances=[3e-09,1e-09,1e-09,1e-09,1e-13,1e-10,4e-10,3e-9]
    27 field_values=[\
    28         md.results.SteadystateSolution.Vx,\
    29         md.results.SteadystateSolution.Vy,\
    30         md.results.SteadystateSolution.Vz,\
    31         md.results.SteadystateSolution.Vel,\
    32         md.results.SteadystateSolution.Pressure,\
    33         md.results.SteadystateSolution.Temperature,\
    34         md.results.SteadystateSolution.Waterfraction,\
    35         md.results.SteadystateSolution.Enthalpy,\
    36         ]
     25field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'Waterfraction', 'Enthalpy']
     26field_tolerances = [3e-09, 1e-09, 1e-09, 1e-09, 1e-13, 1e-10, 4e-10, 3e-9]
     27field_values = [md.results.SteadystateSolution.Vx,
     28                md.results.SteadystateSolution.Vy,
     29                md.results.SteadystateSolution.Vz,
     30                md.results.SteadystateSolution.Vel,
     31                md.results.SteadystateSolution.Pressure,
     32                md.results.SteadystateSolution.Temperature,
     33                md.results.SteadystateSolution.Waterfraction,
     34                md.results.SteadystateSolution.Enthalpy]
  • issm/trunk-jpl/test/NightlyRun/test433.py

    r23016 r23793  
    1010
    1111
    12 radius=1.e6
    13 shelfextent=2.e5
     12radius = 1.e6
     13shelfextent = 2.e5
    1414
    15 md=roundmesh(model(),radius,50000.)
    16 #fix center node to 0,0
    17 rad=np.sqrt(md.mesh.x**2+md.mesh.y**2)
    18 pos=np.argmin(rad)
    19 md.mesh.x[pos]=0.
    20 md.mesh.y[pos]=0.    #the closest node to the center is changed to be exactly at the center
    21 xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
    22 yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
    23 rad=np.sqrt(xelem**2+yelem**2)
    24 flags=np.zeros(md.mesh.numberofelements)
    25 pos=np.nonzero(rad>=(radius-shelfextent))
    26 flags[pos]=1
    27 md=setmask(md,flags,'')
    28 md=parameterize(md,'../Par/RoundSheetShelf.py')
    29 md=setflowequation(md,'SSA','all')
    30 md.extrude(3,1.)
    31 md.cluster=generic('name',gethostname(),'np',3)
     15md = roundmesh(model(), radius, 50000.)
     16#fix center node to 0, 0
     17rad = np.sqrt(md.mesh.x**2 + md.mesh.y**2)
     18pos = np.argmin(rad)
     19md.mesh.x[pos] = 0.
     20md.mesh.y[pos] = 0.    #the closest node to the center is changed to be exactly at the center
     21xelem = np.mean(md.mesh.x[md.mesh.elements.astype(int) - 1], axis=1)
     22yelem = np.mean(md.mesh.y[md.mesh.elements.astype(int) - 1], axis=1)
     23rad = np.sqrt(xelem**2 + yelem**2)
     24flags = np.zeros(md.mesh.numberofelements)
     25pos = np.nonzero(rad >= (radius - shelfextent))
     26flags[pos] = 1
     27md = setmask(md, flags, '')
     28md = parameterize(md, '../Par/RoundSheetShelf.py')
     29md = setflowequation(md, 'SSA', 'all')
     30md.extrude(3, 1.)
     31md.cluster = generic('name', gethostname(), 'np', 3)
    3232
    33 md.transient.isthermal=False
    34 md.transient.ismasstransport=False
    35 md.transient.issmb=True
    36 md.transient.isstressbalance=False
    37 md.transient.isgroundingline=True
     33md.transient.isthermal = False
     34md.transient.ismasstransport = False
     35md.transient.issmb = True
     36md.transient.isstressbalance = False
     37md.transient.isgroundingline = True
    3838
    3939#test different grounding line dynamics.
    40 md.groundingline.migration='AggressiveMigration'
    41 md=solve(md,'Transient')
    42 element_on_iceshelf_agressive=md.results.TransientSolution[0].MaskGroundediceLevelset
     40md.groundingline.migration = 'AggressiveMigration'
     41md = solve(md, 'Transient')
     42element_on_iceshelf_agressive = md.results.TransientSolution[0].MaskGroundediceLevelset
    4343
    44 md.groundingline.migration='SoftMigration'
    45 md=solve(md,'Transient')
    46 element_on_iceshelf_soft=md.results.TransientSolution[0].MaskGroundediceLevelset
     44md.groundingline.migration = 'SoftMigration'
     45md = solve(md, 'Transient')
     46element_on_iceshelf_soft = md.results.TransientSolution[0].MaskGroundediceLevelset
    4747
    48 md.groundingline.migration='SubelementMigration'
    49 md=solve(md,'Transient')
    50 element_on_iceshelf_subelement=md.results.TransientSolution[0].MaskGroundediceLevelset
     48md.groundingline.migration = 'SubelementMigration'
     49md = solve(md, 'Transient')
     50element_on_iceshelf_subelement = md.results.TransientSolution[0].MaskGroundediceLevelset
    5151
    52 md.groundingline.migration='SubelementMigration'
    53 md.groundingline.friction_interpolation='SubelementFriction2'
    54 md=solve(md,'Transient')
    55 element_on_iceshelf_subelement2=md.results.TransientSolution[0].MaskGroundediceLevelset
     52md.groundingline.migration = 'SubelementMigration'
     53md.groundingline.friction_interpolation = 'SubelementFriction2'
     54md = solve(md, 'Transient')
     55element_on_iceshelf_subelement2 = md.results.TransientSolution[0].MaskGroundediceLevelset
    5656
    5757#Fields and tolerances to track changes
    58 field_names     =['ElementOnIceShelfAggressive','ElementOnIceShelfSoft','ElementOnIceShelfSubelement']
    59 field_tolerances=[1e-13,1e-13,1e-13]
    60 field_values=[element_on_iceshelf_agressive,element_on_iceshelf_soft,element_on_iceshelf_subelement]
     58field_names = ['ElementOnIceShelfAggressive', 'ElementOnIceShelfSoft', 'ElementOnIceShelfSubelement']
     59field_tolerances = [1e-13, 1e-13, 1e-13]
     60field_values = [element_on_iceshelf_agressive, element_on_iceshelf_soft, element_on_iceshelf_subelement]
  • issm/trunk-jpl/test/NightlyRun/test434.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfL1L2
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(4,1.)
    16 md=setflowequation(md,'L1L2','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(4, 1.)
     15md = setflowequation(md, 'L1L2', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[1e-06,1e-06,1e-06,1e-06,1e-07]
    23 field_values=[\
    24         md.results.StressbalanceSolution.Vx,\
    25         md.results.StressbalanceSolution.Vy,\
    26         md.results.StressbalanceSolution.Vz,\
    27         md.results.StressbalanceSolution.Vel,\
    28         md.results.StressbalanceSolution.Pressure,\
    29         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-06, 1e-06, 1e-06, 1e-06, 1e-07]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test435.py

    r23016 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',100000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
     11md = triangle(model(), '../Exp/Square.exp', 100000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
    1414md.initialization.vx[:] = 1.
    1515md.initialization.vy[:] = 1.
     
    2121md.geometry.base[pos] = md.geometry.bed[pos]
    2222md.geometry.surface = md.geometry.base + md.geometry.thickness
    23 md = md.extrude(4,1.)
    24 md = setflowequation(md,'HO','all')
     23md = md.extrude(4, 1.)
     24md = setflowequation(md, 'HO', 'all')
    2525
    2626#Boundary conditions:
     
    3030md.stressbalance.spcvy[:] = float('Nan')
    3131md.stressbalance.spcvz[:] = float('Nan')
    32 posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)),np.array(np.where(md.mesh.y > 999999.9)))
    33 posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)),np.array(np.where(md.mesh.y > -0.1)))
    34 pos = np.unique(np.concatenate((posA,posB)))
     32posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)), np.array(np.where(md.mesh.y > 999999.9)))
     33posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)), np.array(np.where(md.mesh.y > -0.1)))
     34pos = np.unique(np.concatenate((posA, posB)))
    3535md.stressbalance.spcvy[pos] = 0.
    3636pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1)))
     
    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,))
     
    5050md.transient.ismasstransport = 1
    5151md.transient.issmb = 1
    52 md.transient.requested_outputs = ['default','BasalforcingsFloatingiceMeltingRate']
     52md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']
    5353md.groundingline.migration = 'SubelementMigration'
    54 md.groundingline.melt_interpolation= 'SubelementMelt1'
     54md.groundingline.melt_interpolation = 'SubelementMelt1'
    5555md.timestepping.final_time = 30
    5656md.timestepping.time_step = 10
    5757
    58 md.cluster = generic('name',gethostname(),'np',3)
    59 md = solve(md,'Transient')
     58md.cluster = generic('name', gethostname(), 'np', 3)
     59md = solve(md, 'Transient')
    6060
    6161#Fields and tolerances to track changes
    62 field_names     = [
    63         'Bed1','Surface1','Thickness1','Floatingice1','Vx1','Vy1','Vz1','Pressure1','FloatingiceMeltingrate1',
    64         'Bed2','Surface2','Thickness2','Floatingice2','Vx2','Vy2','Vz2','Pressure2','FloatingiceMeltingrate2',
    65         'Bed3','Surface3','Thickness3','Floatingice3','Vx3','Vy3','Vz3','Pressure3','FloatingiceMeltingrate3']
    66 field_tolerances = [
    67         2e-11,5e-12,2e-11,1e-11,7e-10,3e-08,6e-10,1e-13,1e-13,
    68         3e-11,3e-11,9e-10,7e-11,9e-09,2e-07,1e-09,1e-10,1e-13,
    69         1e-9,2e-08,7e-09,2e-7 ,1e-03,8e-04,2e-09,1e-10,1e-13]
    70 field_values = [
    71         md.results.TransientSolution[0].Base,
    72         md.results.TransientSolution[0].Surface,
    73         md.results.TransientSolution[0].Thickness,
    74         md.results.TransientSolution[0].MaskGroundediceLevelset,
    75         md.results.TransientSolution[0].Vx,
    76         md.results.TransientSolution[0].Vy,
    77         md.results.TransientSolution[0].Vz,
    78         md.results.TransientSolution[0].Pressure,
    79         md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
    80         md.results.TransientSolution[1].Base,
    81         md.results.TransientSolution[1].Surface,
    82         md.results.TransientSolution[1].Thickness,
    83         md.results.TransientSolution[1].MaskGroundediceLevelset,
    84         md.results.TransientSolution[1].Vx,
    85         md.results.TransientSolution[1].Vy,
    86         md.results.TransientSolution[1].Vz,
    87         md.results.TransientSolution[1].Pressure,
    88         md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
    89         md.results.TransientSolution[2].Base,
    90         md.results.TransientSolution[2].Surface,
    91         md.results.TransientSolution[2].Thickness,
    92         md.results.TransientSolution[2].MaskGroundediceLevelset,
    93         md.results.TransientSolution[2].Vx,
    94         md.results.TransientSolution[2].Vy,
    95         md.results.TransientSolution[2].Vz,
    96         md.results.TransientSolution[2].Pressure,
    97         md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate,
    98         ]
     62field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1', 'Vx1', 'Vy1', 'Vz1', 'Pressure1', 'FloatingiceMeltingrate1',
     63               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2', 'Vx2', 'Vy2', 'Vz2', 'Pressure2', 'FloatingiceMeltingrate2',
     64               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3', 'Vx3', 'Vy3', 'Vz3', 'Pressure3', 'FloatingiceMeltingrate3']
     65field_tolerances = [2e-11, 5e-12, 2e-11, 1e-11, 7e-10, 3e-08, 6e-10, 1e-13, 1e-13,
     66                    3e-11, 3e-11, 9e-10, 7e-11, 9e-09, 2e-07, 1e-09, 1e-10, 1e-13,
     67                    1e-9, 2e-08, 7e-09, 2e-7, 1e-03, 8e-04, 2e-09, 1e-10, 1e-13]
     68field_values = [md.results.TransientSolution[0].Base,
     69                md.results.TransientSolution[0].Surface,
     70                md.results.TransientSolution[0].Thickness,
     71                md.results.TransientSolution[0].MaskGroundediceLevelset,
     72                md.results.TransientSolution[0].Vx,
     73                md.results.TransientSolution[0].Vy,
     74                md.results.TransientSolution[0].Vz,
     75                md.results.TransientSolution[0].Pressure,
     76                md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
     77                md.results.TransientSolution[1].Base,
     78                md.results.TransientSolution[1].Surface,
     79                md.results.TransientSolution[1].Thickness,
     80                md.results.TransientSolution[1].MaskGroundediceLevelset,
     81                md.results.TransientSolution[1].Vx,
     82                md.results.TransientSolution[1].Vy,
     83                md.results.TransientSolution[1].Vz,
     84                md.results.TransientSolution[1].Pressure,
     85                md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
     86                md.results.TransientSolution[2].Base,
     87                md.results.TransientSolution[2].Surface,
     88                md.results.TransientSolution[2].Thickness,
     89                md.results.TransientSolution[2].MaskGroundediceLevelset,
     90                md.results.TransientSolution[2].Vx,
     91                md.results.TransientSolution[2].Vy,
     92                md.results.TransientSolution[2].Vz,
     93                md.results.TransientSolution[2].Pressure,
     94                md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test436.py

    r23707 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',150000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
    14 md = md.extrude(3,2.)
    15 md = setflowequation(md,'HO','all')
    16 md.cluster = generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 150000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md = md.extrude(3, 2.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717md.timestepping.time_step = 0.
    1818md.thermal.isenthalpy = 1
     
    2525field_values = []
    2626for i in ['LliboutryDuval', 'CuffeyTemperate']:
    27         print(' ')
    28         print('====== Testing rheology law: ' + i + ' =====')
     27    print(' ')
     28    print('====== Testing rheology law: ' + i + ' =')
    2929
    30         md.materials.rheology_law = i
    31         md = solve(md,'Steadystate')
    32         field_names += ['Vx'+i,'Vy'+i,'Vz'+i,'Vel'+i,'Pressure'+i,
    33                 'Temperature'+i,'Waterfraction'+i,'Enthalpy'+i]
    34         field_tolerances += [2e-09,1e-09,1e-09,1e-09,1e-13,2e-10,6e-10,1e-9]
    35         field_values += [
    36                 md.results.SteadystateSolution.Vx,
    37                 md.results.SteadystateSolution.Vy,
    38                 md.results.SteadystateSolution.Vz,
    39                 md.results.SteadystateSolution.Vel,
    40                 md.results.SteadystateSolution.Pressure,
    41                 md.results.SteadystateSolution.Temperature,
    42                 md.results.SteadystateSolution.Waterfraction,
    43                 md.results.SteadystateSolution.Enthalpy,
    44                 ]
    45 
     30    md.materials.rheology_law = i
     31    md = solve(md, 'Steadystate')
     32    field_names += ['Vx' + i, 'Vy' + i, 'Vz' + i, 'Vel' + i, 'Pressure' + i,
     33                    'Temperature' + i, 'Waterfraction' + i, 'Enthalpy' + i]
     34    field_tolerances += [2e-09, 1e-09, 1e-09, 1e-09, 1e-13, 2e-10, 6e-10, 1e-9]
     35    field_values += [md.results.SteadystateSolution.Vx,
     36                     md.results.SteadystateSolution.Vy,
     37                     md.results.SteadystateSolution.Vz,
     38                     md.results.SteadystateSolution.Vel,
     39                     md.results.SteadystateSolution.Pressure,
     40                     md.results.SteadystateSolution.Temperature,
     41                     md.results.SteadystateSolution.Waterfraction,
     42                     md.results.SteadystateSolution.Enthalpy]
  • issm/trunk-jpl/test/NightlyRun/test437.py

    r22267 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',300000.)
    12 md = setmask(md,'','')
    13 md = parameterize(md,'../Par/SquareThermal.py')
     11md = triangle(model(), '../Exp/Square.exp', 300000.)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/SquareThermal.py')
    1414
    1515h = 100.
     
    1818md.geometry.surface = md.geometry.base + md.geometry.thickness
    1919
    20 md.extrude(41,2.)
    21 md = setflowequation(md,'HO','all')
     20md.extrude(41, 2.)
     21md = setflowequation(md, 'HO', 'all')
    2222md.thermal.isenthalpy = True
    2323md.thermal.isdynamicbasalspc = True
    2424
    2525#Basal forcing
    26 Ts = 273.15-3.
    27 Tb = 273.15-1.
     26Ts = 273.15 - 3.
     27Tb = 273.15 - 1.
    2828Tsw = Tb
    29 qgeo = md.materials.thermalconductivity / max(md.geometry.thickness) * (Tb - Ts) #qgeo=kappa*(Tb-Ts)/H
     29qgeo = md.materials.thermalconductivity / max(md.geometry.thickness) * (Tb - Ts)  #qgeo = kappa*(Tb-Ts)/H
    3030md.basalforcings.geothermalflux[np.where(md.mesh.vertexonbase)] = qgeo
    3131md.initialization.temperature = qgeo / md.materials.thermalconductivity * (md.geometry.surface - md.mesh.z) + Ts
     
    4343t2 = 100.
    4444md.timestepping.final_time = 400.
    45 md.thermal.spctemperature = np.array([SPC_cold,SPC_cold,SPC_warm,SPC_warm,SPC_cold]).T
    46 md.thermal.spctemperature = np.vstack((md.thermal.spctemperature,[t0, t1-1, t1, t2-1, t2]))
     45md.thermal.spctemperature = np.array([SPC_cold, SPC_cold, SPC_warm, SPC_warm, SPC_cold]).T
     46md.thermal.spctemperature = np.vstack((md.thermal.spctemperature, [t0, t1 - 1, t1, t2 - 1, t2]))
    4747#print np.shape(md.thermal.spctemperature)
    4848#print md.thermal.spctemperature
     
    5757#Go solve
    5858md.verbose = verbose(0)
    59 md.cluster = generic('name',gethostname(),'np',3)
    60 md = solve(md,'Transient')
     59md.cluster = generic('name', gethostname(), 'np', 3)
     60md = solve(md, 'Transient')
    6161
    6262#Fields and tolerances to track changes
    63 field_names = ['Enthalpy1','Temperature1','Waterfraction1','BasalMeltingRate1','Watercolumn1',
    64                    'Enthalpy2','Temperature2','Waterfraction2','BasalMeltingRate2','Watercolumn2',
    65                    'Enthalpy3','Temperature3','Waterfraction3','BasalMeltingRate3','Watercolumn3',
    66                    'Enthalpy4','Temperature4','Waterfraction4','BasalMeltingRate4','Watercolumn4']
    67 field_tolerances = [1.e-10,1.e-10,1.e-10,1.e-9,1.e-10,
    68                     1.e-10,1.e-10,1.e-10,2.e-9,2.e-10,
    69                     1.e-10,1.e-10,1.e-10,2.e-9,1.e-10,
    70                     1.e-10,1.e-10,1.e-10,2.e-9,1.e-10]
     63field_names = ['Enthalpy1', 'Temperature1', 'Waterfraction1', 'BasalMeltingRate1', 'Watercolumn1',
     64               'Enthalpy2', 'Temperature2', 'Waterfraction2', 'BasalMeltingRate2', 'Watercolumn2',
     65               'Enthalpy3', 'Temperature3', 'Waterfraction3', 'BasalMeltingRate3', 'Watercolumn3',
     66               'Enthalpy4', 'Temperature4', 'Waterfraction4', 'BasalMeltingRate4', 'Watercolumn4']
     67field_tolerances = [1.e-10, 1.e-10, 1.e-10, 1.e-9, 1.e-10,
     68                    1.e-10, 1.e-10, 1.e-10, 2.e-9, 2.e-10,
     69                    1.e-10, 1.e-10, 1.e-10, 2.e-9, 1.e-10,
     70                    1.e-10, 1.e-10, 1.e-10, 2.e-9, 1.e-10]
    7171i1 = 0
    72 i2 = int(np.ceil(t2 / md.timestepping.time_step) + 2)-1
    73 i3 = int(np.ceil(md.timestepping.final_time / (2. * md.timestepping.time_step)))-1
    74 i4 = np.shape(md.results.TransientSolution)[0]-1
    75 field_values = [
    76         md.results.TransientSolution[i1].Enthalpy,
    77         md.results.TransientSolution[i1].Temperature,
    78         md.results.TransientSolution[i1].Waterfraction,
    79         md.results.TransientSolution[i1].BasalforcingsGroundediceMeltingRate,
    80         md.results.TransientSolution[i1].Watercolumn,
    81         md.results.TransientSolution[i2].Enthalpy,
    82         md.results.TransientSolution[i2].Temperature,
    83         md.results.TransientSolution[i2].Waterfraction,
    84         md.results.TransientSolution[i2].BasalforcingsGroundediceMeltingRate,
    85         md.results.TransientSolution[i2].Watercolumn,
    86         md.results.TransientSolution[i3].Enthalpy,
    87         md.results.TransientSolution[i3].Temperature,
    88         md.results.TransientSolution[i3].Waterfraction,
    89         md.results.TransientSolution[i3].BasalforcingsGroundediceMeltingRate,
    90         md.results.TransientSolution[i3].Watercolumn,
    91         md.results.TransientSolution[i4].Enthalpy,
    92         md.results.TransientSolution[i4].Temperature,
    93         md.results.TransientSolution[i4].Waterfraction,
    94         md.results.TransientSolution[i4].BasalforcingsGroundediceMeltingRate,
    95         md.results.TransientSolution[i4].Watercolumn,
    96         ]
     72i2 = int(np.ceil(t2 / md.timestepping.time_step) + 2) - 1
     73i3 = int(np.ceil(md.timestepping.final_time / (2. * md.timestepping.time_step))) - 1
     74i4 = np.shape(md.results.TransientSolution)[0] - 1
     75field_values = [md.results.TransientSolution[i1].Enthalpy,
     76                md.results.TransientSolution[i1].Temperature,
     77                md.results.TransientSolution[i1].Waterfraction,
     78                md.results.TransientSolution[i1].BasalforcingsGroundediceMeltingRate,
     79                md.results.TransientSolution[i1].Watercolumn,
     80                md.results.TransientSolution[i2].Enthalpy,
     81                md.results.TransientSolution[i2].Temperature,
     82                md.results.TransientSolution[i2].Waterfraction,
     83                md.results.TransientSolution[i2].BasalforcingsGroundediceMeltingRate,
     84                md.results.TransientSolution[i2].Watercolumn,
     85                md.results.TransientSolution[i3].Enthalpy,
     86                md.results.TransientSolution[i3].Temperature,
     87                md.results.TransientSolution[i3].Waterfraction,
     88                md.results.TransientSolution[i3].BasalforcingsGroundediceMeltingRate,
     89                md.results.TransientSolution[i3].Watercolumn,
     90                md.results.TransientSolution[i4].Enthalpy,
     91                md.results.TransientSolution[i4].Temperature,
     92                md.results.TransientSolution[i4].Waterfraction,
     93                md.results.TransientSolution[i4].BasalforcingsGroundediceMeltingRate,
     94                md.results.TransientSolution[i4].Watercolumn]
  • issm/trunk-jpl/test/NightlyRun/test438.py

    r22267 r23793  
    1010from frictionwaterlayer import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'../Exp/SquareShelf.exp','')
    14 md = parameterize(md,'../Par/SquareSheetShelf.py')
    15 md = setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
    1616md.friction = frictionwaterlayer(md)
    17 md.friction.water_layer = np.zeros((md.mesh.numberofvertices+1,2))
    18 md.friction.water_layer[:,1] = 1.
    19 md.friction.water_layer[md.mesh.numberofvertices,:] = [1.,2.]
     17md.friction.water_layer = np.zeros((md.mesh.numberofvertices + 1, 2))
     18md.friction.water_layer[:, 1] = 1.
     19md.friction.water_layer[md.mesh.numberofvertices, :] = [1., 2.]
    2020md.friction.f = 0.8
    21 md.cluster = generic('name',gethostname(),'np',3)
    22 md = solve(md,'Transient')
     21md.cluster = generic('name', gethostname(), 'np', 3)
     22md = solve(md, 'Transient')
    2323
    2424#Fields and tolerances to track changes
    25 field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1',
    26               'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2',
    27               'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    28 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    29                   1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    30                   1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    31 field_values = [
    32         md.results.TransientSolution[0].Vx,
    33         md.results.TransientSolution[0].Vy,
    34         md.results.TransientSolution[0].Vel,
    35         md.results.TransientSolution[0].Pressure,
    36         md.results.TransientSolution[0].Base,
    37         md.results.TransientSolution[0].Surface,
    38         md.results.TransientSolution[0].Thickness,
    39         md.results.TransientSolution[1].Vx,
    40         md.results.TransientSolution[1].Vy,
    41         md.results.TransientSolution[1].Vel,
    42         md.results.TransientSolution[1].Pressure,
    43         md.results.TransientSolution[1].Base,
    44         md.results.TransientSolution[1].Surface,
    45         md.results.TransientSolution[1].Thickness,
    46         md.results.TransientSolution[2].Vx,
    47         md.results.TransientSolution[2].Vy,
    48         md.results.TransientSolution[2].Vel,
    49         md.results.TransientSolution[2].Pressure,
    50         md.results.TransientSolution[2].Base,
    51         md.results.TransientSolution[2].Surface,
    52         md.results.TransientSolution[2].Thickness
    53         ]
     25field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1',
     26               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2',
     27               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3']
     28field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     29                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     30                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     31field_values = [md.results.TransientSolution[0].Vx,
     32                md.results.TransientSolution[0].Vy,
     33                md.results.TransientSolution[0].Vel,
     34                md.results.TransientSolution[0].Pressure,
     35                md.results.TransientSolution[0].Base,
     36                md.results.TransientSolution[0].Surface,
     37                md.results.TransientSolution[0].Thickness,
     38                md.results.TransientSolution[1].Vx,
     39                md.results.TransientSolution[1].Vy,
     40                md.results.TransientSolution[1].Vel,
     41                md.results.TransientSolution[1].Pressure,
     42                md.results.TransientSolution[1].Base,
     43                md.results.TransientSolution[1].Surface,
     44                md.results.TransientSolution[1].Thickness,
     45                md.results.TransientSolution[2].Vx,
     46                md.results.TransientSolution[2].Vy,
     47                md.results.TransientSolution[2].Vel,
     48                md.results.TransientSolution[2].Pressure,
     49                md.results.TransientSolution[2].Base,
     50                md.results.TransientSolution[2].Surface,
     51                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test439.py

    r23129 r23793  
    1010from frictionwaterlayer import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'../Exp/SquareShelf.exp','')
    14 md = parameterize(md,'../Par/SquareSheetShelf.py')
    15 md = md.extrude(4,1.)
    16 md = setflowequation(md,'HO','all')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = md.extrude(4, 1.)
     16md = setflowequation(md, 'HO', 'all')
    1717md.friction = frictionwaterlayer(md)
    18 md.friction.water_layer = np.zeros((md.mesh.numberofvertices+1,2))
    19 md.friction.water_layer[:,1] = 1.
    20 md.friction.water_layer[md.mesh.numberofvertices,:] = [1.,2.]
     18md.friction.water_layer = np.zeros((md.mesh.numberofvertices + 1, 2))
     19md.friction.water_layer[:, 1] = 1.
     20md.friction.water_layer[md.mesh.numberofvertices, :] = [1., 2.]
    2121md.friction.f = 0.8
    22 md.groundingline.melt_interpolation='SubelementMelt2'
    23 md.cluster = generic('name',gethostname(),'np',3)
    24 md = solve(md,'Transient')
     22md.groundingline.melt_interpolation = 'SubelementMelt2'
     23md.cluster = generic('name', gethostname(), 'np', 3)
     24md = solve(md, 'Transient')
    2525
    2626#Fields and tolerances to track changes
    27 field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1',
    28               'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2',
    29               'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
    30 field_tolerances = [2e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,
    31                     1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,
    32                     1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09]
    33 field_values = [
    34         md.results.TransientSolution[0].Vx,
    35         md.results.TransientSolution[0].Vy,
    36         md.results.TransientSolution[0].Vel,
    37         md.results.TransientSolution[0].Pressure,
    38         md.results.TransientSolution[0].Base,
    39         md.results.TransientSolution[0].Surface,
    40         md.results.TransientSolution[0].Thickness,
    41         md.results.TransientSolution[1].Vx,
    42         md.results.TransientSolution[1].Vy,
    43         md.results.TransientSolution[1].Vel,
    44         md.results.TransientSolution[1].Pressure,
    45         md.results.TransientSolution[1].Base,
    46         md.results.TransientSolution[1].Surface,
    47         md.results.TransientSolution[1].Thickness,
    48         md.results.TransientSolution[2].Vx,
    49         md.results.TransientSolution[2].Vy,
    50         md.results.TransientSolution[2].Vel,
    51         md.results.TransientSolution[2].Pressure,
    52         md.results.TransientSolution[2].Base,
    53         md.results.TransientSolution[2].Surface,
    54         md.results.TransientSolution[2].Thickness
    55         ]
     27field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1',
     28               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2',
     29               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3']
     30field_tolerances = [2e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     31                    1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09,
     32                    1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09]
     33field_values = [md.results.TransientSolution[0].Vx,
     34                md.results.TransientSolution[0].Vy,
     35                md.results.TransientSolution[0].Vel,
     36                md.results.TransientSolution[0].Pressure,
     37                md.results.TransientSolution[0].Base,
     38                md.results.TransientSolution[0].Surface,
     39                md.results.TransientSolution[0].Thickness,
     40                md.results.TransientSolution[1].Vx,
     41                md.results.TransientSolution[1].Vy,
     42                md.results.TransientSolution[1].Vel,
     43                md.results.TransientSolution[1].Pressure,
     44                md.results.TransientSolution[1].Base,
     45                md.results.TransientSolution[1].Surface,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[2].Vx,
     48                md.results.TransientSolution[2].Vy,
     49                md.results.TransientSolution[2].Vel,
     50                md.results.TransientSolution[2].Pressure,
     51                md.results.TransientSolution[2].Base,
     52                md.results.TransientSolution[2].Surface,
     53                md.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test440.py

    r23152 r23793  
    22import numpy as np
    33from model import *
    4 from socket import gethostname
    5 
    64from triangle import *
    75from setmask import *
     
    97from setflowequation import *
    108from solve import *
    11 
    129from partitioner import *
    1310from normal_uncertain import *
    1411from response_function import *
    1512
    16 md = triangle(model(),'../Exp/Square.exp',200000.)
    17 md = setmask(md,'../Exp/SquareShelf.exp','')
    18 md = parameterize(md,'../Par/SquareSheetShelf.py')
    19 md = setflowequation(md,'SSA','all')
    20 md.cluster = generic('name',oshostname(),'np',3)
     13md = triangle(model(), '../Exp/Square.exp', 200000.)
     14md = setmask(md, '../Exp/SquareShelf.exp', '')
     15md = parameterize(md, '../Par/SquareSheetShelf.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', oshostname(), 'np', 3)
    2118
    2219#partitioning
    2320md.qmu.numberofpartitions = md.mesh.numberofvertices
    24 md = partitioner(md,'package','linear')
    25 md.qmu.partition = md.qmu.partition-1
     21md = partitioner(md, 'package', 'linear')
     22md.qmu.partition = md.qmu.partition - 1
    2623md.qmu.isdakota = 1
    2724
     
    3330
    3431#variables
    35 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01)
     32md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01)
    3633
    3734#responses
    38 md.qmu.responses.MaxVel = response_function.response_function('scaled_Thickness',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     35md.qmu.responses.MaxVel = response_function.response_function('scaled_Thickness', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    3936
    4037#method
     
    4542md.qmu.params.interval_type = 'forward'
    4643
    47 if version>=6:
    48         md.qmu.params.analysis_driver = 'matlab'
    49         md.qmu.params.evaluation_scheduling = 'master'
    50         md.qmu.params.processors_per_evaluation = 2
     44if version >= 6:
     45    md.qmu.params.analysis_driver = 'matlab'
     46    md.qmu.params.evaluation_scheduling = 'master'
     47    md.qmu.params.processors_per_evaluation = 2
    5148else:
    52         md.qmu.params.analysis_driver='stressbalance'
    53         md.qmu.params.evaluation_concurrency = 1
     49    md.qmu.params.analysis_driver = 'stressbalance'
     50    md.qmu.params.evaluation_concurrency = 1
    5451
    55 #imperative! 
    56 md.stressbalance.reltol = 10**-5 #tighten for qmu analysese
     52#imperative!
     53md.stressbalance.reltol = 10**-5  #tighten for qmu analysese
    5754
    5855#solve
    59 md.verbose = verbose('000000000')       # this line is recommended
    60 md = solve(md,'Stressbalance','overwrite','y')
     56md.verbose = verbose('000000000')       # this line is recommended
     57md = solve(md, 'Stressbalance', 'overwrite', 'y')
    6158md.qmu.results = md.results.dakota
    6259
     
    6461h = np.zeros(md.qmu.numberofpartitions)
    6562for i in range(md.qmu.numberofpartitions):
    66         h[i] = md.qmu.results.dresp_out[i].mean
     63    h[i] = md.qmu.results.dresp_out[i].mean
    6764
    6865#project onto grid
    69 thickness  = h[md.qmu.partition]
     66thickness = h[md.qmu.partition]
    7067
    7168#Fields and tolerances to track changes
    72 field_names     = ['Thickness']
    73 field_tolerances= [1e-10]
     69field_names = ['Thickness']
     70field_tolerances = [1e-10]
    7471field_values = [thickness]
  • issm/trunk-jpl/test/NightlyRun/test441.py

    r23016 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',100000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
     11md = triangle(model(), '../Exp/Square.exp', 100000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
    1414md.initialization.vx[:] = 1.
    1515md.initialization.vy[:] = 1.
     
    2121md.geometry.base[pos] = md.geometry.bed[pos]
    2222md.geometry.surface = md.geometry.base + md.geometry.thickness
    23 md = setflowequation(md,'SSA','all')
     23md = setflowequation(md, 'SSA', 'all')
    2424
    2525#Boundary conditions:
     
    2929md.stressbalance.spcvy[:] = float('Nan')
    3030md.stressbalance.spcvz[:] = float('Nan')
    31 posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)),np.array(np.where(md.mesh.y > 999999.9)))
    32 posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)),np.array(np.where(md.mesh.y > -0.1)))
    33 pos = np.unique(np.concatenate((posA,posB)))
     31posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)), np.array(np.where(md.mesh.y > 999999.9)))
     32posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)), np.array(np.where(md.mesh.y > -0.1)))
     33pos = np.unique(np.concatenate((posA, posB)))
    3434md.stressbalance.spcvy[pos] = 0.
    3535pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1)))
     
    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,))
     
    4949md.transient.ismasstransport = 1
    5050md.transient.issmb = 1
    51 md.transient.requested_outputs = ['default','BasalforcingsFloatingiceMeltingRate']
     51md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']
    5252md.groundingline.migration = 'SubelementMigration'
    53 md.groundingline.melt_interpolation= 'SubelementMelt2'
    54 md.groundingline.friction_interpolation= 'SubelementFriction2'
     53md.groundingline.melt_interpolation = 'SubelementMelt2'
     54md.groundingline.friction_interpolation = 'SubelementFriction2'
    5555md.timestepping.final_time = 30.
    5656md.timestepping.time_step = 10.
    5757
    58 md.cluster = generic('name',gethostname(),'np',3)
    59 md = solve(md,'Transient')
     58md.cluster = generic('name', gethostname(), 'np', 3)
     59md = solve(md, 'Transient')
    6060
    6161#Fields and tolerances to track changes
    62 field_names     = [
    63         'Bed1','Surface1','Thickness1','Floatingice1','Vx1','Vy1','Pressure1','FloatingiceMeltingrate1',
    64         'Bed2','Surface2','Thickness2','Floatingice2','Vx2','Vy2','Pressure2','FloatingiceMeltingrate2',
    65         'Bed3','Surface3','Thickness3','Floatingice3','Vx3','Vy3','Pressure3','FloatingiceMeltingrate3']
    66 field_tolerances = [
    67         2e-11,5e-12,2e-11,1e-11,5e-10,1e-08,1e-13,1e-13,
    68         3e-11,3e-11,9e-10,7e-11,1e-09,5e-08,1e-10,1e-13,
    69         1e-10,3e-11,1e-10,7e-11,1e-09,5e-08,1e-10,1e-13]
    70 field_values = [
    71         md.results.TransientSolution[0].Base,
    72         md.results.TransientSolution[0].Surface,
    73         md.results.TransientSolution[0].Thickness,
    74         md.results.TransientSolution[0].MaskGroundediceLevelset,
    75         md.results.TransientSolution[0].Vx,
    76         md.results.TransientSolution[0].Vy,
    77         md.results.TransientSolution[0].Pressure,
    78         md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
    79         md.results.TransientSolution[1].Base,
    80         md.results.TransientSolution[1].Surface,
    81         md.results.TransientSolution[1].Thickness,
    82         md.results.TransientSolution[1].MaskGroundediceLevelset,
    83         md.results.TransientSolution[1].Vx,
    84         md.results.TransientSolution[1].Vy,
    85         md.results.TransientSolution[1].Pressure,
    86         md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
    87         md.results.TransientSolution[2].Base,
    88         md.results.TransientSolution[2].Surface,
    89         md.results.TransientSolution[2].Thickness,
    90         md.results.TransientSolution[2].MaskGroundediceLevelset,
    91         md.results.TransientSolution[2].Vx,
    92         md.results.TransientSolution[2].Vy,
    93         md.results.TransientSolution[2].Pressure,
    94         md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate,
    95         ]
     62field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1', 'Vx1', 'Vy1', 'Pressure1', 'FloatingiceMeltingrate1',
     63               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2', 'Vx2', 'Vy2', 'Pressure2', 'FloatingiceMeltingrate2',
     64               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3', 'Vx3', 'Vy3', 'Pressure3', 'FloatingiceMeltingrate3']
     65field_tolerances = [2e-11, 5e-12, 2e-11, 1e-11, 5e-10, 1e-08, 1e-13, 1e-13,
     66                    3e-11, 3e-11, 9e-10, 7e-11, 1e-09, 5e-08, 1e-10, 1e-13,
     67                    1e-10, 3e-11, 1e-10, 7e-11, 1e-09, 5e-08, 1e-10, 1e-13]
     68field_values = [md.results.TransientSolution[0].Base,
     69                md.results.TransientSolution[0].Surface,
     70                md.results.TransientSolution[0].Thickness,
     71                md.results.TransientSolution[0].MaskGroundediceLevelset,
     72                md.results.TransientSolution[0].Vx,
     73                md.results.TransientSolution[0].Vy,
     74                md.results.TransientSolution[0].Pressure,
     75                md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
     76                md.results.TransientSolution[1].Base,
     77                md.results.TransientSolution[1].Surface,
     78                md.results.TransientSolution[1].Thickness,
     79                md.results.TransientSolution[1].MaskGroundediceLevelset,
     80                md.results.TransientSolution[1].Vx,
     81                md.results.TransientSolution[1].Vy,
     82                md.results.TransientSolution[1].Pressure,
     83                md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
     84                md.results.TransientSolution[2].Base,
     85                md.results.TransientSolution[2].Surface,
     86                md.results.TransientSolution[2].Thickness,
     87                md.results.TransientSolution[2].MaskGroundediceLevelset,
     88                md.results.TransientSolution[2].Vx,
     89                md.results.TransientSolution[2].Vy,
     90                md.results.TransientSolution[2].Pressure,
     91                md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test442.py

    r23004 r23793  
    99from solve import *
    1010
    11 md = triangle(model(),'../Exp/Square.exp',100000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
     11md = triangle(model(), '../Exp/Square.exp', 100000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
    1414md.initialization.vx[:] = 1.
    1515md.initialization.vy[:] = 1.
     
    2121md.geometry.base[pos] = md.geometry.bed[pos]
    2222md.geometry.surface = md.geometry.base + md.geometry.thickness
    23 md = md.extrude(4,1.)
    24 md = setflowequation(md,'HO','all')
     23md = md.extrude(4, 1.)
     24md = setflowequation(md, 'HO', 'all')
    2525
    2626#Boundary conditions:
     
    3030md.stressbalance.spcvy[:] = float('Nan')
    3131md.stressbalance.spcvz[:] = float('Nan')
    32 posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)),np.array(np.where(md.mesh.y > 999999.9)))
    33 posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)),np.array(np.where(md.mesh.y > -0.1)))
    34 pos = np.unique(np.concatenate((posA,posB)))
     32posA = np.intersect1d(np.array(np.where(md.mesh.y < 1000000.1)), np.array(np.where(md.mesh.y > 999999.9)))
     33posB = np.intersect1d(np.array(np.where(md.mesh.y < 0.1)), np.array(np.where(md.mesh.y > -0.1)))
     34pos = np.unique(np.concatenate((posA, posB)))
    3535md.stressbalance.spcvy[pos] = 0.
    3636pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1)))
     
    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,))
     
    5050md.transient.ismasstransport = 1
    5151md.transient.issmb = 1
    52 md.transient.requested_outputs = ['default','BasalforcingsFloatingiceMeltingRate']
     52md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']
    5353md.groundingline.migration = 'SubelementMigration'
    54 md.groundingline.friction_interpolation= 'SubelementFriction2'
    55 md.groundingline.melt_interpolation= 'SubelementMelt2'
     54md.groundingline.friction_interpolation = 'SubelementFriction2'
     55md.groundingline.melt_interpolation = 'SubelementMelt2'
    5656md.timestepping.final_time = 30
    5757md.timestepping.time_step = 10
    5858
    59 md.cluster = generic('name',gethostname(),'np',3)
    60 md = solve(md,'Transient')
     59md.cluster = generic('name', gethostname(), 'np', 3)
     60md = solve(md, 'Transient')
    6161
    6262#Fields and tolerances to track changes
    63 field_names     = [
    64         'Bed1','Surface1','Thickness1','Floatingice1','Vx1','Vy1','Vz1','Pressure1','FloatingiceMeltingrate1',
    65         'Bed2','Surface2','Thickness2','Floatingice2','Vx2','Vy2','Vz2','Pressure2','FloatingiceMeltingrate2',
    66         'Bed3','Surface3','Thickness3','Floatingice3','Vx3','Vy3','Vz3','Pressure3','FloatingiceMeltingrate3']
    67 field_tolerances = [
    68         2e-11,5e-12,2e-11,1e-11,5e-10,3e-08,6e-10,1e-13,1e-13,
    69         3e-11,3e-11,9e-10,7e-11,7e-09,1e-07,1e-09,1e-10,1e-13,
    70         1e-8,2e-08,7e-09,2e-7 ,1e-03,8e-04,2e-09,1e-10,1e-13]
    71 field_values = [
    72         md.results.TransientSolution[0].Base,
    73         md.results.TransientSolution[0].Surface,
    74         md.results.TransientSolution[0].Thickness,
    75         md.results.TransientSolution[0].MaskGroundediceLevelset,
    76         md.results.TransientSolution[0].Vx,
    77         md.results.TransientSolution[0].Vy,
    78         md.results.TransientSolution[0].Vz,
    79         md.results.TransientSolution[0].Pressure,
    80         md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
    81         md.results.TransientSolution[1].Base,
    82         md.results.TransientSolution[1].Surface,
    83         md.results.TransientSolution[1].Thickness,
    84         md.results.TransientSolution[1].MaskGroundediceLevelset,
    85         md.results.TransientSolution[1].Vx,
    86         md.results.TransientSolution[1].Vy,
    87         md.results.TransientSolution[1].Vz,
    88         md.results.TransientSolution[1].Pressure,
    89         md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
    90         md.results.TransientSolution[2].Base,
    91         md.results.TransientSolution[2].Surface,
    92         md.results.TransientSolution[2].Thickness,
    93         md.results.TransientSolution[2].MaskGroundediceLevelset,
    94         md.results.TransientSolution[2].Vx,
    95         md.results.TransientSolution[2].Vy,
    96         md.results.TransientSolution[2].Vz,
    97         md.results.TransientSolution[2].Pressure,
    98         md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate,
    99         ]
     63field_names = ['Bed1', 'Surface1', 'Thickness1', 'Floatingice1', 'Vx1', 'Vy1', 'Vz1', 'Pressure1', 'FloatingiceMeltingrate1',
     64               'Bed2', 'Surface2', 'Thickness2', 'Floatingice2', 'Vx2', 'Vy2', 'Vz2', 'Pressure2', 'FloatingiceMeltingrate2',
     65               'Bed3', 'Surface3', 'Thickness3', 'Floatingice3', 'Vx3', 'Vy3', 'Vz3', 'Pressure3', 'FloatingiceMeltingrate3']
     66field_tolerances = [2e-11, 5e-12, 2e-11, 1e-11, 5e-10, 3e-08, 6e-10, 1e-13, 1e-13,
     67                    3e-11, 3e-11, 9e-10, 7e-11, 7e-09, 1e-07, 1e-09, 1e-10, 1e-13,
     68                    1e-8, 2e-08, 7e-09, 2e-7, 1e-03, 8e-04, 2e-09, 1e-10, 1e-13]
     69field_values = [md.results.TransientSolution[0].Base,
     70                md.results.TransientSolution[0].Surface,
     71                md.results.TransientSolution[0].Thickness,
     72                md.results.TransientSolution[0].MaskGroundediceLevelset,
     73                md.results.TransientSolution[0].Vx,
     74                md.results.TransientSolution[0].Vy,
     75                md.results.TransientSolution[0].Vz,
     76                md.results.TransientSolution[0].Pressure,
     77                md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate,
     78                md.results.TransientSolution[1].Base,
     79                md.results.TransientSolution[1].Surface,
     80                md.results.TransientSolution[1].Thickness,
     81                md.results.TransientSolution[1].MaskGroundediceLevelset,
     82                md.results.TransientSolution[1].Vx,
     83                md.results.TransientSolution[1].Vy,
     84                md.results.TransientSolution[1].Vz,
     85                md.results.TransientSolution[1].Pressure,
     86                md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate,
     87                md.results.TransientSolution[2].Base,
     88                md.results.TransientSolution[2].Surface,
     89                md.results.TransientSolution[2].Thickness,
     90                md.results.TransientSolution[2].MaskGroundediceLevelset,
     91                md.results.TransientSolution[2].Vx,
     92                md.results.TransientSolution[2].Vy,
     93                md.results.TransientSolution[2].Vz,
     94                md.results.TransientSolution[2].Pressure,
     95                md.results.TransientSolution[2].BasalforcingsFloatingiceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test443.py

    r22338 r23793  
    1313from regionaloutput import regionaloutput
    1414
    15 md=triangle(model(),'../Exp/Square.exp',150000.)
    16 md=setmask(md,'../Exp/SquareShelf.exp','')
    17 md=parameterize(md,'../Par/SquareSheetShelf.py')
    18 md.geometry.bed=copy.deepcopy(md.geometry.base)
    19 pos=np.nonzero(md.mask.groundedice_levelset<0.)
    20 md.geometry.bed[pos]=md.geometry.bed[pos]-10
    21 md.friction=frictioncoulomb()
    22 md.friction.coefficient=20*np.ones(md.mesh.numberofvertices)
    23 md.friction.p=1*np.ones(md.mesh.numberofelements)
    24 md.friction.q=1*np.ones(md.mesh.numberofelements)
    25 md.friction.coefficientcoulomb=0.02*np.ones(md.mesh.numberofvertices)
    26 md.transient.isthermal=False
    27 md.transient.isgroundingline=True
    28 md.groundingline.migration='AggressiveMigration';
    29 md.mesh.scale_factor=1.1*np.ones((md.mesh.numberofvertices))
     15md = triangle(model(), '../Exp/Square.exp', 150000.)
     16md = setmask(md, '../Exp/SquareShelf.exp', '')
     17md = parameterize(md, '../Par/SquareSheetShelf.py')
     18md.geometry.bed = copy.deepcopy(md.geometry.base)
     19pos = np.nonzero(md.mask.groundedice_levelset < 0.)
     20md.geometry.bed[pos] = md.geometry.bed[pos] - 10
     21md.friction = frictioncoulomb()
     22md.friction.coefficient = 20 * np.ones(md.mesh.numberofvertices)
     23md.friction.p = 1 * np.ones(md.mesh.numberofelements)
     24md.friction.q = 1 * np.ones(md.mesh.numberofelements)
     25md.friction.coefficientcoulomb = 0.02 * np.ones(md.mesh.numberofvertices)
     26md.transient.isthermal = False
     27md.transient.isgroundingline = True
     28md.groundingline.migration = 'AggressiveMigration'
     29md.mesh.scale_factor = 1.1 * np.ones((md.mesh.numberofvertices))
    3030
    31 md.settings.output_frequency=2
    32 md=setflowequation(md,'SSA','all')
    33 md.cluster=generic('name',gethostname(),'np',3)
     31md.settings.output_frequency = 2
     32md = setflowequation(md, 'SSA', 'all')
     33md.cluster = generic('name', gethostname(), 'np', 3)
    3434
    35 regionalmask=np.zeros((md.mesh.numberofvertices))
    36 inflag=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,'../Exp/SquareHalfRight.exp','node',1)
     35regionalmask = np.zeros((md.mesh.numberofvertices))
     36inflag = ContourToMesh(md.mesh.elements, md.mesh.x, md.mesh.y, '../Exp/SquareHalfRight.exp', 'node', 1)
    3737regionalmask[np.nonzero(inflag)[0]] = 1.
    38 md.transient.requested_outputs=['default','GroundedArea1','FloatingArea1','TotalFloatingBmb1','TotalGroundedBmb1','TotalSmb1','IceMass1','IceVolume1','IceVolumeAboveFloatation1','IceVolumeAboveFloatation2','IceVolumeAboveFloatation','IceMassScaled1','IceVolumeScaled1','IceVolumeAboveFloatationScaled1','IceVolumeAboveFloatationScaled2']
     38md.transient.requested_outputs = ['default', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1', 'TotalSmb1', 'IceMass1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceVolumeAboveFloatation2', 'IceVolumeAboveFloatation', 'IceMassScaled1', 'IceVolumeScaled1', 'IceVolumeAboveFloatationScaled1', 'IceVolumeAboveFloatationScaled2']
    3939
    40 md.outputdefinition.definitions=[regionaloutput('name','GroundedArea1','outputnamestring','GroundedArea','mask',regionalmask,'definitionstring','Outputdefinition1'),
    41                 regionaloutput('name','FloatingArea1','outputnamestring','FloatingArea','mask',regionalmask,'definitionstring','Outputdefinition2'),
    42                 regionaloutput('name','TotalFloatingBmb1','outputnamestring','TotalFloatingBmb','mask',regionalmask,'definitionstring','Outputdefinition3'),
    43                 regionaloutput('name','TotalGroundedBmb1','outputnamestring','TotalGroundedBmb','mask',regionalmask,'definitionstring','Outputdefinition4'),
    44                 regionaloutput('name','IceMass1','outputnamestring','IceMass','mask',regionalmask,'definitionstring','Outputdefinition5'),
    45                 regionaloutput('name','IceVolume1','outputnamestring','IceVolume','mask',regionalmask,'definitionstring','Outputdefinition6'),
    46                 regionaloutput('name','IceVolumeAboveFloatation1','outputnamestring','IceVolumeAboveFloatation','mask',regionalmask,'definitionstring','Outputdefinition7'),
    47                 regionaloutput('name','TotalSmb1','outputnamestring','TotalSmb','mask',regionalmask,'definitionstring','Outputdefinition8'),
    48                 regionaloutput('name','IceVolumeAboveFloatation2','outputnamestring','IceVolumeAboveFloatation','maskexpstring','../Exp/SquareHalfRight.exp','definitionstring','Outputdefinition9','model',md),
    49                 regionaloutput('name','IceMassScaled1','outputnamestring','IceMassScaled','mask',regionalmask,'definitionstring','Outputdefinition10'),
    50                 regionaloutput('name','IceVolumeScaled1','outputnamestring','IceVolumeScaled','mask',regionalmask,'definitionstring','Outputdefinition11'),
    51                 regionaloutput('name','IceVolumeAboveFloatationScaled1','outputnamestring','IceVolumeAboveFloatationScaled','mask',regionalmask,'definitionstring','Outputdefinition12'),
    52                 regionaloutput('name','IceVolumeAboveFloatationScaled2','outputnamestring','IceVolumeAboveFloatationScaled','maskexpstring','../Exp/SquareHalfRight.exp','definitionstring','Outputdefinition13','model',md)]
     40md.outputdefinition.definitions = [regionaloutput('name', 'GroundedArea1', 'outputnamestring', 'GroundedArea', 'mask', regionalmask, 'definitionstring', 'Outputdefinition1'),
     41                                   regionaloutput('name', 'FloatingArea1', 'outputnamestring', 'FloatingArea', 'mask', regionalmask, 'definitionstring', 'Outputdefinition2'),
     42                                   regionaloutput('name', 'TotalFloatingBmb1', 'outputnamestring', 'TotalFloatingBmb', 'mask', regionalmask, 'definitionstring', 'Outputdefinition3'),
     43                                   regionaloutput('name', 'TotalGroundedBmb1', 'outputnamestring', 'TotalGroundedBmb', 'mask', regionalmask, 'definitionstring', 'Outputdefinition4'),
     44                                   regionaloutput('name', 'IceMass1', 'outputnamestring', 'IceMass', 'mask', regionalmask, 'definitionstring', 'Outputdefinition5'),
     45                                   regionaloutput('name', 'IceVolume1', 'outputnamestring', 'IceVolume', 'mask', regionalmask, 'definitionstring', 'Outputdefinition6'),
     46                                   regionaloutput('name', 'IceVolumeAboveFloatation1', 'outputnamestring', 'IceVolumeAboveFloatation', 'mask', regionalmask, 'definitionstring', 'Outputdefinition7'),
     47                                   regionaloutput('name', 'TotalSmb1', 'outputnamestring', 'TotalSmb', 'mask', regionalmask, 'definitionstring', 'Outputdefinition8'),
     48                                   regionaloutput('name', 'IceVolumeAboveFloatation2', 'outputnamestring', 'IceVolumeAboveFloatation', 'maskexpstring', '../Exp/SquareHalfRight.exp', 'definitionstring', 'Outputdefinition9', 'model', md),
     49                                   regionaloutput('name', 'IceMassScaled1', 'outputnamestring', 'IceMassScaled', 'mask', regionalmask, 'definitionstring', 'Outputdefinition10'),
     50                                   regionaloutput('name', 'IceVolumeScaled1', 'outputnamestring', 'IceVolumeScaled', 'mask', regionalmask, 'definitionstring', 'Outputdefinition11'),
     51                                   regionaloutput('name', 'IceVolumeAboveFloatationScaled1', 'outputnamestring', 'IceVolumeAboveFloatationScaled', 'mask', regionalmask, 'definitionstring', 'Outputdefinition12'),
     52                                   regionaloutput('name', 'IceVolumeAboveFloatationScaled2', 'outputnamestring', 'IceVolumeAboveFloatationScaled', 'maskexpstring', '../Exp/SquareHalfRight.exp', 'definitionstring', 'Outputdefinition13', 'model', md)]
    5353
    54 md.extrude(3,1.)
    55 md2=copy.deepcopy(md)
     54md.extrude(3, 1.)
     55md2 = copy.deepcopy(md)
    5656md2.collapse()
    57 md=solve(md,'Transient')
     57md = solve(md, 'Transient')
    5858
    5959#Fields and tolerances to track changes
    60 field_names     =['IceMass1','IceVolume1','IceVolumeAboveFloatation1','IceVolumeAboveFloatation21','Thickness1','GroundedArea1','FloatingArea1','TotalFloatingBmb1','TotalGroundedBmb1','TotalSmb1','IceMassScaled1','IceVolumeScaled1','IceVolumeAboveFloatationScaled1','IceVolumeAboveFloatationScaled21','IceMass3','IceVolume3','IceVolumeAboveFloatation3','IceVolumeAboveFloatation23','Thickness3','GroundedArea3','FloatingArea3','TotalFloatingBmb3','TotalGroundedBmb3','TotalSmb3','IceMassScaled3','IceVolumeScaled3','IceVolumeAboveFloatationScaled3','IceVolumeAboveFloatationScaled23','ExtrudedMask','CollapsedMask']
    61 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    62 field_values=[\
    63         md.results.TransientSolution[0].IceMass1,\
    64         md.results.TransientSolution[0].IceVolume1,\
    65         md.results.TransientSolution[0].IceVolumeAboveFloatation1,\
    66         md.results.TransientSolution[0].IceVolumeAboveFloatation2,\
    67         md.results.TransientSolution[0].Thickness,\
    68         md.results.TransientSolution[0].GroundedArea1,\
    69         md.results.TransientSolution[0].FloatingArea1,\
    70         md.results.TransientSolution[0].TotalFloatingBmb1,\
    71         md.results.TransientSolution[0].TotalGroundedBmb1,\
    72         md.results.TransientSolution[0].TotalSmb1,\
    73         md.results.TransientSolution[0].IceMassScaled1,\
    74         md.results.TransientSolution[0].IceVolumeScaled1,\
    75         md.results.TransientSolution[0].IceVolumeAboveFloatationScaled1,\
    76         md.results.TransientSolution[0].IceVolumeAboveFloatationScaled2,\
    77         md.results.TransientSolution[2].IceMass1,\
    78         md.results.TransientSolution[2].IceVolume1,\
    79         md.results.TransientSolution[2].IceVolumeAboveFloatation1,\
    80         md.results.TransientSolution[2].IceVolumeAboveFloatation2,\
    81         md.results.TransientSolution[2].Thickness,\
    82         md.results.TransientSolution[2].GroundedArea1,\
    83         md.results.TransientSolution[2].FloatingArea1,\
    84         md.results.TransientSolution[2].TotalFloatingBmb1,\
    85         md.results.TransientSolution[2].TotalGroundedBmb1,\
    86         md.results.TransientSolution[2].TotalSmb1,\
    87         md.results.TransientSolution[2].IceMassScaled1,\
    88         md.results.TransientSolution[2].IceVolumeScaled1,\
    89         md.results.TransientSolution[2].IceVolumeAboveFloatationScaled1,\
    90         md.results.TransientSolution[2].IceVolumeAboveFloatationScaled2,\
    91         len(md.outputdefinition.definitions[0].mask),\
    92         len(md2.outputdefinition.definitions[0].mask),\
    93         ]
     60field_names = ['IceMass1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceVolumeAboveFloatation21', 'Thickness1', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1', 'TotalSmb1', 'IceMassScaled1', 'IceVolumeScaled1', 'IceVolumeAboveFloatationScaled1', 'IceVolumeAboveFloatationScaled21', 'IceMass3', 'IceVolume3', 'IceVolumeAboveFloatation3', 'IceVolumeAboveFloatation23', 'Thickness3', 'GroundedArea3', 'FloatingArea3', 'TotalFloatingBmb3', 'TotalGroundedBmb3', 'TotalSmb3', 'IceMassScaled3', 'IceVolumeScaled3', 'IceVolumeAboveFloatationScaled3', 'IceVolumeAboveFloatationScaled23', 'ExtrudedMask', 'CollapsedMask']
     61field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     62field_values = [md.results.TransientSolution[0].IceMass1,
     63                md.results.TransientSolution[0].IceVolume1,
     64                md.results.TransientSolution[0].IceVolumeAboveFloatation1,
     65                md.results.TransientSolution[0].IceVolumeAboveFloatation2,
     66                md.results.TransientSolution[0].Thickness,
     67                md.results.TransientSolution[0].GroundedArea1,
     68                md.results.TransientSolution[0].FloatingArea1,
     69                md.results.TransientSolution[0].TotalFloatingBmb1,
     70                md.results.TransientSolution[0].TotalGroundedBmb1,
     71                md.results.TransientSolution[0].TotalSmb1,
     72                md.results.TransientSolution[0].IceMassScaled1,
     73                md.results.TransientSolution[0].IceVolumeScaled1,
     74                md.results.TransientSolution[0].IceVolumeAboveFloatationScaled1,
     75                md.results.TransientSolution[0].IceVolumeAboveFloatationScaled2,
     76                md.results.TransientSolution[2].IceMass1,
     77                md.results.TransientSolution[2].IceVolume1,
     78                md.results.TransientSolution[2].IceVolumeAboveFloatation1,
     79                md.results.TransientSolution[2].IceVolumeAboveFloatation2,
     80                md.results.TransientSolution[2].Thickness,
     81                md.results.TransientSolution[2].GroundedArea1,
     82                md.results.TransientSolution[2].FloatingArea1,
     83                md.results.TransientSolution[2].TotalFloatingBmb1,
     84                md.results.TransientSolution[2].TotalGroundedBmb1,
     85                md.results.TransientSolution[2].TotalSmb1,
     86                md.results.TransientSolution[2].IceMassScaled1,
     87                md.results.TransientSolution[2].IceVolumeScaled1,
     88                md.results.TransientSolution[2].IceVolumeAboveFloatationScaled1,
     89                md.results.TransientSolution[2].IceVolumeAboveFloatationScaled2,
     90                len(md.outputdefinition.definitions[0].mask),
     91                len(md2.outputdefinition.definitions[0].mask)]
  • issm/trunk-jpl/test/NightlyRun/test444.py

    r23231 r23793  
    11#Test Name: SquareShelfTranForceNeg2dDakotaLocal
    22import numpy as np
    3 from os import getcwd
    43from model import *
    5 from socket import gethostname
    64from triangle import *
    75from setmask import *
     
    1513from regionaloutput import *
    1614
    17 #model not consistent:  equality thickness=surface-base violated
     15#model not consistent:  equality thickness = surface-base violated
    1816
    19 md = triangle(model(),'../Exp/Square.exp',150000.)
    20 md = setmask(md,'../Exp/SquareShelf.exp','')
    21 md = parameterize(md,'../Par/SquareSheetShelf.py')
     17md = triangle(model(), '../Exp/Square.exp', 150000.)
     18md = setmask(md, '../Exp/SquareShelf.exp', '')
     19md = parameterize(md, '../Par/SquareSheetShelf.py')
    2220md.geometry.bed = md.geometry.base.copy()
    2321pos = np.where(md.mask.groundedice_levelset < 0)
    24 md.geometry.bed[pos] = md.geometry.base[pos]-10
     22md.geometry.bed[pos] = md.geometry.base[pos] - 10
    2523md.friction.coefficient = 20. * np.ones((md.mesh.numberofvertices,))
    2624md.friction.p = np.ones((md.mesh.numberofelements,))
     
    3129
    3230md.settings.output_frequency = 3
    33 md = setflowequation(md,'SSA','all')
    34 md.cluster = generic('name',oshostname(),'np',3)
     31md = setflowequation(md, 'SSA', 'all')
     32md.cluster = generic('name', oshostname(), 'np', 3)
    3533
    3634regionalmask = np.zeros((md.mesh.numberofvertices,))
    37 c_in = ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,'../Exp/SquareHalfRight.exp','node',1)
     35c_in = ContourToMesh(md.mesh.elements, md.mesh.x, md.mesh.y, '../Exp/SquareHalfRight.exp', 'node', 1)
    3836regionalmask[np.where(c_in)] = 1
    39 md.transient.requested_outputs = ['default','GroundedArea','FloatingArea','IceVolumeAboveFloatation','GroundedArea1','FloatingArea1','TotalFloatingBmb1','TotalGroundedBmb1','TotalSmb1',
    40         'IceMass1','IceVolume1','IceVolumeAboveFloatation1','IceVolumeAboveFloatation']
    41 md.outputdefinition.definitions.append(regionaloutput('name','GroundedArea1','outputnamestring','GroundedArea','mask',regionalmask,
    42         'definitionstring','Outputdefinition1'))
    43 md.outputdefinition.definitions.append(regionaloutput('name','FloatingArea1','outputnamestring','FloatingArea','mask',regionalmask,
    44         'definitionstring','Outputdefinition2'))
    45 md.outputdefinition.definitions.append(regionaloutput('name','TotalFloatingBmb1','outputnamestring','TotalFloatingBmb','mask',regionalmask,
    46         'definitionstring','Outputdefinition3'))
    47 md.outputdefinition.definitions.append(regionaloutput('name','TotalGroundedBmb1','outputnamestring','TotalGroundedBmb','mask',regionalmask,
    48         'definitionstring','Outputdefinition4'))
    49 md.outputdefinition.definitions.append(regionaloutput('name','IceMass1','outputnamestring','IceMass','mask',regionalmask,
    50         'definitionstring','Outputdefinition5'))
    51 md.outputdefinition.definitions.append(regionaloutput('name','IceVolume1','outputnamestring','IceVolume','mask',regionalmask,
    52         'definitionstring','Outputdefinition6'))
    53 md.outputdefinition.definitions.append(regionaloutput('name','IceVolumeAboveFloatation1','outputnamestring','IceVolumeAboveFloatation','mask',regionalmask,
    54         'definitionstring','Outputdefinition7'))
    55 md.outputdefinition.definitions.append(regionaloutput('name','TotalSmb1','outputnamestring','TotalSmb','mask',regionalmask,
    56         'definitionstring','Outputdefinition8'))
    57 md.outputdefinition.definitions.append(regionaloutput('name','TotalSmb2','outputnamestring','TotalSmb','mask',regionalmask,
    58          'definitionstring','Outputdefinition9'))
     37md.transient.requested_outputs = ['default', 'GroundedArea', 'FloatingArea', 'IceVolumeAboveFloatation', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1', 'TotalSmb1',
     38                                  'IceMass1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceVolumeAboveFloatation']
     39md.outputdefinition.definitions.append(regionaloutput('name', 'GroundedArea1', 'outputnamestring', 'GroundedArea', 'mask', regionalmask,
     40                                                      'definitionstring', 'Outputdefinition1'))
     41md.outputdefinition.definitions.append(regionaloutput('name', 'FloatingArea1', 'outputnamestring', 'FloatingArea', 'mask', regionalmask,
     42                                                      'definitionstring', 'Outputdefinition2'))
     43md.outputdefinition.definitions.append(regionaloutput('name', 'TotalFloatingBmb1', 'outputnamestring', 'TotalFloatingBmb', 'mask', regionalmask,
     44                                                      'definitionstring', 'Outputdefinition3'))
     45md.outputdefinition.definitions.append(regionaloutput('name', 'TotalGroundedBmb1', 'outputnamestring', 'TotalGroundedBmb', 'mask', regionalmask,
     46                                                      'definitionstring', 'Outputdefinition4'))
     47md.outputdefinition.definitions.append(regionaloutput('name', 'IceMass1', 'outputnamestring', 'IceMass', 'mask', regionalmask,
     48                                                      'definitionstring', 'Outputdefinition5'))
     49md.outputdefinition.definitions.append(regionaloutput('name', 'IceVolume1', 'outputnamestring', 'IceVolume', 'mask', regionalmask,
     50                                                      'definitionstring', 'Outputdefinition6'))
     51md.outputdefinition.definitions.append(regionaloutput('name', 'IceVolumeAboveFloatation1', 'outputnamestring', 'IceVolumeAboveFloatation', 'mask', regionalmask,
     52                                                      'definitionstring', 'Outputdefinition7'))
     53md.outputdefinition.definitions.append(regionaloutput('name', 'TotalSmb1', 'outputnamestring', 'TotalSmb', 'mask', regionalmask,
     54                                                      'definitionstring', 'Outputdefinition8'))
     55md.outputdefinition.definitions.append(regionaloutput('name', 'TotalSmb2', 'outputnamestring', 'TotalSmb', 'mask', regionalmask,
     56                                                      'definitionstring', 'Outputdefinition9'))
    5957
    60 md.extrude(3,1.)
     58md.extrude(3, 1.)
    6159md.collapse()
    6260
     
    6866
    6967#variables
    70 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_BasalforcingsFloatingiceMeltingRate',1,0.1)
     68md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_BasalforcingsFloatingiceMeltingRate', 1, 0.1)
    7169
    7270#responses
    73 md.qmu.responses.IceMass1 = response_function.response_function('Outputdefinition5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    74 md.qmu.responses.IceVolume1 = response_function.response_function('Outputdefinition6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    75 md.qmu.responses.IceVolumeAboveFloatation1 = response_function.response_function('Outputdefinition7',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    76 md.qmu.responses.IceVolumeAboveFloatation = response_function.response_function('IceVolumeAboveFloatation',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    77 md.qmu.responses.GroundedArea1 = response_function.response_function('Outputdefinition1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    78 md.qmu.responses.FloatingArea1 = response_function.response_function('Outputdefinition2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    79 md.qmu.responses.TotalFloatingBmb1 = response_function.response_function('Outputdefinition3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    80 md.qmu.responses.TotalGroundedBmb1 = response_function.response_function('Outputdefinition4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    81 md.qmu.responses.TotalSmb1 = response_function.response_function('Outputdefinition8',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    82 md.qmu.responses.TotalSmb2 = response_function.response_function('Outputdefinition9',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    83 md.qmu.responses.FloatingArea = response_function.response_function('FloatingArea',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     71md.qmu.responses.IceMass1 = response_function.response_function('Outputdefinition5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     72md.qmu.responses.IceVolume1 = response_function.response_function('Outputdefinition6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     73md.qmu.responses.IceVolumeAboveFloatation1 = response_function.response_function('Outputdefinition7', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     74md.qmu.responses.IceVolumeAboveFloatation = response_function.response_function('IceVolumeAboveFloatation', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     75md.qmu.responses.GroundedArea1 = response_function.response_function('Outputdefinition1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     76md.qmu.responses.FloatingArea1 = response_function.response_function('Outputdefinition2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     77md.qmu.responses.TotalFloatingBmb1 = response_function.response_function('Outputdefinition3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     78md.qmu.responses.TotalGroundedBmb1 = response_function.response_function('Outputdefinition4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     79md.qmu.responses.TotalSmb1 = response_function.response_function('Outputdefinition8', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     80md.qmu.responses.TotalSmb2 = response_function.response_function('Outputdefinition9', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     81md.qmu.responses.FloatingArea = response_function.response_function('FloatingArea', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    8482
    8583#method
    8684md.qmu.method = dakota_method.dakota_method('nond_samp')
    87 md.qmu.method = dmeth_params_set(md.qmu.method,'seed',1234,'samples',20,'sample_type','random')
     85md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'random')
    8886
    8987#parameters
     
    9391
    9492if version >= 6:
    95         md.qmu.params.analysis_driver = 'matlab'
    96         md.qmu.params.evaluation_scheduling = 'master'
    97         md.qmu.params.processors_per_evaluation = 2
     93    md.qmu.params.analysis_driver = 'matlab'
     94    md.qmu.params.evaluation_scheduling = 'master'
     95    md.qmu.params.processors_per_evaluation = 2
    9896else:
    99         md.qmu.params.analysis_driver = 'stressbalance'
    100         md.qmu.params.evaluation_concurrency = 1
     97    md.qmu.params.analysis_driver = 'stressbalance'
     98    md.qmu.params.evaluation_concurrency = 1
    10199
    102100#partitioning
    103101md.qmu.numberofpartitions = 10
    104 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
    105 md.qmu.partition = md.qmu.partition-1
     102md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
     103md.qmu.partition = md.qmu.partition - 1
    106104md.qmu.isdakota = 1
    107105
    108 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses
     106md.stressbalance.reltol = 10**-5  #tighten for qmu analyses
    109107
    110108#solve
    111 md.verbose = verbose('000000000')       # this line is recommended
    112 md = solve(md,'Transient','overwrite','y')
     109md.verbose = verbose('000000000')       # this line is recommended
     110md = solve(md, 'Transient', 'overwrite', 'y')
    113111
    114112#Fields and tolerances to track changes
     
    118116md.results.dakota.montecarlo = []
    119117for i in range(11):
    120         md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean)
     118    md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean)
    121119
    122120for i in range(11):
    123         md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev)
     121    md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev)
    124122
    125 field_names      = ['montecarlo']
     123field_names = ['montecarlo']
    126124field_tolerances = [1e-11]
    127125field_values = [md.results.dakota.montecarlo]
  • issm/trunk-jpl/test/NightlyRun/test445.py

    r23445 r23793  
    1313from ContourToMesh import *
    1414
    15 #model not consistent:  equality thickness=surface-base violated
     15#model not consistent:  equality thickness = surface-base violated
    1616
    17 md=triangle(model(),'../Exp/Square.exp',150000.)
    18 md=setmask(md,'../Exp/SquareShelf.exp','')
    19 md=parameterize(md,'../Par/SquareSheetShelf.py')
    20 md.extrude(3,2.)
    21 md=setflowequation(md,'HO','all')
    22 md.cluster=generic('name',gethostname(),'np',3)
    23 md.timestepping.time_step=0.
    24 md.thermal.isenthalpy=1
    25 md.thermal.isdynamicbasalspc=1
    26 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
    27 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
     17md = triangle(model(), '../Exp/Square.exp', 150000.)
     18md = setmask(md, '../Exp/SquareShelf.exp', '')
     19md = parameterize(md, '../Par/SquareSheetShelf.py')
     20md.extrude(3, 2.)
     21md = setflowequation(md, 'HO', 'all')
     22md.cluster = generic('name', gethostname(), 'np', 3)
     23md.timestepping.time_step = 0.
     24md.thermal.isenthalpy = 1
     25md.thermal.isdynamicbasalspc = 1
     26md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices))
     27md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices))
    2828
    29 md.friction.coupling=3
    30 md.friction.effective_pressure=md.materials.rho_ice*md.constants.g*md.geometry.thickness+md.materials.rho_water*md.constants.g*md.geometry.base
     29md.friction.coupling = 3
     30md.friction.effective_pressure = md.materials.rho_ice * md.constants.g * md.geometry.thickness + md.materials.rho_water * md.constants.g * md.geometry.base
    3131
    3232#dakota version
     
    3535
    3636#variables
    37 md.qmu.variables.neff=normal_uncertain.normal_uncertain('scaled_FrictionEffectivePressure',1,.05)
    38 md.qmu.variables.geoflux=normal_uncertain.normal_uncertain('scaled_BasalforcingsGeothermalflux',1,.05)
     37md.qmu.variables.neff = normal_uncertain.normal_uncertain('scaled_FrictionEffectivePressure', 1, .05)
     38md.qmu.variables.geoflux = normal_uncertain.normal_uncertain('scaled_BasalforcingsGeothermalflux', 1, .05)
    3939
    4040#responses
    41 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    42 md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    43 md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    44 md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    45 md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    46 md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    47 md.qmu.responses.MassFlux6 = response_function.response_function('indexed_MassFlux_6',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
    48 md.qmu.responses.MassFlux7 = response_function.response_function('indexed_MassFlux_7',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     41md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     42md.qmu.responses.MassFlux1 = response_function.response_function('indexed_MassFlux_1', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     43md.qmu.responses.MassFlux2 = response_function.response_function('indexed_MassFlux_2', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     44md.qmu.responses.MassFlux3 = response_function.response_function('indexed_MassFlux_3', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     45md.qmu.responses.MassFlux4 = response_function.response_function('indexed_MassFlux_4', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     46md.qmu.responses.MassFlux5 = response_function.response_function('indexed_MassFlux_5', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     47md.qmu.responses.MassFlux6 = response_function.response_function('indexed_MassFlux_6', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
     48md.qmu.responses.MassFlux7 = response_function.response_function('indexed_MassFlux_7', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    4949
    5050#mass flux profiles
    51 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp','../Exp/Square.exp']
     51md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp', '../Exp/Square.exp']
    5252md.qmu.mass_flux_profile_directory = getcwd()
    5353
    5454#method
    5555md.qmu.method = dakota_method.dakota_method('nond_samp')
    56 md.qmu.method = dmeth_params_set(md.qmu.method,'seed',1234,'samples',20,'sample_type','random')
     56md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'random')
    5757
    5858#parameters
    5959md.qmu.params.direct = True
    6060md.qmu.params.analysis_components = ''
    61 md.qmu.params.tabular_graphics_data = True;
     61md.qmu.params.tabular_graphics_data = True
    6262
    6363if version >= 6:
    64         md.qmu.params.analysis_driver = 'matlab'
    65         md.qmu.params.evaluation_scheduling = 'master'
    66         md.qmu.params.processors_per_evaluation = 2
     64    md.qmu.params.analysis_driver = 'matlab'
     65    md.qmu.params.evaluation_scheduling = 'master'
     66    md.qmu.params.processors_per_evaluation = 2
    6767else:
    68         md.qmu.params.analysis_driver = 'steadystate'
    69         md.qmu.params.evaluation_concurrency = 1
     68    md.qmu.params.analysis_driver = 'steadystate'
     69    md.qmu.params.evaluation_concurrency = 1
    7070
    7171#partitioning
    7272md.qmu.numberofpartitions = 10
    73 md = partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')
    74 md.qmu.partition = md.qmu.partition-1
     73md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on')
     74md.qmu.partition = md.qmu.partition - 1
    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
    8080#solve
    81 md.verbose = verbose('000000000')       # this line is recommended
    82 md = solve(md,'Steadystate','overwrite','y')
     81md.verbose = verbose('000000000')       # this line is recommended
     82md = solve(md, 'Steadystate', 'overwrite', 'y')
    8383
    8484#Fields and tolerances to track changes
     
    8888md.results.dakota.montecarlo = []
    8989for i in range(8):
    90         md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean)
     90    md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean)
    9191
    9292for i in range(8):
    93         md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev)
     93    md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev)
    9494
    95 field_names      = ['montecarlo']
     95field_names = ['montecarlo']
    9696field_tolerances = [2e-10]
    9797field_values = [md.results.dakota.montecarlo]
  • issm/trunk-jpl/test/NightlyRun/test450.py

    r21408 r23793  
    11#Test Name: SquareSheetShelfStressSSAHigherOrder
    2 import numpy as np
    32from model import *
    43from socket import gethostname
    5 
    64from triangle import *
    75from setmask import *
     
    108from solve import *
    119
    12 md=triangle(model(),'../Exp/Square.exp',150000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.cluster = generic('name', gethostname(), 'np', 3)
    1715
    18 field_names=[]
    19 field_tolerances=[]
    20 field_values=[]
    21 for i in ['P1bubble','P1bubblecondensed','P2']:
    22         md.flowequation.fe_SSA=i
    23         md=solve(md,'Stressbalance')
    24         field_names     =field_names+['Vx'+i,'Vy'+i,'Vel'+i,'Pressure'+i]
    25         field_tolerances=field_tolerances+[1e-12,1e-13,1e-13,1e-13]
    26         field_values=field_values+[\
    27                 md.results.StressbalanceSolution.Vx,\
    28                 md.results.StressbalanceSolution.Vy,\
    29                 md.results.StressbalanceSolution.Vel,\
    30                 md.results.StressbalanceSolution.Pressure,\
    31                 ]
     16field_names = []
     17field_tolerances = []
     18field_values = []
     19for i in ['P1bubble', 'P1bubblecondensed', 'P2']:
     20    md.flowequation.fe_SSA = i
     21    md = solve(md, 'Stressbalance')
     22    field_names = field_names + ['Vx' + i, 'Vy' + i, 'Vel' + i, 'Pressure' + i]
     23    field_tolerances = field_tolerances + [1e-12, 1e-13, 1e-13, 1e-13]
     24    field_values = field_values + [md.results.StressbalanceSolution.Vx,
     25                                   md.results.StressbalanceSolution.Vy,
     26                                   md.results.StressbalanceSolution.Vel,
     27                                   md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test455.py

    r23379 r23793  
    11#Test Name: SquareSheetShelfStressHOHigherOrder
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md.extrude(5,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 180000.)
     12md = setmask(md, '../Exp/SquareShelf.exp', '')
     13md = parameterize(md, '../Par/SquareSheetShelf.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1817
    19 field_names=[]
    20 field_tolerances=[]
    21 field_values=[]
    22 for i in ['P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P1xP3','P2xP4']:
    23         md.flowequation.fe_HO=i
    24         md=solve(md,'Stressbalance')
    25         field_names     =field_names+['Vx'+i,'Vy'+i,'Vz'+i,'Vel'+i,'Pressure'+i]
    26         field_tolerances=field_tolerances+[7e-08,6e-08,6e-08,6e-08,3e-13]
    27         field_values=field_values+[\
    28                         md.results.StressbalanceSolution.Vx,\
    29                         md.results.StressbalanceSolution.Vy,\
    30                         md.results.StressbalanceSolution.Vz,\
    31                         md.results.StressbalanceSolution.Vel,\
    32                         md.results.StressbalanceSolution.Pressure,\
    33                         ]
     18field_names = []
     19field_tolerances = []
     20field_values = []
     21for i in ['P1bubble', 'P1bubblecondensed', 'P1xP2', 'P2xP1', 'P2', 'P1xP3', 'P2xP4']:
     22    md.flowequation.fe_HO = i
     23    md = solve(md, 'Stressbalance')
     24    field_names = field_names + ['Vx' + i, 'Vy' + i, 'Vz' + i, 'Vel' + i, 'Pressure' + i]
     25    field_tolerances = field_tolerances + [7e-08, 6e-08, 6e-08, 6e-08, 3e-13]
     26    field_values = field_values + [md.results.StressbalanceSolution.Vx,
     27                                   md.results.StressbalanceSolution.Vy,
     28                                   md.results.StressbalanceSolution.Vz,
     29                                   md.results.StressbalanceSolution.Vel,
     30                                   md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test460.py

    r23684 r23793  
    1010from matestar import *
    1111
    12 md=triangle(model(),'../Exp/Square.exp',180000.)
    13 md=setmask(md,'../Exp/SquareShelf.exp','')
    14 md=parameterize(md,'../Par/SquareSheetShelf.py')
    15 md = md.extrude(3,1.)
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = md.extrude(3, 1.)
    1616md.materials = matestar()
    1717md.materials.rheology_B = 3.15e8 * np.ones((md.mesh.numberofvertices,))
    1818md.materials.rheology_Ec = np.ones((md.mesh.numberofvertices,))
    1919md.materials.rheology_Es = 3 * np.ones((md.mesh.numberofvertices,))
    20 md.cluster = generic('name',gethostname(),'np',3)
     20md.cluster = generic('name', gethostname(), 'np', 3)
    2121
    2222#Go solve
    23 field_names=[]
    24 field_tolerances=[]
    25 field_values=[]
    26 #md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.mesh.y);
    27 for i in ['SSA','HO','FS']:
    28     md = setflowequation(md,i,'all')
    29     md = solve(md,'Stressbalance')
    30     field_names      = field_names + ['Vx'+i,'Vy'+i,'Vz'+i,'Vel'+i,'Pressure'+i]
    31     field_tolerances = field_tolerances + [7e-06,7e-06,2e-06,5e-06,5e-07]
    32     field_values = field_values + [
    33             md.results.StressbalanceSolution.Vx,
    34             md.results.StressbalanceSolution.Vy,
    35             md.results.StressbalanceSolution.Vz,
    36             md.results.StressbalanceSolution.Vel,
    37             md.results.StressbalanceSolution.Pressure,
    38             ]
     23field_names = []
     24field_tolerances = []
     25field_values = []
     26#md.initialization.pressure = md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.mesh.y);
     27for i in ['SSA', 'HO', 'FS']:
     28    md = setflowequation(md, i, 'all')
     29    md = solve(md, 'Stressbalance')
     30    field_names = field_names + ['Vx' + i, 'Vy' + i, 'Vz' + i, 'Vel' + i, 'Pressure' + i]
     31    field_tolerances = field_tolerances + [7e-06, 7e-06, 2e-06, 5e-06, 5e-07]
     32    field_values = field_values + [md.results.StressbalanceSolution.Vx,
     33                                   md.results.StressbalanceSolution.Vy,
     34                                   md.results.StressbalanceSolution.Vz,
     35                                   md.results.StressbalanceSolution.Vel,
     36                                   md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test461.py

    r22267 r23793  
    1010from matestar import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',180000.)
    13 md = setmask(md,'../Exp/SquareShelf.exp','')
    14 md = parameterize(md,'../Par/SquareSheetShelf.py')
    15 md = md.extrude(3,1.)
     12md = triangle(model(), '../Exp/Square.exp', 180000.)
     13md = setmask(md, '../Exp/SquareShelf.exp', '')
     14md = parameterize(md, '../Par/SquareSheetShelf.py')
     15md = md.extrude(3, 1.)
    1616md.materials = matestar()
    1717md.materials.rheology_B = 3.15e8 * np.ones((md.mesh.numberofvertices,))
     
    1919md.materials.rheology_Es = 3. * np.ones((md.mesh.numberofvertices,))
    2020
    21 md = setflowequation(md,'FS','all')
     21md = setflowequation(md, 'FS', 'all')
    2222md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices,))
    2323md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices,))
     
    2929md.thermal.isenthalpy = 1
    3030md.thermal.isdynamicbasalspc = 1
    31 md.cluster = generic('name',gethostname(),'np',3)
    32 md = solve(md,'Transient')
     31md.cluster = generic('name', gethostname(), 'np', 3)
     32md = solve(md, 'Transient')
    3333
    3434#Fields and tolerances to track changes
    35 field_names = [
    36         'Enthalpy1','Waterfraction1','Temperature1',
    37         'Enthalpy2','Waterfraction2','Temperature2',
    38         'Enthalpy3','Waterfraction3','Temperature3']
    39 field_tolerances = [
    40         1e-12,1e-11,1e-12,
    41         1e-12,1e-10,1e-12,
    42         1e-12,1e-9,1e-12]
    43 field_values = [
    44            md.results.TransientSolution[0].Enthalpy,
    45            md.results.TransientSolution[0].Waterfraction,
    46            md.results.TransientSolution[0].Temperature,
    47            md.results.TransientSolution[1].Enthalpy,
    48            md.results.TransientSolution[1].Waterfraction,
    49            md.results.TransientSolution[1].Temperature,
    50            md.results.TransientSolution[2].Enthalpy,
    51            md.results.TransientSolution[2].Waterfraction,
    52            md.results.TransientSolution[2].Temperature,
    53            ]
     35field_names = ['Enthalpy1', 'Waterfraction1', 'Temperature1',
     36               'Enthalpy2', 'Waterfraction2', 'Temperature2',
     37               'Enthalpy3', 'Waterfraction3', 'Temperature3']
     38field_tolerances = [1e-12, 1e-11, 1e-12,
     39                    1e-12, 1e-10, 1e-12,
     40                    1e-12, 1e-9, 1e-12]
     41field_values = [md.results.TransientSolution[0].Enthalpy,
     42                md.results.TransientSolution[0].Waterfraction,
     43                md.results.TransientSolution[0].Temperature,
     44                md.results.TransientSolution[1].Enthalpy,
     45                md.results.TransientSolution[1].Waterfraction,
     46                md.results.TransientSolution[1].Temperature,
     47                md.results.TransientSolution[2].Enthalpy,
     48                md.results.TransientSolution[2].Waterfraction,
     49                md.results.TransientSolution[2].Temperature]
  • issm/trunk-jpl/test/NightlyRun/test462.py

    r22267 r23793  
    11#Test Name: SquareSheetShelfAmrBamgField
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    98from solve import *
    109
    11 md = triangle(model(),'../Exp/Square.exp',150000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
    14 md = setflowequation(md,'SSA','all')
    15 md.cluster = generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.cluster = generic('name', gethostname(), 'np', 3)
    1615md.transient.isstressbalance = 1
    1716md.transient.ismasstransport = 1
     
    3736md.timestepping.final_time = 3
    3837md.timestepping.time_step = 1
    39 md = solve(md,'Transient')
     38md = solve(md, 'Transient')
    4039
    4140#Fields and tolerances to track changes
    42 field_names     = ['Vx','Vy','Vel','Pressure']
    43 field_tolerances = [1e-13,1e-13,1e-13,1e-13]
    44 field_values = [
    45         md.results.TransientSolution[2].Vx,
    46         md.results.TransientSolution[2].Vy,
    47         md.results.TransientSolution[2].Vel,
    48         md.results.TransientSolution[2].Pressure,
    49         ]
     41field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     42field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     43field_values = [md.results.TransientSolution[2].Vx,
     44                md.results.TransientSolution[2].Vy,
     45                md.results.TransientSolution[2].Vel,
     46                md.results.TransientSolution[2].Pressure]
  • issm/trunk-jpl/test/NightlyRun/test463.py

    r22267 r23793  
    11#Test Name: SquareSheetShelfAmrBamgGroundingline
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    98from solve import *
    109
    11 md = triangle(model(),'../Exp/Square.exp',150000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
    14 md = setflowequation(md,'SSA','all')
    15 md.cluster = generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.cluster = generic('name', gethostname(), 'np', 3)
    1615md.transient.isstressbalance = 1
    1716md.transient.ismasstransport = 1
     
    3736md.timestepping.final_time = 3
    3837md.timestepping.time_step = 1
    39 md = solve(md,'Transient')
     38md = solve(md, 'Transient')
    4039
    4140#Fields and tolerances to track changes
    42 field_names     = ['Vx','Vy','Vel','Pressure']
    43 field_tolerances = [1e-8,1e-8,1e-8,1e-8]
    44 field_values = [
    45         md.results.TransientSolution[2].Vx,
    46         md.results.TransientSolution[2].Vy,
    47         md.results.TransientSolution[2].Vel,
    48         md.results.TransientSolution[2].Pressure,
    49         ]
     41field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     42field_tolerances = [1e-8, 1e-8, 1e-8, 1e-8]
     43field_values = [md.results.TransientSolution[2].Vx,
     44                md.results.TransientSolution[2].Vy,
     45                md.results.TransientSolution[2].Vel,
     46                md.results.TransientSolution[2].Pressure]
  • issm/trunk-jpl/test/NightlyRun/test464.py

    r22267 r23793  
    11#Test Name: SquareSheetShelfAmrBamgIceFront
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    98from solve import *
    109
    11 md = triangle(model(),'../Exp/Square.exp',150000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
    14 md = setflowequation(md,'SSA','all')
    15 md.cluster = generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.cluster = generic('name', gethostname(), 'np', 3)
    1615md.transient.isstressbalance = 1
    1716md.transient.ismasstransport = 1
     
    3736md.timestepping.final_time = 3
    3837md.timestepping.time_step = 1
    39 md = solve(md,'Transient')
     38md = solve(md, 'Transient')
    4039
    4140#Fields and tolerances to track changes
    42 field_names     = ['Vx','Vy','Vel','Pressure']
    43 field_tolerances = [1e-13,1e-13,1e-13,1e-13]
    44 field_values = [
    45         md.results.TransientSolution[2].Vx,
    46         md.results.TransientSolution[2].Vy,
    47         md.results.TransientSolution[2].Vel,
    48         md.results.TransientSolution[2].Pressure,
    49         ]
     41field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     42field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13]
     43field_values = [md.results.TransientSolution[2].Vx,
     44                md.results.TransientSolution[2].Vy,
     45                md.results.TransientSolution[2].Vel,
     46                md.results.TransientSolution[2].Pressure]
  • issm/trunk-jpl/test/NightlyRun/test465.py

    r22267 r23793  
    11#Test Name: SquareSheetShelfAmrBamgAll
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    98from solve import *
    109
    11 md = triangle(model(),'../Exp/Square.exp',150000.)
    12 md = setmask(md,'../Exp/SquareShelf.exp','')
    13 md = parameterize(md,'../Par/SquareSheetShelf.py')
    14 md = setflowequation(md,'SSA','all')
    15 md.cluster = generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 150000.)
     11md = setmask(md, '../Exp/SquareShelf.exp', '')
     12md = parameterize(md, '../Par/SquareSheetShelf.py')
     13md = setflowequation(md, 'SSA', 'all')
     14md.cluster = generic('name', gethostname(), 'np', 3)
    1615md.transient.isstressbalance = 1
    1716md.transient.ismasstransport = 1
     
    3736md.timestepping.final_time = 3
    3837md.timestepping.time_step = 1
    39 md = solve(md,'Transient')
     38md = solve(md, 'Transient')
    4039
    4140#Fields and tolerances to track changes
    42 field_names     = ['Vx','Vy','Vel','Pressure']
    43 field_tolerances = [1e-8,1e-8,1e-8,1e-8]
    44 field_values = [
    45         md.results.TransientSolution[2].Vx,
    46         md.results.TransientSolution[2].Vy,
    47         md.results.TransientSolution[2].Vel,
    48         md.results.TransientSolution[2].Pressure,
    49         ]
     41field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     42field_tolerances = [1e-8, 1e-8, 1e-8, 1e-8]
     43field_values = [md.results.TransientSolution[2].Vx,
     44                md.results.TransientSolution[2].Vy,
     45                md.results.TransientSolution[2].Vel,
     46                md.results.TransientSolution[2].Pressure]
  • issm/trunk-jpl/test/NightlyRun/test501.py

    r22864 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Stressbalance')
    1717
    1818# Fields and tolerances to track changes
    19 field_names     =['Vx','Vy','Vel','Pressure']
    20 field_tolerances=[1e-12,2e-12,2e-12,1e-13]
    21 field_values=[md.results.StressbalanceSolution.Vx,
    22                                                         md.results.StressbalanceSolution.Vy,
    23                                                         md.results.StressbalanceSolution.Vel,
    24                                                         md.results.StressbalanceSolution.Pressure]
     19field_names = ['Vx', 'Vy', 'Vel', 'Pressure']
     20field_tolerances = [1e-12, 2e-12, 2e-12, 1e-13]
     21field_values = [md.results.StressbalanceSolution.Vx,
     22                md.results.StressbalanceSolution.Vy,
     23                md.results.StressbalanceSolution.Vel,
     24                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test502.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,0.9)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 0.9)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919# Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-08,1e-08,1e-08,1e-08,1e-08]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-08, 1e-08, 1e-08, 1e-08, 1e-08]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test503.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,0.9)
    15 md=setflowequation(md,'FS','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Stressbalance')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 0.9)
     15md = setflowequation(md, 'FS', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Stressbalance')
    1818
    1919# Fields and tolerances to track changes
    20 field_names     =['Vx','Vy','Vz','Vel','Pressure']
    21 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09]
    22 field_values=[\
    23         md.results.StressbalanceSolution.Vx,\
    24         md.results.StressbalanceSolution.Vy,\
    25         md.results.StressbalanceSolution.Vz,\
    26         md.results.StressbalanceSolution.Vel,\
    27         md.results.StressbalanceSolution.Pressure,\
    28         ]
     20field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure']
     21field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09]
     22field_values = [md.results.StressbalanceSolution.Vx,
     23                md.results.StressbalanceSolution.Vy,
     24                md.results.StressbalanceSolution.Vz,
     25                md.results.StressbalanceSolution.Vel,
     26                md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test504.py

    r22343 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.mesh.scale_factor=0.9*np.ones((md.mesh.numberofvertices))
    16 md.transient.requested_outputs=['default','IceVolume','IceVolumeScaled','GroundedArea','GroundedAreaScaled','FloatingArea','FloatingAreaScaled','TotalSmb','TotalSmbScaled','TotalFloatingBmb','TotalFloatingBmbScaled']
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.mesh.scale_factor = 0.9 * np.ones((md.mesh.numberofvertices))
     16md.transient.requested_outputs = ['default', 'IceVolume', 'IceVolumeScaled', 'GroundedArea', 'GroundedAreaScaled', 'FloatingArea', 'FloatingAreaScaled', 'TotalSmb', 'TotalSmbScaled', 'TotalFloatingBmb', 'TotalFloatingBmbScaled']
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Transient')
    1919
    2020# Fields and tolerances to track changes
    21 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','IceVolume1','IceVolumeScaled1','GroundedArea1','GroundedAreaScaled1','FloatingArea1','FloatingAreaScaled1','TotalSmb1','TotalSmbScaled1','TotalFloatingBmb1','TotalFloatingBmbScaled1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','IceVolume2','IceVolumeScaled2','GroundedArea2','GroundedAreaScaled2','FloatingArea2','FloatingAreaScaled2','TotalSmb2','TotalSmbScaled2','TotalFloatingBmb2','TotalFloatingBmbScaled2']
    22 field_tolerances=[1e-12,2e-12,2e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-12,1e-12,1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,]
    23 field_values=[\
    24         md.results.TransientSolution[0].Vx,\
    25         md.results.TransientSolution[0].Vy,\
    26         md.results.TransientSolution[0].Vel,\
    27         md.results.TransientSolution[0].Pressure,\
    28         md.results.TransientSolution[0].Base,\
    29         md.results.TransientSolution[0].Surface,\
    30         md.results.TransientSolution[0].Thickness,\
    31         md.results.TransientSolution[0].IceVolume,\
    32         md.results.TransientSolution[0].IceVolumeScaled,\
    33         md.results.TransientSolution[0].GroundedArea,\
    34         md.results.TransientSolution[0].GroundedAreaScaled,\
    35         md.results.TransientSolution[0].FloatingArea,\
    36         md.results.TransientSolution[0].FloatingAreaScaled,\
    37         md.results.TransientSolution[0].TotalSmb,\
    38         md.results.TransientSolution[0].TotalSmbScaled,\
    39         md.results.TransientSolution[0].TotalFloatingBmb,\
    40         md.results.TransientSolution[0].TotalFloatingBmbScaled,\
    41         md.results.TransientSolution[1].Vx,\
    42         md.results.TransientSolution[1].Vy,\
    43         md.results.TransientSolution[1].Vel,\
    44         md.results.TransientSolution[1].Pressure,\
    45         md.results.TransientSolution[1].Base,\
    46         md.results.TransientSolution[1].Surface,\
    47         md.results.TransientSolution[1].Thickness,\
    48         md.results.TransientSolution[1].IceVolume,\
    49         md.results.TransientSolution[1].IceVolumeScaled,\
    50         md.results.TransientSolution[1].GroundedArea,\
    51         md.results.TransientSolution[1].GroundedAreaScaled,\
    52         md.results.TransientSolution[1].FloatingArea,\
    53         md.results.TransientSolution[1].FloatingAreaScaled,\
    54         md.results.TransientSolution[1].TotalSmb,\
    55         md.results.TransientSolution[1].TotalSmbScaled,\
    56         md.results.TransientSolution[1].TotalFloatingBmb,\
    57         md.results.TransientSolution[1].TotalFloatingBmbScaled,\
    58         ]
     21field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1',
     22               'Bed1', 'Surface1', 'Thickness1',
     23               'IceVolume1', 'IceVolumeScaled1',
     24               'GroundedArea1', 'GroundedAreaScaled1',
     25               'FloatingArea1', 'FloatingAreaScaled1',
     26               'TotalSmb1', 'TotalSmbScaled1',
     27               'TotalFloatingBmb1', 'TotalFloatingBmbScaled1',
     28               'Vx2', 'Vy2', 'Vel2', 'Pressure2',
     29               'Bed2', 'Surface2', 'Thickness2',
     30               'IceVolume2', 'IceVolumeScaled2',
     31               'GroundedArea2', 'GroundedAreaScaled2',
     32               'FloatingArea2', 'FloatingAreaScaled2',
     33               'TotalSmb2', 'TotalSmbScaled2',
     34               'TotalFloatingBmb2', 'TotalFloatingBmbScaled2']
     35field_tolerances = [1e-12, 2e-12, 2e-12, 1e-13,
     36                    1e-13, 1e-13, 1e-13,
     37                    1e-13, 1e-13,
     38                    1e-13, 1e-13,
     39                    1e-12, 1e-12,
     40                    1e-12, 1e-13,
     41                    1e-13, 1e-13,
     42                    1e-13, 1e-13, 1e-13, 1e-13,
     43                    1e-13, 1e-13, 1e-13,
     44                    1e-13, 1e-13,
     45                    1e-13, 1e-13,
     46                    1e-13, 1e-13,
     47                    1e-13, 1e-13,
     48                    1e-13, 1e-13]
     49field_values = [md.results.TransientSolution[0].Vx,
     50                md.results.TransientSolution[0].Vy,
     51                md.results.TransientSolution[0].Vel,
     52                md.results.TransientSolution[0].Pressure,
     53                md.results.TransientSolution[0].Base,
     54                md.results.TransientSolution[0].Surface,
     55                md.results.TransientSolution[0].Thickness,
     56                md.results.TransientSolution[0].IceVolume,
     57                md.results.TransientSolution[0].IceVolumeScaled,
     58                md.results.TransientSolution[0].GroundedArea,
     59                md.results.TransientSolution[0].GroundedAreaScaled,
     60                md.results.TransientSolution[0].FloatingArea,
     61                md.results.TransientSolution[0].FloatingAreaScaled,
     62                md.results.TransientSolution[0].TotalSmb,
     63                md.results.TransientSolution[0].TotalSmbScaled,
     64                md.results.TransientSolution[0].TotalFloatingBmb,
     65                md.results.TransientSolution[0].TotalFloatingBmbScaled,
     66                md.results.TransientSolution[1].Vx,
     67                md.results.TransientSolution[1].Vy,
     68                md.results.TransientSolution[1].Vel,
     69                md.results.TransientSolution[1].Pressure,
     70                md.results.TransientSolution[1].Base,
     71                md.results.TransientSolution[1].Surface,
     72                md.results.TransientSolution[1].Thickness,
     73                md.results.TransientSolution[1].IceVolume,
     74                md.results.TransientSolution[1].IceVolumeScaled,
     75                md.results.TransientSolution[1].GroundedArea,
     76                md.results.TransientSolution[1].GroundedAreaScaled,
     77                md.results.TransientSolution[1].FloatingArea,
     78                md.results.TransientSolution[1].FloatingAreaScaled,
     79                md.results.TransientSolution[1].TotalSmb,
     80                md.results.TransientSolution[1].TotalSmbScaled,
     81                md.results.TransientSolution[1].TotalFloatingBmb,
     82                md.results.TransientSolution[1].TotalFloatingBmbScaled]
  • issm/trunk-jpl/test/NightlyRun/test505.py

    r21835 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',30000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Transient')
    1818
    1919# Fields and tolerances to track changes
    20 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    21         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2']
    22 field_tolerances=[1e-12,1e-12,3e-10,1e-12,1e-13,1e-11,5e-12,9e-12,1e-13,5e-9, \
    23         5e-11,5e-11,1e-10,2e-11,7e-12,1e-11,1e-11,5e-12,1e-11,2e-8]
    24 field_values=[\
    25         md.results.TransientSolution[0].Vx,\
    26         md.results.TransientSolution[0].Vy,\
    27         md.results.TransientSolution[0].Vz,\
    28         md.results.TransientSolution[0].Vel,\
    29         md.results.TransientSolution[0].Pressure,\
    30         md.results.TransientSolution[0].Base,\
    31         md.results.TransientSolution[0].Surface,\
    32         md.results.TransientSolution[0].Thickness,\
    33         md.results.TransientSolution[0].Temperature,\
    34         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    35         md.results.TransientSolution[1].Vx,\
    36         md.results.TransientSolution[1].Vy,\
    37         md.results.TransientSolution[1].Vz,\
    38         md.results.TransientSolution[1].Vel,\
    39         md.results.TransientSolution[1].Pressure,\
    40         md.results.TransientSolution[1].Base,\
    41         md.results.TransientSolution[1].Surface,\
    42         md.results.TransientSolution[1].Thickness,\
    43         md.results.TransientSolution[1].Temperature,\
    44         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    45         ]
     20field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     21               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2']
     22field_tolerances = [1e-12, 1e-12, 3e-10, 1e-12, 1e-13, 1e-11, 5e-12, 9e-12, 1e-13, 5e-9,
     23                    5e-11, 5e-11, 1e-10, 2e-11, 7e-12, 1e-11, 1e-11, 5e-12, 1e-11, 2e-8]
     24field_values = [md.results.TransientSolution[0].Vx,
     25                md.results.TransientSolution[0].Vy,
     26                md.results.TransientSolution[0].Vz,
     27                md.results.TransientSolution[0].Vel,
     28                md.results.TransientSolution[0].Pressure,
     29                md.results.TransientSolution[0].Base,
     30                md.results.TransientSolution[0].Surface,
     31                md.results.TransientSolution[0].Thickness,
     32                md.results.TransientSolution[0].Temperature,
     33                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     34                md.results.TransientSolution[1].Vx,
     35                md.results.TransientSolution[1].Vy,
     36                md.results.TransientSolution[1].Vz,
     37                md.results.TransientSolution[1].Vel,
     38                md.results.TransientSolution[1].Pressure,
     39                md.results.TransientSolution[1].Base,
     40                md.results.TransientSolution[1].Surface,
     41                md.results.TransientSolution[1].Thickness,
     42                md.results.TransientSolution[1].Temperature,
     43                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test506.py

    r22335 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',30000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.mesh.scale_factor=0.9*np.ones((md.mesh.numberofvertices))
    15 md.extrude(2,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.transient.requested_outputs=['default','IceVolume','IceVolumeScaled','GroundedArea','GroundedAreaScaled','FloatingArea','FloatingAreaScaled','TotalSmb','TotalSmbScaled','TotalFloatingBmb','TotalFloatingBmbScaled']
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.mesh.scale_factor = 0.9 * np.ones((md.mesh.numberofvertices))
     15md.extrude(2, 1.)
     16md = setflowequation(md, 'HO', 'all')
     17md.transient.requested_outputs = ['default', 'IceVolume', 'IceVolumeScaled', 'GroundedArea', 'GroundedAreaScaled', 'FloatingArea', 'FloatingAreaScaled', 'TotalSmb', 'TotalSmbScaled', 'TotalFloatingBmb', 'TotalFloatingBmbScaled']
     18md.cluster = generic('name', gethostname(), 'np', 3)
     19md = solve(md, 'Transient')
    2020
    2121# Fields and tolerances to track changes
    22 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','IceVolume1','IceVolumeScaled1','GroundedArea1','GroundedAreaScaled1','FloatingArea1','FloatingAreaScaled1','TotalSmb1','TotalSmbScaled1','TotalFloatingBmb1','TotalFloatingBmbScaled1', \
    23                                       'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','IceVolume2','IceVolumeScaled2','GroundedArea2','GroundedAreaScaled2','FloatingArea2','FloatingAreaScaled2','TotalSmb2','TotalSmbScaled2','TotalFloatingBmb2','TotalFloatingBmbScaled2']
    24 field_tolerances=[1e-10,1e-10,1e-10,1e-10,1e-12,1e-11,2e-12,1e-11,1e-12,1e-09,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
    25                                                 1e-11,1e-11,1e-09,1e-11,1e-11,1e-10,1e-11,1e-10,1e-11,2e-08,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    26 field_values=[\
    27         md.results.TransientSolution[0].Vx,\
    28         md.results.TransientSolution[0].Vy,\
    29         md.results.TransientSolution[0].Vz,\
    30         md.results.TransientSolution[0].Vel,\
    31         md.results.TransientSolution[0].Pressure,\
    32         md.results.TransientSolution[0].Base,\
    33         md.results.TransientSolution[0].Surface,\
    34         md.results.TransientSolution[0].Thickness,\
    35         md.results.TransientSolution[0].Temperature,\
    36         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    37         md.results.TransientSolution[0].IceVolume,\
    38         md.results.TransientSolution[0].IceVolumeScaled,\
    39         md.results.TransientSolution[0].GroundedArea,\
    40         md.results.TransientSolution[0].GroundedAreaScaled,\
    41         md.results.TransientSolution[0].FloatingArea,\
    42         md.results.TransientSolution[0].FloatingAreaScaled,\
    43         md.results.TransientSolution[0].TotalSmb,\
    44         md.results.TransientSolution[0].TotalSmbScaled,\
    45         md.results.TransientSolution[0].TotalFloatingBmb,\
    46         md.results.TransientSolution[0].TotalFloatingBmbScaled,\
    47         md.results.TransientSolution[1].Vx,\
    48         md.results.TransientSolution[1].Vy,\
    49         md.results.TransientSolution[1].Vz,\
    50         md.results.TransientSolution[1].Vel,\
    51         md.results.TransientSolution[1].Pressure,\
    52         md.results.TransientSolution[1].Base,\
    53         md.results.TransientSolution[1].Surface,\
    54         md.results.TransientSolution[1].Thickness,\
    55         md.results.TransientSolution[1].Temperature,\
    56         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    57         md.results.TransientSolution[1].IceVolume,\
    58         md.results.TransientSolution[1].IceVolumeScaled,\
    59         md.results.TransientSolution[1].GroundedArea,\
    60         md.results.TransientSolution[1].GroundedAreaScaled,\
    61         md.results.TransientSolution[1].FloatingArea,\
    62         md.results.TransientSolution[1].FloatingAreaScaled,\
    63         md.results.TransientSolution[1].TotalSmb,\
    64         md.results.TransientSolution[1].TotalSmbScaled,\
    65         md.results.TransientSolution[1].TotalFloatingBmb,\
    66         md.results.TransientSolution[1].TotalFloatingBmbScaled,\
    67         ]
     22field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'IceVolume1', 'IceVolumeScaled1', 'GroundedArea1', 'GroundedAreaScaled1', 'FloatingArea1', 'FloatingAreaScaled1', 'TotalSmb1', 'TotalSmbScaled1', 'TotalFloatingBmb1', 'TotalFloatingBmbScaled1',
     23               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'IceVolume2', 'IceVolumeScaled2', 'GroundedArea2', 'GroundedAreaScaled2', 'FloatingArea2', 'FloatingAreaScaled2', 'TotalSmb2', 'TotalSmbScaled2', 'TotalFloatingBmb2', 'TotalFloatingBmbScaled2']
     24field_tolerances = [1e-10, 1e-10, 1e-10, 1e-10, 1e-12, 1e-11, 2e-12, 1e-11, 1e-12, 1e-09, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     25                    1e-11, 1e-11, 1e-09, 1e-11, 1e-11, 1e-10, 1e-11, 1e-10, 1e-11, 2e-08, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     26field_values = [md.results.TransientSolution[0].Vx,
     27                md.results.TransientSolution[0].Vy,
     28                md.results.TransientSolution[0].Vz,
     29                md.results.TransientSolution[0].Vel,
     30                md.results.TransientSolution[0].Pressure,
     31                md.results.TransientSolution[0].Base,
     32                md.results.TransientSolution[0].Surface,
     33                md.results.TransientSolution[0].Thickness,
     34                md.results.TransientSolution[0].Temperature,
     35                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     36                md.results.TransientSolution[0].IceVolume,
     37                md.results.TransientSolution[0].IceVolumeScaled,
     38                md.results.TransientSolution[0].GroundedArea,
     39                md.results.TransientSolution[0].GroundedAreaScaled,
     40                md.results.TransientSolution[0].FloatingArea,
     41                md.results.TransientSolution[0].FloatingAreaScaled,
     42                md.results.TransientSolution[0].TotalSmb,
     43                md.results.TransientSolution[0].TotalSmbScaled,
     44                md.results.TransientSolution[0].TotalFloatingBmb,
     45                md.results.TransientSolution[0].TotalFloatingBmbScaled,
     46                md.results.TransientSolution[1].Vx,
     47                md.results.TransientSolution[1].Vy,
     48                md.results.TransientSolution[1].Vz,
     49                md.results.TransientSolution[1].Vel,
     50                md.results.TransientSolution[1].Pressure,
     51                md.results.TransientSolution[1].Base,
     52                md.results.TransientSolution[1].Surface,
     53                md.results.TransientSolution[1].Thickness,
     54                md.results.TransientSolution[1].Temperature,
     55                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,
     56                md.results.TransientSolution[1].IceVolume,
     57                md.results.TransientSolution[1].IceVolumeScaled,
     58                md.results.TransientSolution[1].GroundedArea,
     59                md.results.TransientSolution[1].GroundedAreaScaled,
     60                md.results.TransientSolution[1].FloatingArea,
     61                md.results.TransientSolution[1].FloatingAreaScaled,
     62                md.results.TransientSolution[1].TotalSmb,
     63                md.results.TransientSolution[1].TotalSmbScaled,
     64                md.results.TransientSolution[1].TotalFloatingBmb,
     65                md.results.TransientSolution[1].TotalFloatingBmbScaled]
  • issm/trunk-jpl/test/NightlyRun/test507.py

    r23012 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',30000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(2,1.)
    15 md=setflowequation(md,'FS','all')
    16 md.groundingline.melt_interpolation='FullMeltOnPartiallyFloating'
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(2, 1.)
     15md = setflowequation(md, 'FS', 'all')
     16md.groundingline.melt_interpolation = 'FullMeltOnPartiallyFloating'
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Transient')
    1919
    2020# Fields and tolerances to track changes
    21 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', \
    22                                       'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2']
    23 field_tolerances=[1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06,1e-06,1e-06,1e-06,1e-06,1e-06,1e-06,1e-06,1e-06,1e-06]
    24 field_values=[\
    25         md.results.TransientSolution[0].Vx,\
    26         md.results.TransientSolution[0].Vy,\
    27         md.results.TransientSolution[0].Vz,\
    28         md.results.TransientSolution[0].Vel,\
    29         md.results.TransientSolution[0].Pressure,\
    30         md.results.TransientSolution[0].Base,\
    31         md.results.TransientSolution[0].Surface,\
    32         md.results.TransientSolution[0].Thickness,\
    33         md.results.TransientSolution[0].Temperature,\
    34         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
    35         md.results.TransientSolution[1].Vx,\
    36         md.results.TransientSolution[1].Vy,\
    37         md.results.TransientSolution[1].Vz,\
    38         md.results.TransientSolution[1].Vel,\
    39         md.results.TransientSolution[1].Pressure,\
    40         md.results.TransientSolution[1].Base,\
    41         md.results.TransientSolution[1].Surface,\
    42         md.results.TransientSolution[1].Thickness,\
    43         md.results.TransientSolution[1].Temperature,\
    44         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate,\
    45         ]
     21field_names = ['Vx1', 'Vy1', 'Vz1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     22               'Vx2', 'Vy2', 'Vz2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2']
     23field_tolerances = [1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06]
     24field_values = [md.results.TransientSolution[0].Vx,
     25                md.results.TransientSolution[0].Vy,
     26                md.results.TransientSolution[0].Vz,
     27                md.results.TransientSolution[0].Vel,
     28                md.results.TransientSolution[0].Pressure,
     29                md.results.TransientSolution[0].Base,
     30                md.results.TransientSolution[0].Surface,
     31                md.results.TransientSolution[0].Thickness,
     32                md.results.TransientSolution[0].Temperature,
     33                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     34                md.results.TransientSolution[1].Vx,
     35                md.results.TransientSolution[1].Vy,
     36                md.results.TransientSolution[1].Vz,
     37                md.results.TransientSolution[1].Vel,
     38                md.results.TransientSolution[1].Pressure,
     39                md.results.TransientSolution[1].Base,
     40                md.results.TransientSolution[1].Surface,
     41                md.results.TransientSolution[1].Thickness,
     42                md.results.TransientSolution[1].Temperature,
     43                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test508.py

    r22311 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',35000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,1.1)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.timestepping.time_step=0.
    18 md=solve(md,'Steadystate')
     11md = triangle(model(), '../Exp/Pig.exp', 35000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 1.1)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping.time_step = 0.
     18md = solve(md, 'Steadystate')
    1919
    2020# Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsGroundediceMeltingRate']
    22 field_tolerances=[5e-08,1.6e-08,5e-08,5e-08,1e-09,6e-08,5e-07]
    23 field_values=[\
    24         md.results.SteadystateSolution.Vx,\
    25         md.results.SteadystateSolution.Vy,\
    26         md.results.SteadystateSolution.Vz,\
    27         md.results.SteadystateSolution.Vel,\
    28         md.results.SteadystateSolution.Pressure,\
    29         md.results.SteadystateSolution.Temperature,\
    30         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate,\
    31         ]
     21field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [5e-08, 1.6e-08, 5e-08, 5e-08, 1e-09, 6e-08, 5e-07]
     23field_values = [md.results.SteadystateSolution.Vx,
     24                md.results.SteadystateSolution.Vy,
     25                md.results.SteadystateSolution.Vz,
     26                md.results.SteadystateSolution.Vel,
     27                md.results.SteadystateSolution.Pressure,
     28                md.results.SteadystateSolution.Temperature,
     29                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test509.py

    r23496 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',30000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.timestepping.time_step=0.
    18 md.thermal.penalty_threshold=7
    19 md=solve(md,'Steadystate')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping.time_step = 0.
     18md.thermal.penalty_threshold = 7
     19md = solve(md, 'Steadystate')
    2020
    2121# Fields and tolerances to track changes
    22 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsGroundediceMeltingRate']
    23 field_tolerances=[1e-09,1e-09,5e-08,5e-08,1e-09,5e-09,1e-06]
    24 field_values=[\
    25         md.results.SteadystateSolution.Vx,\
    26         md.results.SteadystateSolution.Vy,\
    27         md.results.SteadystateSolution.Vz,\
    28         md.results.SteadystateSolution.Vel,\
    29         md.results.SteadystateSolution.Pressure,\
    30         md.results.SteadystateSolution.Temperature,\
    31         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate,\
    32         ]
     22field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     23field_tolerances = [1e-09, 1e-09, 5e-08, 5e-08, 1e-09, 5e-09, 1e-06]
     24field_values = [md.results.SteadystateSolution.Vx,
     25                md.results.SteadystateSolution.Vy,
     26                md.results.SteadystateSolution.Vz,
     27                md.results.SteadystateSolution.Vel,
     28                md.results.SteadystateSolution.Pressure,
     29                md.results.SteadystateSolution.Temperature,
     30                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test510.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(2,1.)
    15 md=setflowequation(md,'FS','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md.timestepping.time_step=0.
    18 md=solve(md,'Steadystate')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(2, 1.)
     15md = setflowequation(md, 'FS', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md.timestepping.time_step = 0.
     18md = solve(md, 'Steadystate')
    1919
    2020# Fields and tolerances to track changes
    21 field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsGroundediceMeltingRate']
    22 field_tolerances=[1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06]
    23 field_values=[\
    24         md.results.SteadystateSolution.Vx,\
    25         md.results.SteadystateSolution.Vy,\
    26         md.results.SteadystateSolution.Vz,\
    27         md.results.SteadystateSolution.Vel,\
    28         md.results.SteadystateSolution.Pressure,\
    29         md.results.SteadystateSolution.Temperature,\
    30         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate,\
    31         ]
     21field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     22field_tolerances = [1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-06]
     23field_values = [md.results.SteadystateSolution.Vx,
     24                md.results.SteadystateSolution.Vy,
     25                md.results.SteadystateSolution.Vz,
     26                md.results.SteadystateSolution.Vel,
     27                md.results.SteadystateSolution.Pressure,
     28                md.results.SteadystateSolution.Temperature,
     29                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test511.py

    r23784 r23793  
    99from solve import *
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',11000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
     11md = triangle(model(), '../Exp/Pig.exp', 11000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
    1414
    1515#impose hydrostatic equilibrium (required by Stokes)
    16 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    17 md.geometry.surface=md.geometry.base+md.geometry.thickness
    18 md.extrude(3,1.)
    19 md=setflowequation(md,'FS','all')
    20 md=md.extract(md.mask.groundedice_levelset<0.)
     16md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness
     17md.geometry.surface = md.geometry.base + md.geometry.thickness
     18md.extrude(3, 1.)
     19md = setflowequation(md, 'FS', 'all')
     20md = md.extract(md.mask.groundedice_levelset < 0.)
    2121
    2222#control parameters
    23 md.inversion.iscontrol=1
    24 md.inversion.control_parameters=['MaterialsRheologyBbar']
    25 md.inversion.min_parameters=10.**6*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    26 md.inversion.max_parameters=2.*10**9*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    27 md.inversion.nsteps=2
    28 md.inversion.cost_functions=[101]
    29 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    30 md.inversion.gradient_scaling=10.**8*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    31 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    32 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
    33 md.inversion.vx_obs=md.initialization.vx
    34 md.inversion.vy_obs=md.initialization.vy
     23md.inversion.iscontrol = 1
     24md.inversion.control_parameters = ['MaterialsRheologyBbar']
     25md.inversion.min_parameters = 10.**6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     26md.inversion.max_parameters = 2. * 10**9 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     27md.inversion.nsteps = 2
     28md.inversion.cost_functions = [101]
     29md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     30md.inversion.gradient_scaling = 10.**8 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     31md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     32md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps))
     33md.inversion.vx_obs = md.initialization.vx
     34md.inversion.vy_obs = md.initialization.vy
    3535
    36 md.cluster=generic('name',gethostname(),'np',1)
    37 md=solve(md,'Stressbalance')
     36md.cluster = generic('name', gethostname(), 'np', 1)
     37md = solve(md, 'Stressbalance')
    3838
    3939#Fields and tolerances to track changes
    40 field_names     =['Gradient','Misfits','MaterialsRheologyB','Pressure','Vel','Vx','Vy']
    41 field_tolerances=[5e-11,5e-11,5e-11,1e-09,1e-11,5e-11,1e-11]
    42 field_values=[
    43         md.results.StressbalanceSolution.Gradient1,
    44         md.results.StressbalanceSolution.J,
    45         md.results.StressbalanceSolution.MaterialsRheologyBbar,
    46         md.results.StressbalanceSolution.Pressure,
    47         md.results.StressbalanceSolution.Vel,
    48         md.results.StressbalanceSolution.Vx,
    49         md.results.StressbalanceSolution.Vy,
    50 ]
     40field_names = ['Gradient', 'Misfits', 'MaterialsRheologyB', 'Pressure', 'Vel', 'Vx', 'Vy']
     41field_tolerances = [5e-11, 5e-11, 5e-11, 1e-09, 1e-11, 5e-11, 1e-11]
     42field_values = [md.results.StressbalanceSolution.Gradient1,
     43                md.results.StressbalanceSolution.J,
     44                md.results.StressbalanceSolution.MaterialsRheologyBbar,
     45                md.results.StressbalanceSolution.Pressure,
     46                md.results.StressbalanceSolution.Vel,
     47                md.results.StressbalanceSolution.Vx,
     48                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test512.py

    r23785 r23793  
    1010
    1111
    12 md=triangle(model(),'../Exp/Pig.exp',20000.)
    13 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    14 md=parameterize(md,'../Par/Pig.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
     12md = triangle(model(), '../Exp/Pig.exp', 20000.)
     13md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     14md = parameterize(md, '../Par/Pig.py')
     15md.extrude(3, 1.)
     16md = setflowequation(md, 'HO', 'all')
    1717
    1818# control parameters
    19 md.inversion.iscontrol=1
    20 md.inversion.control_parameters=['FrictionCoefficient']
    21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    23 md.inversion.nsteps=2
    24 md.inversion.cost_functions=[103,501]
    25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    29 md.inversion.step_threshold=2.99*np.ones((md.inversion.nsteps))
    30 md.inversion.vx_obs=md.initialization.vx
    31 md.inversion.vy_obs=md.initialization.vy
    3219
    33 md.cluster=generic('name',gethostname(),'np',3)
    34 md=solve(md,'Stressbalance')
     20md.inversion.iscontrol = 1
     21md.inversion.control_parameters = ['FrictionCoefficient']
     22md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     24md.inversion.nsteps = 2
     25md.inversion.cost_functions = [103, 501]
     26md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     27md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     28md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     29md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     30md.inversion.step_threshold = 2.99 * np.ones((md.inversion.nsteps))
     31md.inversion.vx_obs = md.initialization.vx
     32md.inversion.vy_obs = md.initialization.vy
     33
     34md.cluster = generic('name', gethostname(), 'np', 3)
     35md = solve(md, 'Stressbalance')
    3536
    3637# Fields and tolerances to track changes
    37 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy']
    38 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11]
    39 field_values=[\
    40         md.results.StressbalanceSolution.Gradient1,\
    41         md.results.StressbalanceSolution.J,\
    42         md.results.StressbalanceSolution.FrictionCoefficient,\
    43         md.results.StressbalanceSolution.Pressure,\
    44         md.results.StressbalanceSolution.Vel,\
    45         md.results.StressbalanceSolution.Vx,\
    46         md.results.StressbalanceSolution.Vy
    47 ]
     38field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy']
     39field_tolerances = [1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11]
     40field_values = [md.results.StressbalanceSolution.Gradient1,
     41                md.results.StressbalanceSolution.J,
     42                md.results.StressbalanceSolution.FrictionCoefficient,
     43                md.results.StressbalanceSolution.Pressure,
     44                md.results.StressbalanceSolution.Vel,
     45                md.results.StressbalanceSolution.Vx,
     46                md.results.StressbalanceSolution.Vy]
  • issm/trunk-jpl/test/NightlyRun/test513.py

    r23785 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',30000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'SSA','all')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'SSA', 'all')
    1616
    1717# control parameters
    18 md.inversion.iscontrol=1
    19 md.inversion.control_parameters=['FrictionCoefficient']
    20 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    21 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    22 md.inversion.nsteps=2
    23 md.inversion.cost_functions=[103,501]
    24 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
    25 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
    26 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    27 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
    28 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
    29 md.inversion.vx_obs=md.initialization.vx
    30 md.inversion.vy_obs=md.initialization.vy
    31 md.timestepping.time_step=0.
    32 
    33 md.thermal.penalty_lock=5
    34 md.cluster=generic('name',gethostname(),'np',3)
    35 md=solve(md,'Steadystate')
     18md.inversion.iscontrol = 1
     19md.inversion.control_parameters = ['FrictionCoefficient']
     20md.inversion.min_parameters = 1. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     21md.inversion.max_parameters = 200. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     22md.inversion.nsteps = 2
     23md.inversion.cost_functions = [103, 501]
     24md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2))
     25md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7
     26md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     27md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps))
     28md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps))
     29md.inversion.vx_obs = md.initialization.vx
     30md.inversion.vy_obs = md.initialization.vy
     31md.timestepping.time_step = 0.
     32md.thermal.penalty_lock = 5
     33md.cluster = generic('name', gethostname(), 'np', 3)
     34md = solve(md, 'Steadystate')
    3635
    3736# Fields and tolerances to track changes
    38 field_names     =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy','Vz','Temperature','BasalforcingsGroundediceMeltingRate']
    39 field_tolerances=[5e-08,4e-10,1e-10,1e-10,3e-6,4e-6,3.4e-6,3e-6,2e-6,2e-06]
    40 field_values=[\
    41         md.results.SteadystateSolution.Gradient1,\
    42         md.results.SteadystateSolution.J,\
    43         md.results.SteadystateSolution.FrictionCoefficient,\
    44         md.results.SteadystateSolution.Pressure,\
    45         md.results.SteadystateSolution.Vel,\
    46         md.results.SteadystateSolution.Vx,\
    47         md.results.SteadystateSolution.Vy,\
    48         md.results.SteadystateSolution.Vz,\
    49         md.results.SteadystateSolution.Temperature,\
    50         md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate
    51 ]
     37field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy', 'Vz', 'Temperature', 'BasalforcingsGroundediceMeltingRate']
     38field_tolerances = [5e-08, 4e-10, 1e-10, 1e-10, 3e-6, 4e-6, 3.4e-6, 3e-6, 2e-6, 2e-06]
     39field_values = [md.results.SteadystateSolution.Gradient1,
     40                md.results.SteadystateSolution.J,
     41                md.results.SteadystateSolution.FrictionCoefficient,
     42                md.results.SteadystateSolution.Pressure,
     43                md.results.SteadystateSolution.Vel,
     44                md.results.SteadystateSolution.Vx,
     45                md.results.SteadystateSolution.Vy,
     46                md.results.SteadystateSolution.Vz,
     47                md.results.SteadystateSolution.Temperature,
     48                md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test514.py

    r22864 r23793  
    33import copy
    44from model import *
    5 from socket import gethostname
    65from bamg import *
    76from setmask import *
     
    1211
    1312#Simple mesh 1
    14 hVertices=10000.*np.ones((27))
    15 hVertices[0:5]=1000.
    16 md=bamg(model(),'domain','../Exp/Pig.exp','hmax',20000.,'hVertices',hVertices,'gradation',3.)
    17 x1=md.mesh.x
    18 y1=md.mesh.y
     13hVertices = 10000. * np.ones((27))
     14hVertices[0:5] = 1000.
     15md = bamg(model(), 'domain', '../Exp/Pig.exp', 'hmax', 20000., 'hVertices', hVertices, 'gradation', 3.)
     16x1 = md.mesh.x
     17y1 = md.mesh.y
    1918
    2019#Simple mesh 2
    21 md=bamg(model(),'domain','../Exp/Pig.exp','hmax',10000.)
    22 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    23 md=parameterize(md,'../Par/Pig.py')
    24 x2=md.mesh.x
    25 y2=md.mesh.y
     20md = bamg(model(), 'domain', '../Exp/Pig.exp', 'hmax', 10000.)
     21md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     22md = parameterize(md, '../Par/Pig.py')
     23x2 = md.mesh.x
     24y2 = md.mesh.y
    2625
    2726#refine existing mesh 1
    28 hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vy_obs,'node')
    29 metric=ComputeMetric(hessian,2./9.,1.,1000.,25.*10.**3,[])
    30 md.miscellaneous.dummy=metric
    31 md2=bamg(copy.deepcopy(md),'metric',md.miscellaneous.dummy,'hmin',1000.,'hmax',20000.,'gradation',3.)
    32 x3=md2.mesh.x
    33 y3=md2.mesh.y
     27hessian = ComputeHessian(md.mesh.elements, md.mesh.x, md.mesh.y, md.inversion.vy_obs, 'node')
     28metric = ComputeMetric(hessian, 2. / 9., 1., 1000., 25. * 10.**3, [])
     29md.miscellaneous.dummy = metric
     30md2 = bamg(copy.deepcopy(md), 'metric', md.miscellaneous.dummy, 'hmin', 1000., 'hmax', 20000., 'gradation', 3.)
     31x3 = md2.mesh.x
     32y3 = md2.mesh.y
    3433
    3534#refine existing mesh 2
    36 md2=bamg(copy.deepcopy(md),'metric',md.miscellaneous.dummy,'hmin',1000.,'hmax',20000.,'gradation',3.,'anisomax',1.)
    37 x4=md2.mesh.x
    38 y4=md2.mesh.y
     35md2 = bamg(copy.deepcopy(md), 'metric', md.miscellaneous.dummy, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'anisomax', 1.)
     36x4 = md2.mesh.x
     37y4 = md2.mesh.y
    3938
    4039#refine existing mesh 3
    41 hVertices=np.nan*np.ones((md.mesh.numberofvertices))
    42 hVertices[np.nonzero(md.mesh.vertexonboundary)]=500.
    43 md2=bamg(copy.deepcopy(md),'metric',md.miscellaneous.dummy,'hmin',1000.,'hmax',20000.,'gradation',3.,'anisomax',1.,'hVertices',hVertices)
    44 x5=md2.mesh.x
    45 y5=md2.mesh.y
     40hVertices = np.nan * np.ones((md.mesh.numberofvertices))
     41hVertices[np.nonzero(md.mesh.vertexonboundary)] = 500.
     42md2 = bamg(copy.deepcopy(md), 'metric', md.miscellaneous.dummy, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'anisomax', 1., 'hVertices', hVertices)
     43x5 = md2.mesh.x
     44y5 = md2.mesh.y
    4645
    4746#refine existing mesh 4
    48 md2=bamg(copy.deepcopy(md),'field',md.inversion.vy_obs,'hmin',1000.,'hmax',20000.,'gradation',3.,'Hessiantype',0,'err',np.array([1.]))
    49 x6=md2.mesh.x
    50 y6=md2.mesh.y
     47md2 = bamg(copy.deepcopy(md), 'field', md.inversion.vy_obs, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'Hessiantype', 0, 'err', np.array([1.]))
     48x6 = md2.mesh.x
     49y6 = md2.mesh.y
    5150
    5251#refine existing mesh 5
    53 md2=bamg(copy.deepcopy(md),'field',np.vstack((md.inversion.vy_obs,md.geometry.thickness)).T,'hmin',1000.,'hmax',20000.,'gradation',3.,'Hessiantype',1,'err',np.array([[10.,100.]]))
    54 x7=md2.mesh.x
    55 y7=md2.mesh.y
     52md2 = bamg(copy.deepcopy(md), 'field', np.vstack((md.inversion.vy_obs, md.geometry.thickness)).T, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'Hessiantype', 1, 'err', np.array([[10., 100.]]))
     53x7 = md2.mesh.x
     54y7 = md2.mesh.y
    5655
    5756#Fields and tolerances to track changes
    58 field_names     =['x1','y1','x2','y2','x3','y3','x4','y4','x5','y5','x6','y6','x7','y7']
    59 field_tolerances = [2e-10,7e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
    60 field_values=[x1, y1,x2, y2,    x3, y3, x4, y4, x5, y5, x6, y6, x7, y7]
     57field_names = ['x1', 'y1', 'x2', 'y2', 'x3', 'y3', 'x4', 'y4', 'x5', 'y5', 'x6', 'y6', 'x7', 'y7']
     58field_tolerances = [2e-10, 7e-10, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     59field_values = [x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7]
  • issm/trunk-jpl/test/NightlyRun/test515.py

    r22864 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',30000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.extrude(3,1.)
    15 md=setflowequation(md,'HO','all')
    16 md.thermal.stabilization=2
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md.transient.isstressbalance=False
    19 md.transient.ismasstransport=False
    20 md.transient.issmb=True
    21 md.transient.isthermal=True
    22 md.transient.isgroundingline=False
    23 md=solve(md,'Transient')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.thermal.stabilization = 2
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.transient.isstressbalance = False
     19md.transient.ismasstransport = False
     20md.transient.issmb = True
     21md.transient.isthermal = True
     22md.transient.isgroundingline = False
     23md = solve(md, 'Transient')
    2424
    2525# Fields and tolerances to track changes
    26 field_names     =['Temperature1','BasalforcingsGroundediceMeltingRate1',
    27                                                                         'Temperature2','BasalforcingsGroundediceMeltingRate2']
    28 field_tolerances=[1e-13,1e-8,1e-13,5e-8]
    29 field_values=[md.results.TransientSolution[0].Temperature,
    30                                                         md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
    31                                                         md.results.TransientSolution[1].Temperature,
    32                                                         md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate]
     26field_names = ['Temperature1', 'BasalforcingsGroundediceMeltingRate1',
     27               'Temperature2', 'BasalforcingsGroundediceMeltingRate2']
     28field_tolerances = [1e-13, 1e-8, 1e-13, 5e-8]
     29field_values = [md.results.TransientSolution[0].Temperature,
     30                md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,
     31                md.results.TransientSolution[1].Temperature,
     32                md.results.TransientSolution[1].BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test516.py

    r21408 r23793  
    11#Test Name: PigTherSteaSUPG
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/Pig.exp',30000.)
    13 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    14 md=parameterize(md,'../Par/Pig.py')
    15 md.extrude(3,1.)
    16 md=setflowequation(md,'HO','all')
    17 md.thermal.stabilization=2
    18 md.cluster=generic('name',gethostname(),'np',3)
    19 md.timestepping.time_step=0
    20 md.thermal.penalty_threshold=40
    21 md=solve(md,'Thermal')
     11md = triangle(model(), '../Exp/Pig.exp', 30000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(3, 1.)
     15md = setflowequation(md, 'HO', 'all')
     16md.thermal.stabilization = 2
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md.timestepping.time_step = 0
     19md.thermal.penalty_threshold = 40
     20md = solve(md, 'Thermal')
    2221
    2322#Fields and tolerances to track changes
    24 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
    25 field_tolerances=[1e-11,1e-11]
    26 field_values=[\
    27         md.results.ThermalSolution.Temperature,\
    28         md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
    29         ]
     23field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate']
     24field_tolerances = [1e-11, 1e-11]
     25field_values = [md.results.ThermalSolution.Temperature,
     26                md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
  • issm/trunk-jpl/test/NightlyRun/test530.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Balancevelocity')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Balancevelocity')
    1717
    1818# Fields and tolerances to track changes
    19 field_names     =['DrivingStressX','DrivingStressY','Vel']
    20 field_tolerances=[1e-13,1e-13,1e-13]
    21 field_values=[\
    22                 md.results.BalancevelocitySolution.DrivingStressX,\
    23                 md.results.BalancevelocitySolution.DrivingStressY,\
    24                 md.results.BalancevelocitySolution.Vel,\
    25                 ]
     19field_names = ['DrivingStressX', 'DrivingStressY', 'Vel']
     20field_tolerances = [1e-13, 1e-13, 1e-13]
     21field_values = [md.results.BalancevelocitySolution.DrivingStressX,
     22                md.results.BalancevelocitySolution.DrivingStressY,
     23                md.results.BalancevelocitySolution.Vel]
  • issm/trunk-jpl/test/NightlyRun/test531.py

    r21408 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Pig.exp',20000.)
    12 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md=parameterize(md,'../Par/Pig.py')
    14 md.initialization.vx[:]=0.
    15 md.initialization.vy[:]=0.
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Balancevelocity')
     11md = triangle(model(), '../Exp/Pig.exp', 20000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.initialization.vx[:] = 0.
     15md.initialization.vy[:] = 0.
     16md = setflowequation(md, 'SSA', 'all')
     17md.cluster = generic('name', gethostname(), 'np', 3)
     18md = solve(md, 'Balancevelocity')
    1919
    2020# Fields and tolerances to track changes
    21 field_names     =['DrivingStressX','DrivingStressY','Vel']
    22 field_tolerances=[1e-13,1e-13,1e-13]
    23 field_values=[\
    24                 md.results.BalancevelocitySolution.DrivingStressX,\
    25                 md.results.BalancevelocitySolution.DrivingStressY,\
    26                 md.results.BalancevelocitySolution.Vel,\
    27                 ]
     21field_names = ['DrivingStressX', 'DrivingStressY', 'Vel']
     22field_tolerances = [1e-13, 1e-13, 1e-13]
     23field_values = [md.results.BalancevelocitySolution.DrivingStressX,
     24                md.results.BalancevelocitySolution.DrivingStressY,
     25                md.results.BalancevelocitySolution.Vel]
  • issm/trunk-jpl/test/NightlyRun/test540.py

    r23653 r23793  
    99from calvingvonmises import *
    1010
    11 md = triangle(model(),'../Exp/Pig.exp',10000.)
    12 md = setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md = parameterize(md,'../Par/Pig.py')
    14 md = setflowequation(md,'SSA','all')
     11md = triangle(model(), '../Exp/Pig.exp', 10000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md = setflowequation(md, 'SSA', 'all')
    1515md.timestepping.time_step = 2
    1616md.timestepping.final_time = 50
     
    2626
    2727#Force MUMPS sequential analysis
    28 md.toolkits.DefaultAnalysis.mat_mumps_icntl_28=1
    29 md.cluster = generic('name',gethostname(),'np',2)
    30 md = solve(md,'Transient')
     28md.toolkits.DefaultAnalysis.mat_mumps_icntl_28 = 1
     29md.cluster = generic('name', gethostname(), 'np', 2)
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names = [
    34         'Vx1' ,'Vy1' ,'Vel1' ,'Pressure1' ,'Bed1' ,'Surface1' ,'Thickness1' ,'MaskIceLevelset1' ,
    35         'Vx2' ,'Vy2' ,'Vel2' ,'Pressure2' ,'Bed2' ,'Surface2' ,'Thickness2' ,'MaskIceLevelset2' ,
    36         'Vx10','Vy10','Vel10','Pressure10','Bed10','Surface10','Thickness10','MaskIceLevelset10',
    37         ]
    38 field_tolerances = [
    39         1e-12,2e-12,2e-12,1e-13,1e-13,1e-13,1e-13,1e-13,
    40         1e-12,1e-12,1e-12,1e-13,1e-13,1e-13,1e-13,1e-12,
    41         1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-9,
    42         ]
    43 field_values = [
    44         md.results.TransientSolution[0].Vx,
    45         md.results.TransientSolution[0].Vy,
    46         md.results.TransientSolution[0].Vel,
    47         md.results.TransientSolution[0].Pressure,
    48         md.results.TransientSolution[0].Base,
    49         md.results.TransientSolution[0].Surface,
    50         md.results.TransientSolution[0].Thickness,
    51         md.results.TransientSolution[0].MaskIceLevelset,
    52         md.results.TransientSolution[1].Vx,
    53         md.results.TransientSolution[1].Vy,
    54         md.results.TransientSolution[1].Vel,
    55         md.results.TransientSolution[1].Pressure,
    56         md.results.TransientSolution[1].Base,
    57         md.results.TransientSolution[1].Surface,
    58         md.results.TransientSolution[1].Thickness,
    59         md.results.TransientSolution[1].MaskIceLevelset,
    60         md.results.TransientSolution[9].Vx,
    61         md.results.TransientSolution[9].Vy,
    62         md.results.TransientSolution[9].Vel,
    63         md.results.TransientSolution[9].Pressure,
    64         md.results.TransientSolution[9].Base,
    65         md.results.TransientSolution[9].Surface,
    66         md.results.TransientSolution[9].Thickness,
    67         md.results.TransientSolution[9].MaskIceLevelset,
    68         ]
     33field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'MaskIceLevelset1',
     34               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'MaskIceLevelset2',
     35               'Vx10', 'Vy10', 'Vel10', 'Pressure10', 'Bed10', 'Surface10', 'Thickness10', 'MaskIceLevelset10']
     36field_tolerances = [1e-12, 2e-12, 2e-12, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     37                    1e-12, 1e-12, 1e-12, 1e-13, 1e-13, 1e-13, 1e-13, 1e-12,
     38                    1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-9]
     39field_values = [md.results.TransientSolution[0].Vx,
     40                md.results.TransientSolution[0].Vy,
     41                md.results.TransientSolution[0].Vel,
     42                md.results.TransientSolution[0].Pressure,
     43                md.results.TransientSolution[0].Base,
     44                md.results.TransientSolution[0].Surface,
     45                md.results.TransientSolution[0].Thickness,
     46                md.results.TransientSolution[0].MaskIceLevelset,
     47                md.results.TransientSolution[1].Vx,
     48                md.results.TransientSolution[1].Vy,
     49                md.results.TransientSolution[1].Vel,
     50                md.results.TransientSolution[1].Pressure,
     51                md.results.TransientSolution[1].Base,
     52                md.results.TransientSolution[1].Surface,
     53                md.results.TransientSolution[1].Thickness,
     54                md.results.TransientSolution[1].MaskIceLevelset,
     55                md.results.TransientSolution[9].Vx,
     56                md.results.TransientSolution[9].Vy,
     57                md.results.TransientSolution[9].Vel,
     58                md.results.TransientSolution[9].Pressure,
     59                md.results.TransientSolution[9].Base,
     60                md.results.TransientSolution[9].Surface,
     61                md.results.TransientSolution[9].Thickness,
     62                md.results.TransientSolution[9].MaskIceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test541.py

    r23688 r23793  
    99from calvingvonmises import *
    1010
    11 md = triangle(model(),'../Exp/Pig.exp',10000.)
    12 md = setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
    13 md = parameterize(md,'../Par/Pig.py')
    14 md.extrude(5,1.)
    15 md = setflowequation(md,'HO','all')
     11md = triangle(model(), '../Exp/Pig.exp', 10000.)
     12md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp')
     13md = parameterize(md, '../Par/Pig.py')
     14md.extrude(5, 1.)
     15md = setflowequation(md, 'HO', 'all')
    1616md.timestepping.time_step = 2
    1717md.timestepping.final_time = 50
     
    2727
    2828#Force MUMPS sequential analysis
    29 md.toolkits.DefaultAnalysis.mat_mumps_icntl_28=1
    30 md.cluster = generic('name',gethostname(),'np',2)
    31 md = solve(md,'Transient')
     29md.toolkits.DefaultAnalysis.mat_mumps_icntl_28 = 1
     30md.cluster = generic('name', gethostname(), 'np', 2)
     31md = solve(md, 'Transient')
    3232
    3333#Fields and tolerances to track changes
    34 field_names = [
    35         'Vx1' ,'Vy1' ,'Vel1' ,'Pressure1' ,'Bed1' ,'Surface1' ,'Thickness1' ,'MaskIceLevelset1' ,
    36         'Vx2' ,'Vy2' ,'Vel2' ,'Pressure2' ,'Bed2' ,'Surface2' ,'Thickness2' ,'MaskIceLevelset2' ,
    37         'Vx10','Vy10','Vel10','Pressure10','Bed10','Surface10','Thickness10','MaskIceLevelset10',
    38         ]
    39 field_tolerances = [
    40         1e-11,2e-11,2e-11,1e-12,2e-11,6e-12,9e-12,1e-12,
    41         2e-11,1e-11,1e-11,9e-12,2e-1,2e-11,2e-11,1e-11,
    42         2e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,
    43         ]
    44 field_values = [
    45         md.results.TransientSolution[0].Vx,
    46         md.results.TransientSolution[0].Vy,
    47         md.results.TransientSolution[0].Vel,
    48         md.results.TransientSolution[0].Pressure,
    49         md.results.TransientSolution[0].Base,
    50         md.results.TransientSolution[0].Surface,
    51         md.results.TransientSolution[0].Thickness,
    52         md.results.TransientSolution[0].MaskIceLevelset,
    53         md.results.TransientSolution[1].Vx,
    54         md.results.TransientSolution[1].Vy,
    55         md.results.TransientSolution[1].Vel,
    56         md.results.TransientSolution[1].Pressure,
    57         md.results.TransientSolution[1].Base,
    58         md.results.TransientSolution[1].Surface,
    59         md.results.TransientSolution[1].Thickness,
    60         md.results.TransientSolution[1].MaskIceLevelset,
    61         md.results.TransientSolution[9].Vx,
    62         md.results.TransientSolution[9].Vy,
    63         md.results.TransientSolution[9].Vel,
    64         md.results.TransientSolution[9].Pressure,
    65         md.results.TransientSolution[9].Base,
    66         md.results.TransientSolution[9].Surface,
    67         md.results.TransientSolution[9].Thickness,
    68         md.results.TransientSolution[9].MaskIceLevelset,
    69         ]
     34field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 'MaskIceLevelset1',
     35               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 'MaskIceLevelset2',
     36               'Vx10', 'Vy10', 'Vel10', 'Pressure10', 'Bed10', 'Surface10', 'Thickness10', 'MaskIceLevelset10']
     37field_tolerances = [1e-11, 2e-11, 2e-11, 1e-12, 2e-11, 6e-12, 9e-12, 1e-12,
     38                    2e-11, 1e-11, 1e-11, 9e-12, 2e-1, 2e-11, 2e-11, 1e-11,
     39                    2e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-9]
     40field_values = [md.results.TransientSolution[0].Vx,
     41                md.results.TransientSolution[0].Vy,
     42                md.results.TransientSolution[0].Vel,
     43                md.results.TransientSolution[0].Pressure,
     44                md.results.TransientSolution[0].Base,
     45                md.results.TransientSolution[0].Surface,
     46                md.results.TransientSolution[0].Thickness,
     47                md.results.TransientSolution[0].MaskIceLevelset,
     48                md.results.TransientSolution[1].Vx,
     49                md.results.TransientSolution[1].Vy,
     50                md.results.TransientSolution[1].Vel,
     51                md.results.TransientSolution[1].Pressure,
     52                md.results.TransientSolution[1].Base,
     53                md.results.TransientSolution[1].Surface,
     54                md.results.TransientSolution[1].Thickness,
     55                md.results.TransientSolution[1].MaskIceLevelset,
     56                md.results.TransientSolution[9].Vx,
     57                md.results.TransientSolution[9].Vy,
     58                md.results.TransientSolution[9].Vel,
     59                md.results.TransientSolution[9].Pressure,
     60                md.results.TransientSolution[9].Base,
     61                md.results.TransientSolution[9].Surface,
     62                md.results.TransientSolution[9].Thickness,
     63                md.results.TransientSolution[9].MaskIceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test601.py

    r22864 r23793  
    99from solve import *
    1010
    11 md=triangle(model(),'../Exp/79North.exp',10000.)
    12 md=setmask(md,'../Exp/79NorthShelf.exp','')
    13 md=parameterize(md,'../Par/79North.py')
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
    16 md=solve(md,'Masstransport')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Masstransport')
    1717
    1818#Fields and tolerances to track changes
    19 field_names     =['Thickness']
    20 field_tolerances=[1e-13]
    21 field_values=[md.results.MasstransportSolution.Thickness]
     19field_names = ['Thickness']
     20field_tolerances = [1e-13]
     21field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test602.py

    r21408 r23793  
    11#Test Name: 79NorthMasstransp2dDG
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    1110from solve import *
    1211
    13 md=triangle(model(),'../Exp/79North.exp',10000.)
    14 md=meshconvert(md)
    15 md=setmask(md,'../Exp/79NorthShelf.exp','')
    16 md=parameterize(md,'../Par/79North.py')
    17 md=setflowequation(md,'SSA','all')
    18 md.masstransport.stabilization=3
    19 md.masstransport.spcthickness=md.geometry.thickness
    20 md.cluster=generic('name',gethostname(),'np',3)
    21 md=solve(md,'Masstransport')
     12md = triangle(model(), '../Exp/79North.exp', 10000.)
     13md = meshconvert(md)
     14md = setmask(md, '../Exp/79NorthShelf.exp', '')
     15md = parameterize(md, '../Par/79North.py')
     16md = setflowequation(md, 'SSA', 'all')
     17md.masstransport.stabilization = 3
     18md.masstransport.spcthickness = md.geometry.thickness
     19md.cluster = generic('name', gethostname(), 'np', 3)
     20md = solve(md, 'Masstransport')
    2221
    2322#Fields and tolerances to track changes
    24 field_names     =['Thickness']
    25 field_tolerances=[1e-13]
    26 field_values=[\
    27         md.results.MasstransportSolution.Thickness,\
    28         ]
     23field_names = ['Thickness']
     24field_tolerances = [1e-13]
     25field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test603.py

    r21408 r23793  
    11#Test Name: 79NorthMasstransp3d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md.extrude(6,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'Masstransport')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md.extrude(6, 1.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'Masstransport')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['Thickness']
    22 field_tolerances=[1e-13]
    23 field_values=[\
    24         md.results.MasstransportSolution.Thickness,\
    25         ]
     20field_names = ['Thickness']
     21field_tolerances = [1e-13]
     22field_values = [md.results.MasstransportSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test604.py

    r21408 r23793  
    11#Test Name: 79NorthSurfSlop2d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'SurfaceSlope')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'SurfaceSlope')
    1817
    1918#Fields and tolerances to track changes
    20 field_names     =['SurfaceSlopeX','SurfaceSlopeY']
    21 field_tolerances=[1e-13,1e-13]
    22 field_values=[\
    23         md.results.SurfaceSlopeSolution.SurfaceSlopeX,\
    24         md.results.SurfaceSlopeSolution.SurfaceSlopeY,\
    25         ]
     19field_names = ['SurfaceSlopeX', 'SurfaceSlopeY']
     20field_tolerances = [1e-13, 1e-13]
     21field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX,
     22                md.results.SurfaceSlopeSolution.SurfaceSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test605.py

    r21408 r23793  
    11#Test Name: 79NorthSurfSlop3d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md.extrude(5,1.5)
    16 md=setflowequation(md,'HO','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'SurfaceSlope')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md.extrude(5, 1.5)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
     17md = solve(md, 'SurfaceSlope')
    1918
    2019#Fields and tolerances to track changes
    21 field_names     =['SurfaceSlopeX','SurfaceSlopeY']
    22 field_tolerances=[1e-13,1e-13]
    23 field_values=[\
    24         md.results.SurfaceSlopeSolution.SurfaceSlopeX,\
    25         md.results.SurfaceSlopeSolution.SurfaceSlopeY,\
    26         ]
     20field_names = ['SurfaceSlopeX', 'SurfaceSlopeY']
     21field_tolerances = [1e-13, 1e-13]
     22field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX,
     23                md.results.SurfaceSlopeSolution.SurfaceSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test606.py

    r21408 r23793  
    11#Test Name: 79NorthBedSlop2d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'BedSlope')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'BedSlope')
    1817
    1918#Fields and tolerances to track changes
    20 field_names     =['BedSlopeX','BedSlopeY']
    21 field_tolerances=[1e-13,1e-13]
    22 field_values=[\
    23         md.results.BedSlopeSolution.BedSlopeX,\
    24         md.results.BedSlopeSolution.BedSlopeY,\
    25         ]
     19field_names = ['BedSlopeX', 'BedSlopeY']
     20field_tolerances = [1e-13, 1e-13]
     21field_values = [md.results.BedSlopeSolution.BedSlopeX,
     22                md.results.BedSlopeSolution.BedSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test607.py

    r21408 r23793  
    11#Test Name: 79NorthBedSlop3d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
    5 
    64from triangle import *
    75from setmask import *
     
    108from solve import *
    119
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md.extrude(2,1.)
    16 md=setflowequation(md,'SSA','all')
    17 md.cluster=generic('name',gethostname(),'np',3)
    18 md=solve(md,'BedSlope')
     10md = triangle(model(), '../Exp/79North.exp', 10000.)
     11md = setmask(md, '../Exp/79NorthShelf.exp', '')
     12md = parameterize(md, '../Par/79North.py')
     13md.extrude(2, 1.)
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'BedSlope')
    1917
    2018#Fields and tolerances to track changes
    21 field_names     =['BedSlopeX','BedSlopeY']
    22 field_tolerances=[1e-13,1e-13]
    23 field_values=[\
    24         md.results.BedSlopeSolution.BedSlopeX,\
    25         md.results.BedSlopeSolution.BedSlopeY,\
    26         ]
     19field_names = ['BedSlopeX', 'BedSlopeY']
     20field_tolerances = [1e-13, 1e-13]
     21field_values = [md.results.BedSlopeSolution.BedSlopeX,
     22                md.results.BedSlopeSolution.BedSlopeY]
  • issm/trunk-jpl/test/NightlyRun/test608.py

    r21408 r23793  
    11#Test Name: 79NorthBalThic2d
    2 import numpy as np
    32from model import *
    43from socket import gethostname
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
    17 md=solve(md,'Balancethickness')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
     16md = solve(md, 'Balancethickness')
    1817
    1918#Fields and tolerances to track changes
    20 field_names     =['Thickness']
    21 field_tolerances=[1e-12]
    22 field_values=[\
    23         md.results.BalancethicknessSolution.Thickness,\
    24         ]
     19field_names = ['Thickness']
     20field_tolerances = [1e-12]
     21field_values = [md.results.BalancethicknessSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test611.py

    r23784 r23793  
    33from model import *
    44from socket import gethostname
    5 
    65from triangle import *
    76from setmask import *
     
    109from solve import *
    1110
    12 md=triangle(model(),'../Exp/79North.exp',10000.)
    13 md=setmask(md,'../Exp/79NorthShelf.exp','')
    14 md=parameterize(md,'../Par/79North.py')
    15 md=setflowequation(md,'SSA','all')
     11md = triangle(model(), '../Exp/79North.exp', 10000.)
     12md = setmask(md, '../Exp/79NorthShelf.exp', '')
     13md = parameterize(md, '../Par/79North.py')
     14md = setflowequation(md, 'SSA', 'all')
    1615
    1716#control parameters
    18 md.inversion.nsteps=2
    19 md.masstransport.stabilization=1
    20 md.inversion.iscontrol=1
    21 md.inversion.control_parameters=['BalancethicknessThickeningRate']
    22 md.inversion.thickness_obs=md.geometry.thickness
    23 md.inversion.min_parameters=-50.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    24 md.inversion.max_parameters=50.*np.ones((md.mesh.numberofvertices,len(md.inversion.control_parameters)))
    25 md.inversion.cost_functions=[201]
    26 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    27 md.inversion.gradient_scaling=10./md.constants.yts*np.ones((md.inversion.nsteps,len(md.inversion.control_parameters)))
    28 md.inversion.maxiter_per_step=4*np.ones((md.inversion.nsteps))
    29 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
     17md.inversion.nsteps = 2
     18md.masstransport.stabilization = 1
     19md.inversion.iscontrol = 1
     20md.inversion.control_parameters = ['BalancethicknessThickeningRate']
     21md.inversion.thickness_obs = md.geometry.thickness
     22md.inversion.min_parameters = -50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     23md.inversion.max_parameters = 50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters)))
     24md.inversion.cost_functions = [201]
     25md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     26md.inversion.gradient_scaling = 10. / md.constants.yts * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters)))
     27md.inversion.maxiter_per_step = 4 * np.ones((md.inversion.nsteps))
     28md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps))
    3029
    31 md.cluster=generic('name',gethostname(),'np',3)
    32 md=solve(md,'Balancethickness')
     30md.cluster = generic('name', gethostname(), 'np', 3)
     31md = solve(md, 'Balancethickness')
    3332
    3433#Fields and tolerances to track changes
    35 field_names     =['Gradient','Misfits','BalancethicknessThickeningRate','Thickness']
    36 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
    37 field_values=[md.results.BalancethicknessSolution.Gradient1,
    38                                                         md.results.BalancethicknessSolution.J,
    39                                                         md.results.BalancethicknessSolution.BalancethicknessThickeningRate,
    40                                                         md.results.BalancethicknessSolution.Thickness]
     34field_names = ['Gradient', 'Misfits', 'BalancethicknessThickeningRate', 'Thickness']
     35field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12]
     36field_values = [md.results.BalancethicknessSolution.Gradient1,
     37                md.results.BalancethicknessSolution.J,
     38                md.results.BalancethicknessSolution.BalancethicknessThickeningRate,
     39                md.results.BalancethicknessSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test613.py

    r23784 r23793  
    1212
    1313
    14 md=triangle(model(),'../Exp/79North.exp',10000.)
    15 md=meshconvert(md)
    16 md=setmask(md,'../Exp/79NorthShelf.exp','')
    17 md=parameterize(md,'../Par/79North.py')
    18 md=setflowequation(md,'SSA','all')
     14md = triangle(model(), '../Exp/79North.exp', 10000.)
     15md = meshconvert(md)
     16md = setmask(md, '../Exp/79NorthShelf.exp', '')
     17md = parameterize(md, '../Par/79North.py')
     18md = setflowequation(md, 'SSA', 'all')
    1919
    2020#Ice sheet only
    21 md=model.extract(md,md.mask.groundedice_levelset>0.)
    22 pos=np.nonzero(md.mesh.vertexonboundary)
    23 md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos]
     21md = model.extract(md, md.mask.groundedice_levelset > 0.)
     22pos = np.nonzero(md.mesh.vertexonboundary)
     23md.balancethickness.spcthickness[pos] = md.geometry.thickness[pos]
    2424
    2525#control parameters
    26 md.inversion.thickness_obs=copy.deepcopy(md.geometry.thickness)
    27 md.inversion.iscontrol=1
    28 md.inversion.nsteps=2
    29 md.inversion.control_parameters=['Vx','Vy']
    30 md.balancethickness.stabilization=1
    31 md.inversion.gradient_scaling=np.vstack((10./md.constants.yts*np.ones((md.inversion.nsteps)),10./md.constants.yts*np.ones((md.inversion.nsteps)))).T
    32 md.inversion.min_parameters=np.vstack((-2000.*np.ones((md.mesh.numberofvertices)),-2000.*np.ones((md.mesh.numberofvertices)))).T
    33 md.inversion.max_parameters=np.vstack((+2000.*np.ones((md.mesh.numberofvertices)),+2000.*np.ones((md.mesh.numberofvertices)))).T
    34 md.inversion.cost_functions=[201]
    35 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,len(md.inversion.cost_functions)))
    36 md.inversion.maxiter_per_step=4*np.ones((md.inversion.nsteps))
    37 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
     26md.inversion.thickness_obs = copy.deepcopy(md.geometry.thickness)
     27md.inversion.iscontrol = 1
     28md.inversion.nsteps = 2
     29md.inversion.control_parameters = ['Vx', 'Vy']
     30md.balancethickness.stabilization = 1
     31md.inversion.gradient_scaling = np.vstack((10. / md.constants.yts * np.ones((md.inversion.nsteps)), 10. / md.constants.yts * np.ones((md.inversion.nsteps)))).T
     32md.inversion.min_parameters = np.vstack((-2000. * np.ones((md.mesh.numberofvertices)), - 2000. * np.ones((md.mesh.numberofvertices)))).T
     33md.inversion.max_parameters = np.vstack((+2000. * np.ones((md.mesh.numberofvertices)), + 2000. * np.ones((md.mesh.numberofvertices)))).T
     34md.inversion.cost_functions = [201]
     35md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions)))
     36md.inversion.maxiter_per_step = 4 * np.ones((md.inversion.nsteps))
     37md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps))
    3838
    39 md.verbose.control=1
    40 md.cluster=generic('name',gethostname(),'np',3)
    41 md=solve(md,'Balancethickness')
     39md.verbose.control = 1
     40md.cluster = generic('name', gethostname(), 'np', 3)
     41md = solve(md, 'Balancethickness')
    4242
    4343#Fields and tolerances to track changes
    44 field_names     =['Gradient1','Gradient2','Misfits','Vx','Vy','Thickness']
    45 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
    46 field_values=[md.results.BalancethicknessSolution.Gradient1,
    47                                                         md.results.BalancethicknessSolution.Gradient2,
    48                                                         md.results.BalancethicknessSolution.J,
    49                                                         md.results.BalancethicknessSolution.Vx,
    50                                                         md.results.BalancethicknessSolution.Vy,
    51                                                         md.results.BalancethicknessSolution.Thickness]
     44field_names = ['Gradient1', 'Gradient2', 'Misfits', 'Vx', 'Vy', 'Thickness']
     45field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12]
     46field_values = [md.results.BalancethicknessSolution.Gradient1,
     47                md.results.BalancethicknessSolution.Gradient2,
     48                md.results.BalancethicknessSolution.J,
     49                md.results.BalancethicknessSolution.Vx,
     50                md.results.BalancethicknessSolution.Vy,
     51                md.results.BalancethicknessSolution.Thickness]
  • issm/trunk-jpl/test/NightlyRun/test701.py

    r23707 r23793  
    77from paterson import *
    88
    9 x = np.arange(1,3001,100).T
    10 h = np.linspace(1000,300,np.size(x)).T
    11 b = -917./1023.*h
     9x = np.arange(1, 3001, 100).T
     10h = np.linspace(1000, 300, np.size(x)).T
     11b = -917. / 1023. * h
    1212
    13 md = bamgflowband(model(),x,b+h,b,'hmax',80.)
     13md = bamgflowband(model(), x, b + h, b, 'hmax', 80.)
    1414
    15 #Geometry           #interp1d returns a function to be called on md.mesh.x
    16 md.geometry.surface = np.interp(md.mesh.x,x,b+h)
    17 md.geometry.base = np.interp(md.mesh.x,x,b)
    18 md.geometry.thickness = md.geometry.surface-md.geometry.base
     15#Geometry           #interp1d returns a function to be called on md.mesh.x
     16md.geometry.surface = np.interp(md.mesh.x, x, b + h)
     17md.geometry.base = np.interp(md.mesh.x, x, b)
     18md.geometry.thickness = md.geometry.surface - md.geometry.base
    1919
    2020#mask
     
    2424
    2525#materials
    26 md.initialization.temperature = (273.-20.)*np.ones((md.mesh.numberofvertices,))
     26md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices,))
    2727md.materials.rheology_B = paterson(md.initialization.temperature)
    28 md.materials.rheology_n = 3.*np.ones((md.mesh.numberofelements,))
     28md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements,))
    2929
    3030#friction
     
    3535
    3636#Boundary conditions
    37 md.stressbalance.referential = np.nan*np.ones((md.mesh.numberofvertices,6))
    38 md.stressbalance.loadingforce = 0. * np.ones((md.mesh.numberofvertices,3))
     37md.stressbalance.referential = np.nan * np.ones((md.mesh.numberofvertices, 6))
     38md.stressbalance.loadingforce = 0. * np.ones((md.mesh.numberofvertices, 3))
    3939md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices,))
    4040md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices,))
     
    4242md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 0.
    4343md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0.
    44 md.basalforcings.floatingice_melting_rate=np.zeros((md.mesh.numberofvertices,))
     44md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices,))
    4545
    4646#Misc
    47 md = setflowequation(md,'FS','all')
     47md = setflowequation(md, 'FS', 'all')
    4848md.stressbalance.abstol = np.nan
    4949#md.stressbalance.reltol = 10**-16
     
    5151md.stressbalance.maxiter = 20
    5252md.flowequation.augmented_lagrangian_r = 10000.
    53 md.miscellaneous.name  = 'test701'
    54 md.verbose = verbose('convergence',True)
    55 md.cluster = generic('np',2)
    56 md.groundingline.migration='None'
     53md.miscellaneous.name = 'test701'
     54md.verbose = verbose('convergence', True)
     55md.cluster = generic('np', 2)
     56md.groundingline.migration = 'None'
    5757
    5858#Go solve
     
    6161field_values = []
    6262#md.initialization.pressure = md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.mesh.y)
    63 for i in ['MINI','MINIcondensed','TaylorHood','LATaylorHood','CrouzeixRaviart','LACrouzeixRaviart']:
    64         print(' ')
    65         print('======Testing ' +i+ ' Full-Stokes Finite element=====')
    66         md.flowequation.fe_FS = i
    67         md = solve(md,'Stressbalance')
    68         field_names = field_names + [['Vx'+i],['Vy'+i],['Vel'+i],['Pressure'+i]]
    69         field_tolerances = field_tolerances + [9e-5,9e-5,9e-5,1e-10]
    70         field_values = field_values + [md.results.StressbalanceSolution.Vx,
    71                                                                                                                                 md.results.StressbalanceSolution.Vy,
    72                                                                                                                                 md.results.StressbalanceSolution.Vel,
    73                                                                                                                                 md.results.StressbalanceSolution.Pressure]
     63for i in ['MINI', 'MINIcondensed', 'TaylorHood', 'LATaylorHood', 'CrouzeixRaviart', 'LACrouzeixRaviart']:
     64    print(' ')
     65    print('======Testing ' + i + ' Full-Stokes Finite element=====')
     66    md.flowequation.fe_FS = i
     67    md = solve(md, 'Stressbalance')
     68    field_names = field_names + [['Vx' + i], ['Vy' + i], ['Vel' + i], ['Pressure' + i]]
     69    field_tolerances = field_tolerances + [9e-5, 9e-5, 9e-5, 1e-10]
     70    field_values = field_values + [md.results.StressbalanceSolution.Vx,
     71                                  md.results.StressbalanceSolution.Vy,
     72                                  md.results.StressbalanceSolution.Vel,
     73                                  md.results.StressbalanceSolution.Pressure]
  • issm/trunk-jpl/test/NightlyRun/test702.py

    r23707 r23793  
    22import numpy as np
    33#from scipy.interpolate import interp1d
    4 from model import  *
    5 from setflowequation import  *
    6 from solve import  *
     4from model import *
     5from setflowequation import *
     6from solve import *
    77from NowickiProfile import *
    88from bamgflowband import *
     
    1010
    1111#mesh parameters
    12 x = np.arange(-5,5.5,.5).T
    13 [b,h,sea] = NowickiProfile(x)
     12x = np.arange(-5, 5.5, .5).T
     13[b, h, sea] = NowickiProfile(x)
    1414x = x * 10**3
    1515h = h * 10**3
    16 b = (b-sea) * 10**3
     16b = (b - sea) * 10**3
    1717
    1818#mesh domain
    19 md = bamgflowband(model(),x,b+h,b,'hmax',150.)
     19md = bamgflowband(model(), x, b + h, b, 'hmax', 150.)
    2020
    2121#parameterize
    22 md.geometry.surface = np.interp(md.mesh.x,x,b+h)
    23 md.geometry.base = np.interp(md.mesh.x,x,b)
     22md.geometry.surface = np.interp(md.mesh.x, x, b + h)
     23md.geometry.base = np.interp(md.mesh.x, x, b)
    2424md.geometry.thickness = md.geometry.surface - md.geometry.base
    2525
     
    2727md.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))
    30 md.mask.groundedice_levelset[np.where(md.mesh.x<0)]=0.5
     29md.mask.groundedice_levelset = -0.5 * np.ones((md.mesh.numberofvertices))
     30md.mask.groundedice_levelset[np.where(md.mesh.x < 0)] = 0.5
    3131
    3232#materials
     
    4949md.stressbalance.spcvy = float('NaN') * np.ones((md.mesh.numberofvertices,))
    5050md.stressbalance.spcvz = float('NaN') * np.ones((md.mesh.numberofvertices,))
    51 md.stressbalance.referential = float('NaN') * np.ones((md.mesh.numberofvertices,6))
    52 md.stressbalance.loadingforce = np.zeros((md.mesh.numberofvertices,3))
     51md.stressbalance.referential = float('NaN') * np.ones((md.mesh.numberofvertices, 6))
     52md.stressbalance.loadingforce = np.zeros((md.mesh.numberofvertices, 3))
    5353md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 800.
    5454md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0.
    55 md.basalforcings.floatingice_melting_rate=np.zeros((md.mesh.numberofvertices,))
     55md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices,))
    5656
    5757#misc
    58 md = setflowequation(md,'FS','all')
     58md = setflowequation(md, 'FS', 'all')
    5959md.stressbalance.abstol = float('NaN')
    6060md.stressbalance.FSreconditioning = 1
     
    6565md.miscellaneous.name = 'test702'
    6666md.groundingline.migration = 'None'
    67 md.cluster = generic('np',2)
     67md.cluster = generic('np', 2)
    6868
    6969#Fields and tolerances to track changes
     
    7171field_tolerances = []
    7272field_values = []
    73 for i in ['MINI','MINIcondensed','TaylorHood','XTaylorHood','LATaylorHood']:
    74         print(' ')
    75         print('======Testing ' +i+ ' Full-Stokes Finite element=====')
    76         md.flowequation.fe_FS = i
    77         md = solve(md,'Stressbalance')
    78         field_names.extend(['Vx'+i,'Vy'+i,'Vel'+i,'Pressure'+i])
    79         field_tolerances.extend([8e-5,8e-5,8e-5,1e-08])
    80         field_values.extend([
    81                 md.results.StressbalanceSolution.Vx,
    82                 md.results.StressbalanceSolution.Vy,
    83                 md.results.StressbalanceSolution.Vel,
    84                 md.results.StressbalanceSolution.Pressure
    85                 ])
     73for i in ['MINI', 'MINIcondensed', 'TaylorHood', 'XTaylorHood', 'LATaylorHood']:
     74    print(' ')
     75    print('======Testing ' + i + ' Full-Stokes Finite element=====')
     76    md.flowequation.fe_FS = i
     77    md = solve(md, 'Stressbalance')
     78    field_names.extend(['Vx' + i, 'Vy' + i, 'Vel' + i, 'Pressure' + i])
     79    field_tolerances.extend([8e-5, 8e-5, 8e-5, 1e-08])
     80    field_values.extend([md.results.StressbalanceSolution.Vx,
     81                         md.results.StressbalanceSolution.Vy,
     82                         md.results.StressbalanceSolution.Vel,
     83                         md.results.StressbalanceSolution.Pressure])
  • issm/trunk-jpl/test/NightlyRun/test703.py

    r23130 r23793  
    11#Test Name: FlowbandFSsheetshelfTrans
    22import numpy as np
    3 from model import  *
    4 from setflowequation import  *
    5 from solve import  *
     3from model import *
     4from setflowequation import *
     5from solve import *
    66from NowickiProfile import *
    77from bamgflowband import *
     
    99
    1010#mesh parameters
    11 x = np.arange(-5,5.5,.5).T
    12 [b,h,sea] = NowickiProfile(x)
     11x = np.arange(-5, 5.5, .5).T
     12[b, h, sea] = NowickiProfile(x)
    1313x = x * 10**3
    1414h = h * 10**3
    15 b = (b-sea) * 10**3
     15b = (b - sea) * 10**3
    1616
    1717#for i in x:
    18         #print i
     18#print i
    1919
    2020#for i in b:
    21         #print '%.12f' % i
     21#print '%.12f' % i
    2222#for i in h:
    23         #print '%.11f' % i
     23#print '%.11f' % i
    2424#print '%.12f' % sea
    2525
     
    3030
    3131#mesh domain
    32 md = bamgflowband(model(),x,b+h,b,'hmax',150.)
     32md = bamgflowband(model(), x, b + h, b, 'hmax', 150.)
    3333
    3434#geometry
    35 md.geometry.surface = np.interp(md.mesh.x,x,b+h)
    36 md.geometry.base = np.interp(md.mesh.x,x,b)
     35md.geometry.surface = np.interp(md.mesh.x, x, b + h)
     36md.geometry.base = np.interp(md.mesh.x, x, b)
    3737md.geometry.thickness = md.geometry.surface - md.geometry.base
    3838
     
    4040md.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))
    43 md.mask.groundedice_levelset[np.where(md.mesh.x<0)]=0.5
     42md.mask.groundedice_levelset = -0.5 * np.ones((md.mesh.numberofvertices))
     43md.mask.groundedice_levelset[np.where(md.mesh.x < 0)] = 0.5
    4444
    4545#materials
     
    5858md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices))
    5959md.stressbalance.spcvz = np.nan * np.ones((md.mesh.numberofvertices))
    60 md.stressbalance.referential = np.nan * np.ones((md.mesh.numberofvertices,6))
    61 md.stressbalance.loadingforce = np.zeros((md.mesh.numberofvertices,3))
     60md.stressbalance.referential = np.nan * np.ones((md.mesh.numberofvertices, 6))
     61md.stressbalance.loadingforce = np.zeros((md.mesh.numberofvertices, 3))
    6262md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 800.
    6363md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0.
    6464
    6565#Misc
    66 md = setflowequation(md,'FS','all')
     66md = setflowequation(md, 'FS', 'all')
    6767md.flowequation.fe_FS = 'TaylorHood'
    6868md.stressbalance.abstol = np.nan
     
    7777md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices))
    7878md.basalforcings.geothermalflux = np.zeros((md.mesh.numberofvertices))
    79 posb = np.where(np.logical_and(md.mesh.x > 0.,md.mesh.vertexonbase))[0]
     79posb = np.where(np.logical_and(md.mesh.x > 0., md.mesh.vertexonbase))[0]
    8080md.basalforcings.groundedice_melting_rate[posb] = 18.
    8181md.basalforcings.floatingice_melting_rate[posb] = 18.
     
    8787md.transient.isthermal = 0
    8888md.masstransport.isfreesurface = 1
    89 md.groundingline.migration='None'
     89md.groundingline.migration = 'None'
    9090
    9191#Go solve
    92 md.cluster = generic('np',3)
     92md.cluster = generic('np', 3)
    9393md.stressbalance.shelf_dampening = 1
    94 md1=copy.deepcopy(md)
    95 md1 = solve(md1,'Transient')
     94md1 = copy.deepcopy(md)
     95md1 = solve(md1, 'Transient')
    9696
    9797md.stressbalance.shelf_dampening = 0
    98 md = solve(md,'Transient')
     98md = solve(md, 'Transient')
    9999
    100100#Fields and tolerances to track changes
    101 field_names      = ['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1',
    102                                                                                 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2',
    103                                                                                 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3',
    104                                                                                 'Vx1_damp','Vy1_damp','Vel1_damp','Pressure1_damp','Bed1_damp','Surface1_damp','Thickness1_damp',
    105                                                                                 'Vx2_damp','Vy2_damp','Vel2_damp','Pressure2_damp','Bed2_damp','Surface2_damp','Thickness2_damp',
    106                                                                                 'Vx3_damp','Vy3_damp','Vel3_damp','Pressure3_damp','Bed3_damp','Surface3_damp','Thickness3_damp']
    107 field_tolerances = [2e-08,2e-08,2e-08,1e-08,1e-10,1e-10,1e-10,
    108                                                                                 2e-08,2e-08,2e-08,1e-08,1e-10,1e-10,1e-10,
    109                                                                                 2e-08,2e-08,2e-08,1e-08,1e-10,1e-10,1e-10,
    110                                                                                 5e-08,5e-08,5e-08,1e-08,1e-10,1e-10,1e-10,
    111                                                                                 5e-08,5e-08,5e-08,1e-08,1e-10,1e-10,1e-10,
    112                                                                                 5e-08,5e-08,5e-08,1e-08,1e-10,1e-10,1e-10]
     101field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1',
     102               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2',
     103               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3',
     104               'Vx1_damp', 'Vy1_damp', 'Vel1_damp', 'Pressure1_damp', 'Bed1_damp', 'Surface1_damp', 'Thickness1_damp',
     105               'Vx2_damp', 'Vy2_damp', 'Vel2_damp', 'Pressure2_damp', 'Bed2_damp', 'Surface2_damp', 'Thickness2_damp',
     106               'Vx3_damp', 'Vy3_damp', 'Vel3_damp', 'Pressure3_damp', 'Bed3_damp', 'Surface3_damp', 'Thickness3_damp']
     107field_tolerances = [2e-08, 2e-08, 2e-08, 1e-08, 1e-10, 1e-10, 1e-10,
     108                    2e-08, 2e-08, 2e-08, 1e-08, 1e-10, 1e-10, 1e-10,
     109                    2e-08, 2e-08, 2e-08, 1e-08, 1e-10, 1e-10, 1e-10,
     110                    5e-08, 5e-08, 5e-08, 1e-08, 1e-10, 1e-10, 1e-10,
     111                    5e-08, 5e-08, 5e-08, 1e-08, 1e-10, 1e-10, 1e-10,
     112                    5e-08, 5e-08, 5e-08, 1e-08, 1e-10, 1e-10, 1e-10]
    113113field_values = [md.results.TransientSolution[0].Vx,
    114                                                                 md.results.TransientSolution[0].Vy,
    115                                                                 md.results.TransientSolution[0].Vel,
    116                                                                 md.results.TransientSolution[0].Pressure,
    117                                                                 md.results.TransientSolution[0].Base,
    118                                                                 md.results.TransientSolution[0].Surface,
    119                                                                 md.results.TransientSolution[0].Thickness,
    120                                                                 md.results.TransientSolution[1].Vx,
    121                                                                 md.results.TransientSolution[1].Vy,
    122                                                                 md.results.TransientSolution[1].Vel,
    123                                                                 md.results.TransientSolution[1].Pressure,
    124                                                                 md.results.TransientSolution[1].Base,
    125                                                                 md.results.TransientSolution[1].Surface,
    126                                                                 md.results.TransientSolution[1].Thickness,
    127                                                                 md.results.TransientSolution[2].Vx,
    128                                                                 md.results.TransientSolution[2].Vy,
    129                                                                 md.results.TransientSolution[2].Vel,
    130                                                                 md.results.TransientSolution[2].Pressure,
    131                                                                 md.results.TransientSolution[2].Base,
    132                                                                 md.results.TransientSolution[2].Surface,
    133                                                                 md.results.TransientSolution[2].Thickness,
    134                                                                 md1.results.TransientSolution[0].Vx,
    135                                                                 md1.results.TransientSolution[0].Vy,
    136                                                                 md1.results.TransientSolution[0].Vel,
    137                                                                 md1.results.TransientSolution[0].Pressure,
    138                                                                 md1.results.TransientSolution[0].Base,
    139                                                                 md1.results.TransientSolution[0].Surface,
    140                                                                 md1.results.TransientSolution[0].Thickness,
    141                                                                 md1.results.TransientSolution[1].Vx,
    142                                                                 md1.results.TransientSolution[1].Vy,
    143                                                                 md1.results.TransientSolution[1].Vel,
    144                                                                 md1.results.TransientSolution[1].Pressure,
    145                                                                 md1.results.TransientSolution[1].Base,
    146                                                                 md1.results.TransientSolution[1].Surface,
    147                                                                 md1.results.TransientSolution[1].Thickness,
    148                                                                 md1.results.TransientSolution[2].Vx,
    149                                                                 md1.results.TransientSolution[2].Vy,
    150                                                                 md1.results.TransientSolution[2].Vel,
    151                                                                 md1.results.TransientSolution[2].Pressure,
    152                                                                 md1.results.TransientSolution[2].Base,
    153                                                                 md1.results.TransientSolution[2].Surface,
    154                                                                 md1.results.TransientSolution[2].Thickness]
     114                md.results.TransientSolution[0].Vy,
     115                md.results.TransientSolution[0].Vel,
     116                md.results.TransientSolution[0].Pressure,
     117                md.results.TransientSolution[0].Base,
     118                md.results.TransientSolution[0].Surface,
     119                md.results.TransientSolution[0].Thickness,
     120                md.results.TransientSolution[1].Vx,
     121                md.results.TransientSolution[1].Vy,
     122                md.results.TransientSolution[1].Vel,
     123                md.results.TransientSolution[1].Pressure,
     124                md.results.TransientSolution[1].Base,
     125                md.results.TransientSolution[1].Surface,
     126                md.results.TransientSolution[1].Thickness,
     127                md.results.TransientSolution[2].Vx,
     128                md.results.TransientSolution[2].Vy,
     129                md.results.TransientSolution[2].Vel,
     130                md.results.TransientSolution[2].Pressure,
     131                md.results.TransientSolution[2].Base,
     132                md.results.TransientSolution[2].Surface,
     133                md.results.TransientSolution[2].Thickness,
     134                md1.results.TransientSolution[0].Vx,
     135                md1.results.TransientSolution[0].Vy,
     136                md1.results.TransientSolution[0].Vel,
     137                md1.results.TransientSolution[0].Pressure,
     138                md1.results.TransientSolution[0].Base,
     139                md1.results.TransientSolution[0].Surface,
     140                md1.results.TransientSolution[0].Thickness,
     141                md1.results.TransientSolution[1].Vx,
     142                md1.results.TransientSolution[1].Vy,
     143                md1.results.TransientSolution[1].Vel,
     144                md1.results.TransientSolution[1].Pressure,
     145                md1.results.TransientSolution[1].Base,
     146                md1.results.TransientSolution[1].Surface,
     147                md1.results.TransientSolution[1].Thickness,
     148                md1.results.TransientSolution[2].Vx,
     149                md1.results.TransientSolution[2].Vy,
     150                md1.results.TransientSolution[2].Vel,
     151                md1.results.TransientSolution[2].Pressure,
     152                md1.results.TransientSolution[2].Base,
     153                md1.results.TransientSolution[2].Surface,
     154                md1.results.TransientSolution[2].Thickness]
  • issm/trunk-jpl/test/NightlyRun/test801.py

    r23656 r23793  
    88from solve import *
    99
    10 md=triangle(model(),'../Exp/Square.exp',50000)
    11 md=setmask(md,'','')
    12 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
    13 md.levelset.stabilization=2
    14 md=setflowequation(md,'SSA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
     10md = triangle(model(), '../Exp/Square.exp', 50000)
     11md = setmask(md, '', '')
     12md = parameterize(md, '../Par/ValleyGlacierShelf.py')
     13md.levelset.stabilization = 2
     14md = setflowequation(md, 'SSA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
    1616
    1717#Transient
    18 md.transient.isstressbalance=True
    19 md.transient.ismovingfront=True
    20 md.transient.ismasstransport=True
    21 md.transient.issmb=True
    22 md.transient.isthermal=False
    23 md.transient.isgroundingline=True
    24 md.transient.isgia=False
     18md.transient.isstressbalance = True
     19md.transient.ismovingfront = True
     20md.transient.ismasstransport = True
     21md.transient.issmb = True
     22md.transient.isthermal = False
     23md.transient.isgroundingline = True
     24md.transient.isgia = False
    2525
    26 md=solve(md,'Transient')
     26md = solve(md, 'Transient')
    2727
    2828#Fields and tolerances to track changes
    29 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',
    30         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',
    31         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
    32 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
    33         1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
    34         1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
    35 field_values=[md.results.TransientSolution[0].Vx,
    36         md.results.TransientSolution[0].Vy,
    37         md.results.TransientSolution[0].Vel,
    38         md.results.TransientSolution[0].Pressure,
    39         md.results.TransientSolution[0].Thickness,
    40         md.results.TransientSolution[0].Surface,
    41         md.results.TransientSolution[0].MaskIceLevelset,
    42         md.results.TransientSolution[1].Vx,
    43         md.results.TransientSolution[1].Vy,
    44         md.results.TransientSolution[1].Vel,
    45         md.results.TransientSolution[1].Pressure,
    46         md.results.TransientSolution[1].Thickness,
    47         md.results.TransientSolution[1].Surface,
    48         md.results.TransientSolution[1].MaskIceLevelset,
    49         md.results.TransientSolution[2].Vx,
    50         md.results.TransientSolution[2].Vy,
    51         md.results.TransientSolution[2].Vel,
    52         md.results.TransientSolution[2].Pressure,
    53         md.results.TransientSolution[2].Thickness,
    54         md.results.TransientSolution[2].Surface,
    55         md.results.TransientSolution[2].MaskIceLevelset]
     29field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1',
     30               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2',
     31               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3']
     32field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12,
     33                    1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12,
     34                    1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12]
     35field_values = [md.results.TransientSolution[0].Vx,
     36                md.results.TransientSolution[0].Vy,
     37                md.results.TransientSolution[0].Vel,
     38                md.results.TransientSolution[0].Pressure,
     39                md.results.TransientSolution[0].Thickness,
     40                md.results.TransientSolution[0].Surface,
     41                md.results.TransientSolution[0].MaskIceLevelset,
     42                md.results.TransientSolution[1].Vx,
     43                md.results.TransientSolution[1].Vy,
     44                md.results.TransientSolution[1].Vel,
     45                md.results.TransientSolution[1].Pressure,
     46                md.results.TransientSolution[1].Thickness,
     47                md.results.TransientSolution[1].Surface,
     48                md.results.TransientSolution[1].MaskIceLevelset,
     49                md.results.TransientSolution[2].Vx,
     50                md.results.TransientSolution[2].Vy,
     51                md.results.TransientSolution[2].Vel,
     52                md.results.TransientSolution[2].Pressure,
     53                md.results.TransientSolution[2].Thickness,
     54                md.results.TransientSolution[2].Surface,
     55                md.results.TransientSolution[2].MaskIceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test802.py

    r23010 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',50000)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 50000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/ValleyGlacierShelf.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    1818#Thermal model
    19 pos_surf=np.nonzero(md.mesh.vertexonsurface)[0]
    20 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf]
     19pos_surf = np.nonzero(md.mesh.vertexonsurface)[0]
     20md.thermal.spctemperature[pos_surf] = md.initialization.temperature[pos_surf]
    2121
    2222#Transient
    23 md.transient.isstressbalance=True
    24 md.transient.ismovingfront=True
    25 md.transient.ismasstransport=True
    26 md.transient.issmb=True
    27 md.transient.isthermal=True
    28 md.transient.isgroundingline=True
    29 md.transient.isgia=False
    30 md.groundingline.melt_interpolation='SubelementMelt1'
     23md.transient.isstressbalance = True
     24md.transient.ismovingfront = True
     25md.transient.ismasstransport = True
     26md.transient.issmb = True
     27md.transient.isthermal = True
     28md.transient.isgroundingline = True
     29md.transient.isgia = False
     30md.groundingline.melt_interpolation = 'SubelementMelt1'
    3131
    32 md=solve(md,'Transient')
     32md = solve(md, 'Transient')
    3333
    3434#Fields and tolerances to track changes
    35 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Temperature1',
    36                                                                         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Temperature2',
    37                                                                         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Temperature3']
    38 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
    39                                                                         1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,
    40                                                                         1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    41 field_values=[md.results.TransientSolution[0].Vx,
    42                                                         md.results.TransientSolution[0].Vy,
    43                                                         md.results.TransientSolution[0].Vel,
    44                                                         md.results.TransientSolution[0].Pressure,
    45                                                         md.results.TransientSolution[0].Thickness,
    46                                                         md.results.TransientSolution[0].Surface,
    47                                                         md.results.TransientSolution[0].MaskIceLevelset,
    48                                                         md.results.TransientSolution[0].Temperature,
    49                                                         md.results.TransientSolution[1].Vx,
    50                                                         md.results.TransientSolution[1].Vy,
    51                                                         md.results.TransientSolution[1].Vel,
    52                                                         md.results.TransientSolution[1].Pressure,
    53                                                         md.results.TransientSolution[1].Thickness,
    54                                                         md.results.TransientSolution[1].Surface,
    55                                                         md.results.TransientSolution[1].MaskIceLevelset,
    56                                                         md.results.TransientSolution[1].Temperature,
    57                                                         md.results.TransientSolution[2].Vx,
    58                                                         md.results.TransientSolution[2].Vy,
    59                                                         md.results.TransientSolution[2].Vel,
    60                                                         md.results.TransientSolution[2].Pressure,
    61                                                         md.results.TransientSolution[2].Thickness,
    62                                                         md.results.TransientSolution[2].Surface,
    63                                                         md.results.TransientSolution[2].MaskIceLevelset,
    64                                                         md.results.TransientSolution[2].Temperature]
     35field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1', 'Temperature1',
     36               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2', 'Temperature2',
     37               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3', 'Temperature3']
     38field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12,
     39                    1e-9, 1e-9, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-9,
     40                    1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     41field_values = [md.results.TransientSolution[0].Vx,
     42                md.results.TransientSolution[0].Vy,
     43                md.results.TransientSolution[0].Vel,
     44                md.results.TransientSolution[0].Pressure,
     45                md.results.TransientSolution[0].Thickness,
     46                md.results.TransientSolution[0].Surface,
     47                md.results.TransientSolution[0].MaskIceLevelset,
     48                md.results.TransientSolution[0].Temperature,
     49                md.results.TransientSolution[1].Vx,
     50                md.results.TransientSolution[1].Vy,
     51                md.results.TransientSolution[1].Vel,
     52                md.results.TransientSolution[1].Pressure,
     53                md.results.TransientSolution[1].Thickness,
     54                md.results.TransientSolution[1].Surface,
     55                md.results.TransientSolution[1].MaskIceLevelset,
     56                md.results.TransientSolution[1].Temperature,
     57                md.results.TransientSolution[2].Vx,
     58                md.results.TransientSolution[2].Vy,
     59                md.results.TransientSolution[2].Vel,
     60                md.results.TransientSolution[2].Pressure,
     61                md.results.TransientSolution[2].Thickness,
     62                md.results.TransientSolution[2].Surface,
     63                md.results.TransientSolution[2].MaskIceLevelset,
     64                md.results.TransientSolution[2].Temperature]
  • issm/trunk-jpl/test/NightlyRun/test803.py

    r23010 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',50000)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 50000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/ValleyGlacierShelf.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    1818#Thermal model
    19 pos_surf=np.where(md.mesh.vertexonsurface)[0]
    20 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf]
    21 md.thermal.isenthalpy=True
    22 md.thermal.isdynamicbasalspc=True
     19pos_surf = np.where(md.mesh.vertexonsurface)[0]
     20md.thermal.spctemperature[pos_surf] = md.initialization.temperature[pos_surf]
     21md.thermal.isenthalpy = True
     22md.thermal.isdynamicbasalspc = True
    2323
    2424#Transient
    25 md.transient.isstressbalance=True
    26 md.transient.ismovingfront=True
    27 md.transient.ismasstransport=True
    28 md.transient.issmb=True
    29 md.transient.isthermal=True
    30 md.transient.isgroundingline=True
    31 md.transient.isgia=False
    32 md.groundingline.melt_interpolation='SubelementMelt1'
     25md.transient.isstressbalance = True
     26md.transient.ismovingfront = True
     27md.transient.ismasstransport = True
     28md.transient.issmb = True
     29md.transient.isthermal = True
     30md.transient.isgroundingline = True
     31md.transient.isgia = False
     32md.groundingline.melt_interpolation = 'SubelementMelt1'
    3333
    34 md=solve(md,'Transient')
     34md = solve(md, 'Transient')
    3535
    3636#Fields and tolerances to track changes
    37 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',
    38         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',
    39         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3']
    40 field_tolerances=[1e-10,1e-10,1e-10,1e-13,1e-12,1e-12,1e-13,1e-13,1e-13,
    41         1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,
    42         1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    43 field_values=[md.results.TransientSolution[0].Vx,
    44         md.results.TransientSolution[0].Vy,
    45         md.results.TransientSolution[0].Vel,
    46         md.results.TransientSolution[0].Pressure,
    47         md.results.TransientSolution[0].Thickness,
    48         md.results.TransientSolution[0].Surface,
    49         md.results.TransientSolution[0].MaskIceLevelset,
    50         md.results.TransientSolution[0].Enthalpy,
    51         md.results.TransientSolution[0].Watercolumn,
    52         md.results.TransientSolution[1].Vx,
    53         md.results.TransientSolution[1].Vy,
    54         md.results.TransientSolution[1].Vel,
    55         md.results.TransientSolution[1].Pressure,
    56         md.results.TransientSolution[1].Thickness,
    57         md.results.TransientSolution[1].Surface,
    58         md.results.TransientSolution[1].MaskIceLevelset,
    59         md.results.TransientSolution[1].Enthalpy,
    60         md.results.TransientSolution[1].Watercolumn,
    61         md.results.TransientSolution[2].Vx,
    62         md.results.TransientSolution[2].Vy,
    63         md.results.TransientSolution[2].Vel,
    64         md.results.TransientSolution[2].Pressure,
    65         md.results.TransientSolution[2].Thickness,
    66         md.results.TransientSolution[2].Surface,
    67         md.results.TransientSolution[2].MaskIceLevelset,
    68         md.results.TransientSolution[2].Enthalpy,
    69         md.results.TransientSolution[2].Watercolumn]
     37field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1', 'Enthalpy1', 'Watercolumn1',
     38               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2', 'Enthalpy2', 'Watercolumn2',
     39               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3', 'Enthalpy3', 'Watercolumn3']
     40field_tolerances = [1e-10, 1e-10, 1e-10, 1e-13, 1e-12, 1e-12, 1e-13, 1e-13, 1e-13,
     41                    1e-9, 1e-9, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-9, 1e-10,
     42                    1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     43field_values = [md.results.TransientSolution[0].Vx,
     44                md.results.TransientSolution[0].Vy,
     45                md.results.TransientSolution[0].Vel,
     46                md.results.TransientSolution[0].Pressure,
     47                md.results.TransientSolution[0].Thickness,
     48                md.results.TransientSolution[0].Surface,
     49                md.results.TransientSolution[0].MaskIceLevelset,
     50                md.results.TransientSolution[0].Enthalpy,
     51                md.results.TransientSolution[0].Watercolumn,
     52                md.results.TransientSolution[1].Vx,
     53                md.results.TransientSolution[1].Vy,
     54                md.results.TransientSolution[1].Vel,
     55                md.results.TransientSolution[1].Pressure,
     56                md.results.TransientSolution[1].Thickness,
     57                md.results.TransientSolution[1].Surface,
     58                md.results.TransientSolution[1].MaskIceLevelset,
     59                md.results.TransientSolution[1].Enthalpy,
     60                md.results.TransientSolution[1].Watercolumn,
     61                md.results.TransientSolution[2].Vx,
     62                md.results.TransientSolution[2].Vy,
     63                md.results.TransientSolution[2].Vel,
     64                md.results.TransientSolution[2].Pressure,
     65                md.results.TransientSolution[2].Thickness,
     66                md.results.TransientSolution[2].Surface,
     67                md.results.TransientSolution[2].MaskIceLevelset,
     68                md.results.TransientSolution[2].Enthalpy,
     69                md.results.TransientSolution[2].Watercolumn]
  • issm/trunk-jpl/test/NightlyRun/test804.py

    r23653 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',50000)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
    14 md=setflowequation(md,'SIA','all')
    15 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 50000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/ValleyGlacierShelf.py')
     14md = setflowequation(md, 'SIA', 'all')
     15md.cluster = generic('name', gethostname(), 'np', 3)
    1616
    1717#Transient
    18 md.transient.isstressbalance=True
    19 md.transient.ismasstransport=True
    20 md.transient.issmb=True
    21 md.transient.isthermal=False
    22 md.transient.isgroundingline=True
    23 md.transient.isgia=False
    24 md.transient.ismovingfront=True
     18md.transient.isstressbalance = True
     19md.transient.ismasstransport = True
     20md.transient.issmb = True
     21md.transient.isthermal = False
     22md.transient.isgroundingline = True
     23md.transient.isgia = False
     24md.transient.ismovingfront = True
    2525
    26 md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices))
    27 md.frontalforcings.meltingrate=np.zeros((md.mesh.numberofvertices))
     26md.calving.calvingrate = 1000. * np.ones((md.mesh.numberofvertices))
     27md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices))
    2828
    29 md=solve(md,'Transient')
     29md = solve(md, 'Transient')
    3030
    3131#Fields and tolerances to track changes
    32 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',
    33                                                                         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',
    34                                                                         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
    35 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    36                                                                         2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13,
    37                                                                         2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13]
    38 field_values=[md.results.TransientSolution[0].Vx,
    39                                                         md.results.TransientSolution[0].Vy,
    40                                                         md.results.TransientSolution[0].Vel,
    41                                                         md.results.TransientSolution[0].Pressure,
    42                                                         md.results.TransientSolution[0].Thickness,
    43                                                         md.results.TransientSolution[0].Surface,
    44                                                         md.results.TransientSolution[0].MaskIceLevelset,
    45                                                         md.results.TransientSolution[1].Vx,
    46                                                         md.results.TransientSolution[1].Vy,
    47                                                         md.results.TransientSolution[1].Vel,
    48                                                         md.results.TransientSolution[1].Pressure,
    49                                                         md.results.TransientSolution[1].Thickness,
    50                                                         md.results.TransientSolution[1].Surface,
    51                                                         md.results.TransientSolution[1].MaskIceLevelset,
    52                                                         md.results.TransientSolution[2].Vx,
    53                                                         md.results.TransientSolution[2].Vy,
    54                                                         md.results.TransientSolution[2].Vel,
    55                                                         md.results.TransientSolution[2].Pressure,
    56                                                         md.results.TransientSolution[2].Thickness,
    57                                                         md.results.TransientSolution[2].Surface,
    58                                                         md.results.TransientSolution[2].MaskIceLevelset]
     32field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1',
     33               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2',
     34               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3']
     35field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     36                    2e-13, 2e-13, 2e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     37                    2e-13, 2e-13, 2e-13, 1e-13, 1e-13, 1e-13, 1e-13]
     38field_values = [md.results.TransientSolution[0].Vx,
     39                md.results.TransientSolution[0].Vy,
     40                md.results.TransientSolution[0].Vel,
     41                md.results.TransientSolution[0].Pressure,
     42                md.results.TransientSolution[0].Thickness,
     43                md.results.TransientSolution[0].Surface,
     44                md.results.TransientSolution[0].MaskIceLevelset,
     45                md.results.TransientSolution[1].Vx,
     46                md.results.TransientSolution[1].Vy,
     47                md.results.TransientSolution[1].Vel,
     48                md.results.TransientSolution[1].Pressure,
     49                md.results.TransientSolution[1].Thickness,
     50                md.results.TransientSolution[1].Surface,
     51                md.results.TransientSolution[1].MaskIceLevelset,
     52                md.results.TransientSolution[2].Vx,
     53                md.results.TransientSolution[2].Vy,
     54                md.results.TransientSolution[2].Vel,
     55                md.results.TransientSolution[2].Pressure,
     56                md.results.TransientSolution[2].Thickness,
     57                md.results.TransientSolution[2].Surface,
     58                md.results.TransientSolution[2].MaskIceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test805.py

    r23653 r23793  
    99
    1010
    11 md=triangle(model(),'../Exp/Square.exp',50000)
    12 md=setmask(md,'','')
    13 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
    14 md.extrude(3,2.)
    15 md=setflowequation(md,'HO','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     11md = triangle(model(), '../Exp/Square.exp', 50000)
     12md = setmask(md, '', '')
     13md = parameterize(md, '../Par/ValleyGlacierShelf.py')
     14md.extrude(3, 2.)
     15md = setflowequation(md, 'HO', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    1818#Thermal model
    19 pos_surf=np.nonzero(md.mesh.vertexonsurface)[0]
    20 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf]
    21 md.thermal.isenthalpy=True
    22 md.thermal.isdynamicbasalspc=True
     19pos_surf = np.nonzero(md.mesh.vertexonsurface)[0]
     20md.thermal.spctemperature[pos_surf] = md.initialization.temperature[pos_surf]
     21md.thermal.isenthalpy = True
     22md.thermal.isdynamicbasalspc = True
    2323
    2424#Transient
    25 md.transient.isstressbalance=True
    26 md.transient.ismasstransport=True
    27 md.transient.issmb=True
    28 md.transient.isthermal=True
    29 md.transient.isgroundingline=True
    30 md.transient.isgia=False
    31 md.transient.ismovingfront=True
     25md.transient.isstressbalance = True
     26md.transient.ismasstransport = True
     27md.transient.issmb = True
     28md.transient.isthermal = True
     29md.transient.isgroundingline = True
     30md.transient.isgia = False
     31md.transient.ismovingfront = True
    3232
    33 md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices))
    34 md.frontalforcings.meltingrate=np.zeros((md.mesh.numberofvertices))
    35 md.groundingline.melt_interpolation='SubelementMelt1'
    36 md.levelset.stabilization=2
     33md.calving.calvingrate = 1000. * np.ones((md.mesh.numberofvertices))
     34md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices))
     35md.groundingline.melt_interpolation = 'SubelementMelt1'
     36md.levelset.stabilization = 2
    3737
    38 md=solve(md,'Transient')
     38md = solve(md, 'Transient')
    3939
    4040#Fields and tolerances to track changes
    41 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',
    42                                                                         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',
    43                                                                         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3']
    44 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
    45                                                                         1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,
    46                                                                         1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
    47 field_values=[md.results.TransientSolution[0].Vx,
    48                                                         md.results.TransientSolution[0].Vy,
    49                                                         md.results.TransientSolution[0].Vel,
    50                                                         md.results.TransientSolution[0].Pressure,
    51                                                         md.results.TransientSolution[0].Thickness,
    52                                                         md.results.TransientSolution[0].Surface,
    53                                                         md.results.TransientSolution[0].MaskIceLevelset,
    54                                                         md.results.TransientSolution[0].Enthalpy,
    55                                                         md.results.TransientSolution[0].Watercolumn,
    56                                                         md.results.TransientSolution[1].Vx,
    57                                                         md.results.TransientSolution[1].Vy,
    58                                                         md.results.TransientSolution[1].Vel,
    59                                                         md.results.TransientSolution[1].Pressure,
    60                                                         md.results.TransientSolution[1].Thickness,
    61                                                         md.results.TransientSolution[1].Surface,
    62                                                         md.results.TransientSolution[1].MaskIceLevelset,
    63                                                         md.results.TransientSolution[1].Enthalpy,
    64                                                         md.results.TransientSolution[1].Watercolumn,
    65                                                         md.results.TransientSolution[2].Vx,
    66                                                         md.results.TransientSolution[2].Vy,
    67                                                         md.results.TransientSolution[2].Vel,
    68                                                         md.results.TransientSolution[2].Pressure,
    69                                                         md.results.TransientSolution[2].Thickness,
    70                                                         md.results.TransientSolution[2].Surface,
    71                                                         md.results.TransientSolution[2].MaskIceLevelset,
    72                                                         md.results.TransientSolution[2].Enthalpy,
    73                                                         md.results.TransientSolution[2].Watercolumn]
     41field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1', 'Enthalpy1', 'Watercolumn1',
     42               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2', 'Enthalpy2', 'Watercolumn2',
     43               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3', 'Enthalpy3', 'Watercolumn3']
     44field_tolerances = [1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11,
     45                    1e-9, 1e-9, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-9, 1e-10,
     46                    1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10]
     47field_values = [md.results.TransientSolution[0].Vx,
     48                md.results.TransientSolution[0].Vy,
     49                md.results.TransientSolution[0].Vel,
     50                md.results.TransientSolution[0].Pressure,
     51                md.results.TransientSolution[0].Thickness,
     52                md.results.TransientSolution[0].Surface,
     53                md.results.TransientSolution[0].MaskIceLevelset,
     54                md.results.TransientSolution[0].Enthalpy,
     55                md.results.TransientSolution[0].Watercolumn,
     56                md.results.TransientSolution[1].Vx,
     57                md.results.TransientSolution[1].Vy,
     58                md.results.TransientSolution[1].Vel,
     59                md.results.TransientSolution[1].Pressure,
     60                md.results.TransientSolution[1].Thickness,
     61                md.results.TransientSolution[1].Surface,
     62                md.results.TransientSolution[1].MaskIceLevelset,
     63                md.results.TransientSolution[1].Enthalpy,
     64                md.results.TransientSolution[1].Watercolumn,
     65                md.results.TransientSolution[2].Vx,
     66                md.results.TransientSolution[2].Vy,
     67                md.results.TransientSolution[2].Vel,
     68                md.results.TransientSolution[2].Pressure,
     69                md.results.TransientSolution[2].Thickness,
     70                md.results.TransientSolution[2].Surface,
     71                md.results.TransientSolution[2].MaskIceLevelset,
     72                md.results.TransientSolution[2].Enthalpy,
     73                md.results.TransientSolution[2].Watercolumn]
  • issm/trunk-jpl/test/NightlyRun/test806.py

    r23653 r23793  
    1010import numpy as np
    1111
    12 md=triangle(model(),'../Exp/Square.exp',50000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 50000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    1818x = md.mesh.x
    1919xmin = min(x)
    2020xmax = max(x)
    21 Lx = (xmax-xmin)
    22 alpha = 2./3.
    23 md.mask.ice_levelset = np.float_((x - alpha*Lx)>0) - np.float_((x - alpha*Lx)<0)
     21Lx = (xmax - xmin)
     22alpha = 2. / 3.
     23md.mask.ice_levelset = np.float_((x - alpha * Lx) > 0) - np.float_((x - alpha * Lx) < 0)
    2424
    25 md.timestepping.time_step=10
    26 md.timestepping.final_time=30
     25md.timestepping.time_step = 10
     26md.timestepping.final_time = 30
    2727
    2828#Transient
    29 md.transient.isstressbalance=True
    30 md.transient.ismasstransport=True
    31 md.transient.issmb=True
    32 md.transient.isthermal=False
    33 md.transient.isgroundingline=False
    34 md.transient.isgia=False
    35 md.transient.ismovingfront=True
     29md.transient.isstressbalance = True
     30md.transient.ismasstransport = True
     31md.transient.issmb = True
     32md.transient.isthermal = False
     33md.transient.isgroundingline = False
     34md.transient.isgia = False
     35md.transient.ismovingfront = True
    3636
    37 md.calving=calvinglevermann()
    38 md.calving.coeff=4.89e13*np.ones((md.mesh.numberofvertices))
    39 md.frontalforcings.meltingrate=np.zeros((md.mesh.numberofvertices))
    40 md.levelset.spclevelset=np.nan*np.ones((md.mesh.numberofvertices))
     37md.calving = calvinglevermann()
     38md.calving.coeff = 4.89e13 * np.ones((md.mesh.numberofvertices))
     39md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices))
     40md.levelset.spclevelset = np.nan * np.ones((md.mesh.numberofvertices))
    4141
    42 md.transient.requested_outputs=['default','StrainRateparallel','StrainRateperpendicular','Calvingratex','Calvingratey','CalvingCalvingrate']
     42md.transient.requested_outputs = ['default', 'StrainRateparallel', 'StrainRateperpendicular', 'Calvingratex', 'Calvingratey', 'CalvingCalvingrate']
    4343
    44 md=solve(md,'Transient')
     44md = solve(md, 'Transient')
    4545
    4646#Fields and tolerances to track changes
    47 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','StrainRateparallel1','StrainRateperpendicular1','CalvingCalvingrate1',
    48                                                                         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','StrainRateparallel2','StrainRateperpendicular2','CalvingCalvingrate2',
    49                                                                         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','StrainRateparallel3','StrainRateperpendicular3','CalvingCalvingrate3']
    50 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
    51                                                                         2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
    52                                                                         2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,5e-11,5e-11,1e-11]
    53 field_values=[md.results.TransientSolution[0].Vx,
    54                                                         md.results.TransientSolution[0].Vy,
    55                                                         md.results.TransientSolution[0].Vel,
    56                                                         md.results.TransientSolution[0].Pressure,
    57                                                         md.results.TransientSolution[0].Thickness,
    58                                                         md.results.TransientSolution[0].Surface,
    59                                                         md.results.TransientSolution[0].MaskIceLevelset,
    60                                                         md.results.TransientSolution[0].StrainRateparallel,
    61                                                         md.results.TransientSolution[0].StrainRateperpendicular,
    62                                                         md.results.TransientSolution[0].CalvingCalvingrate,
    63                                                         md.results.TransientSolution[1].Vx,
    64                                                         md.results.TransientSolution[1].Vy,
    65                                                         md.results.TransientSolution[1].Vel,
    66                                                         md.results.TransientSolution[1].Pressure,
    67                                                         md.results.TransientSolution[1].Thickness,
    68                                                         md.results.TransientSolution[1].Surface,
    69                                                         md.results.TransientSolution[1].MaskIceLevelset,
    70                                                         md.results.TransientSolution[1].StrainRateparallel,
    71                                                         md.results.TransientSolution[1].StrainRateperpendicular,
    72                                                         md.results.TransientSolution[1].CalvingCalvingrate,
    73                                                         md.results.TransientSolution[2].Vx,
    74                                                         md.results.TransientSolution[2].Vy,
    75                                                         md.results.TransientSolution[2].Vel,
    76                                                         md.results.TransientSolution[2].Pressure,
    77                                                         md.results.TransientSolution[2].Thickness,
    78                                                         md.results.TransientSolution[2].Surface,
    79                                                         md.results.TransientSolution[2].MaskIceLevelset,
    80                                                         md.results.TransientSolution[2].StrainRateparallel,
    81                                                         md.results.TransientSolution[2].StrainRateperpendicular,
    82                                                         md.results.TransientSolution[2].CalvingCalvingrate]
     47field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1', 'StrainRateparallel1', 'StrainRateperpendicular1', 'CalvingCalvingrate1',
     48               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2', 'StrainRateparallel2', 'StrainRateperpendicular2', 'CalvingCalvingrate2',
     49               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3', 'StrainRateparallel3', 'StrainRateperpendicular3', 'CalvingCalvingrate3']
     50field_tolerances = [1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11,
     51                    2e-11, 2e-11, 2e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11,
     52                    2e-11, 2e-11, 2e-11, 1e-11, 1e-11, 1e-11, 1e-11, 5e-11, 5e-11, 1e-11]
     53field_values = [md.results.TransientSolution[0].Vx,
     54                md.results.TransientSolution[0].Vy,
     55                md.results.TransientSolution[0].Vel,
     56                md.results.TransientSolution[0].Pressure,
     57                md.results.TransientSolution[0].Thickness,
     58                md.results.TransientSolution[0].Surface,
     59                md.results.TransientSolution[0].MaskIceLevelset,
     60                md.results.TransientSolution[0].StrainRateparallel,
     61                md.results.TransientSolution[0].StrainRateperpendicular,
     62                md.results.TransientSolution[0].CalvingCalvingrate,
     63                md.results.TransientSolution[1].Vx,
     64                md.results.TransientSolution[1].Vy,
     65                md.results.TransientSolution[1].Vel,
     66                md.results.TransientSolution[1].Pressure,
     67                md.results.TransientSolution[1].Thickness,
     68                md.results.TransientSolution[1].Surface,
     69                md.results.TransientSolution[1].MaskIceLevelset,
     70                md.results.TransientSolution[1].StrainRateparallel,
     71                md.results.TransientSolution[1].StrainRateperpendicular,
     72                md.results.TransientSolution[1].CalvingCalvingrate,
     73                md.results.TransientSolution[2].Vx,
     74                md.results.TransientSolution[2].Vy,
     75                md.results.TransientSolution[2].Vel,
     76                md.results.TransientSolution[2].Pressure,
     77                md.results.TransientSolution[2].Thickness,
     78                md.results.TransientSolution[2].Surface,
     79                md.results.TransientSolution[2].MaskIceLevelset,
     80                md.results.TransientSolution[2].StrainRateparallel,
     81                md.results.TransientSolution[2].StrainRateperpendicular,
     82                md.results.TransientSolution[2].CalvingCalvingrate]
  • issm/trunk-jpl/test/NightlyRun/test807.py

    r23659 r23793  
    1010import numpy as np
    1111
    12 md=triangle(model(),'../Exp/Square.exp',50000.)
    13 md=setmask(md,'all','')
    14 md=parameterize(md,'../Par/SquareShelf.py')
    15 md=setflowequation(md,'SSA','all')
    16 md.cluster=generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 50000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    1818x = md.mesh.x
    1919xmin = min(x)
    2020xmax = max(x)
    21 Lx = (xmax-xmin)
    22 alpha = 2./3.
    23 md.mask.ice_levelset = np.float_((x - alpha*Lx)>0) - np.float_((x - alpha*Lx)<0)
     21Lx = (xmax - xmin)
     22alpha = 2. / 3.
     23md.mask.ice_levelset = np.float_((x - alpha * Lx) > 0) - np.float_((x - alpha * Lx) < 0)
    2424
    25 md.timestepping.time_step=10
    26 md.timestepping.final_time=30
     25md.timestepping.time_step = 10
     26md.timestepping.final_time = 30
    2727
    2828#Transient
    29 md.transient.isstressbalance=True
    30 md.transient.ismasstransport=True
    31 md.transient.issmb=True
    32 md.transient.isthermal=False
    33 md.transient.isgroundingline=False
    34 md.transient.isgia=False
    35 md.transient.ismovingfront=True
     29md.transient.isstressbalance = True
     30md.transient.ismasstransport = True
     31md.transient.issmb = True
     32md.transient.isthermal = False
     33md.transient.isgroundingline = False
     34md.transient.isgia = False
     35md.transient.ismovingfront = True
    3636
    37 md.calving.calvingrate=np.zeros((md.mesh.numberofvertices))
    38 md.frontalforcings.meltingrate=10000*np.ones((md.mesh.numberofvertices))
    39 md.levelset.spclevelset=np.nan*np.ones((md.mesh.numberofvertices))
     37md.calving.calvingrate = np.zeros((md.mesh.numberofvertices))
     38md.frontalforcings.meltingrate = 10000 * np.ones((md.mesh.numberofvertices))
     39md.levelset.spclevelset = np.nan * np.ones((md.mesh.numberofvertices))
    4040
    41 md=solve(md,'Transient')
     41md = solve(md, 'Transient')
    4242
    4343#Fields and tolerances to track changes
    44 field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',
    45                                                                         'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',
    46                                                                         'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
    47 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
    48                                                                         2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11,
    49                                                                         2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11]
    50 field_values=[md.results.TransientSolution[0].Vx,
    51                                                         md.results.TransientSolution[0].Vy,
    52                                                         md.results.TransientSolution[0].Vel,
    53                                                         md.results.TransientSolution[0].Pressure,
    54                                                         md.results.TransientSolution[0].Thickness,
    55                                                         md.results.TransientSolution[0].Surface,
    56                                                         md.results.TransientSolution[0].MaskIceLevelset,
    57                                                         md.results.TransientSolution[1].Vx,
    58                                                         md.results.TransientSolution[1].Vy,
    59                                                         md.results.TransientSolution[1].Vel,
    60                                                         md.results.TransientSolution[1].Pressure,
    61                                                         md.results.TransientSolution[1].Thickness,
    62                                                         md.results.TransientSolution[1].Surface,
    63                                                         md.results.TransientSolution[1].MaskIceLevelset,
    64                                                         md.results.TransientSolution[2].Vx,
    65                                                         md.results.TransientSolution[2].Vy,
    66                                                         md.results.TransientSolution[2].Vel,
    67                                                         md.results.TransientSolution[2].Pressure,
    68                                                         md.results.TransientSolution[2].Thickness,
    69                                                         md.results.TransientSolution[2].Surface,
    70                                                         md.results.TransientSolution[2].MaskIceLevelset]
     44field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1',
     45               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2',
     46               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3']
     47field_tolerances = [1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11,
     48                    2e-11, 2e-11, 2e-11, 1e-11, 1e-11, 1e-11, 5e-11,
     49                    2e-11, 2e-11, 2e-11, 1e-11, 1e-11, 1e-11, 5e-11]
     50field_values = [md.results.TransientSolution[0].Vx,
     51                md.results.TransientSolution[0].Vy,
     52                md.results.TransientSolution[0].Vel,
     53                md.results.TransientSolution[0].Pressure,
     54                md.results.TransientSolution[0].Thickness,
     55                md.results.TransientSolution[0].Surface,
     56                md.results.TransientSolution[0].MaskIceLevelset,
     57                md.results.TransientSolution[1].Vx,
     58                md.results.TransientSolution[1].Vy,
     59                md.results.TransientSolution[1].Vel,
     60                md.results.TransientSolution[1].Pressure,
     61                md.results.TransientSolution[1].Thickness,
     62                md.results.TransientSolution[1].Surface,
     63                md.results.TransientSolution[1].MaskIceLevelset,
     64                md.results.TransientSolution[2].Vx,
     65                md.results.TransientSolution[2].Vy,
     66                md.results.TransientSolution[2].Vel,
     67                md.results.TransientSolution[2].Pressure,
     68                md.results.TransientSolution[2].Thickness,
     69                md.results.TransientSolution[2].Surface,
     70                md.results.TransientSolution[2].MaskIceLevelset]
  • issm/trunk-jpl/test/NightlyRun/test808.py

    r23653 r23793  
    1010from calvingminthickness import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',30000.)
    13 md = setmask(md,'all','')
    14 md = parameterize(md,'../Par/SquareShelf.py')
    15 md = setflowequation(md,'SSA','all')
    16 md.cluster = generic('name',gethostname(),'np',3)
     12md = triangle(model(), '../Exp/Square.exp', 30000.)
     13md = setmask(md, 'all', '')
     14md = parameterize(md, '../Par/SquareShelf.py')
     15md = setflowequation(md, 'SSA', 'all')
     16md.cluster = generic('name', gethostname(), 'np', 3)
    1717
    1818x = md.mesh.x
     
    3838md.calving.min_thickness = 400
    3939md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices,))
    40 md.levelset.spclevelset = float('NaN')* np.ones((md.mesh.numberofvertices,))
     40md.levelset.spclevelset = float('NaN') * np.ones((md.mesh.numberofvertices,))
    4141md.levelset.reinit_frequency = 1
    4242
    43 md = solve(md,'Transient')
     43md = solve(md, 'Transient')
    4444
    4545#Fields and tolerances to track changes
    46 field_names = [ 'Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1'
    47                                                                 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2'
    48                                                                 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
    49 field_tolerances = [1e-8,1e-8,1e-8,1e-9,1e-9,1e-9,3e-9,
    50                                                                                 1e-8,1e-8,1e-8,1e-9,1e-9,1e-9,3e-9,
    51                                                                                 1e-8,1e-8,1e-8,1e-9,1e-9,1e-9,3e-9]
     46field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Thickness1', 'Surface1', 'MaskIceLevelset1'
     47               'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Thickness2', 'Surface2', 'MaskIceLevelset2'
     48               'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Thickness3', 'Surface3', 'MaskIceLevelset3']
     49field_tolerances = [1e-8, 1e-8, 1e-8, 1e-9, 1e-9, 1e-9, 3e-9,
     50                    1e-8, 1e-8, 1e-8, 1e-9, 1e-9, 1e-9, 3e-9,
     51                    1e-8, 1e-8, 1e-8, 1e-9, 1e-9, 1e-9, 3e-9]
    5252field_values = [md.results.TransientSolution[0].Vx,
    53                                                                 md.results.TransientSolution[0].Vy,
    54                                                                 md.results.TransientSolution[0].Vel,
    55                                                                 md.results.TransientSolution[0].Pressure,
    56                                                                 md.results.TransientSolution[0].Thickness,
    57                                                                 md.results.TransientSolution[0].Surface,
    58                                                                 md.results.TransientSolution[0].MaskIceLevelset,
    59                                                                 md.results.TransientSolution[1].Vx,
    60                                                                 md.results.TransientSolution[1].Vy,
    61                                                                 md.results.TransientSolution[1].Vel,
    62                                                                 md.results.TransientSolution[1].Pressure,
    63                                                                 md.results.TransientSolution[1].Thickness,
    64                                                                 md.results.TransientSolution[1].Surface,
    65                                                                 md.results.TransientSolution[1].MaskIceLevelset,
    66                                                                 md.results.TransientSolution[2].Vx,
    67                                                                 md.results.TransientSolution[2].Vy,
    68                                                                 md.results.TransientSolution[2].Vel,
    69                                                                 md.results.TransientSolution[2].Pressure,
    70                                                                 md.results.TransientSolution[2].Thickness,
    71                                                                 md.results.TransientSolution[2].Surface,
    72                                                                 md.results.TransientSolution[2].MaskIceLevelset]
     53                md.results.TransientSolution[0].Vy,
     54                md.results.TransientSolution[0].Vel,
     55                md.results.TransientSolution[0].Pressure,
     56                md.results.TransientSolution[0].Thickness,
     57                md.results.TransientSolution[0].Surface,
     58                md.results.TransientSolution[0].MaskIceLevelset,
     59                md.results.TransientSolution[1].Vx,
     60                md.results.TransientSolution[1].Vy,
     61                md.results.TransientSolution[1].Vel,
     62                md.results.TransientSolution[1].Pressure,
     63                md.results.TransientSolution[1].Thickness,
     64                md.results.TransientSolution[1].Surface,
     65                md.results.TransientSolution[1].MaskIceLevelset,
     66                md.results.TransientSolution[2].Vx,
     67                md.results.TransientSolution[2].Vy,
     68                md.results.TransientSolution[2].Vel,
     69                md.results.TransientSolution[2].Pressure,
     70                md.results.TransientSolution[2].Thickness,
     71                md.results.TransientSolution[2].Surface,
     72                md.results.TransientSolution[2].MaskIceLevelset]
Note: See TracChangeset for help on using the changeset viewer.