Changeset 23793
- Timestamp:
- 03/13/19 03:17:46 (6 years ago)
- Location:
- issm/trunk-jpl/test/NightlyRun
- Files:
-
- 299 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/GetIds.py
r23176 r23793 4 4 import numpy as np 5 5 6 6 7 def GetIds(ids_names): 7 8 8 """ 9 GetIds - output ids from a given array of IDs and test names 9 10 10 11 11 the test names can be any string or sub-string present 12 in the test's name (first line of corresponding file) 12 13 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 22 15 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 """ 24 23 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 = [] 32 25 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"') 39 33 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"') 49 40 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.') 60 50 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.') 64 61 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__) 66 65 66 return np.array(ids).astype(int) -
issm/trunk-jpl/test/NightlyRun/IdFromString.py
r23707 r23793 3 3 import os 4 4 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 18 6 19 #Check input20 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('"','')24 7 25 #Get the test ids and names and scan for matches 8 def 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 """ 26 18 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('"', '') 37 24 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 42 26 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) 46 37 47 ids.sort() 38 #Return if no test found 39 if not ids: 40 print("No test matches '%s'." % string) 41 return ids 48 42 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])] 55 46 56 return ids 47 ids.sort() 57 48 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 1 1 #! /usr/bin/env python 2 2 3 3 4 def 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 12 7 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 1 1 #!/usr/bin/env python 2 2 import os 3 import argparse 3 4 import numpy as np 4 5 from traceback import format_exc 5 6 from sys import float_info 6 7 from glob import glob 7 from socket import gethostname8 8 from GetIds import * 9 9 try: 10 11 except ImportError:#we don't have issm code in path, just get it12 13 10 from parallelrange import parallelrange 11 except ModuleNotFoundError: #we don't have issm code in path, just get it 12 import devpath 13 from parallelrange import parallelrange 14 14 from IdToName import IdToName 15 15 from arch import archread 16 16 from 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 19 def 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 235 230 if __name__ == '__main__': 236 237 PYTHONSTARTUP=os.environ['PYTHONSTARTUP']238 #print 'PYTHONSTARTUP =',PYTHONSTARTUP239 240 241 242 243 print(("PYTHONSTARTUP error: ",e))244 245 246 247 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 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 263 264 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 10 10 from generic import generic 11 11 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)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', 2) 17 17 #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')]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')] 25 25 26 md =solve(md,'Stressbalance')26 md = solve(md, 'Stressbalance') 27 27 28 28 #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 34 35 1e-13, 1e-13, 1e-13]36 field_values =[md.results.StressbalanceSolution.Vx,37 38 39 40 41 42 43 44 45 46 47 48 md.results.StressbalanceSolution.MassFlux6]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] -
issm/trunk-jpl/test/NightlyRun/test102.py
r21477 r23793 9 9 10 10 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')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') 18 18 19 19 #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 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] -
issm/trunk-jpl/test/NightlyRun/test103.py
r21408 r23793 9 9 10 10 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')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') 19 19 20 20 #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 31 32 33 34 35 36 37 38 39 md.results.StressbalanceSolution.StressTensoryz,]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] -
issm/trunk-jpl/test/NightlyRun/test104.py
r23539 r23793 9 9 10 10 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')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') 18 18 19 19 #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]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] -
issm/trunk-jpl/test/NightlyRun/test105.py
r21408 r23793 9 9 10 10 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')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') 17 17 18 18 #Fields and tolerances to track changes 19 field_names =['Thickness'] 20 field_tolerances=[1e-13] 21 field_values=[\ 22 md.results.MasstransportSolution.Thickness,\ 23 ] 19 field_names = ['Thickness'] 20 field_tolerances = [1e-13] 21 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test106.py
r21408 r23793 10 10 11 11 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 =319 md.masstransport.spcthickness =md.geometry.thickness20 md =solve(md,'Masstransport')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') 21 21 22 22 #Fields and tolerances to track changes 23 field_names =['Thickness'] 24 field_tolerances=[1e-13] 25 field_values=[\ 26 md.results.MasstransportSolution.Thickness,\ 27 ] 23 field_names = ['Thickness'] 24 field_tolerances = [1e-13] 25 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test107.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #Fields and tolerances to track changes 20 field_names =['Thickness'] 21 field_tolerances=[1e-13] 22 field_values=[\ 23 md.results.MasstransportSolution.Thickness,\ 24 ] 20 field_names = ['Thickness'] 21 field_tolerances = [1e-13] 22 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test108.py
r21408 r23793 9 9 10 10 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 =017 md.cluster =generic('name',gethostname(),'np',3)18 md =solve(md,'Thermal')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') 19 19 20 20 #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 ] 21 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 22 field_tolerances = [1e-13, 1e-5] 23 field_values = [md.results.ThermalSolution.Temperature, 24 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test109.py
r21408 r23793 9 9 10 10 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 =False18 md.transient.ismasstransport =False19 md.transient.issmb =True20 md.transient.isthermal =True21 md.transient.isgroundingline =False22 md =solve(md,'Transient')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') 23 23 24 24 #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 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] -
issm/trunk-jpl/test/NightlyRun/test110.py
r21408 r23793 9 9 10 10 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']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'] 17 17 18 md =solve(md,'Transient')18 md = solve(md, 'Transient') 19 19 20 20 #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 ] 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 = [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 1 1 #Test Name: ISMIPAHO 2 2 import numpy as np 3 import shutil4 3 from model import * 5 4 from socket import gethostname … … 15 14 """ 16 15 17 printingflag =False16 printingflag = False 18 17 19 #L_list=[80000.] 20 L_list=[80000.] 21 results=[] 22 minvx=[] 23 maxvx=[] 18 L_list = [80000.] 19 results = [] 20 minvx = [] 21 maxvx = [] 24 22 25 23 for L in L_list: 26 nx=20 #numberof nodes in x direction27 ny=2028 md=model()29 md=squaremesh(md,L,L,nx,ny)30 md=setmask(md,'','') #ice sheet test31 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.) 33 31 34 md=setflowequation(md,'HO','all')32 md = setflowequation(md, 'HO', 'all') 35 33 36 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)) 40 38 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. 44 42 45 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] 48 46 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 times50 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] 51 49 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)) 53 51 54 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') 57 55 58 59 vx=md.results.StressbalanceSolution.Vx60 vy=md.results.StressbalanceSolution.Vy61 vz=md.results.StressbalanceSolution.Vz62 63 64 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:])) 65 63 66 67 # plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')68 69 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 75 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 81 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') 85 83 86 if (L==5000.):87 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 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 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 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 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 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 111 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') 115 113 116 114 #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]) 118 116 if printingflag: 119 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]) 124 122 if printingflag: 125 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') 129 127 130 128 #Fields and tolerances to track changes 131 field_names =['Vx80km','Vy80km','Vz80km']132 field_tolerances =[1e-08,1e-08,1e-08]133 field_values =[]129 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 130 field_tolerances = [1e-08, 1e-08, 1e-08] 131 field_values = [] 134 132 for 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 1 1 #Test Name: ISMIPAFS 2 2 import numpy as np 3 import shutil4 3 from model import * 5 4 from socket import gethostname … … 15 14 """ 16 15 17 printingflag =False16 printingflag = False 18 17 19 L_list =[80000.]20 results =[]21 minvx =[]22 maxvx =[]18 L_list = [80000.] 19 results = [] 20 minvx = [] 21 maxvx = [] 23 22 24 23 for L in L_list: 25 nx=20 #numberof nodes in x direction26 ny=2027 md=model()28 md=squaremesh(md,L,L,nx,ny)29 md=setmask(md,'','') #ice sheet test24 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 30 29 31 # 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 # 36 # 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) 37 36 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') 41 40 42 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. 47 46 48 49 md.stressbalance.abstol=np.nan50 md.stressbalance.reltol=np.nan51 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') 54 53 55 56 vx=md.results.StressbalanceSolution.Vx57 vy=md.results.StressbalanceSolution.Vy58 vz=md.results.StressbalanceSolution.Vz59 pressure=md.results.StressbalanceSolution.Pressure60 61 62 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:])) 63 62 64 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 67 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 73 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 79 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') 83 82 84 if (L==5000.):85 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 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 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 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 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 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 109 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') 113 112 114 113 #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]) 116 115 if printingflag: 117 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]) 122 121 if printingflag: 123 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') 127 126 128 127 #Fields and tolerances to track changes 129 field_names =['Vx80km','Vy80km','Vz80km']130 field_tolerances =[1e-12,1e-11,1e-12,]131 field_values =[]128 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 129 field_tolerances = [1e-12, 1e-11, 1e-12] 130 field_values = [] 132 131 for 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 1 1 #Test Name: ISMIPBHO 2 2 import numpy as np 3 import shutil4 3 from model import * 5 4 from socket import gethostname … … 15 14 """ 16 15 17 printingflag =False16 printingflag = False 18 17 19 L_list =[80000.]20 results =[]21 minvx =[]22 maxvx =[]18 L_list = [80000.] 19 results = [] 20 minvx = [] 21 maxvx = [] 23 22 24 23 for L in L_list: 25 nx=20 #numberof nodes in x direction26 ny=2027 md=model()28 md=squaremesh(md,L,L,nx,ny)29 md=setmask(md,'','') #ice sheet test30 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.) 32 31 33 md=setflowequation(md,'HO','all')32 md = setflowequation(md, 'HO', 'all') 34 33 35 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. 42 41 43 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] 46 45 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 times48 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] 49 48 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)) 51 50 52 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') 55 54 56 57 vx=md.results.StressbalanceSolution.Vx58 vy=md.results.StressbalanceSolution.Vy59 vz=md.results.StressbalanceSolution.Vz60 61 62 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:])) 63 62 64 65 # plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')66 67 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 73 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') 77 76 78 if (L==5000.):79 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 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 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 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 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 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 103 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') 107 106 108 107 #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]) 110 109 if printingflag: 111 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]) 116 115 if printingflag: 117 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') 121 120 122 121 #Fields and tolerances to track changes 123 field_names =['Vx80km','Vy80km','Vz80km']124 field_tolerances =[1e-08,1e-07,1e-07]125 field_values =[]122 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 123 field_tolerances = [1e-08, 1e-07, 1e-07] 124 field_values = [] 126 125 for 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 14 14 """ 15 15 16 L_list =[80000.]17 results =[]16 L_list = [80000.] 17 results = [] 18 18 19 19 for L in L_list: 20 nx=20 #numberof nodes in x direction21 ny=2022 md=model()23 md=squaremesh(md,L,L,nx,ny)24 md=setmask(md,'','') #ice sheet test25 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') 28 28 29 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)) 33 33 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. 37 37 38 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] 41 41 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 times43 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] 44 44 45 md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))46 47 48 md.stressbalance.abstol=np.nan49 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') 57 57 58 59 vx=md.results.StressbalanceSolution.Vx60 vy=md.results.StressbalanceSolution.Vy61 vz=md.results.StressbalanceSolution.Vz62 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 63 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) 65 65 66 66 #Fields and tolerances to track changes 67 field_names =['Vx80km','Vy80km','Vz80km']68 field_tolerances =[1e-08,1e-07,1e-08]69 field_values =[]67 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 68 field_tolerances = [1e-08, 1e-07, 1e-08] 69 field_values = [] 70 70 for 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 1 1 #Test Name: ISMIPCHO 2 2 import numpy as np 3 import shutil4 3 from model import * 5 4 from socket import gethostname … … 15 14 """ 16 15 17 printingflag =False16 printingflag = False 18 17 19 L_list =[80000.]20 results =[]21 minvx =[]22 maxvx =[]18 L_list = [80000.] 19 results = [] 20 minvx = [] 21 maxvx = [] 23 22 24 for L in L_list: #in m (3 times the desired length for BC problems) 25 nx=30 #number of nodes in x direction26 ny=3027 md=model()28 md=squaremesh(md,L,L,nx,ny)29 md=setmask(md,'','') #ice sheet test30 md=parameterize(md,'../Par/ISMIPC.py')31 md.extrude(10,1.)23 for 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.) 32 31 33 md=setflowequation(md,'HO','all')32 md = setflowequation(md, 'HO', 'all') 34 33 35 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)) 39 38 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] 42 41 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 times44 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] 45 44 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)) 47 46 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 74 69 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. 78 73 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') 86 77 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:])) 106 85 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') 136 135 137 136 #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]) 139 138 if printingflag: 140 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]) 145 144 if printingflag: 146 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') 150 149 151 150 #Fields and tolerances to track changes 152 field_names =['Vx80km','Vy80km','Vz80km']153 field_tolerances =[1e-09,1e-08,1e-08]154 field_values =[]151 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 152 field_tolerances = [1e-09, 1e-08, 1e-08] 153 field_values = [] 155 154 for 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 14 14 """ 15 15 16 L_list =[80000.]17 results =[]16 L_list = [80000.] 17 results = [] 18 18 19 19 for L in L_list: 20 md=triangle(model(),"../Exp/Square_%d.exp" % L,L/10.) #size 3*L 21 md=setmask(md,'','') #ice sheet test22 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.) 25 25 26 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.6632 md.stressbalance.spcvy[pos]=-0.196733 elif (L==10000.):34 md.stressbalance.spcvx[pos]=16.0435 md.stressbalance.spcvy[pos]=-0.197736 elif (L==20000.):37 md.stressbalance.spcvx[pos]=16.5338 md.stressbalance.spcvy[pos]=-1.2739 elif (L==40000.):40 md.stressbalance.spcvx[pos]=17.2341 md.stressbalance.spcvy[pos]=-3.1742 elif (L==80000.):43 md.stressbalance.spcvx[pos]=16.6844 md.stressbalance.spcvy[pos]=-2.6945 elif (L==160000.):46 md.stressbalance.spcvx[pos]=16.0347 md.stressbalance.spcvy[pos]=-1.2726 #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 48 48 49 md=setflowequation(md,'FS','all')49 md = setflowequation(md, 'FS', 'all') 50 50 51 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') 54 54 55 56 vx=md.results.StressbalanceSolution.Vx57 vy=md.results.StressbalanceSolution.Vy58 vz=md.results.StressbalanceSolution.Vz59 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 60 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) 62 62 63 63 #Fields and tolerances to track changes 64 field_names =['Vx80km','Vy80km','Vz80km']65 field_tolerances =[1e-12,1e-12,1e-12]66 field_values =[]64 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 65 field_tolerances = [1e-12, 1e-12, 1e-12] 66 field_values = [] 67 67 for 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 1 1 #Test Name: ISMIPDHO 2 2 import numpy as np 3 import shutil4 3 from model import * 5 4 from socket import gethostname … … 15 14 """ 16 15 17 printingflag =False16 printingflag = False 18 17 19 L_list =[80000.]20 results =[]21 minvx =[]22 maxvx =[]18 L_list = [80000.] 19 results = [] 20 minvx = [] 21 maxvx = [] 23 22 24 23 for L in L_list: 25 nx=30 #numberof nodes in x direction26 ny=3027 md=model()28 md=squaremesh(md,L,L,nx,ny)29 md=setmask(md,'','') #ice sheet test30 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.) 32 31 33 md=setflowequation(md,'HO','all')32 md = setflowequation(md, 'HO', 'all') 34 33 35 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)) 39 38 40 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] 45 44 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 times47 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] 48 47 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)) 50 49 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 71 66 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. 75 70 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') 83 74 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:])) 97 82 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') 127 126 128 127 #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]) 130 129 if printingflag: 131 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]) 136 135 if printingflag: 137 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') 141 140 142 141 #Fields and tolerances to track changes 143 field_names =['Vx80km','Vy80km','Vz80km']144 field_tolerances =[1e-08,1e-08,1e-07]145 field_values =[]142 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 143 field_tolerances = [1e-08, 1e-08, 1e-07] 144 field_values = [] 146 145 for 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 17 17 """ 18 18 19 #L_list =[5000.,10000.,20000.,40000.,80000.,160000.]20 L_list =[80000.]21 results =[]19 #L_list = [5000., 10000., 20000., 40000., 80000., 160000.] 20 L_list = [80000.] 21 results = [] 22 22 23 23 for L in L_list: 24 nx=30 #numberof nodes in x direction25 ny=3026 md=model()27 md=squaremesh(md,L,L,nx,ny)28 md=setmask(md,'','') #ice sheet test29 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.) 31 31 32 md=setflowequation(md,'HO','all')32 md = setflowequation(md, 'HO', 'all') 33 33 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)) 45 38 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) 49 45 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. 53 49 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] 56 53 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] 58 56 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)))) 75 58 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') 81 75 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) 83 83 84 84 #Fields and tolerances to track changes 85 field_names =['Vx80km','Vy80km','Vz80km']86 field_tolerances =[1e-08,1e-07,1e-07]87 field_values =[]85 field_names = ['Vx80km', 'Vy80km', 'Vz80km'] 86 field_tolerances = [1e-08, 1e-07, 1e-07] 87 field_values = [] 88 88 for 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 1 1 #Test Name: ISMIPE 2 2 import numpy as np 3 import sys4 3 from model import * 5 4 from socket import gethostname … … 12 11 13 12 #This test is a test from the ISMP-HOM Intercomparison project. 14 #TestE 13 #TestE 15 14 #Four tests to run: - Pattyn frozen 16 15 # - Stokes frozen … … 21 20 22 21 for i in range(4): 23 Lx=10.#in m24 Ly=5000.#in m25 nx=3#number of nodes in x direction26 ny=5127 28 md = squaremesh(md,Lx,Ly,nx,ny)29 md = setmask(md,'','')#ice sheet test30 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.) 32 31 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') 37 36 38 39 40 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)) 42 41 43 #Create spcs on the bed 44 45 46 47 48 49 50 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. 51 50 52 53 if i==2 or i==3:54 55 56 57 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') 58 57 59 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') 62 61 63 64 65 66 62 vx = md.results.StressbalanceSolution.Vx 63 vy = md.results.StressbalanceSolution.Vy 64 vz = md.results.StressbalanceSolution.Vz 65 results[i] = md.results.StressbalanceSolution 67 66 68 67 69 68 #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 ] 69 field_names = ['VyPattynSliding', 'VzPattynSliding', 70 'VxStokesSliding', 'VyStokesSliding', 'VzStokesSliding', 71 'VyPattynFrozen', 'VzPattynFrozen', 72 'VxStokesFrozen', 'VyStokesFrozen', 'VzStokesFrozen'] 73 field_tolerances = [1e-05, 1e-05, 74 1e-05, 1e-06, 1e-06, 75 1e-05, 1e-04, 76 1e-05, 1e-05, 1e-06] 82 77 83 78 field_values = [] 84 79 for i in range(4): 85 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 9 9 10 10 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')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') 19 19 20 20 #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 ] 21 field_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'] 24 field_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] 27 field_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 11 11 12 12 #This test is a test from the ISMP-HOM Intercomparison project. 13 #TestF 13 #TestF 14 14 printingflag = False 15 15 results = [] 16 16 17 17 for i in range(4): 18 L = 100000.#in m19 nx = 30#numberof nodes in x direction20 21 22 md = squaremesh(md,L,L,nx,ny)23 # md = triangle(md,'../Exp/SquareISMIP.exp',5500.)24 md = setmask(md,'','')#ice sheet test25 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.) 27 27 28 29 md = setflowequation(md,'HO','all')30 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') 32 32 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. 53 50 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. 57 53 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)) 60 57 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)) 63 60 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)) 74 63 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 100 69 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') 118 74 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']) 119 132 120 133 #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 ] 134 field_names = ['VxPattynFrozen', 'VyPattynFrozen', 'VzPattynFrozen', 'SurfacePattynFrozen', 135 'VxPattynSliding', 'VyPattynSliding', 'VzPattynSliding', 'SurfacePattynSliding', 136 'VxStokesFrozen', 'VyStokesFrozen', 'VzStokesFrozen', 'SurfaceStokesFrozen', 137 'VxStokesSliding', 'VyStokesSliding', 'VzStokesSliding', 'SurfaceStokesSliding'] 138 field_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] 133 142 field_values = [] 134 143 for 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 9 9 10 10 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')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') 17 17 18 18 #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 ] 19 field_names = ['SurfaceSlopeX', 'SurfaceSlopeY'] 20 field_tolerances = [1e-13, 1e-13] 21 field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX, 22 md.results.SurfaceSlopeSolution.SurfaceSlopeY] -
issm/trunk-jpl/test/NightlyRun/test113.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_names = ['SurfaceSlopeX', 'SurfaceSlopeY'] 21 field_tolerances = [1e-13, 1e-13] 22 field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX, 23 md.results.SurfaceSlopeSolution.SurfaceSlopeY] -
issm/trunk-jpl/test/NightlyRun/test114.py
r21408 r23793 9 9 10 10 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')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') 17 17 18 18 #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 ] 19 field_names = ['BedSlopeX', 'BedSlopeY'] 20 field_tolerances = [1e-13, 1e-13] 21 field_values = [md.results.BedSlopeSolution.BedSlopeX, 22 md.results.BedSlopeSolution.BedSlopeY] -
issm/trunk-jpl/test/NightlyRun/test115.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_names = ['BedSlopeX', 'BedSlopeY'] 21 field_tolerances = [1e-13, 1e-13] 22 field_values = [md.results.BedSlopeSolution.BedSlopeX, 23 md.results.BedSlopeSolution.BedSlopeY] -
issm/trunk-jpl/test/NightlyRun/test116.py
r21408 r23793 10 10 11 11 12 md =triangle(model(),'../Exp/Square.exp',150000)13 md =setmask(md,'all','')14 md =parameterize(md,'../Par/SquareShelfConstrained.py')12 md = triangle(model(), '../Exp/Square.exp', 150000) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelfConstrained.py') 15 15 #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')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') 21 21 22 22 #Fields and tolerances to track changes 23 field_names =['Thickness'] 24 field_tolerances=[1e-13] 25 field_values=[\ 26 md.results.BalancethicknessSolution.Thickness,\ 27 ] 23 field_names = ['Thickness'] 24 field_tolerances = [1e-13] 25 field_values = [md.results.BalancethicknessSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test119.py
r23692 r23793 3 3 import time 4 4 from model import * 5 from socket import gethostname6 5 from bamg import * 7 6 8 7 9 8 #Simple mesh 10 md =bamg(model(),'domain','../Exp/Square.exp','hmax',100000.)11 x1 =md.mesh.x12 y1 =md.mesh.y9 md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 100000.) 10 x1 = md.mesh.x 11 y1 = md.mesh.y 13 12 14 13 #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.x17 y2 =md.mesh.y14 md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 300000., 'hVertices', np.array([10000., 100000., 400000., 100000.]).reshape(-1, 1)) 15 x2 = md.mesh.x 16 y2 = md.mesh.y 18 17 19 18 #big mesh 20 t0 =time.time()21 md =bamg(model(),'domain','../Exp/Square.exp','hmax',3000.)22 nbelements =md.mesh.numberofelements23 elapsedtime =time.time()-t024 if nbelements >267895-50 and nbelements<267895+50:25 19 t0 = time.time() 20 md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 3000.) 21 nbelements = md.mesh.numberofelements 22 elapsedtime = time.time() - t0 23 if nbelements > 267895 - 50 and nbelements < 267895 + 50: 24 nbewithinrange = 1. 26 25 else: 27 26 nbewithinrange = 0. 28 27 29 28 #Fields and tolerances to track changes 30 field_names =['x1','y1','x2','y2','nbelements','elapsed time']29 field_names = ['x1', 'y1', 'x2', 'y2', 'nbelements', 'elapsed time'] 31 30 # 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 ] 31 field_tolerances = [2e-9, 2e-9, 1e-13, 1e-13, 1e-13, 7.0] 32 field_values = [x1, y1, x2, y2, nbewithinrange, elapsedtime] -
issm/trunk-jpl/test/NightlyRun/test120.py
r21408 r23793 10 10 11 11 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 =018 md.initialization.waterfraction =np.zeros(md.mesh.numberofvertices)19 md.initialization.watercolumn =np.zeros(md.mesh.numberofvertices)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) 20 20 md.thermal.isenthalpy = 1 21 21 md.thermal.isdynamicbasalspc = 1 22 22 23 md.cluster =generic('name',gethostname(),'np',3)24 md =solve(md,'Thermal')23 md.cluster = generic('name', gethostname(), 'np', 3) 24 md = solve(md, 'Thermal') 25 25 26 26 #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 31 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] -
issm/trunk-jpl/test/NightlyRun/test1201.py
r23707 r23793 14 14 """ 15 15 16 printingflag =False17 results =[]16 printingflag = False 17 results = [] 18 18 19 for stabilization in range(1, 4):20 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)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) 27 27 28 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)) 31 31 32 33 if stabilization==2:34 md.masstransport.stabilization=035 36 md.masstransport.stabilization=stabilization32 #Stabilization 33 if stabilization == 2: 34 md.masstransport.stabilization = 0 35 else: 36 md.masstransport.stabilization = stabilization 37 37 38 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,:]=times43 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 DG38 #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 47 47 48 49 md.transient.isstressbalance=False50 md.settings.output_frequency=500 #keep only last step51 md.verbose=verbose()52 md=solve(md,'Transient')53 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) 54 54 55 55 #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') 62 62 if printingflag: 63 64 # set(gcf,'Color','w')65 # 63 pass 64 # set(gcf, 'Color', 'w') 65 # export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf']) 66 66 67 67 #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]]68 field_names = ['ThicknessArtDiff', 'ThicknessNoArtDiff', 'ThicknessDG'] 69 field_tolerances = [1e-13, 1e-13, 1e-13] 70 field_values = [results[0], results[1], results[2]] -
issm/trunk-jpl/test/NightlyRun/test1202.py
r21408 r23793 1 1 #Test Name: EISMINTStress1 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 14 13 """ 15 14 16 printingflag =False15 printingflag = False 17 16 18 17 #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 2d18 md = model() 19 md = triangle(md, '../Exp/SquareEISMINT.exp', 3550.) 20 md = setmask(md, 'all', '') 21 md = parameterize(md, '../Par/SquareEISMINT.py') 22 md = setflowequation(md, 'SSA', 'all') #SSA's model and 2d 24 23 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 25 md.cluster = generic('name', gethostname(), 'np', 8) 26 md = solve(md, 'Stressbalance') 28 27 29 28 #plot results 30 vx =md.results.StressbalanceSolution.Vx31 vy =md.results.StressbalanceSolution.Vy29 vx = md.results.StressbalanceSolution.Vx 30 vy = md.results.StressbalanceSolution.Vy 32 31 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') 35 34 if printingflag: 36 37 # set(gcf,'Color','w')38 # printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')39 # 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 ']) 40 39 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') 43 42 if printingflag: 44 45 # set(gcf,'Color','w')46 # printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')47 # 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 ']) 48 47 49 48 #Fields and tolerances to track changes 50 field_names =['Vx','Vy']51 field_tolerances =[1e-13,1e-13]52 field_values =[vx,vy]49 field_names = ['Vx', 'Vy'] 50 field_tolerances = [1e-13, 1e-13] 51 field_values = [vx, vy] -
issm/trunk-jpl/test/NightlyRun/test1203.py
r21408 r23793 15 15 """ 16 16 17 printingflag =False17 printingflag = False 18 18 19 #test 5 and 6: 20 md =model()21 md =triangle(md,'../Exp/SquareEISMINT.exp',5100.) #test322 md =setmask(md,'all','')23 md =parameterize(md,'../Par/SquareEISMINT.py')24 md =setflowequation(md,'SSA','all') #SSA's model and 2d19 #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 25 25 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)) 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)))) 31 31 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 33 md.cluster = generic('name', gethostname(), 'np', 8) 34 md = solve(md, 'Stressbalance') 35 35 36 vx =md.results.StressbalanceSolution.Vx37 vy =md.results.StressbalanceSolution.Vy36 vx = md.results.StressbalanceSolution.Vx 37 vy = md.results.StressbalanceSolution.Vy 38 38 39 39 #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') 42 42 if printingflag: 43 44 # set(gcf,'Color','w')45 # printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')46 # 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') 49 49 if printingflag: 50 51 # set(gcf,'Color','w')52 # printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')53 # 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 ']) 54 54 55 55 #Fields and tolerances to track changes 56 field_names =['Vx','Vy']57 field_tolerances =[1e-13,1e-13]58 field_values =[vx,vy]56 field_names = ['Vx', 'Vy'] 57 field_tolerances = [1e-13, 1e-13] 58 field_values = [vx, vy] -
issm/trunk-jpl/test/NightlyRun/test1204.py
r21408 r23793 15 15 """ 16 16 17 printingflag =False17 printingflag = False 18 18 19 19 #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 2d20 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 25 25 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)) 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)))) 31 31 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 33 md.cluster = generic('name', gethostname(), 'np', 8) 34 md = solve(md, 'Stressbalance') 35 35 36 36 #plot results 37 md.initialization.vx =md.results.StressbalanceSolution.Vx38 md.initialization.vy =md.results.StressbalanceSolution.Vy37 md.initialization.vx = md.results.StressbalanceSolution.Vx 38 md.initialization.vy = md.results.StressbalanceSolution.Vy 39 39 40 md.timestepping.time_step =1.41 md.timestepping.final_time =5000.42 md.masstransport.stabilization =143 md =solve(md,'Transient')40 md.timestepping.time_step = 1. 41 md.timestepping.final_time = 5000. 42 md.masstransport.stabilization = 1 43 md = solve(md, 'Transient') 44 44 45 #plotmodel(md, 'data',(md.results.TransientSolution(end).Vx))45 #plotmodel(md, 'data',(md.results.TransientSolution(end).Vx)) 46 46 if printingflag: 47 48 # set(gcf,'Color','w')49 # printmodel('eisminttrans2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')50 # 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 ']) 51 51 52 #plotmodel(md, 'data',(md.results.TransientSolution(end).Vy))52 #plotmodel(md, 'data',(md.results.TransientSolution(end).Vy)) 53 53 if printingflag: 54 55 # set(gcf,'Color','w')56 # printmodel('eisminttrans2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')57 # 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 ']) 58 58 59 #plotmodel(md, 'data',(md.results.TransientSolution(end).Thickness))59 #plotmodel(md, 'data',(md.results.TransientSolution(end).Thickness)) 60 60 if printingflag: 61 62 # set(gcf,'Color','w')63 # printmodel('eisminttrans2thickness','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')64 # 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 ']) 65 65 66 66 #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 71 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] -
issm/trunk-jpl/test/NightlyRun/test1205.py
r23707 r23793 14 14 """ 15 15 16 printingflag =False16 printingflag = False 17 17 18 numlayers =1019 resolution =30000.18 numlayers = 10 19 resolution = 30000. 20 20 21 21 #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 solution25 md =parameterize(md,'../Par/RoundSheetStaticEISMINT.py')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') 26 26 27 27 #Calculation of the analytical 2d velocity field 28 constant =0.329 vx_obs =constant/2.*md.mesh.x*(md.geometry.thickness)**-130 vy_obs =constant/2.*md.mesh.y*(md.geometry.thickness)**-131 vel_obs =np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)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) 32 32 33 33 #We extrude the model to have a 3d model 34 md.extrude(numlayers, 1.)35 md =setflowequation(md,'SIA','all')34 md.extrude(numlayers, 1.) 35 md = setflowequation(md, 'SIA', 'all') 36 36 37 37 #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.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 42 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 44 md.cluster = generic('name', gethostname(), 'np', 8) 45 md = solve(md, 'Stressbalance') 46 46 47 47 #Calculate the depth averaged velocity field (2d): 48 vx =md.results.StressbalanceSolution.Vx49 vy =md.results.StressbalanceSolution.Vy50 vel =np.zeros((md.mesh.numberofvertices2d))48 vx = md.results.StressbalanceSolution.Vx 49 vy = md.results.StressbalanceSolution.Vy 50 vel = np.zeros((md.mesh.numberofvertices2d)) 51 51 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_vel52 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 57 57 58 58 #Plot of the velocity from the exact and calculated solutions 59 59 #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 73 66 #caxis([0 200]) 74 67 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) 76 76 #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') 83 83 #axis([0 750000 0 200]) 84 84 #hold off 85 85 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') 90 90 #colorbar 91 91 #caxis([0 100]) 92 92 93 93 if printingflag: 94 95 # set(gcf,'Color','w')96 # printmodel('SIAstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')97 # 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']) 98 98 99 99 #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]100 field_names = ['Vx', 'Vy', 'Vel'] 101 field_tolerances = [1e-13, 1e-13, 1e-13] 102 field_values = [vx, vy, vel] -
issm/trunk-jpl/test/NightlyRun/test1206.py
r23707 r23793 14 14 """ 15 15 16 printingflag =False16 printingflag = False 17 17 18 numlayers =1019 resolution =30000.18 numlayers = 10 19 resolution = 30000. 20 20 21 21 #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 solution25 md =parameterize(md,'../Par/RoundSheetStaticEISMINT.py')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') 26 26 27 27 #Calculation of the analytical 2d velocity field 28 constant =0.329 vx_obs =constant/2.*md.mesh.x*(md.geometry.thickness)**-130 vy_obs =constant/2.*md.mesh.y*(md.geometry.thickness)**-131 vel_obs =np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)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) 32 32 33 33 #We extrude the model to have a 3d model 34 md.extrude(numlayers, 1.)35 md =setflowequation(md,'HO','all')34 md.extrude(numlayers, 1.) 35 md = setflowequation(md, 'HO', 'all') 36 36 37 37 #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.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 42 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 44 md.cluster = generic('name', gethostname(), 'np', 8) 45 md = solve(md, 'Stressbalance') 46 46 47 47 #Calculate the depth averaged velocity field (2d): 48 vx =md.results.StressbalanceSolution.Vx49 vy =md.results.StressbalanceSolution.Vy50 vel =np.zeros((md.mesh.numberofvertices2d))48 vx = md.results.StressbalanceSolution.Vx 49 vy = md.results.StressbalanceSolution.Vy 50 vel = np.zeros((md.mesh.numberofvertices2d)) 51 51 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 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 59 57 60 58 #Plot of the velocity from the exact and calculated solutions 61 59 #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 74 65 #caxis([0 200]) 75 66 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) 77 75 #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') 84 82 #axis([0 750000 0 200]) 85 83 #hold off 86 84 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') 91 89 #colorbar 92 90 #caxis([0 100]) 93 91 94 92 if printingflag: 95 96 # set(gcf,'Color','w')97 # printmodel('HOstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')98 # 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']) 99 97 100 98 #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]99 field_names = ['Vx', 'Vy', 'Vel'] 100 field_tolerances = [1e-12, 1e-12, 1e-12] 101 field_values = [vx, vy, vel] -
issm/trunk-jpl/test/NightlyRun/test1207.py
r23707 r23793 14 14 """ 15 15 16 printingflag =False16 printingflag = False 17 17 18 numlayers =1019 resolution =30000.18 numlayers = 10 19 resolution = 30000. 20 20 21 21 #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 solution25 md =parameterize(md,'../Par/RoundSheetStaticEISMINT.py')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') 26 26 27 27 #Calculation of the analytical 2d velocity field 28 constant =0.329 vx_obs =constant/2.*md.mesh.x*(md.geometry.thickness)**-130 vy_obs =constant/2.*md.mesh.y*(md.geometry.thickness)**-131 vel_obs =np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)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) 32 32 33 33 #We extrude the model to have a 3d model 34 md.extrude(numlayers, 1.)35 md =setflowequation(md,'FS','all')34 md.extrude(numlayers, 1.) 35 md = setflowequation(md, 'FS', 'all') 36 36 37 37 #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.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 42 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 44 md.cluster = generic('name', gethostname(), 'np', 8) 45 md = solve(md, 'Stressbalance') 46 46 47 47 #Calculate the depth averaged velocity field (2d): 48 vx =md.results.StressbalanceSolution.Vx49 vy =md.results.StressbalanceSolution.Vy50 vel =np.zeros((md.mesh.numberofvertices2d))48 vx = md.results.StressbalanceSolution.Vx 49 vy = md.results.StressbalanceSolution.Vy 50 vel = np.zeros((md.mesh.numberofvertices2d)) 51 51 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 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 59 57 60 58 #Plot of the velocity from the exact and calculated solutions 61 59 #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 74 65 #caxis([0 200]) 75 66 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) 77 75 #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') 84 82 #axis([0 750000 0 200]) 85 83 #hold off 86 84 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') 91 89 #colorbar 92 90 #caxis([0 100]) 93 91 94 92 if printingflag: 95 96 # set(gcf,'Color','w')97 # printmodel('FSstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')98 # 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']) 99 97 100 98 #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]99 field_names = ['Vx', 'Vy', 'Vel'] 100 field_tolerances = [1e-12, 1e-12, 1e-12] 101 field_values = [vx, vy, vel] -
issm/trunk-jpl/test/NightlyRun/test1208.py
r21408 r23793 14 14 """ 15 15 16 numlayers =817 resolution =50000.16 numlayers = 8 17 resolution = 50000. 18 18 19 19 #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')20 md = triangle(model(), '../Exp/SquareEISMINT750000.exp', resolution) 21 md = setmask(md, '', '') 22 md = parameterize(md, '../Par/RoundSheetEISMINT.py') 23 23 24 24 #We extrude the model to have a 3d model 25 md.extrude(numlayers, 1.)26 md =setflowequation(md,'SIA','all')25 md.extrude(numlayers, 1.) 26 md = setflowequation(md, 'SIA', 'all') 27 27 28 28 #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.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. 33 33 34 34 #Adapt the time steps to the resolution 35 md.timestepping.time_step =15.36 md.settings.output_frequency =50037 md.timestepping.final_time =30000.38 md.masstransport.stabilization =139 md.thermal.stabilization =135 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 40 40 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 42 md.cluster = generic('name', gethostname(), 'np', 8) 43 md = solve(md, 'Transient') 44 44 45 45 #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 50 51 52 53 54 55 56 57 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] -
issm/trunk-jpl/test/NightlyRun/test121.py
r21408 r23793 9 9 10 10 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 =False20 md.transient.ismasstransport =False21 md.transient.issmb =True22 md.transient.isthermal =True23 md.transient.isgroundingline =False24 md.thermal.isenthalpy =125 md.thermal.isdynamicbasalspc =126 md =solve(md,'Transient')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') 27 27 28 28 #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 ] 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 = [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 9 9 10 10 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 =119 md.thermal.isdynamicbasalspc =120 md.thermal.stabilization =221 md.cluster =generic('name',gethostname(),'np',3)22 md =solve(md,'Transient')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') 23 23 24 24 #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 ] 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 = [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] 31 field_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 10 10 11 11 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)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) 17 17 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))).T18 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 21 21 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 )] 22 md.transient.requested_outputs = ['default', 'SurfaceMisfit'] 23 md.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')] 33 31 34 md =solve(md,'Transient')32 md = solve(md, 'Transient') 35 33 36 34 #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 ] 35 field_names = ['SurfaceMisfitFirstStep', 'SurfaceMisfitSecondStep', 'SurfaceMisfitThirdStep'] 36 field_tolerances = [1e-13, 1e-13, 1e-13] 37 field_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 8 8 from solve import * 9 9 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')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') 15 15 16 16 #Free surface … … 20 20 21 21 #Go solve 22 md.cluster =generic('name',gethostname(),'np',3)23 md =solve(md,'Transient')22 md.cluster = generic('name', gethostname(), 'np', 3) 23 md = solve(md, 'Transient') 24 24 25 25 #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 ] 26 field_names = ['Vx1', 'Vy1', 'Vel1', 'Pressure1', 'Bed1', 'Surface1', 'Thickness1', 27 'Vx2', 'Vy2', 'Vel2', 'Pressure2', 'Bed2', 'Surface2', 'Thickness2', 28 'Vx3', 'Vy3', 'Vel3', 'Pressure3', 'Bed3', 'Surface3', 'Thickness3'] 29 field_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] 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] -
issm/trunk-jpl/test/NightlyRun/test125.py
r23762 r23793 7 7 from setflowequation import * 8 8 from solve import * 9 10 from massfluxatgate import massfluxatgate11 9 from generic import generic 12 10 import copy 13 11 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']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', 'TotalSmb'] 20 18 21 md.verbose =verbose('solution',1)22 md.settings.recording_frequency =419 md.verbose = verbose('solution', 1) 20 md.settings.recording_frequency = 4 23 21 24 22 # time steps and resolution 25 md.timestepping.final_time =1926 md.settings.output_frequency =223 md.timestepping.final_time = 19 24 md.settings.output_frequency = 2 27 25 28 md =solve(md,'Transient')29 md2 =copy.deepcopy(md)30 md =solve(md,'Transient','restart',1)26 md = solve(md, 'Transient') 27 md2 = copy.deepcopy(md) 28 md = solve(md, 'Transient', 'restart', 1) 31 29 32 30 #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 31 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'] 32 field_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 field_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 7 7 from setflowequation import * 8 8 from solve import * 9 10 from massfluxatgate import massfluxatgate11 9 from generic import generic 12 10 import copy 13 11 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')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelfConstrained.py') 15 md.cluster = generic('name', gethostname(), 'np', 1) 16 md.transient.requested_outputs = ['IceVolume', 'TotalSmb'] 17 md.extrude(3, 1.) 18 md = setflowequation(md, 'HO', 'all') 21 19 22 md.verbose =verbose('solution',1)23 md.settings.recording_frequency =520 md.verbose = verbose('solution', 1) 21 md.settings.recording_frequency = 5 24 22 25 23 # time steps and resolution 26 md.timestepping.final_time =824 md.timestepping.final_time = 8 27 25 28 md =solve(md,'Transient')29 md2 =copy.deepcopy(md)30 md =solve(md,'Transient','restart',1)26 md = solve(md, 'Transient') 27 md2 = copy.deepcopy(md) 28 md = solve(md, 'Transient', 'restart', 1) 31 29 32 30 #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 31 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'] 32 field_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] 37 field_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 18 18 """ 19 19 20 printingflag =False20 printingflag = False 21 21 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')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') 28 28 29 29 #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)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) 35 35 36 36 #analytical results 37 37 #melting heat = geothermal flux 38 #Mb*L*rho =G => Mb=G/L*rho39 melting =md.basalforcings.geothermalflux/(md.materials.rho_ice*md.materials.latentheat)*md.constants.yts38 #Mb*L*rho = G => Mb = G/L*rho 39 melting = md.basalforcings.geothermalflux / (md.materials.rho_ice * md.materials.latentheat) * md.constants.yts 40 40 41 41 #modeled results 42 md.cluster =generic('name',gethostname(),'np',2)43 md =solve(md,'Thermal')42 md.cluster = generic('name', gethostname(), 'np', 2) 43 md = solve(md, 'Thermal') 44 44 45 45 #plot results 46 comp_melting =md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate47 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')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') 52 52 if printingflag: 53 54 # set(gcf,'Color','w')55 # printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')56 # 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 ']) 57 57 58 58 #Fields and tolerances to track changes 59 field_names =['BasalMelting']60 field_tolerances =[1e-08]61 field_values =[comp_melting]59 field_names = ['BasalMelting'] 60 field_tolerances = [1e-08] 61 field_values = [comp_melting] -
issm/trunk-jpl/test/NightlyRun/test1302.py
r21408 r23793 1 1 #Test Name: ThermalAdvection 2 2 import numpy as np 3 import sys4 3 from model import * 5 4 from socket import gethostname … … 13 12 """ 14 13 This 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 temperature14 There is u = v=0 and w = cst everywhere the only thermal boundary conditions are an imposed temperature 16 15 at upper surface and an impose flux at its base. 17 16 """ 18 17 19 printingflag =False18 printingflag = False 20 19 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')20 md = model() 21 md = triangle(md, '../Exp/Square.exp', 100000.) 22 md = setmask(md, '', '') 23 md = parameterize(md, '../Par/SquareThermal.py') 24 md.extrude(30, 1.) #NB: the more one extrudes, the better (10-> relative~0.35%, 20->0.1%, 30->0.05%) 25 md = setflowequation(md, 'HO', 'all') 27 26 28 27 #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)28 pos1 = np.where(np.isnan(md.mesh.lowerelements))[0] 29 md.thermal.spctemperature[md.mesh.elements[pos1, 0:3] - 1] = 10. 30 pos2 = np.where(np.isnan(md.mesh.upperelements))[0] 31 md.thermal.spctemperature[md.mesh.elements[pos2, 3:6] - 1] = 0. 32 md.initialization.vz = 0.1 * np.ones((md.mesh.numberofvertices)) 33 md.initialization.vel = np.sqrt(md.initialization.vx**2 + md.initialization.vy**2 + md.initialization.vz**2) 34 md.initialization.pressure = np.zeros((md.mesh.numberofvertices), int) 36 35 37 md.thermal.stabilization =236 md.thermal.stabilization = 2 38 37 #analytical results 39 #d2T/dz2-w*rho_ice*c/k*dT/dz =0 T(surface)=0 T(bed)=10 => T=A exp(alpha z)+B40 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/an41 A =10./(np.exp(alpha*(-1000.))-1.) #A=T(bed)/(exp(alpha*bed)-1) with bed=-1000 T(bed)=1042 B =-A43 md.initialization.temperature =A*np.exp(alpha*md.mesh.z)+B38 #d2T/dz2-w*rho_ice*c/k*dT/dz = 0 T(surface)=0 T(bed)=10 => T = A exp(alpha z)+B 39 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 40 A = 10. / (np.exp(alpha * (-1000.)) - 1.) #A = T(bed)/(exp(alpha*bed)-1) with bed=-1000 T(bed)=10 41 B = -A 42 md.initialization.temperature = A * np.exp(alpha * md.mesh.z) + B 44 43 45 44 #modeled results 46 md.cluster =generic('name',gethostname(),'np',2)47 md =solve(md,'Thermal')45 md.cluster = generic('name', gethostname(), 'np', 2) 46 md = solve(md, 'Thermal') 48 47 49 48 #plot results 50 comp_temp =md.results.ThermalSolution.Temperature51 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)49 comp_temp = md.results.ThermalSolution.Temperature 50 relative = np.abs((comp_temp - md.initialization.temperature) / md.initialization.temperature) * 100. 51 relative[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) 57 56 if printingflag: 58 59 # set(gcf,'Color','w')60 # printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')61 # 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 ']) 62 61 63 62 #Fields and tolerances to track changes 64 field_names =['AdvectionTemperature']65 field_tolerances =[1e-13]66 field_values =[comp_temp]63 field_names = ['AdvectionTemperature'] 64 field_tolerances = [1e-13] 65 field_values = [comp_temp] -
issm/trunk-jpl/test/NightlyRun/test1303.py
r21408 r23793 1 1 #Test Name: ThermalConduction 2 2 import numpy as np 3 import sys4 3 from model import * 5 4 from socket import gethostname … … 18 17 """ 19 18 20 printingflag =False19 printingflag = False 21 20 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')21 md = model() 22 md = triangle(md, '../Exp/Square.exp', 100000.) 23 md = setmask(md, 'all', '') 24 md = parameterize(md, '../Par/SquareThermal.py') 25 md.extrude(11, 2.) 26 md = setflowequation(md, 'HO', 'all') 28 27 29 28 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)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.pressure = np.zeros((md.mesh.numberofvertices), int) 35 34 36 35 #analytical results 37 #d2T/dz2 =0 T(bed)=10 T(surface)=0 => T=0*(z-bed)/thickness+10*(surface-z)/thickness36 #d2T/dz2 = 0 T(bed)=10 T(surface)=0 => T = 0*(z-bed)/thickness+10*(surface-z)/thickness 38 37 #each layer of the 3d mesh must have a constant value 39 md.initialization.temperature =10.*(md.geometry.surface-md.mesh.z)/md.geometry.thickness38 md.initialization.temperature = 10. * (md.geometry.surface - md.mesh.z) / md.geometry.thickness 40 39 41 40 #modeled results 42 md.cluster =generic('name',gethostname(),'np',2)43 md =solve(md,'Thermal')41 md.cluster = generic('name', gethostname(), 'np', 2) 42 md = solve(md, 'Thermal') 44 43 45 44 #plot results 46 comp_temp =md.results.ThermalSolution.Temperature47 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)45 comp_temp = md.results.ThermalSolution.Temperature 46 relative = np.abs((comp_temp - md.initialization.temperature) / md.initialization.temperature) * 100. 47 relative[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) 53 52 if printingflag: 54 55 # set(gcf,'Color','w')56 # printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')57 # 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 ']) 58 57 59 58 #Fields and tolerances to track changes 60 field_names =['ConductionTemperature']61 field_tolerances =[1e-13]62 field_values =[comp_temp]59 field_names = ['ConductionTemperature'] 60 field_tolerances = [1e-13] 61 field_values = [comp_temp] -
issm/trunk-jpl/test/NightlyRun/test1304.py
r21408 r23793 1 1 #Test Name: ThermalGeothermalFlux 2 2 import numpy as np 3 import sys4 3 from model import * 5 4 from socket import gethostname … … 18 17 """ 19 18 20 printingflag =False19 printingflag = False 21 20 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')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(11, 1.) 26 md = setflowequation(md, 'HO', 'all') 28 27 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^228 pos2 = np.where(np.isnan(md.mesh.upperelements))[0] 29 md.thermal.spctemperature[md.mesh.elements[pos2, 3:6] - 1] = 0. 30 md.initialization.pressure = np.zeros((md.mesh.numberofvertices), int) 31 md.basalforcings.geothermalflux[:] = 0.1 #100mW/m^2 33 32 34 33 #analytical results 35 34 #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/m235 #d2T/dz2 = 0 -k*dT/dz(bed)=G T(surface)=0 => T=-G/k*(z-surface) 36 md.initialization.temperature = -0.1 / md.materials.thermalconductivity * (md.mesh.z - md.geometry.surface) #G = 0.1 W/m2 38 37 39 38 #modeled results 40 md.cluster =generic('name',gethostname(),'np',2)41 md =solve(md,'Thermal')39 md.cluster = generic('name', gethostname(), 'np', 2) 40 md = solve(md, 'Thermal') 42 41 43 42 #plot results 44 comp_temp =md.results.ThermalSolution.Temperature45 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)43 comp_temp = md.results.ThermalSolution.Temperature 44 relative = np.abs((comp_temp - md.initialization.temperature) / md.initialization.temperature) * 100. 45 relative[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) 51 50 if printingflag: 52 53 # set(gcf,'Color','w')54 # printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')55 # 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 ']) 56 55 57 56 #Fields and tolerances to track changes 58 field_names =['GeothermalFluxTemperature']59 field_tolerances =[1e-13]60 field_values =[comp_temp]57 field_names = ['GeothermalFluxTemperature'] 58 field_tolerances = [1e-13] 59 field_values = [comp_temp] -
issm/trunk-jpl/test/NightlyRun/test1501.py
r23707 r23793 1 1 #Test Name: SquareShelfTranSawTooth2d 2 2 import numpy as np 3 import sys4 3 from model import * 5 4 from socket import gethostname … … 13 12 printingflag = False 14 13 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 =False21 22 md.timestepping.time_step =1.23 md.settings.output_frequency =124 md.timestepping.final_time =2000.14 md = triangle(model(), '../Exp/Square.exp', 350000.) 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.transient.isthermal = False 20 21 md.timestepping.time_step = 1. 22 md.settings.output_frequency = 1 23 md.timestepping.final_time = 2000. 25 24 26 25 #Solve for thinning rate -> -1 * surface mass balance 27 smb = 2.*np.ones((md.mesh.numberofvertices))28 md.smb.mass_balance = smb29 md.basalforcings.groundedice_melting_rate = smb30 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)26 smb = 2. * np.ones((md.mesh.numberofvertices)) 27 md.smb.mass_balance = smb 28 md.basalforcings.groundedice_melting_rate = smb 29 30 md = solve(md, 'Masstransport') 31 32 for 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) 36 35 37 36 #Set up transient 38 37 smb = md.smb.mass_balance 39 38 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')]' ] 40 tooth = np.hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400)))) 41 #smb = [ [ones(399, 1)*(smb')]' smb tooth tooth] 42 smb = np.hstack((np.tile(smb, (1, 399)), smb, tooth, tooth)) 44 43 45 44 #md.smb.mass_balance= smb 46 45 #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')46 md.smb.mass_balance = np.vstack((smb, np.arange(1, 2001))) 47 48 md = solve(md, 'Transient') 50 49 51 50 #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 ] 51 field_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'] 56 field_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] 61 field_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] 104 101 105 102 if 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 1 1 #Test Name: SquareShelfTranSawTooth3d 2 2 import numpy as np 3 import sys4 3 from model import * 5 4 from socket import gethostname … … 13 12 printingflag = False 14 13 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 =False22 23 md.timestepping.time_step =1.24 md.settings.output_frequency =125 md.timestepping.final_time =2000.14 md = triangle(model(), '../Exp/Square.exp', 450000.) 15 md = setmask(md, 'all', '') 16 md = parameterize(md, '../Par/SquareShelf.py') 17 md = setflowequation(md, 'SSA', 'all') 18 md.extrude(3, 1.) 19 md.cluster = generic('name', gethostname(), 'np', 2) 20 md.transient.isthermal = False 21 22 md.timestepping.time_step = 1. 23 md.settings.output_frequency = 1 24 md.timestepping.final_time = 2000. 26 25 27 26 #Solve for thinning rate -> -1 * surface mass balance 28 smb = 2.*np.ones((md.mesh.numberofvertices))29 md.smb.mass_balance = smb30 md.basalforcings.groundedice_melting_rate = smb31 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)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) 37 36 38 37 #Set up transient 39 38 smb = md.smb.mass_balance 40 39 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')]' ] 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)) 45 44 46 45 #md.smb.mass_balance= smb 47 46 #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')47 md.smb.mass_balance = np.vstack((smb, np.arange(1, 2001))) 48 49 md = solve(md, 'Transient') 51 50 52 51 #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 ] 52 field_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'] 57 field_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] 62 field_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] 110 107 111 108 if 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 11 11 12 12 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.nan18 md.initialization.vx[:] =0.19 md.initialization.vy[:] =0.20 md.initialization.vel =np.zeros((md.mesh.numberofvertices))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)) 21 21 22 md.cluster =generic('name',gethostname(),'np',2)23 md =solve(md,'Stressbalance')24 vel0 =md.results.StressbalanceSolution.Vel25 theta =30.*np.pi/180.26 x =md.mesh.x27 y =md.mesh.y28 md.mesh.x =np.cos(theta)*x-np.sin(theta)*y29 md.mesh.y =np.sin(theta)*x+np.cos(theta)*y22 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 30 30 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.Vel36 #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)))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: {}".format(np.max(np.abs(vel0 - vel1)) / (np.max(np.abs(vel0)) + sys.float_info.epsilon))) 38 38 39 39 #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.nan42 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.Vel40 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 46 46 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') 48 print("Error between Cartesian and rotated CS: {}".format(np.max(np.abs(vel0 - vel2)) / (np.max(np.abs(vel0)) + sys.float_info.epsilon))) 49 49 50 50 #Fields and tolerances to track changes 51 field_names =['vel1','vel2']52 field_tolerances =[1e-11,1e-11]53 field_values =[vel1,vel2]51 field_names = ['vel1', 'vel2'] 52 field_tolerances = [1e-11, 1e-11] 53 field_values = [vel1, vel2] -
issm/trunk-jpl/test/NightlyRun/test1602.py
r23707 r23793 11 11 12 12 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.nan19 md.initialization.vx[:] =0.20 md.initialization.vy[:] =0.21 md.initialization.vel =np.zeros_like(md.initialization.vx)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) 22 22 23 md.cluster =generic('name',gethostname(),'np',3)24 md =solve(md,'Stressbalance')25 vel0 =md.results.StressbalanceSolution.Vel23 md.cluster = generic('name', gethostname(), 'np', 3) 24 md = solve(md, 'Stressbalance') 25 vel0 = md.results.StressbalanceSolution.Vel 26 26 27 theta =30.*np.pi/180.28 x =md.mesh.x29 y =md.mesh.y30 md.mesh.x =np.cos(theta)*x-np.sin(theta)*y31 md.mesh.y =np.sin(theta)*x+np.cos(theta)*y27 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 32 32 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.Vel33 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 37 37 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) 39 print("Error between Cartesian and rotated CS: {}".format(np.max(np.abs(vel0 - vel1)) / (np.max(np.abs(vel0)) + sys.float_info.epsilon))) 40 40 41 41 #Fields and tolerances to track changes 42 field_names =['vel1']43 field_tolerances =[1e-9]44 field_values =[vel1]42 field_names = ['vel1'] 43 field_tolerances = [1e-9] 44 field_values = [vel1] -
issm/trunk-jpl/test/NightlyRun/test2001.py
r21585 r23793 1 1 #Test Name: SquareSheetConstrainedGia2d 2 2 import numpy as np 3 import copy4 3 from model import * 5 4 from socket import gethostname … … 11 10 12 11 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 13 md = model() 14 md = triangle(md, '../Exp/Square.exp', 100000.) 15 md = setmask(md, '', '') 16 md = parameterize(md, '../Par/SquareSheetConstrained.py') 18 17 19 #Indicate what you want to compute 20 md.gia.cross_section_shape =1 # for square-edged x-section18 #Indicate what you want to compute 19 md.gia.cross_section_shape = 1 # for square-edged x-section 21 20 22 21 #Define loading history (see test2001.m for the description) 23 md.timestepping.start_time =2400000 # 2,400 kyr24 md.timestepping.final_time =2500000 # 2,500 kyr25 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 28 29 22 md.timestepping.start_time = 2400000 # 2, 400 kyr 23 md.timestepping.final_time = 2500000 # 2, 500 kyr 24 md.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 30 29 31 #Solve for GIA deflection 32 md.cluster =generic('name',gethostname(),'np',3)33 md =solve(md,'Gia')30 #Solve for GIA deflection 31 md.cluster = generic('name', gethostname(), 'np', 3) 32 md = solve(md, 'Gia') 34 33 35 34 #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 35 field_names = ['GiaW', 'GiadWdt'] 36 field_tolerances = [1e-13, 1e-13] 37 field_values = [md.results.GiaSolution.GiaW, 38 md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2002.py
r23088 r23793 1 1 #Test Name: EarthSlr 2 2 from model import * 3 from socket import gethostname4 3 import numpy as np 5 4 from parameterize import * … … 12 11 13 12 #mesh earth: 14 md =model()15 md.mesh =gmshplanet('radius',6.371012*10**3,'resolution',700.)#500 km resolution mesh13 md = model() 14 md.mesh = gmshplanet('radius', 6.371012 * 10**3, 'resolution', 700.) #500 km resolution mesh 16 15 17 16 #parameterize slr solution: 18 17 #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))18 md.slr.deltathickness = np.zeros((md.mesh.numberofelements)) 19 md.slr.sealevel = np.zeros((md.mesh.numberofvertices)) 20 md.slr.steric_rate = np.zeros((md.mesh.numberofvertices)) 22 21 23 22 #antarctica 24 late =np.sum(md.mesh.lat[md.mesh.elements-1],axis=1)/325 longe =np.sum(md.mesh.long[md.mesh.elements-1],axis=1)/326 pos =np.where(late <-80)27 md.slr.deltathickness[pos] =-10028 #greenland 29 pos =np.where(np.logical_and.reduce((late > 70,late < 80,longe>-60,longe<-30)))30 md.slr.deltathickness[pos] =-10023 late = np.sum(md.mesh.lat[md.mesh.elements - 1], axis=1) / 3 24 longe = np.sum(md.mesh.long[md.mesh.elements - 1], axis=1) / 3 25 pos = np.where(late < -80) 26 md.slr.deltathickness[pos] = -100 27 #greenland 28 pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30))) 29 md.slr.deltathickness[pos] = -100 31 30 32 31 #elastic loading from love numbers: 33 nlov =10132 nlov = 101 34 33 md.slr.love_h = love_numbers('h')[:nlov] 35 34 md.slr.love_k = love_numbers('k')[:nlov] … … 37 36 38 37 #mask: 39 md.mask =maskpsl()# use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset40 mask =gmtmask(md.mesh.lat,md.mesh.long)38 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset 39 mask = gmtmask(md.mesh.lat, md.mesh.long) 41 40 42 icemask =np.ones((md.mesh.numberofvertices))43 pos =np.where(mask==0)[0]44 icemask[pos] =-145 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]=-147 md.mask.ice_levelset =icemask48 md.mask.ocean_levelset =np.zeros((md.mesh.numberofvertices))49 pos =np.where(md.mask.ice_levelset==1)50 md.mask.ocean_levelset[pos] =141 icemask = np.ones((md.mesh.numberofvertices)) 42 pos = np.where(mask == 0)[0] 43 icemask[pos] = -1 44 pos = np.where(np.sum(mask[md.mesh.elements.astype(int) - 1], axis=1) < 3)[0] 45 icemask[md.mesh.elements[pos, :].astype(int) - 1] = -1 46 md.mask.ice_levelset = icemask 47 md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices)) 48 pos = np.where(md.mask.ice_levelset == 1) 49 md.mask.ocean_levelset[pos] = 1 51 50 52 51 #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))52 md.mask.land_levelset = np.zeros((md.mesh.numberofvertices)) 53 md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices)) 55 54 56 55 #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;56 pos = np.nonzero(md.slr.deltathickness)[0] 57 md.mask.groundedice_levelset[md.mesh.elements[pos, :] - 1] = 1 59 58 60 59 #make sure wherever there is an ice load, that the mask is set to ice: 61 icemask[md.mesh.elements[pos, :]-1]=-162 md.mask.ice_levelset =icemask60 icemask[md.mesh.elements[pos, :] - 1] = -1 61 md.mask.ice_levelset = icemask 63 62 64 md.slr.ocean_area_scaling =063 md.slr.ocean_area_scaling = 0 65 64 66 65 #geometry 67 di =md.materials.rho_ice/md.materials.rho_water68 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.thickness71 md.geometry.bed =md.geometry.base66 di = md.materials.rho_ice / md.materials.rho_water 67 md.geometry.thickness = np.ones((md.mesh.numberofvertices)) 68 md.geometry.surface = (1 - di) * np.zeros((md.mesh.numberofvertices)) 69 md.geometry.base = md.geometry.surface - md.geometry.thickness 70 md.geometry.bed = md.geometry.base 72 71 73 72 #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))73 md.initialization.temperature = 273.25 * np.ones((md.mesh.numberofvertices)) 74 md.materials.rheology_B = paterson(md.initialization.temperature) 75 md.materials.rheology_n = 3 * np.ones((md.mesh.numberofelements)) 77 76 78 77 #New stuff 79 md.slr.spcthickness = np.nan *np.ones((md.mesh.numberofvertices,));78 md.slr.spcthickness = np.nan * np.ones((md.mesh.numberofvertices,)) 80 79 md.slr.Ngia = np.zeros((md.mesh.numberofvertices,)) 81 80 md.slr.Ugia = np.zeros((md.mesh.numberofvertices,)) 82 81 83 82 #Miscellaneous 84 md.miscellaneous.name ='test2002'83 md.miscellaneous.name = 'test2002' 85 84 86 85 #Solution parameters 87 md.slr.reltol =np.nan88 md.slr.abstol =1e-389 md.slr.geodetic =186 md.slr.reltol = np.nan 87 md.slr.abstol = 1e-3 88 md.slr.geodetic = 1 90 89 91 90 #max number of iteration reverted back to 10 (i.e., the original default value) 92 md.slr.maxiter =1091 md.slr.maxiter = 10 93 92 94 #eustatic run: 95 md.slr.rigid =096 md.slr.elastic =097 md.slr.rotation =098 md =solve(md,'Sealevelrise')99 Seustatic =md.results.SealevelriseSolution.Sealevel93 #eustatic run: 94 md.slr.rigid = 0 95 md.slr.elastic = 0 96 md.slr.rotation = 0 97 md = solve(md, 'Sealevelrise') 98 Seustatic = md.results.SealevelriseSolution.Sealevel 100 99 101 #eustatic + rigid run: 102 md.slr.rigid =1103 md.slr.elastic =0104 md.slr.rotation =0105 md =solve(md,'Sealevelrise')106 Srigid =md.results.SealevelriseSolution.Sealevel100 #eustatic + rigid run: 101 md.slr.rigid = 1 102 md.slr.elastic = 0 103 md.slr.rotation = 0 104 md = solve(md, 'Sealevelrise') 105 Srigid = md.results.SealevelriseSolution.Sealevel 107 106 108 #eustatic + rigid + elastic run: 109 md.slr.rigid =1110 md.slr.elastic =1111 md.slr.rotation =0112 md =solve(md,'Sealevelrise')113 Selastic =md.results.SealevelriseSolution.Sealevel107 #eustatic + rigid + elastic run: 108 md.slr.rigid = 1 109 md.slr.elastic = 1 110 md.slr.rotation = 0 111 md = solve(md, 'Sealevelrise') 112 Selastic = md.results.SealevelriseSolution.Sealevel 114 113 115 #eustatic + rigid + elastic + rotation run: 116 md.slr.rigid =1117 md.slr.elastic =1118 md.slr.rotation =1119 md =solve(md,'Sealevelrise')120 Srotation =md.results.SealevelriseSolution.Sealevel114 #eustatic + rigid + elastic + rotation run: 115 md.slr.rigid = 1 116 md.slr.elastic = 1 117 md.slr.rotation = 1 118 md = solve(md, 'Sealevelrise') 119 Srotation = md.results.SealevelriseSolution.Sealevel 121 120 122 121 #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]122 field_names = ['Eustatic', 'Rigid', 'Elastic', 'Rotation'] 123 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 124 field_values = [Seustatic, Srigid, Selastic, Srotation] -
issm/trunk-jpl/test/NightlyRun/test2003.py
r23088 r23793 12 12 #mesh earth: 13 13 md = model() 14 md.mesh = gmshplanet('radius', 6.371012*1e3,'resolution',1000.)#500 km resolution mesh14 md.mesh = gmshplanet('radius', 6.371012 * 1e3, 'resolution', 1000.) #500 km resolution mesh 15 15 16 16 #parameterize slr solution: … … 23 23 #Access every element in lat using the indices in elements 24 24 #-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) / 326 longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 325 late = sum(md.mesh.lat[md.mesh.elements - 1], 1) / 3 26 longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 3 27 27 pos = np.intersect1d(np.array(np.where(late < -75)), np.array(np.where(longe < 0))) 28 28 md.slr.deltathickness[pos] = -1 29 29 30 #elastic loading from love numbers: 30 #elastic loading from love numbers: 31 31 nlov = 1000 32 32 md.slr.love_h = np.array(love_numbers('h')) … … 39 39 40 40 #mask: {{{ 41 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset42 mask = gmtmask(md.mesh.lat, md.mesh.long)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) 43 43 44 44 icemask = np.ones((md.mesh.numberofvertices,)) 45 45 pos = 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 0s46 #pos[0] because np.where(mask = 0) returns a 2d array, the latter parts of which are all array/s of 0s 47 47 icemask[pos[0]] = -1 48 pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3)49 icemask[md.mesh.elements[pos, :] - 1] = -148 pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3) 49 icemask[md.mesh.elements[pos, :] - 1] = -1 50 50 md.mask.ice_levelset = icemask 51 51 md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices,)) … … 58 58 59 59 #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;60 pos = np.nonzero(md.slr.deltathickness)[0] 61 md.mask.groundedice_levelset[md.mesh.elements[pos, :] - 1] = 1 62 62 63 63 #make sure wherever there is an ice load, that the mask is set to ice: 64 icemask[md.mesh.elements[pos, :]-1]=-165 md.mask.ice_levelset =icemask64 icemask[md.mesh.elements[pos, :] - 1] = -1 65 md.mask.ice_levelset = icemask 66 66 # }}} 67 67 68 # use model representation of ocea area (not the ture area) 68 # use model representation of ocea area (not the ture area) 69 69 md.slr.ocean_area_scaling = 0 70 70 … … 85 85 86 86 #New stuff 87 md.slr.spcthickness = np.nan *np.ones((md.mesh.numberofvertices,));87 md.slr.spcthickness = np.nan * np.ones((md.mesh.numberofvertices,)) 88 88 md.slr.Ngia = np.zeros((md.mesh.numberofvertices,)) 89 89 md.slr.Ugia = np.zeros((md.mesh.numberofvertices,)) … … 92 92 md.slr.reltol = float('NaN') 93 93 md.slr.abstol = 1e-3 94 md.slr.geodetic =194 md.slr.geodetic = 1 95 95 96 #eustatic + rigid + elastic run: 96 #eustatic + rigid + elastic run: 97 97 md.slr.rigid = 1 98 98 md.slr.elastic = 1 99 99 md.slr.rotation = 0 100 md.cluster = generic('name', gethostname(),'np',3)100 md.cluster = generic('name', gethostname(), 'np', 3) 101 101 #md.verbose = verbose('111111111') 102 102 #print md.calving … … 105 105 #print md.esa 106 106 #print md.autodiff 107 md = solve(md, 'Sealevelrise')107 md = solve(md, 'Sealevelrise') 108 108 SnoRotation = md.results.SealevelriseSolution.Sealevel 109 109 110 #eustatic + rigid + elastic + rotation run: 110 #eustatic + rigid + elastic + rotation run: 111 111 md.slr.rigid = 1 112 112 md.slr.elastic = 1 113 113 md.slr.rotation = 1 114 md.cluster = generic('name', gethostname(),'np',3)114 md.cluster = generic('name', gethostname(), 'np', 3) 115 115 #md.verbose = verbose('111111111') 116 md = solve(md, 'Sealevelrise')116 md = solve(md, 'Sealevelrise') 117 117 SRotation = md.results.SealevelriseSolution.Sealevel 118 118 … … 121 121 field_tolerances = [1e-13, 1e-13] 122 122 field_values = [SnoRotation, SRotation] 123 -
issm/trunk-jpl/test/NightlyRun/test201.py
r21614 r23793 10 10 from ContourToMesh import * 11 11 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')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') 18 18 19 19 #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 24 25 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] -
issm/trunk-jpl/test/NightlyRun/test2010.py
r23088 r23793 10 10 from gmtmask import * 11 11 12 #mesh earth: 12 #mesh earth: 13 13 md = model() 14 rad_e = 6.371012 *1e3# mean radius of Earth, km15 md.mesh = gmshplanet('radius', rad_e,'resolution',1000.0) # km resolution14 rad_e = 6.371012 * 1e3 # mean radius of Earth, km 15 md.mesh = gmshplanet('radius', rad_e, 'resolution', 1000.0) # km resolution 16 16 17 17 #parameterize slr solution: 18 18 #slr loading: {{{ 19 late = sum(md.mesh.lat[md.mesh.elements - 1], 1) / 320 longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 319 late = sum(md.mesh.lat[md.mesh.elements - 1], 1) / 3 20 longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 3 21 21 22 22 md.slr.deltathickness = np.zeros((md.mesh.numberofelements,)) … … 29 29 md.slr.ocean_area_scaling = 1 30 30 31 #elastic loading from love numbers: 31 #elastic loading from love numbers: 32 32 nlov = 1000 33 33 md.slr.love_h = np.array(love_numbers('h')) … … 40 40 #}}} 41 41 #mask: {{{ 42 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset43 mask = gmtmask(md.mesh.lat, md.mesh.long)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) 44 44 45 45 icemask = np.ones((md.mesh.numberofvertices,)) 46 46 pos = np.where(mask == 0) 47 47 icemask[pos[0]] = -1 48 pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3)49 icemask[md.mesh.elements[pos, :] - 1] = -148 pos = np.where(sum(mask[md.mesh.elements - 1], 1) < 3) 49 icemask[md.mesh.elements[pos, :] - 1] = -1 50 50 md.mask.ice_levelset = icemask 51 51 md.mask.ocean_levelset = np.zeros((md.mesh.numberofvertices,)) … … 58 58 59 59 #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;60 pos = np.nonzero(md.slr.deltathickness)[0] 61 md.mask.groundedice_levelset[md.mesh.elements[pos, :] - 1] = 1 62 62 63 63 #make sure wherever there is an ice load, that the mask is set to ice: 64 icemask[md.mesh.elements[pos, :]-1]=-165 md.mask.ice_levelset =icemask64 icemask[md.mesh.elements[pos, :] - 1] = -1 65 md.mask.ice_levelset = icemask 66 66 # }}} 67 67 #geometry {{{ … … 87 87 88 88 #New stuff 89 md.slr.spcthickness = np.nan *np.ones((md.mesh.numberofvertices,));89 md.slr.spcthickness = np.nan * np.ones((md.mesh.numberofvertices,)) 90 90 md.slr.Ngia = np.zeros((md.mesh.numberofvertices,)) 91 91 md.slr.Ugia = np.zeros((md.mesh.numberofvertices,)) 92 92 93 #eustatic + rigid + elastic run: 93 #eustatic + rigid + elastic run: 94 94 md.slr.rigid = 1 95 95 md.slr.elastic = 1 96 96 md.slr.rotation = 1 97 md.cluster = generic('name', gethostname(),'np',3)97 md.cluster = generic('name', gethostname(), 'np', 3) 98 98 99 # uncomment following 2 lines for 100 md = solve(md, 'Sealevelrise')99 # uncomment following 2 lines for 100 md = solve(md, 'Sealevelrise') 101 101 eus = md.results.SealevelriseSolution.SealevelRSLEustatic 102 102 slr = md.results.SealevelriseSolution.Sealevel 103 103 moixz = md.results.SealevelriseSolution.SealevelInertiaTensorXZ 104 104 moiyz = md.results.SealevelriseSolution.SealevelInertiaTensorYZ 105 moizz = md.results.SealevelriseSolution.SealevelInertiaTensorZZ 105 moizz = md.results.SealevelriseSolution.SealevelInertiaTensorZZ 106 106 107 107 # 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/180108 # ...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 112 112 #moi_xz = sum(-md.materials.rho_freshwater.*md.slr.deltathickness.*areas.*rad_e^2.*sin(lat).*cos(lat).*cos(lon)) 113 113 #moi_yz = sum(-md.materials.rho_freshwater.*md.slr.deltathickness.*areas.*rad_e^2.*sin(lat).*cos(lat).*sin(lon)) … … 115 115 116 116 #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]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] -
issm/trunk-jpl/test/NightlyRun/test202.py
r21408 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')12 md = triangle(model(), '../Exp/Square.exp', 180000) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf.py') 15 md.extrude(3, 2.) 16 md = setflowequation(md, 'SSA', 'all') 17 md.cluster = generic('name', gethostname(), 'np', 3) 18 md = solve(md, 'Stressbalance') 20 19 21 20 22 21 # Fields and tolerances to track changes 23 22 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 ] 23 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 24 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 25 field_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 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')12 md = triangle(model(), '../Exp/Square.exp', 180000) 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) 18 md = solve(md, 'Stressbalance') 20 19 21 20 22 21 # Fields and tolerances to track changes 23 22 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 ] 23 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 24 field_tolerances = [2e-09, 2e-09, 1e-09, 2e-09, 1e-09] 25 field_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 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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 =120 md.timestepping.time_step =021 md1 =solve(md,'Stressbalance')22 md.stressbalance.shelf_dampening =023 md =solve(md,'Stressbalance')12 md = triangle(model(), '../Exp/Square.exp', 180000) 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.cluster = generic('name', gethostname(), 'np', 3) 18 md.stressbalance.shelf_dampening = 1 19 md.timestepping.time_step = 0 20 md1 = solve(md, 'Stressbalance') 21 md.stressbalance.shelf_dampening = 0 22 md = solve(md, 'Stressbalance') 24 23 25 24 26 25 # Fields and tolerances to track changes 27 26 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 ] 27 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 28 field_tolerances = [1e-08, 1e-08, 4e-06, 1e-08, 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] -
issm/trunk-jpl/test/NightlyRun/test205.py
r21408 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')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', '../Exp/SquareHalfRight.exp', 'fill', 'SSA', 'coupling', 'penalties') 17 md.cluster = generic('name', gethostname(), 'np', 3) 18 md = solve(md, 'Stressbalance') 20 19 21 20 22 21 # Fields and tolerances to track changes 23 22 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 ] 23 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 24 field_tolerances = [2e-05, 2e-05, 1e-05, 1e-05, 1e-05] 25 field_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 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000.) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksAB.py') 14 14 15 # indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section15 # indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section 17 17 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 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([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 28 26 29 # solve for GIA deflection 30 md.cluster =generic('name',gethostname(),'np',3)27 # solve for GIA deflection 28 md.cluster = generic('name', gethostname(), 'np', 3) 31 29 md.verbose = verbose('1111111') 32 md = solve(md, 'Gia')30 md = solve(md, 'Gia') 33 31 34 32 #Fields and tolerances to track changes 35 field_names = ['GiaW','GiadWdt']36 field_tolerances = [1e-13, 1e-13]33 field_names = ['GiaW', 'GiadWdt'] 34 field_tolerances = [1e-13, 1e-13] 37 35 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2052.py
r22134 r23793 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksAB.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section 17 17 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 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([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 28 26 29 #solve for GIA deflection 30 md.cluster = generic('name', gethostname(),'np',3)27 #solve for GIA deflection 28 md.cluster = generic('name', gethostname(), 'np', 3) 31 29 md.verbose = verbose('1111111') 32 md = solve(md, 'Gia')30 md = solve(md, 'Gia') 33 31 34 32 #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]33 field_names = ['GiaW', 'GiadWdt'] 34 field_tolerances = [1e-13, 1e-13] 35 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2053.py
r22134 r23793 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksAB.py') 14 14 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 16 md.gia.cross_section_shape = 1 # for square-edged x-section 17 17 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 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([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 28 26 29 #solve for GIA deflection 30 md.cluster = generic('name', gethostname(),'np',3)27 #solve for GIA deflection 28 md.cluster = generic('name', gethostname(), 'np', 3) 31 29 md.verbose = verbose('1111111') 32 md = solve(md, 'Gia')30 md = solve(md, 'Gia') 33 31 34 32 #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]33 field_names = ['GiaW', 'GiadWdt'] 34 field_tolerances = [1e-13, 1e-13] 35 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test206.py
r21408 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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 =019 md.cluster =generic('name',gethostname(),'np',3)20 md =solve(md,'Thermal')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.timestepping.time_step = 0 18 md.cluster = generic('name', gethostname(), 'np', 3) 19 md = solve(md, 'Thermal') 21 20 22 21 23 22 # Fields and tolerances to track changes 24 23 25 field_names =['Temperature','BasalforcingsGroundediceMeltingRate'] 26 field_tolerances=[1e-13,5e-6] 27 field_values=[md.results.ThermalSolution.Temperature, 28 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] 24 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 25 field_tolerances = [1e-13, 5e-6] 26 field_values = [md.results.ThermalSolution.Temperature, md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test207.py
r21408 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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 =False20 md.transient.ismasstransport =False21 md.transient.issmb =True22 md.transient.isthermal =True23 md.transient.isgroundingline =False24 md =solve(md,'Transient')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.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') 25 24 26 25 # 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 ] 26 field_names = ['Temperature1', 'BasalforcingsGroundediceMeltingRate1', 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 'Temperature3', 'BasalforcingsGroundediceMeltingRate3'] 27 field_tolerances = [1e-13, 1e-6, 1e-13, 1e-6, 1e-13, 1e-6] 28 field_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 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section 17 17 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 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([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 27 25 28 #solve for GIA deflection 29 md.cluster = generic('name', gethostname(),'np',3)26 #solve for GIA deflection 27 md.cluster = generic('name', gethostname(), 'np', 3) 30 28 md.verbose = verbose('1111111') 31 md = solve(md, 'Gia')29 md = solve(md, 'Gia') 32 30 33 31 #Fields and tolerances to track changes 34 field_names = ['GiaW','GiadWdt']35 field_tolerances = [1e-13, 1e-13]32 field_names = ['GiaW', 'GiadWdt'] 33 field_tolerances = [1e-13, 1e-13] 36 34 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2072.py
r22134 r23793 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section 17 17 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 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([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 27 25 28 #solve for GIA deflection 29 md.cluster = generic('name', gethostname(),'np',3)26 #solve for GIA deflection 27 md.cluster = generic('name', gethostname(), 'np', 3) 30 28 md.verbose = verbose('1111111') 31 md = solve(md, 'Gia')29 md = solve(md, 'Gia') 32 30 33 31 #Fields and tolerances to track changes 34 field_names = ['GiaW','GiadWdt']35 field_tolerances = [1e-13, 1e-13]32 field_names = ['GiaW', 'GiadWdt'] 33 field_tolerances = [1e-13, 1e-13] 36 34 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2073.py
r22134 r23793 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 1 # for square-edged x-section 17 17 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 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([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 27 25 28 #solve for GIA deflection 29 md.cluster = generic('name', gethostname(),'np',3)26 #solve for GIA deflection 27 md.cluster = generic('name', gethostname(), 'np', 3) 30 28 md.verbose = verbose('1111111') 31 md = solve(md, 'Gia')29 md = solve(md, 'Gia') 32 30 33 31 #Fields and tolerances to track changes 34 field_names = ['GiaW','GiadWdt']35 field_tolerances = [1e-13, 1e-13]32 field_names = ['GiaW', 'GiadWdt'] 33 field_tolerances = [1e-13, 1e-13] 36 34 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test208.py
r21408 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')12 md = triangle(model(), '../Exp/Square.exp', 150000) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf.py') 15 md.basalforcings.floatingice_melting_rate[:] = 1. 16 md = setflowequation(md, 'SSA', 'all') 17 md.cluster = generic('name', gethostname(), 'np', 3) 18 md.transient.requested_outputs = ['default', 'FloatingArea', 'GroundedArea', 'TotalFloatingBmb', 'TotalGroundedBmb'] 19 md = solve(md, 'Transient') 21 20 22 21 23 22 # Fields and tolerances to track changes 24 23 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 ] 24 field_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'] 30 field_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] 36 field_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 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 2 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 2 # for square-edged x-section 17 17 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 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([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 27 25 28 #solve for GIA deflection 29 md.cluster = generic('name', gethostname(),'np',3)26 #solve for GIA deflection 27 md.cluster = generic('name', gethostname(), 'np', 3) 30 28 md.verbose = verbose('1111111') 31 md = solve(md, 'Gia')29 md = solve(md, 'Gia') 32 30 33 31 #Fields and tolerances to track changes 34 field_names = ['GiaW','GiadWdt']35 field_tolerances = [1e-13, 1e-13]32 field_names = ['GiaW', 'GiadWdt'] 33 field_tolerances = [1e-13, 1e-13] 36 34 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2082.py
r22134 r23793 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 2 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 2 # for square-edged x-section 17 17 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 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([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 27 25 28 #solve for GIA deflection 29 md.cluster = generic('name', gethostname(),'np',3)26 #solve for GIA deflection 27 md.cluster = generic('name', gethostname(), 'np', 3) 30 28 md.verbose = verbose('1111111') 31 md = solve(md, 'Gia')29 md = solve(md, 'Gia') 32 30 33 31 #Fields and tolerances to track changes 34 field_names = ['GiaW','GiadWdt']35 field_tolerances = [1e-13, 1e-13]32 field_names = ['GiaW', 'GiadWdt'] 33 field_tolerances = [1e-13, 1e-13] 36 34 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2083.py
r22134 r23793 8 8 from parameterize import * 9 9 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.) 11 md = triangle(model(), '../Exp/RoundFrontEISMINT.exp', 200000) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/GiaIvinsBenchmarksCD.py') 14 14 15 #indicate what you want to compute 16 md.gia.cross_section_shape = 2 # for square-edged x-section15 #indicate what you want to compute 16 md.gia.cross_section_shape = 2 # for square-edged x-section 17 17 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 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([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 27 25 28 #solve for GIA deflection 29 md.cluster = generic('name', gethostname(),'np',3)26 #solve for GIA deflection 27 md.cluster = generic('name', gethostname(), 'np', 3) 30 28 md.verbose = verbose('1111111') 31 md = solve(md, 'Gia')29 md = solve(md, 'Gia') 32 30 33 31 #Fields and tolerances to track changes 34 field_names = ['GiaW','GiadWdt']35 field_tolerances = [1e-13, 1e-13]32 field_names = ['GiaW', 'GiadWdt'] 33 field_tolerances = [1e-13, 1e-13] 36 34 field_values = [md.results.GiaSolution.GiaW, md.results.GiaSolution.GiadWdt] -
issm/trunk-jpl/test/NightlyRun/test2084.py
r23272 r23793 14 14 from materials import * 15 15 16 md =model()17 md.cluster =generic('name',gethostname(),'np',1)16 md = model() 17 md.cluster = generic('name', gethostname(), 'np', 1) 18 18 19 md.materials =materials('litho')20 md.miscellaneous.name ='FourierLoveTest'21 md.groundingline.migration ='None'19 md.materials = materials('litho') 20 md.miscellaneous.name = 'FourierLoveTest' 21 md.groundingline.migration = 'None' 22 22 23 md.verbose =verbose('all')24 cst =365.25*24*3600*100023 md.verbose = verbose('all') 24 cst = 365.25 * 24 * 3600 * 1000 25 25 26 md.materials.numlayers =627 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)*1e329 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)*1e1133 md.materials.viscosity =np.array([0,0,2.0000e+00,1.0000e+00,1.0000e+00,34 1.0000e+25]).reshape(-1,1)*1e2135 md.materials.lame_lambda =np.array(md.materials.lame_mu)*0+5e1436 md.materials.issolid =np.array([1,0,1,1,1,1]).reshape(-1,1)37 md.materials.isburgers =np.zeros((md.materials.numlayers,1))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)) 38 38 39 md.love.allow_layer_deletion =140 md.love.frequencies =(np.array([0])*2*pi).reshape(-1,1)/cst41 md.love.nfreq =len(md.love.frequencies)42 md.love.sh_nmax =25639 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 43 43 44 md.materials.burgers_mu =md.materials.lame_mu45 md.materials.burgers_viscosity =md.materials.viscosity44 md.materials.burgers_mu = md.materials.lame_mu 45 md.materials.burgers_viscosity = md.materials.viscosity 46 46 47 md =solve(md,'lv')47 md = solve(md, 'lv') 48 48 49 49 #Fields and tolerances to track changes 50 50 #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 ] 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 = [np.array(md.results.LoveSolution.LoveHr)[:, 0], 54 np.array(md.results.LoveSolution.LoveKr)[:, 0], 55 np.array(md.results.LoveSolution.LoveLr)[:, 0]] 58 56 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)/cst61 md.love.nfreq =len(md.love.frequencies)62 md.love.sh_nmax =25663 md.materials.burgers_mu =md.materials.lame_mu64 md.materials.burgers_viscosity =md.materials.viscosity57 md.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 59 md.love.nfreq = len(md.love.frequencies) 60 md.love.sh_nmax = 256 61 md.materials.burgers_mu = md.materials.lame_mu 62 md.materials.burgers_viscosity = md.materials.viscosity 65 63 66 md =solve(md,'lv')64 md = solve(md, 'lv') 67 65 68 66 #Fields and tolerances to track changes 69 67 #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 ] 68 field_names += ['LoveH_loading_realpart', 'LoveK_loading_realpart', 'LoveL_loading_realpart', 'LoveH_loading_imagpart', 'LoveK_loading_imagpart', 'LoveL_loading_imagpart'] 69 field_tolerances += [5e-7, 5e-7, 5e-7, 5e-7, 5e-7, 5e-7] 70 field_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)] 80 76 81 md.love.forcing_type =982 md.love.sh_nmin =283 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)77 md.love.forcing_type = 9 78 md.love.sh_nmin = 2 79 md.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) 81 md.love.nfreq = len(md.love.frequencies) 86 82 87 md =solve(md,'lv')83 md = solve(md, 'lv') 88 84 89 85 #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 ] 86 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'] 87 field_tolerances += [8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6, 8e-6] 88 field_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:]] 103 97 104 98 #Many layers PREM-based model 105 #data =load('../Data/PREM_500layers')106 #md.love.sh_nmin =1107 #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)>0112 #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) 113 107 #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) 114 108 #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) … … 119 113 #md.materials.lame_mu(ind(2:end))=[] 120 114 #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.issolid123 #md.materials.burgers_mu =md.materials.lame_mu124 #md.materials.burgers_viscosity =md.materials.viscosity125 #md.materials.isburgers =md.materials.issolid*0126 #md.love.forcing_type =11127 #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') 129 123 # 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 # ] 143 137 #Model VSS96 from Vermeersen, L.L.A., Sabadini, R. & Spada, G., 1996a. Analytical visco-elastic relaxation models, Geophys. Res. Lett., 23, 697-700. 144 138 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)*1e3150 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)*1e11155 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+5e14173 md.materials.issolid =np.ones(len(md.materials.lame_mu)).reshape(-1,1)174 md.materials.issolid[1] =0175 md.materials.numlayers =len(md.materials.lame_mu)176 md.materials.burgers_mu =md.materials.lame_mu177 md.materials.burgers_viscosity =md.materials.viscosity178 md.materials.isburgers =md.materials.issolid*0179 md.love.forcing_type =11180 md.love.sh_nmin =1181 md.love.sh_nmax =100139 md.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 144 md.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 149 md.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) 155 md.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) 166 md.materials.lame_lambda = np.array(md.materials.lame_mu) * 0 + 5e14 167 md.materials.issolid = np.ones(len(md.materials.lame_mu)).reshape(-1, 1) 168 md.materials.issolid[1] = 0 169 md.materials.numlayers = len(md.materials.lame_mu) 170 md.materials.burgers_mu = md.materials.lame_mu 171 md.materials.burgers_viscosity = md.materials.viscosity 172 md.materials.isburgers = md.materials.issolid * 0 173 md.love.forcing_type = 11 174 md.love.sh_nmin = 1 175 md.love.sh_nmax = 100 182 176 183 md =solve(md,'lv')177 md = solve(md, 'lv') 184 178 185 md.love.frequencies =(np.array([0,1e-3,1e-2,1,-1e-3,-1e-2,186 -1])*2*pi).reshape(-1,1)/cst187 md.love.nfreq =len(md.love.frequencies)179 md.love.frequencies = (np.array([0, 1e-3, 1e-2, 1, -1e-3, -1e-2, 180 -1]) * 2 * pi).reshape(-1, 1) / cst 181 md.love.nfreq = len(md.love.frequencies) 188 182 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 ] 183 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'] 184 field_tolerances += [2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6, 2e-6] 185 field_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 1 1 #Test Name: LovenumberstAtDepth. 2 #Same as test #1 of test2084.m 2 #Same as test #1 of test2084.m 3 3 4 4 from model import * … … 10 10 11 11 md = model() 12 md.cluster = generic('name', gethostname(),'np',1)12 md.cluster = generic('name', gethostname(), 'np', 1) 13 13 14 14 md.materials = materials('litho') 15 15 md.miscellaneous.name = 'FourierLoveTest' 16 md.groundingline.migration ='None'16 md.groundingline.migration = 'None' 17 17 18 18 md.verbose = verbose('111111101') 19 cst = 365.25 *24*3600*100019 cst = 365.25 * 24 * 3600 * 1000 20 20 21 21 md.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)*1e323 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)*1e1125 md.materials.viscosity = np.array([0, 0,2.0000e+00,1.0000e+00,1.0000e+00,1.0000e+25]).reshape(-1,1)*1e2126 md.materials.lame_lambda = np.array(md.materials.lame_mu) *0+5e1427 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)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) 29 29 30 md.love.love_kernels = 1 30 md.love.love_kernels = 1 31 31 md.love.allow_layer_deletion = 1 32 md.love.frequencies = (np.array([0]) *2*pi).reshape(-1,1) / cst32 md.love.frequencies = (np.array([0]) * 2 * pi).reshape(-1, 1) / cst 33 33 md.love.nfreq = len(md.love.frequencies) 34 34 md.love.sh_nmax = 2 … … 37 37 md.materials.burgers_viscosity = md.materials.viscosity 38 38 39 md = solve(md, 'lv')39 md = solve(md, 'lv') 40 40 41 41 #Fields and tolerances to track changes 42 42 #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,:,:]] 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 = [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 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')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 = solve(md, 'Transient') 20 19 21 20 22 21 # Fields and tolerances to track changes 23 22 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] 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 = [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] 31 29 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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test210.py
r22318 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')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 = solve(md, 'Transient') 20 19 21 20 22 21 # Fields and tolerances to track changes 23 22 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 ] 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 = [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] 29 field_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 12 12 from gmtmask import * 13 13 14 #mesh earth: 14 #mesh earth: 15 15 md = model() 16 md.mesh = gmshplanet('radius', 6.371012*1e3,'resolution',1000)16 md.mesh = gmshplanet('radius', 6.371012 * 1e3, 'resolution', 1000) 17 17 18 #define load 18 #define load 19 19 md.esa.deltathickness = np.zeros((md.mesh.numberofelements,)) 20 20 pos = 449 … … 23 23 #love numbers: 24 24 nlov = 10000 25 md.esa.love_h = np.array(love_numbers('h')) 25 md.esa.love_h = np.array(love_numbers('h')) #Originally had CM arg 26 26 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 27 md.esa.love_l = np.array(love_numbers('l')) 27 md.esa.love_l = np.array(love_numbers('l')) #Originally had CM arg 28 28 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 29 29 30 30 #mask: {{{ 31 md.mask = maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset32 md.mask.ocean_levelset = gmtmask(md.mesh.lat, md.mesh.long)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) 33 33 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: 35 35 md.mask.ice_levelset = np.ones((md.mesh.numberofvertices,)) 36 36 pos = np.where(md.esa.deltathickness) 37 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -137 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1 38 38 39 #is ice grounded? 39 #is ice grounded? 40 40 md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,)) 41 41 pos = np.where(md.mask.ice_levelset <= 0) 42 42 md.mask.groundedice_levelset[pos] = 1 43 43 44 #make sure ice domain is on the continent: 44 #make sure ice domain is on the continent: 45 45 #pos = np.where(md.mask.ice_levelset <= 0) 46 46 #md.mask.ocean_levelset[pos] = 0 47 47 48 #land mask 48 #land mask 49 49 md.mask.land_levelset = 1 - md.mask.ocean_levelset 50 50 … … 66 66 # }}} 67 67 68 #solve esa 69 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion','EsaEmotion']70 md.cluster = generic('name', gethostname(),'np',3)68 #solve esa 69 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion'] 70 md.cluster = generic('name', gethostname(), 'np', 3) 71 71 md.verbose = verbose('111111111') 72 md = solve(md, 'Esa')72 md = solve(md, 'Esa') 73 73 74 74 #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 75 field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion'] 76 field_tolerances = [1e-13, 1e-13, 1e-13] 77 field_values = [md.results.EsaSolution.EsaUmotion, 78 md.results.EsaSolution.EsaNmotion, 79 md.results.EsaSolution.EsaEmotion] -
issm/trunk-jpl/test/NightlyRun/test211.py
r23684 r23793 10 10 from generic import generic 11 11 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.NaN18 md.cluster =generic('name',gethostname(),'np',3)19 md =solve(md,'Transient')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') 20 20 21 21 22 22 # Fields and tolerances to track changes 23 23 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 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] -
issm/trunk-jpl/test/NightlyRun/test2110.py
r22355 r23793 10 10 from paterson import * 11 11 12 #mesh earth: 12 #mesh earth: 13 13 md = model() 14 md = roundmesh(md, 50000,2000) # radius and element size (meters)14 md = roundmesh(md, 50000, 2000) # radius and element size (meters) 15 15 16 #define load 16 #define load 17 17 md.esa.deltathickness = np.zeros((md.mesh.numberofelements,)) 18 disc_radius = 20 # km18 disc_radius = 20 # km 19 19 index = md.mesh.elements 20 20 x_element = np.mean(md.mesh.x[index - 1], 1) … … 24 24 25 25 #love numbers: 26 nlov = 10000 26 nlov = 10000 # horizontal displacements do not work for low degree truncation, e.g., 101 27 27 md.esa.love_h = np.array(love_numbers('h')) 28 28 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) … … 31 31 32 32 #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: 34 34 md.mask.ice_levelset = np.ones((md.mesh.numberofvertices,)) 35 35 pos = np.where(md.esa.deltathickness) 36 md.mask.ice_levelset[md.mesh.elements[pos, :]-1] = -136 md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = -1 37 37 38 #is ice grounded? 38 #is ice grounded? 39 39 md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,)) 40 40 pos = np.where(md.mask.ice_levelset <= 0) … … 60 60 md.esa.degacc = 0.01 61 61 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 63 md.esa.requested_outputs = ['EsaUmotion', 'EsaXmotion', 'EsaYmotion', 64 'EsaStrainratexx', 'EsaStrainratexy', 'EsaStrainrateyy', 'EsaRotationrate'] 65 md.cluster = generic('name', gethostname(), 'np', 3) 66 66 md.verbose = verbose('111111111') 67 md = solve(md, 'Esa')67 md = solve(md, 'Esa') 68 68 69 69 #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 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 = [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 1 1 #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 3 3 4 4 import numpy as np … … 12 12 #mesh ais: {{{ 13 13 md = model() 14 md = triangle(md, '../Exp/Ais.exp',200000);# max element size14 md = triangle(md, '../Exp/Ais.exp', 200000) # max element size 15 15 # }}} 16 16 #define load: {{{ 17 17 md.esa.deltathickness = np.zeros((md.mesh.numberofelements,)) 18 disc_radius = 500 # km18 disc_radius = 500 # km 19 19 index = md.mesh.elements 20 20 x_element = np.mean(md.mesh.x[index - 1], 1) - 1.0e6 … … 24 24 # }}} 25 25 #love numbers: {{{ 26 nlov = 10000 27 md.esa.love_h = np.array(love_numbers('h', 'CF'))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')) 28 28 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 29 md.esa.love_l = np.array(love_numbers('l', 'CF'))29 md.esa.love_l = np.array(love_numbers('l', 'CF')) 30 30 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 31 31 # }}} 32 32 #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: 34 34 md.mask.ice_levelset = np.ones((md.mesh.numberofvertices,)) 35 35 pos = np.where(md.esa.deltathickness) 36 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -136 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1 37 37 38 #is ice grounded? 38 #is ice grounded? 39 39 md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,)) 40 40 pos = np.where(md.mask.ice_levelset <= 0) … … 54 54 # }}} 55 55 #additional parameters, miscellaneous: {{{ 56 md.miscellaneous.name ='test2111';57 md.esa.degacc =0.01;58 md.esa.hemisphere = -1 ;56 md.miscellaneous.name = 'test2111' 57 md.esa.degacc = 0.01 58 md.esa.hemisphere = -1 59 59 # }}} 60 60 61 61 #solve esa: {{{ 62 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion','EsaEmotion','EsaXmotion','EsaYmotion']63 md.cluster = generic('name', gethostname(),'np',3)62 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion'] 63 md.cluster = generic('name', gethostname(), 'np', 3) 64 64 md.verbose = verbose('111111111') 65 md = solve(md, 'Esa')65 md = solve(md, 'Esa') 66 66 # }}} 67 67 #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 ] 68 field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion'] 69 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 70 field_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] 77 75 # }}} 78 -
issm/trunk-jpl/test/NightlyRun/test2112.py
r22350 r23793 1 1 #Test Name: Esa2Dsurface 2 #AIS 2 -- load centered at the south pole! 3 2 #AIS 2 -- load centered at the south pole! 4 3 import numpy as np 5 4 from model import * … … 12 11 #mesh ais: {{{ 13 12 md = model() 14 md = triangle(md, '../Exp/Ais.exp',100000);# max element size13 md = triangle(md, '../Exp/Ais.exp', 100000) # max element size 15 14 # }}} 16 15 #define load: {{{ 17 16 md.esa.deltathickness = np.zeros((md.mesh.numberofelements,)) 18 disc_radius = 500 # km17 disc_radius = 500 # km 19 18 index = md.mesh.elements 20 19 x_element = np.mean(md.mesh.x[index - 1], 1) … … 24 23 # }}} 25 24 #love numbers: {{{ 26 nlov = 10000 27 md.esa.love_h = np.array(love_numbers('h', 'CF'))25 nlov = 10000 # horizontal displacements do not work for low degree truncation, e.g., 101 26 md.esa.love_h = np.array(love_numbers('h', 'CF')) 28 27 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 29 md.esa.love_l = np.array(love_numbers('l', 'CF'))28 md.esa.love_l = np.array(love_numbers('l', 'CF')) 30 29 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 31 30 # }}} 32 31 #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: 34 33 md.mask.ice_levelset = np.ones((md.mesh.numberofvertices,)) 35 34 pos = np.where(md.esa.deltathickness) 36 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -135 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1 37 36 38 #is ice grounded? 37 #is ice grounded? 39 38 md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,)) 40 39 pos = np.where(md.mask.ice_levelset <= 0) … … 54 53 # }}} 55 54 #additional parameters, miscellaneous: {{{ 56 md.miscellaneous.name ='test2112';57 md.esa.degacc =0.01;58 md.esa.hemisphere = -1 ;55 md.miscellaneous.name = 'test2112' 56 md.esa.degacc = 0.01 57 md.esa.hemisphere = -1 59 58 # }}} 60 59 61 60 #solve esa: {{{ 62 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion','EsaEmotion','EsaXmotion','EsaYmotion']63 md.cluster = generic('name', gethostname(),'np',3)61 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion'] 62 md.cluster = generic('name', gethostname(), 'np', 3) 64 63 md.verbose = verbose('111111111') 65 md = solve(md, 'Esa')64 md = solve(md, 'Esa') 66 65 # }}} 67 66 #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 ] 67 field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion', 'EsaXmotion', 'EsaYmotion'] 68 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 69 field_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] 77 74 # }}} 78 -
issm/trunk-jpl/test/NightlyRun/test2113.py
r22358 r23793 1 1 #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 4 4 5 5 import numpy as np … … 13 13 #mesh ais: {{{ 14 14 md = model() 15 md = triangle(md, '../Exp/Ais.exp',200000);# max element size15 md = triangle(md, '../Exp/Ais.exp', 200000) # max element size 16 16 # }}} 17 17 #define load: {{{ 18 18 md.esa.deltathickness = np.zeros((md.mesh.numberofelements,)) 19 disc_radius = 500 # km19 disc_radius = 500 # km 20 20 index = md.mesh.elements 21 21 x_element = np.mean(md.mesh.x[index - 1], 1) - 1.0e6 … … 25 25 # }}} 26 26 #love numbers: {{{ 27 nlov = 10000 28 md.esa.love_h = np.array(love_numbers('h', 'CF'))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')) 29 29 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 30 md.esa.love_l = np.array(love_numbers('l', 'CF'))30 md.esa.love_l = np.array(love_numbers('l', 'CF')) 31 31 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 32 32 # }}} 33 33 #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: 35 35 md.mask.ice_levelset = np.ones((md.mesh.numberofvertices,)) 36 36 pos = np.where(md.esa.deltathickness) 37 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -137 md.mask.ice_levelset[md.mesh.elements[pos, :]] = -1 38 38 39 #is ice grounded? 39 #is ice grounded? 40 40 md.mask.groundedice_levelset = -np.ones((md.mesh.numberofvertices,)) 41 41 pos = np.where(md.mask.ice_levelset <= 0) … … 55 55 # }}} 56 56 #additional parameters, miscellaneous: {{{ 57 md.miscellaneous.name ='test2113';58 md.esa.degacc =0.01;59 md.esa.hemisphere = 1 ; # AIS is placed in Northern Hemisphere57 md.miscellaneous.name = 'test2113' 58 md.esa.degacc = 0.01 59 md.esa.hemisphere = 1 # AIS is placed in Northern Hemisphere 60 60 # }}} 61 61 62 62 #solve esa: {{{ 63 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion','EsaEmotion']64 md.cluster = generic('name', gethostname(),'np',3)63 md.esa.requested_outputs = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion'] 64 md.cluster = generic('name', gethostname(), 'np', 3) 65 65 md.verbose = verbose('111111111') 66 md = solve(md, 'Esa')66 md = solve(md, 'Esa') 67 67 # }}} 68 68 #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 ] 69 field_names = ['EsaUmotion', 'EsaNmotion', 'EsaEmotion'] 70 field_tolerances = [1e-13, 1e-13, 1e-13] 71 field_values = [md.results.EsaSolution.EsaUmotion, 72 md.results.EsaSolution.EsaNmotion, 73 md.results.EsaSolution.EsaEmotion] 76 74 # }}} 77 -
issm/trunk-jpl/test/NightlyRun/test212.py
r23785 r23793 10 10 from generic import generic 11 11 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')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') 16 16 17 17 # control parameters 18 18 19 md.inversion.iscontrol =120 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 =224 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.vx30 md.inversion.vy_obs =md.initialization.vy19 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 31 31 32 32 33 md.cluster =generic('name',gethostname(),'np',3)34 md =solve(md,'Stressbalance')33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 35 35 36 36 37 37 # Fields and tolerances to track changes 38 38 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 43 44 45 46 47 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] -
issm/trunk-jpl/test/NightlyRun/test213.py
r23785 r23793 1 1 #Test Name: SquareShelfCMBSSA3d 2 3 2 from model import * 4 3 from socket import gethostname … … 11 10 from generic import generic 12 11 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')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, 'SSA', 'all') 18 17 19 18 20 19 # control parameters 20 md.inversion.iscontrol = 1 21 md.inversion.control_parameters = ['MaterialsRheologyBbar'] 22 md.inversion.min_parameters = 10**6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 23 md.inversion.max_parameters = 2. * 10**9 * 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 = 10**7 * 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 21 32 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 33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 39 35 40 36 # Fields and tolerances to track changes 41 37 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] 38 field_names = ['Gradient', 'Misfits', 'MaterialsRheologyBbar', 'Pressure', 'Vel', 'Vx', 'Vy'] 39 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 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] -
issm/trunk-jpl/test/NightlyRun/test214.py
r23785 r23793 11 11 from generic import generic 12 12 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')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 18 19 19 20 20 # control parameters 21 md.inversion.iscontrol = 1 22 md.inversion.control_parameters = ['MaterialsRheologyBbar'] 23 md.inversion.min_parameters = 1e6 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 24 md.inversion.max_parameters = 2. * 1e9 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 25 md.inversion.nsteps = 2 26 md.inversion.cost_functions = [101] 27 md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions))) 28 md.inversion.gradient_scaling = 1e7 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters))) 29 md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps)) 30 md.inversion.step_threshold = 0.3 * np.ones((md.inversion.nsteps)) 31 md.inversion.vx_obs = md.initialization.vx 32 md.inversion.vy_obs = md.initialization.vy 21 33 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') 34 md.cluster = generic('name', gethostname(), 'np', 3) 35 md = solve(md, 'Stressbalance') 38 36 39 37 40 38 # Fields and tolerances to track changes 41 39 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 46 47 48 49 50 40 field_names = ['Gradient', 'Misfits', 'MaterialsRheologyBbar', 'Pressure', 'Vel', 'Vx', 'Vy'] 41 field_tolerances = [1e-07, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08] 42 field_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 10 10 from generic import generic 11 11 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')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 17 18 18 19 19 # control parameters 20 md.inversion.iscontrol =121 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 =225 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.vx31 md.inversion.vy_obs =md.initialization.vy20 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 32 32 33 md.cluster =generic('name',gethostname(),'np',3)34 md =solve(md,'Stressbalance')33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 35 35 36 36 37 37 # 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]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] -
issm/trunk-jpl/test/NightlyRun/test216.py
r22579 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from meshprocessrifts import * … … 12 11 from generic import generic 13 12 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)13 md = triangle(model(), '../Exp/SquareHole.exp', '../Exp/Rifts.exp', 50000.) 14 md = meshprocessrifts(md, '../Exp/Square.exp') 15 md = setmask(md, 'all', '') 16 md = parameterize(md, '../Par/SquareShelf2.py') 17 md = setflowequation(md, 'SSA', 'all') 18 md.cluster = generic('name', gethostname(), 'np', 3) 20 19 21 20 # rift settings 22 21 23 md.rifts.riftstruct[0]['fill'] ='Melange'24 md.rifts.riftstruct[0]['fraction'] =025 md.stressbalance.rift_penalty_lock =226 md.stressbalance.rift_penalty_threshold =027 md.rifts.riftstruct[0]['fractionincrement'] =0.128 md =solve(md,'Stressbalance')22 md.rifts.riftstruct[0]['fill'] = 'Melange' 23 md.rifts.riftstruct[0]['fraction'] = 0 24 md.stressbalance.rift_penalty_lock = 2 25 md.stressbalance.rift_penalty_threshold = 0 26 md.rifts.riftstruct[0]['fractionincrement'] = 0.1 27 md = solve(md, 'Stressbalance') 29 28 30 29 # Fields and tolerances to track changes 31 30 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 ] 31 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 32 field_tolerances = [9e-7, 7e-8, 9e-8, 2e-11] 33 field_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 11 11 from generic import generic 12 12 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)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) 18 18 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, 21 21 # from 0 m/yr at the grounding line. 22 22 23 23 # tighten 24 md.stressbalance.restol =1e-424 md.stressbalance.restol = 1e-4 25 25 26 26 # 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)27 ymin = min(md.mesh.y) 28 ymax = max(md.mesh.y) 29 xmin = min(md.mesh.x) 30 xmax = max(md.mesh.x) 31 31 32 di =md.materials.rho_ice/md.materials.rho_water32 di = md.materials.rho_ice / md.materials.rho_water 33 33 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.thickness37 md.geometry.surface =md.geometry.base+md.geometry.thickness34 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 38 38 39 39 # 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))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)) 44 44 45 45 # 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))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)) 49 49 50 50 # 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))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)) 54 54 55 55 # 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] =058 md.stressbalance.spcvz[pos] =np.nan56 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 59 59 60 60 # constrain grounding line to 0 velocity 61 pos =np.where(md.mesh.y==ymin)62 md.stressbalance.spcvx[pos] =063 md.stressbalance.spcvy[pos] =061 pos = np.where(md.mesh.y == ymin) 62 md.stressbalance.spcvx[pos] = 0 63 md.stressbalance.spcvy[pos] = 0 64 64 65 65 # icefront 66 nodeonicefront =np.zeros(md.mesh.numberofvertices)67 pos =np.where(md.mesh.y==ymax)68 nodeonicefront[pos] =169 md.mask.ice_levelset =-1+nodeonicefront66 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 70 70 71 md =solve(md,'Stressbalance')71 md = solve(md, 'Stressbalance') 72 72 73 73 # create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292. 74 74 # 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.yts75 # vy_c = ey_c.*md.mesh.y*md.constants.yts 76 76 77 77 # Fields and tolerances to track changes 78 field_names =['Vy']79 field_tolerances =[1e-13]80 field_values =[md.results.StressbalanceSolution.Vy]78 field_names = ['Vy'] 79 field_tolerances = [1e-13] 80 field_values = [md.results.StressbalanceSolution.Vy] -
issm/trunk-jpl/test/NightlyRun/test218.py
r23130 r23793 22 22 from verbose import * 23 23 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)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) 29 29 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, 32 32 #from 0 m/yr at the grounding line. 33 33 … … 67 67 68 68 #constrain grounding line to 0 velocity 69 pos = np.where(md.mesh.y == ymin)69 pos = np.where(md.mesh.y == ymin) 70 70 md.stressbalance.spcvx[pos] = 0. 71 71 md.stressbalance.spcvy[pos] = 0. … … 73 73 #partitioning 74 74 md.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).T75 md = partitioner(md, 'package', 'linear', 'npart', md.qmu.numberofpartitions) 76 md.qmu.partition = (md.qmu.partition - 1.).reshape(-1, 1).T 77 77 78 78 #Dakota options … … 81 81 version = IssmConfig('_DAKOTA_VERSION_') 82 82 # returns tuple "(u'6.2',)" -> unicode string '6.2', convert to float 83 version =float(version[0])83 version = float(version[0]) 84 84 85 85 #variables 86 md.qmu.variables.rheology_B = normal_uncertain.normal_uncertain('scaled_MaterialsRheologyB', 1,.05)86 md.qmu.variables.rheology_B = normal_uncertain.normal_uncertain('scaled_MaterialsRheologyB', 1, .05) 87 87 88 88 #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])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]) 90 90 91 91 #method … … 97 97 98 98 if version >= 6: 99 100 101 99 md.qmu.params.analysis_driver = 'matlab' 100 md.qmu.params.evaluation_scheduling = 'master' 101 md.qmu.params.processors_per_evaluation = 2 102 102 else: 103 104 103 md.qmu.params.analysis_driver = 'stressbalance' 104 md.qmu.params.evaluation_concurrency = 1 105 105 106 106 107 #imperative! 108 md.stressbalance.reltol = 10**-10 #tighten for qmu analysis107 #imperative! 108 md.stressbalance.reltol = 10**-10 #tighten for qmu analysis 109 109 md.qmu.isdakota = 1 110 110 111 111 #solve 112 md.verbose = verbose('000000000') 113 md = solve(md, 'Stressbalance','overwrite','y')112 md.verbose = verbose('000000000') # this line is recommended 113 md = solve(md, 'Stressbalance', 'overwrite', 'y') 114 114 115 115 #Fields and tolerances to track changes 116 116 md.qmu.results = md.results.dakota 117 md.results.dakota.importancefactors = importancefactors(md, 'scaled_MaterialsRheologyB','MaxVel').reshape(-1,1)117 md.results.dakota.importancefactors = importancefactors(md, 'scaled_MaterialsRheologyB', 'MaxVel').reshape(-1, 1) 118 118 field_names = ['importancefactors'] 119 119 field_tolerances = [1e-10] 120 field_values =[md.results.dakota.importancefactors]120 field_values = [md.results.dakota.importancefactors] -
issm/trunk-jpl/test/NightlyRun/test219.py
r22545 r23793 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')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', '../Exp/SquareHalfRight.exp', 'fill', 'SSA') 17 md.cluster = generic('name', gethostname(), 'np', 3) 18 md = solve(md, 'Stressbalance') 20 19 21 20 # Fields and tolerances to track changes 22 21 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 ] 22 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 23 field_tolerances = [5e-09, 5e-09, 5e-09, 5e-09, 1e-13] 24 field_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 3 3 from model import * 4 4 from socket import gethostname 5 import numpy as np6 5 from triangle import * 7 6 from setmask import * … … 11 10 from generic import generic 12 11 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')12 md = triangle(model(), '../Exp/Square.exp', 120000.) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf2.py') 15 md.extrude(2, 1.) 16 md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'HO') 17 md.cluster = generic('name', gethostname(), 'np', 3) 18 md = solve(md, 'Stressbalance') 20 19 21 20 # Fields and tolerances to track changes 22 21 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 ] 22 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 23 field_tolerances = [1e-09, 1e-09, 5e-06, 1e-09, 1e-09] 24 field_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 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [1e-09, 1e-09, 5e-06, 1e-09, 1e-09] 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] -
issm/trunk-jpl/test/NightlyRun/test222.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_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'] 26 field_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] 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] -
issm/trunk-jpl/test/NightlyRun/test223.py
r21408 r23793 9 9 10 10 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')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') 20 20 21 21 #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 ] 22 field_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'] 28 field_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] 34 field_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 9 9 10 10 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')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') 19 19 20 20 #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 ] 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 = [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] 27 field_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 9 9 10 10 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')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') 21 21 22 22 #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 ] 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 = [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] 29 field_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 9 9 10 10 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')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') 19 19 20 20 #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 ] 21 field_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'] 27 field_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] 33 field_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 9 9 10 10 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)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 17 md.timestepping = timesteppingadaptive(md.timestepping) 18 md.timestepping.final_time =20.19 md =solve(md,'Transient')18 md.timestepping.final_time = 20. 19 md = solve(md, 'Transient') 20 20 21 21 #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 ] 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 = [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] 28 field_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 10 10 11 11 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)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 17 18 md.timestepping.time_step =1.19 md.settings.output_frequency =120 md.timestepping.final_time =4.18 md.timestepping.time_step = 1. 19 md.settings.output_frequency = 1 20 md.timestepping.final_time = 4. 21 21 22 22 #Set up transient 23 smb =np.ones((md.mesh.numberofvertices))*3.624 smb =np.vstack((smb,smb*-1.)).T23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * -1.)).T 25 25 26 md.smb.mass_balance =np.vstack((smb,[1.5,3.]))27 md.transient.isthermal =False26 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 27 md.transient.isthermal = False 28 28 29 md =solve(md,'Transient')29 md = solve(md, 'Transient') 30 30 31 31 #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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 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] -
issm/trunk-jpl/test/NightlyRun/test229.py
r21408 r23793 10 10 11 11 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)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 17 18 md.timestepping.time_step =1.19 md.settings.output_frequency =120 md.timestepping.final_time =4.18 md.timestepping.time_step = 1. 19 md.settings.output_frequency = 1 20 md.timestepping.final_time = 4. 21 21 22 22 #Set up transient 23 smb =np.ones((md.mesh.numberofvertices))*3.624 smb =np.vstack((smb,smb*2.)).T23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * 2.)).T 25 25 26 md.smb.mass_balance =np.vstack((smb,[1.5,3.]))27 md.transient.isthermal =False26 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 27 md.transient.isthermal = False 28 28 29 md =solve(md,'Transient')29 md = solve(md, 'Transient') 30 30 31 31 #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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 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] -
issm/trunk-jpl/test/NightlyRun/test230.py
r21408 r23793 10 10 11 11 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)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) 18 18 19 md.timestepping.time_step =1.20 md.settings.output_frequency =121 md.timestepping.final_time =4.19 md.timestepping.time_step = 1. 20 md.settings.output_frequency = 1 21 md.timestepping.final_time = 4. 22 22 23 23 #Set up transient 24 smb =np.ones((md.mesh.numberofvertices))*3.625 smb =np.vstack((smb,smb*-1.)).T24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * -1.)).T 26 26 27 md.smb.mass_balance =np.vstack((smb,[1.5,3.]))28 md.transient.isthermal =False27 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 28 md.transient.isthermal = False 29 29 30 md =solve(md,'Transient')30 md = solve(md, 'Transient') 31 31 32 32 #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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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] -
issm/trunk-jpl/test/NightlyRun/test231.py
r21408 r23793 10 10 11 11 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)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) 18 18 19 md.timestepping.time_step =1.20 md.settings.output_frequency =121 md.timestepping.final_time =4.19 md.timestepping.time_step = 1. 20 md.settings.output_frequency = 1 21 md.timestepping.final_time = 4. 22 22 23 23 #Set up transient 24 smb =np.ones((md.mesh.numberofvertices))*3.625 smb =np.vstack((smb,smb*2.)).T24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * 2.)).T 26 26 27 md.smb.mass_balance =np.vstack((smb,[1.5,3.]))28 md.transient.isthermal =False27 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 28 md.transient.isthermal = False 29 29 30 md =solve(md,'Transient')30 md = solve(md, 'Transient') 31 31 32 32 #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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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] -
issm/trunk-jpl/test/NightlyRun/test232.py
r21408 r23793 10 10 11 11 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') 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, 19 md.thermal.spctemperature + 5., 20 md.thermal.spctemperature + 10., 21 md.thermal.spctemperature + 15.)).T, [1.5, 2.5, 3.5, 4.])) 22 md.timestepping.time_step = 1. 23 md.timestepping.final_time = 4. 24 md.transient.isstressbalance = False 25 md.transient.ismasstransport = False 26 md.transient.issmb = True 27 md.transient.isthermal = True 28 md.transient.isgroundingline = False 29 md = solve(md, 'Transient') 27 30 28 31 #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 36 37 38 39 40 41 32 field_names = ['Temperature1', 'BasalforcingsGroundediceMeltingRate1', 33 'Temperature2', 'BasalforcingsGroundediceMeltingRate2', 34 'Temperature3', 'BasalforcingsGroundediceMeltingRate3', 35 'Temperature4', 'BasalforcingsGroundediceMeltingRate4'] 36 field_tolerances = [1e-13, 1e-6, 1e-13, 1e-6, 1e-13, 1e-6, 1e-13, 1e-6] 37 field_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 10 10 11 11 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.520 md.timestepping.final_time =2.21 md =solve(md,'Transient')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') 22 22 23 23 #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]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] -
issm/trunk-jpl/test/NightlyRun/test234.py
r23707 r23793 1 1 #Test Name: SquareShelfTranForceNeg2dDakotaSamp 2 2 import numpy as np 3 import scipy.io as spio4 3 from os import getcwd 5 4 from IssmConfig import IssmConfig … … 15 14 from dmeth_params_set import * 16 15 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)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) 22 21 23 22 md.timestepping.time_step = 1 … … 25 24 md.timestepping.final_time = 4 26 25 27 smb = np.ones((md.mesh.numberofvertices,)) *3.628 smb = np.array([smb, smb*-1]).T26 smb = np.ones((md.mesh.numberofvertices,)) * 3.6 27 smb = np.array([smb, smb * -1]).T 29 28 30 29 md.smb.mass_balance = smb 31 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5,3]]))30 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]])) 32 31 md.transient.isthermal = 0 33 32 … … 40 39 #partitioning 41 40 md.qmu.numberofpartitions = 20 42 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')41 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 43 42 md.qmu.partition = md.qmu.partition - 1 44 43 45 44 #variables 46 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1,0.1)45 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 0.1) 47 46 48 47 #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])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]) 57 56 58 57 #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']58 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp'] 60 59 md.qmu.mass_flux_profile_directory = getcwd() 61 60 62 # #nond_sampling study61 # nond_sampling study 63 62 md.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')63 md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'lhs') 65 64 dver = 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')65 if ((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') 68 67 69 68 #parameters … … 75 74 76 75 if version >= 6: 77 78 79 76 md.qmu.params.analysis_driver = 'matlab' 77 md.qmu.params.evaluation_scheduling = 'master' 78 md.qmu.params.processors_per_evaluation = 2 80 79 else: 81 82 80 md.qmu.params.analysis_driver = 'stressbalance' 81 md.qmu.params.evaluation_concurrency = 1 83 82 84 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses83 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 85 84 md.transient.requested_outputs = ['IceVolume'] 86 85 87 86 #solve 88 md.verbose = verbose('000000000') 89 md = solve(md, 'Transient','overwrite','y')87 md.verbose = verbose('000000000') # this line is recommended 88 md = solve(md, 'Transient', 'overwrite', 'y') 90 89 md.qmu.results = md.results.dakota 91 90 … … 93 92 md.results.dakota.moments = [] 94 93 for i in range(8): 95 94 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean) 96 95 97 96 for i in range(8): 98 97 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev) 99 98 100 field_names 99 field_names = ['moments'] 101 100 field_tolerances = [1e-11] 102 101 field_values = [md.results.dakota.moments] -
issm/trunk-jpl/test/NightlyRun/test235.py
r23707 r23793 1 1 #Test Name: SquareShelfTranForceNeg2dDakotaLocal 2 2 import numpy as np 3 import scipy.io as spio4 3 from os import getcwd 5 4 from model import * … … 15 14 from dmeth_params_set import * 16 15 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)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) 22 21 23 22 md.timestepping.time_step = 1 … … 25 24 md.timestepping.final_time = 4 26 25 27 smb = np.ones((md.mesh.numberofvertices,)) *3.628 smb = np.array([smb, smb*-1]).T26 smb = np.ones((md.mesh.numberofvertices,)) * 3.6 27 smb = np.array([smb, smb * -1]).T 29 28 30 29 md.smb.mass_balance = smb 31 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5,3]]))30 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]])) 32 31 md.transient.isthermal = 0 33 32 … … 40 39 #partitioning 41 40 md.qmu.numberofpartitions = 20 42 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')41 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 43 42 md.qmu.partition = md.qmu.partition - 1 44 43 45 44 #variables 46 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1,100)45 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 100) 47 46 48 47 #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])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]) 57 56 58 57 #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']58 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp'] 60 59 md.qmu.mass_flux_profile_directory = getcwd() 61 60 … … 71 70 72 71 if version >= 6: 73 74 75 72 md.qmu.params.analysis_driver = 'matlab' 73 md.qmu.params.evaluation_scheduling = 'master' 74 md.qmu.params.processors_per_evaluation = 2 76 75 else: 77 78 76 md.qmu.params.analysis_driver = 'stressbalance' 77 md.qmu.params.evaluation_concurrency = 1 79 78 80 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses79 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 81 80 md.transient.requested_outputs = ['IceVolume'] 82 81 83 82 #solve 84 md.verbose = verbose('000000000') 85 md = solve(md, 'Transient','overwrite','y')83 md.verbose = verbose('000000000') # this line is recommended 84 md = solve(md, 'Transient', 'overwrite', 'y') 86 85 md.qmu.results = md.results.dakota 87 86 … … 89 88 md.results.dakota.moments = [] 90 89 for i in range(8): 91 90 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean) 92 91 93 92 for i in range(8): 94 93 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev) 95 94 96 field_names 95 field_names = ['moments'] 97 96 field_tolerances = [1e-11] 98 97 field_values = [md.results.dakota.moments] -
issm/trunk-jpl/test/NightlyRun/test236.py
r23707 r23793 10 10 11 11 12 md =triangle(model(),'../Exp/Square.exp',150000.)13 md =setmask(md,'all','')14 md =parameterize(md,'../Par/SquareShelf.py')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf.py') 15 15 16 16 # Use of ispdd and isdelta18o methods 17 17 md.smb = SMBpdd() 18 md.smb.isdelta18o =119 md.smb.ismungsm =018 md.smb.isdelta18o = 1 19 md.smb.ismungsm = 0 20 20 21 21 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 22 22 # creating delta18o 23 delta18o =np.loadtxt('../Data/delta18o.data')24 md.smb.delta18o =delta18o23 delta18o = np.loadtxt('../Data/delta18o.data') 24 md.smb.delta18o = delta18o 25 25 # creating delta18oSurface 26 md.smb.delta18o_surface = np.zeros((2, np.size(delta18o,axis=1)))27 md.smb.delta18o_surface[1, :] = delta18o[1,:]26 md.smb.delta18o_surface = np.zeros((2, np.size(delta18o, axis=1))) 27 md.smb.delta18o_surface[1, :] = delta18o[1, :] 28 28 29 29 # creating Present day and lgm temperatures 30 30 # 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.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. 37 37 # 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.) 40 40 41 41 # 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)).T44 itemp =np.arange(0,md.timestepping.final_time,md.timestepping.time_step)45 md.thermal.spctemperature =np.vstack((md.thermal.spctemperature,itemp))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)) 46 46 47 md.initialization.temperature =md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0] #*ones(md.mesh.numberofvertices,1)47 md.initialization.temperature = md.smb.temperatures_lgm[0:md.mesh.numberofvertices, 0] #*ones(md.mesh.numberofvertices, 1) 48 48 md.smb.initialize(md) 49 49 50 50 # 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.555 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.557 md.smb.precipitations_lgm[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)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.) 58 58 59 59 # 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)))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))) 62 62 # 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))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)) 65 65 66 66 # time steps and resolution 67 md.timestepping.time_step =20.68 md.timestepping.final_time =60.67 md.timestepping.time_step = 20. 68 md.timestepping.final_time = 60. 69 69 70 70 71 71 # 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')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') 76 76 77 77 #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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 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] -
issm/trunk-jpl/test/NightlyRun/test237.py
r23707 r23793 11 11 from generic import generic 12 12 13 md =triangle(model(),'../Exp/Square.exp',600000) #18000014 md =setmask(md,'all','')15 md =parameterize(md,'../Par/SquareShelf.py')13 md = triangle(model(), '../Exp/Square.exp', 600000) #180000 14 md = setmask(md, 'all', '') 15 md = parameterize(md, '../Par/SquareShelf.py') 16 16 17 17 # Use of ispdd and isdelta18o methods 18 18 md.smb = SMBpdd() 19 md.smb.isdelta18o =020 md.smb.ismungsm =119 md.smb.isdelta18o = 0 20 md.smb.ismungsm = 1 21 21 22 22 # time steps and resolution 23 md.timestepping.time_step =20.24 md.settings.output_frequency =125 md.timestepping.final_time =60.23 md.timestepping.time_step = 20. 24 md.settings.output_frequency = 1 25 md.timestepping.final_time = 60. 26 26 27 27 # creating Present day and lgm temperatures 28 28 # 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.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. 35 35 # 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.) 38 38 39 39 # 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)).T42 itemp =np.arange(0,md.timestepping.final_time,md.timestepping.time_step)43 md.thermal.spctemperature =np.vstack((md.thermal.spctemperature,itemp))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)) 44 44 45 md.initialization.temperature =md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0] #*ones(md.mesh.numberofvertices,1)45 md.initialization.temperature = md.smb.temperatures_lgm[0:md.mesh.numberofvertices, 0] #*ones(md.mesh.numberofvertices, 1) 46 46 md.smb.initialize(md) 47 47 48 48 # 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.553 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.555 md.smb.precipitations_lgm[md.mesh.numberofvertices, imonth]=((float(imonth)+1.)/12.)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.) 56 56 57 fsize =int(md.timestepping.final_time/md.timestepping.time_step)+258 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):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): 62 62 # 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 67 md.smb.Pfac[1,iint]=(float(iint))*2068 md.smb.Tdiff[1,iint]=(float(iint))*2069 md.smb.sealev[1,iint]=(float(iint))*2063 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 70 70 71 71 # 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')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') 77 77 78 78 #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 ] 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 = [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 2 2 import numpy as np 3 3 from model import * … … 10 10 11 11 12 md =triangle(model(),'../Exp/Square.exp',150000.)13 md =setmask(md,'all','')14 md =parameterize(md,'../Par/SquareShelf.py')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf.py') 15 15 16 16 # Use of ispdd and isdelta18o methods 17 17 md.smb = SMBd18opdd() 18 md.smb.isd18opd =118 md.smb.isd18opd = 1 19 19 20 20 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 21 21 # creating delta18o 22 delta18o =np.loadtxt('../Data/delta18o.data')23 md.smb.delta18o =delta18o22 delta18o = np.loadtxt('../Data/delta18o.data') 23 md.smb.delta18o = delta18o 24 24 25 25 # creating Present day temperatures 26 26 # 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]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] 31 31 # 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.) 33 33 34 34 # 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-1037 md.initialization.temperature =md.thermal.spctemperature35 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 38 38 md.smb.initialize(md) 39 39 40 40 # 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.544 md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth]=(float(imonth)/12.)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.) 45 45 46 46 # time steps and resolution 47 md.timestepping.time_step =2048 md.settings.output_frequency =149 md.timestepping.final_time =6047 md.timestepping.time_step = 20 48 md.settings.output_frequency = 1 49 md.timestepping.final_time = 60 50 50 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 # 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') 56 56 57 57 #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 ] 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 = [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 2 2 import numpy as np 3 3 from model import * … … 10 10 11 11 12 md =triangle(model(),'../Exp/Square.exp',150000.)13 md =setmask(md,'all','')14 md =parameterize(md,'../Par/SquareShelf.py')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf.py') 15 15 16 16 # Use of ispdd and isdelta18o methods 17 17 md.smb = SMBd18opdd() 18 md.smb.isd18opd =118 md.smb.isd18opd = 1 19 19 20 20 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 21 21 # creating delta18o 22 delta18o =np.loadtxt('../Data/delta18o.data')23 md.smb.delta18o =delta18o22 delta18o = np.loadtxt('../Data/delta18o.data') 23 md.smb.delta18o = delta18o 24 24 25 25 # creating Present day temperatures 26 26 # 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]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] 31 31 # 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.) 33 33 34 34 # 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-1037 md.initialization.temperature =md.thermal.spctemperature35 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 38 38 md.smb.initialize(md) 39 39 40 40 # 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.544 md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth]=((float(imonth)+1.)/12.)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.) 45 45 46 46 # time steps and resolution 47 md.timestepping.time_step =0.548 md.settings.output_frequency =149 md.timestepping.final_time =247 md.timestepping.time_step = 0.5 48 md.settings.output_frequency = 1 49 md.timestepping.final_time = 2 50 50 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 # 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') 56 56 57 57 #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 ] 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 = [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 2 2 import numpy as np 3 3 from model import * … … 10 10 11 11 12 md =triangle(model(),'../Exp/Square.exp',150000.)13 md =setmask(md,'all','')14 md =parameterize(md,'../Par/SquareShelf.py')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, 'all', '') 14 md = parameterize(md, '../Par/SquareShelf.py') 15 15 16 16 # Use of ispdd and isdelta18o methods 17 17 md.smb = SMBd18opdd() 18 md.smb.isd18opd =118 md.smb.isd18opd = 1 19 19 20 20 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 21 21 # creating delta18o 22 delta18o =np.loadtxt('../Data/delta18o.data')23 md.smb.delta18o =delta18o22 delta18o = np.loadtxt('../Data/delta18o.data') 23 md.smb.delta18o = delta18o 24 24 25 25 # creating Present day temperatures 26 26 # 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]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] 31 31 # 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.) 33 33 34 34 # 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-1037 md.initialization.temperature =md.thermal.spctemperature35 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 38 38 md.smb.initialize(md) 39 39 40 40 # 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.544 md.smb.precipitations_presentday[md.mesh.numberofvertices, imonth]=((float(imonth)+1.)/12.)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.) 45 45 46 46 # time steps and resolution 47 md.timestepping.time_step =0.548 md.settings.output_frequency =149 md.timestepping.final_time =250 md.timestepping.interp_forcings =047 md.timestepping.time_step = 0.5 48 md.settings.output_frequency = 1 49 md.timestepping.final_time = 2 50 md.timestepping.interp_forcings = 0 51 51 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 # 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') 57 57 58 58 #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 ] 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 = [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 10 10 11 11 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)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 17 18 md.timestepping.time_step =1.19 md.settings.output_frequency =120 md.timestepping.final_time =4.21 md.timestepping.interp_forcings =False18 md.timestepping.time_step = 1. 19 md.settings.output_frequency = 1 20 md.timestepping.final_time = 4. 21 md.timestepping.interp_forcings = False 22 22 23 23 #Set up transient 24 smb =np.ones((md.mesh.numberofvertices))*3.625 smb =np.vstack((smb,smb*-1.)).T24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * -1.)).T 26 26 27 md.smb.mass_balance =np.vstack((smb,[1.5,3.]))28 md.transient.isthermal =False27 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 28 md.transient.isthermal = False 29 29 30 md =solve(md,'Transient')30 md = solve(md, 'Transient') 31 31 32 32 #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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 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] -
issm/trunk-jpl/test/NightlyRun/test242.py
r21408 r23793 10 10 11 11 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)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) 18 18 19 md.timestepping.time_step =1.20 md.settings.output_frequency =121 md.timestepping.final_time =4.22 md.timestepping.interp_forcings =False19 md.timestepping.time_step = 1. 20 md.settings.output_frequency = 1 21 md.timestepping.final_time = 4. 22 md.timestepping.interp_forcings = False 23 23 24 24 #Set up transient 25 smb =np.ones((md.mesh.numberofvertices))*3.626 smb =np.vstack((smb,smb*-1.)).T25 smb = np.ones((md.mesh.numberofvertices)) * 3.6 26 smb = np.vstack((smb, smb * -1.)).T 27 27 28 md.smb.mass_balance =np.vstack((smb,[1.5,3.]))29 md.transient.isthermal =False28 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 29 md.transient.isthermal = False 30 30 31 md =solve(md,'Transient')31 md = solve(md, 'Transient') 32 32 33 33 #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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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] -
issm/trunk-jpl/test/NightlyRun/test2424.py
r22267 r23793 10 10 from newforcing import * 11 11 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')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 16 md.initialization.vx[:] = 0. 17 17 md.initialization.vy[:] = 0. 18 18 md.smb.mass_balance[:] = 0. 19 19 20 md.geometry.base = -700. - np.abs(md.mesh.y -500000.) / 1000.21 md.geometry.bed = -700. - np.abs(md.mesh.y -500000.) / 1000.20 md.geometry.base = -700. - np.abs(md.mesh.y - 500000.) / 1000. 21 md.geometry.bed = -700. - np.abs(md.mesh.y - 500000.) / 1000. 22 22 md.geometry.thickness[:] = 1000. 23 23 md.geometry.surface = md.geometry.base + md.geometry.thickness … … 27 27 md.transient.isthermal = 0 28 28 md.groundingline.migration = 'AggressiveMigration' 29 md.transient.requested_outputs = ['IceVolume', 'IceVolumeAboveFloatation','Sealevel']29 md.transient.requested_outputs = ['IceVolume', 'IceVolumeAboveFloatation', 'Sealevel'] 30 30 31 31 md.timestepping.time_step = .1 32 32 md.slr.sealevel = newforcing(md.timestepping.start_time, md.timestepping.final_time, 33 33 md.timestepping.time_step, -200., 200., md.mesh.numberofvertices) 34 34 35 md.cluster = generic('name', gethostname(),'np',3)36 md = solve(md, 'Transient')35 md.cluster = generic('name', gethostname(), 'np', 3) 36 md = solve(md, 'Transient') 37 37 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 40 40 41 41 nsteps = len(md.results.TransientSolution) … … 45 45 #time is off by the year constant 46 46 for 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 9 9 from solve import * 10 10 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')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 15 md.initialization.vx[:] = 0. 16 16 md.initialization.vy[:] = 0. … … 26 26 md.timestepping.final_time = 1 27 27 28 md.cluster = generic('name', gethostname(),'np',3)29 md = solve(md, 'Transient')28 md.cluster = generic('name', gethostname(), 'np', 3) 29 md = solve(md, 'Transient') 30 30 vel1 = md.results.TransientSolution[-1].Vel 31 31 32 #get same results with offset in bed and sea level: 32 #get same results with offset in bed and sea level: 33 33 md.geometry.base = -700. - (md.mesh.y - 500000.) / 1000. 34 md.geometry.bed 34 md.geometry.bed = -700. - (md.mesh.y - 500000.) / 1000. 35 35 md.geometry.thickness[:] = 1300. 36 36 md.geometry.surface = md.geometry.base + md.geometry.thickness … … 41 41 md.slr.sealevel = 1000 * np.ones((md.mesh.numberofvertices,)) 42 42 43 md = solve(md, 'Transient','checkconsistency','no')43 md = solve(md, 'Transient', 'checkconsistency', 'no') 44 44 vel2 = md.results.TransientSolution[-1].Vel 45 45 46 46 #Fields and tolerances to track changes 47 field_names = ['Vel','Veloffset'] 48 field_tolerances = [1e-13,1e-13] 49 field_values = [vel1,vel2] 50 47 field_names = ['Vel', 'Veloffset'] 48 field_tolerances = [1e-13, 1e-13] 49 field_values = [vel1, vel2] -
issm/trunk-jpl/test/NightlyRun/test243.py
r23753 r23793 11 11 from SMBgemb import * 12 12 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')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') 17 17 md.materials.rho_ice = 910 18 md.cluster = generic('name', gethostname(),'np',3)18 md.cluster = generic('name', gethostname(), 'np', 3) 19 19 20 20 #Use of Gemb method for SMB computation 21 21 md.smb = SMBgemb() 22 md.smb.setdefaultparameters(md.mesh, md.geometry)22 md.smb.setdefaultparameters(md.mesh, md.geometry) 23 23 md.smb.dsnowIdx = 0 24 24 25 25 #load hourly surface forcing date from 1979 to 2009: 26 26 if sys.version_info.major == 2: 27 inputs = np.load('../Data/gemb_input.npy').item()27 inputs = np.load('../Data/gemb_input.npy').item() 28 28 else: 29 inputs = np.load('../Data/gemb_input.npy',encoding='bytes').item()29 inputs = np.load('../Data/gemb_input.npy', encoding='bytes').item() 30 30 31 31 #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()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() 44 44 45 45 #smb settings 46 md.smb.requested_outputs = ['SmbDz', 'SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbEC','SmbA','SmbMassBalance','SmbMAdd','SmbDzAdd','SmbFAC']46 md.smb.requested_outputs = ['SmbDz', 'SmbT', 'SmbD', 'SmbRe', 'SmbGdn', 'SmbGsp', 'SmbEC', 'SmbA', 'SmbMassBalance', 'SmbMAdd', 'SmbDzAdd', 'SmbFAC'] 47 47 48 48 #only run smb core: … … 58 58 59 59 #Run transient 60 md = solve(md, 'Transient')60 md = solve(md, 'Transient') 61 61 62 62 #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]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] 65 65 #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 ] 66 field_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 19 19 from dmeth_params_set import * 20 20 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')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') 25 25 md.materials.rho_ice = 910 26 md.cluster = generic('name', gethostname(),'np',3)26 md.cluster = generic('name', gethostname(), 'np', 3) 27 27 md.geometry.bed = md.geometry.base 28 28 29 29 # Use of Gemb method for SMB computation 30 30 md.smb = SMBgemb() 31 md.smb.setdefaultparameters(md.mesh, md.geometry)31 md.smb.setdefaultparameters(md.mesh, md.geometry) 32 32 md.smb.dsnowIdx = 0 33 33 34 34 #load hourly surface forcing date from 1979 to 2009: 35 inputs = spio.loadmat('../Data/gemb_input.mat', squeeze_me =True)35 inputs = spio.loadmat('../Data/gemb_input.mat', squeeze_me=True) 36 36 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: 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() 50 50 51 51 #smb settings 52 md.smb.requested_outputs = ['SmbDz', 'SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbEC','SmbA','SmbMassBalance']52 md.smb.requested_outputs = ['SmbDz', 'SmbT', 'SmbD', 'SmbRe', 'SmbGdn', 'SmbGsp', 'SmbEC', 'SmbA', 'SmbMassBalance'] 53 53 54 #only run smb core: 54 #only run smb core: 55 55 md.transient.isstressbalance = 0 56 56 md.transient.ismasstransport = 1 57 57 md.transient.isthermal = 0 58 58 59 #time stepping: 59 #time stepping: 60 60 md.timestepping.start_time = 1965. 61 61 md.timestepping.final_time = 1965.75 62 md.timestepping.time_step = 1. /365.062 md.timestepping.time_step = 1. / 365.0 63 63 md.timestepping.interp_forcings = 0. 64 64 … … 69 69 #partitioning 70 70 md.qmu.numberofpartitions = md.mesh.numberofelements 71 md = partitioner(md, 'package','linear')72 md.qmu.partition = (md.qmu.partition - 1).reshape(-1, 1).T71 md = partitioner(md, 'package', 'linear') 72 md.qmu.partition = (md.qmu.partition - 1).reshape(-1, 1).T 73 73 74 74 #variables 75 md.qmu.variables.surface_mass_balanceC = normal_uncertain.normal_uncertain('scaled_SmbC', 1,0.5)75 md.qmu.variables.surface_mass_balanceC = normal_uncertain.normal_uncertain('scaled_SmbC', 1, 0.5) 76 76 Tmin = 273. 77 telms = np.atleast_2d(np.min(md.smb.Ta[0:-1, :],1))77 telms = np.atleast_2d(np.min(md.smb.Ta[0:-1, :], 1)) 78 78 mint_on_partition = telms.flatten() 79 79 for pa in range(np.size(mint_on_partition)): 80 81 mint = telms[vi]*1.0582 83 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]) 85 85 86 86 mint_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)87 md.qmu.variables.surface_mass_balanceTa = uniform_uncertain.uniform_uncertain('scaled_SmbTa', 1, 0.05) 88 88 md.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)89 md.qmu.variables.surface_mass_balanceTa[0].upper = np.maximum(np.minimum(np.maximum(1.05, mint_on_partition), 0.9999), 0.0001) 90 90 91 91 #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])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]) 95 95 96 96 # nond_sampling study 97 97 md.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')98 md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 3, 'sample_type', 'lhs') 99 99 dver = 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')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') 102 102 103 103 #parameters … … 109 109 110 110 if version >= 6: 111 112 113 111 md.qmu.params.analysis_driver = 'matlab' 112 md.qmu.params.evaluation_scheduling = 'master' 113 md.qmu.params.processors_per_evaluation = 2 114 114 else: 115 116 115 md.qmu.params.analysis_driver = 'stressbalance' 116 md.qmu.params.evaluation_concurrency = 1 117 117 118 118 119 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses120 md.transient.requested_outputs = ['IceVolume', 'TotalSmb','IceMass']119 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 120 md.transient.requested_outputs = ['IceVolume', 'TotalSmb', 'IceMass'] 121 121 122 122 #solve 123 md.verbose = verbose('000000000') 124 md = solve(md, 'Transient','overwrite','y')123 md.verbose = verbose('000000000') # this line is recommended 124 md = solve(md, 'Transient', 'overwrite', 'y') 125 125 md.qmu.results = md.results.dakota 126 126 … … 128 128 md.results.dakota.moments = [] 129 129 for i in range(3): 130 130 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean) 131 131 132 132 for i in range(3): 133 133 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev) 134 134 135 135 field_names = ['moments'] 136 136 field_tolerances = [1e-11] 137 137 field_values = [md.results.dakota.moments] 138 -
issm/trunk-jpl/test/NightlyRun/test245.py
r23785 r23793 11 11 from SMBpddSicopolis import * 12 12 13 md = triangle(model(), '../Exp/Square.exp',150000.)14 md = setmask(md, 'all','')15 md = parameterize(md, '../Par/SquareShelf.py')13 md = triangle(model(), '../Exp/Square.exp', 150000.) 14 md = setmask(md, 'all', '') 15 md = parameterize(md, '../Par/SquareShelf.py') 16 16 17 17 # Use of SMBpddSicopolis 18 md.smb =SMBpddSicopolis()18 md.smb = SMBpddSicopolis() 19 19 # initalize pdd fields 20 20 md.smb.initialize(md) 21 md.smb.s0p = md.geometry.surface.reshape(-1, 1)22 md.smb.s0t = md.geometry.surface.reshape(-1, 1)21 md.smb.s0p = md.geometry.surface.reshape(-1, 1) 22 md.smb.s0t = md.geometry.surface.reshape(-1, 1) 23 23 24 # 25 md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices +1,12))26 md.smb.precipitation = np.empty((md.mesh.numberofvertices +1,12))24 25 md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices + 1, 12)) 26 md.smb.precipitation = np.empty((md.mesh.numberofvertices + 1, 12)) 27 27 temp_ma_present = -10. * np.ones((md.mesh.numberofvertices,)) - md.smb.rlaps * md.geometry.surface / 1000. 28 28 temp_mj_present = 10. * np.ones((md.mesh.numberofvertices,)) - md.smb.rlaps * md.geometry.surface / 1000. 29 29 precipitation = 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] = precipitation34 md.smb.precipitation[md.mesh.numberofvertices,imonth] = ((imonth+1)/12.)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.) 35 35 36 36 # time steps and resolution … … 44 44 md.transient.isthermal = 0 45 45 46 md.transient.requested_outputs = ['default', 'TemperaturePDD']47 md.cluster = generic('name', gethostname(),'np',1)# 3 for the cluster48 md = solve(md, 'Transient')46 md.transient.requested_outputs = ['default', 'TemperaturePDD'] 47 md.cluster = generic('name', gethostname(), 'np', 1) # 3 for the cluster 48 md = solve(md, 'Transient') 49 49 50 50 #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 51 field_names = ['TemperaturePDD1', 'SmbMassBalance1', 'TemperaturePDD2', 'SmbMassBalance2'] 52 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 53 field_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 1 1 #Test Name: SquareShelfTranForceNeg2dDakotaSampLinearPart 2 2 import numpy as np 3 import scipy.io as spio4 3 from os import getcwd 5 4 from model import * … … 14 13 from dmeth_params_set import * 15 14 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)15 md = triangle(model(), '../Exp/Square.exp', 180000.) 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) 21 20 22 21 md.timestepping.time_step = 1 … … 24 23 md.timestepping.final_time = 4 25 24 26 smb = np.ones((md.mesh.numberofvertices,)) *3.627 smb = np.array([smb, smb*-1]).T25 smb = np.ones((md.mesh.numberofvertices,)) * 3.6 26 smb = np.array([smb, smb * -1]).T 28 27 29 md.smb.mass_balance = 30 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5,3]]))28 md.smb.mass_balance = smb 29 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]])) 31 30 md.transient.isthermal = 0 32 31 #Dakota options … … 38 37 #partitioning 39 38 md.qmu.numberofpartitions = md.mesh.numberofvertices 40 md = partitioner(md, 'package','linear')41 md.qmu.partition = md.qmu.partition -139 md = partitioner(md, 'package', 'linear') 40 md.qmu.partition = md.qmu.partition - 1 42 41 43 42 #variables 44 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1,0.1)43 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 0.1) 45 44 46 45 #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])46 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]) 47 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]) 48 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]) 49 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]) 50 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]) 51 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]) 52 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]) 53 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]) 55 54 56 55 #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']56 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp'] 58 57 md.qmu.mass_flux_profile_directory = getcwd() 59 58 60 # #nond_sampling study59 # nond_sampling study 61 60 md.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')61 md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'lhs') 63 62 dver = 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')63 if ((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') 66 65 67 66 #parameters … … 73 72 74 73 if version >= 6: 75 76 77 74 md.qmu.params.analysis_driver = 'matlab' 75 md.qmu.params.evaluation_scheduling = 'master' 76 md.qmu.params.processors_per_evaluation = 2 78 77 else: 79 80 78 md.qmu.params.analysis_driver = 'stressbalance' 79 md.qmu.params.evaluation_concurrency = 1 81 80 82 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses81 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 83 82 md.transient.requested_outputs = ['IceVolume'] 84 83 85 84 #solve 86 md.verbose = verbose('000000000') 87 md = solve(md, 'Transient','overwrite','y')85 md.verbose = verbose('000000000') # this line is recommended 86 md = solve(md, 'Transient', 'overwrite', 'y') 88 87 md.qmu.results = md.results.dakota 89 88 … … 91 90 md.results.dakota.moments = [] 92 91 for i in range(8): 93 92 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean) 94 93 95 94 for i in range(8): 96 95 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev) 97 96 98 97 field_names = ['moments'] -
issm/trunk-jpl/test/NightlyRun/test251.py
r23130 r23793 1 1 #Test Name: SquareShelfTranForceNeg2dDakotaLocalLinearPart 2 2 import numpy as np 3 import scipy.io as spio4 3 from os import getcwd 5 4 from model import * … … 14 13 from dmeth_params_set import * 15 14 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)15 md = triangle(model(), '../Exp/Square.exp', 180000.) 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) 21 20 22 21 md.timestepping.time_step = 1 … … 24 23 md.timestepping.final_time = 4 25 24 26 smb = np.ones((md.mesh.numberofvertices,)) *3.627 smb = np.array([smb, smb*-1]).T25 smb = np.ones((md.mesh.numberofvertices,)) * 3.6 26 smb = np.array([smb, smb * -1]).T 28 27 29 md.smb.mass_balance = 30 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5,3]]))28 md.smb.mass_balance = smb 29 md.smb.mass_balance = np.concatenate((md.smb.mass_balance, [[1.5, 3]])) 31 30 md.transient.isthermal = 0 32 31 … … 39 38 #partitioning 40 39 md.qmu.numberofpartitions = md.mesh.numberofvertices 41 md = partitioner(md, 'package','linear')42 md.qmu.partition = md.qmu.partition -140 md = partitioner(md, 'package', 'linear') 41 md.qmu.partition = md.qmu.partition - 1 43 42 44 43 #variables 45 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1,100)44 md.qmu.variables.surface_mass_balance = normal_uncertain.normal_uncertain('scaled_SmbMassBalance', 1, 100) 46 45 47 46 #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])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]) 56 55 57 56 #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']57 md.qmu.mass_flux_profiles = ['../Exp/MassFlux1.exp', '../Exp/MassFlux2.exp', '../Exp/MassFlux3.exp', '../Exp/MassFlux4.exp', '../Exp/MassFlux5.exp', '../Exp/MassFlux6.exp'] 59 58 md.qmu.mass_flux_profile_directory = getcwd() 60 59 … … 70 69 71 70 if version >= 6: 72 73 74 71 md.qmu.params.analysis_driver = 'matlab' 72 md.qmu.params.evaluation_scheduling = 'master' 73 md.qmu.params.processors_per_evaluation = 2 75 74 else: 76 77 75 md.qmu.params.analysis_driver = 'stressbalance' 76 md.qmu.params.evaluation_concurrency = 1 78 77 79 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses78 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 80 79 md.transient.requested_outputs = ['IceVolume'] 81 80 82 81 #solve 83 md.verbose = verbose('000000000') 84 md = solve(md, 'Transient','overwrite','y')82 md.verbose = verbose('000000000') # this line is recommended 83 md = solve(md, 'Transient', 'overwrite', 'y') 85 84 md.qmu.results = md.results.dakota 86 85 … … 88 87 md.results.dakota.moments = [] 89 88 for i in range(8): 90 89 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean) 91 90 92 91 for i in range(8): 93 92 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev) 94 93 95 94 field_names = ['moments'] -
issm/trunk-jpl/test/NightlyRun/test260.py
r22267 r23793 10 10 from matenhancedice import * 11 11 12 md = triangle(model(), '../Exp/Square.exp',150000.)13 md = setmask(md, 'all','')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, 'all', '') 14 14 md.materials = matenhancedice() 15 15 md.materials.rheology_B = 3.15e8 * np.ones(md.mesh.numberofvertices,) 16 16 md.materials.rheology_n = 3 * np.ones(md.mesh.numberofelements,) 17 17 md.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')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') 22 22 23 23 #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 ] 24 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 25 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 26 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/test261.py
r22267 r23793 10 10 from matenhancedice import * 11 11 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)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) 18 18 md.materials = matenhancedice() 19 19 md.materials.rheology_B = 3.15e8 * np.ones(md.mesh.numberofvertices,) … … 25 25 md.transient.isthermal = 1 26 26 md.transient.isgroundingline = 0 27 md = solve(md, 'Transient')27 md = solve(md, 'Transient') 28 28 29 29 #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 ] 30 field_names = ['Vx', 'Vy', 'Vel', 'Temperature', 'BasalforcingsGroundediceMeltingRate'] 31 field_tolerances = [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].Temperature, 36 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test270.py
r21411 r23793 10 10 from matdamageice import matdamageice 11 11 from generic import generic 12 from socket import gethostname13 12 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 =119 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')13 md = triangle(model(), '../Exp/Square.exp', 150000.) 14 md = setmask(md, 'all', '') 15 md.materials = matdamageice() 16 md = parameterize(md, '../Par/SquareShelf.py') 17 md.damage.isdamage = 1 18 md.damage.D = 0.5 * np.ones(md.mesh.numberofvertices) 19 md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices) 20 md = setflowequation(md, 'SSA', 'all') 21 md.cluster = generic('name', gethostname(), 'np', 3) 22 md = solve(md, 'Stressbalance') 24 23 25 24 #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 30 31 25 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 26 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 27 field_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 8 8 from setflowequation import setflowequation 9 9 from solve import solve 10 from socket import gethostname11 10 from matdamageice import matdamageice 12 11 from generic import generic 13 12 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 =119 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')13 md = triangle(model(), '../Exp/Square.exp', 150000.) 14 md = setmask(md, 'all', '') 15 md.materials = matdamageice() 16 md = parameterize(md, '../Par/SquareShelf.py') 17 md.damage.isdamage = 1 18 md.damage.D = 0.5 * np.ones(md.mesh.numberofvertices) 19 md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices) 20 md = setflowequation(md, 'SSA', 'all') 22 21 23 22 #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 23 md.inversion.iscontrol = 1 24 md.inversion.control_parameters = ['DamageDbar'] 25 md.inversion.iscontrol = 1 26 md.inversion.control_parameters = ['DamageDbar'] 27 md.inversion.min_parameters = 10**-13 * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 28 md.inversion.max_parameters = np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 29 md.inversion.nsteps = 2 30 md.inversion.cost_functions = [101] 31 md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions))) 32 md.inversion.gradient_scaling = 0.9 * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters))) 33 md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps)) 34 md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps)) 35 md.inversion.vx_obs = md.initialization.vx 36 md.inversion.vy_obs = md.initialization.vy 36 37 37 md.cluster =generic('name',gethostname(),'np',3)38 md =solve(md,'Stressbalance')38 md.cluster = generic('name', gethostname(), 'np', 3) 39 md = solve(md, 'Stressbalance') 39 40 40 41 #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 45 46 47 48 49 42 field_names = ['Gradient', 'Misfits', 'DamageDbar', 'Pressure', 'Vel', 'Vx', 'Vy'] 43 field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12] 44 field_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 10 10 from matdamageice import matdamageice 11 11 from generic import generic 12 from socket import gethostname13 12 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 =119 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)13 md = triangle(model(), '../Exp/Square.exp', 150000.) 14 md = setmask(md, 'all', '') 15 md.materials = matdamageice() 16 md = parameterize(md, '../Par/SquareShelf.py') 17 md.damage.isdamage = 1 18 md.damage.D = 0. * np.ones(md.mesh.numberofvertices) 19 md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices) 20 md = setflowequation(md, 'SSA', 'all') 21 md.cluster = generic('name', gethostname(), 'np', 3) 23 22 24 md.stressbalance.requested_outputs =['default','NewDamage']25 md.damage.stress_threshold =1.3e526 md.damage.kappa =2.823 md.stressbalance.requested_outputs = ['default', 'NewDamage'] 24 md.damage.stress_threshold = 1.3e5 25 md.damage.kappa = 2.8 27 26 28 md =solve(md,'Stressbalance')27 md = solve(md, 'Stressbalance') 29 28 30 29 #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 35 36 37 30 field_names = ['Vx', 'Vy', 'Vel', 'Pressure', 'NewDamage'] 31 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 32 field_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 8 8 from setflowequation import setflowequation 9 9 from solve import solve 10 from socket import gethostname11 10 from matdamageice import matdamageice 12 11 from meshprocessrifts import meshprocessrifts 13 12 from generic import generic 14 13 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 =121 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')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.materials = matdamageice() 18 md = parameterize(md, '../Par/SquareShelf2.py') 19 md.damage.isdamage = 1 20 md.damage.D = 0.5 * np.ones(md.mesh.numberofvertices) 21 md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices) 22 md = setflowequation(md, 'SSA', 'all') 24 23 25 md.cluster =generic('name',gethostname(),'np',3)24 md.cluster = generic('name', gethostname(), 'np', 3) 26 25 print(md.rifts.riftstruct[0]['fill']) 27 md =solve(md,'Stressbalance')26 md = solve(md, 'Stressbalance') 28 27 29 28 #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 34 35 29 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 30 field_tolerances = [7e-8, 3e-8, 3e-8, 1e-11] 31 field_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 2 2 import numpy as np 3 3 from triangle import triangle … … 6 6 from setmask import setmask 7 7 from parameterize import parameterize 8 from verbose import verbose9 8 from setflowequation import setflowequation 10 9 from generic import generic 11 from socket import gethostname12 10 from solve import solve 13 11 from matdamageice import matdamageice 14 12 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 =120 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 =113 md = triangle(model(), '../Exp/Square.exp', 150000.) 14 md = setmask(md, 'all', '') 15 md.materials = matdamageice() 16 md = parameterize(md, '../Par/SquareShelf.py') 17 md.damage.isdamage = 1 18 md.damage.D = 0.1 * np.ones(md.mesh.numberofvertices) 19 md.damage.spcdamage = np.nan * np.ones(md.mesh.numberofvertices) 20 md.damage.law = 1 23 21 24 md.damage.c1 =1.e-1125 md.damage.c2 =0.426 md.damage.c3 =1.e-327 md.damage.healing =0.428 md.damage.stress_threshold =1.e529 md.damage.stabilization =122 md.damage.c1 = 1.e-11 23 md.damage.c2 = 0.4 24 md.damage.c3 = 1.e-3 25 md.damage.healing = 0.4 26 md.damage.stress_threshold = 1.e5 27 md.damage.stabilization = 1 30 28 31 md.damage.requested_outputs =['default','DamageF']29 md.damage.requested_outputs = ['default', 'DamageF'] 32 30 33 md =setflowequation(md,'SSA','all')34 md.cluster =generic('name',gethostname(),'np',3)35 md =solve(md,'DamageEvolution')31 md = setflowequation(md, 'SSA', 'all') 32 md.cluster = generic('name', gethostname(), 'np', 3) 33 md = solve(md, 'DamageEvolution') 36 34 37 field_names =['D','F']38 field_tolerances =[1.e-13,1.e-13]39 field_values =[md.results.DamageEvolutionSolution.DamageDbar,40 35 field_names = ['D', 'F'] 36 field_tolerances = [1.e-13, 1.e-13] 37 field_values = [md.results.DamageEvolutionSolution.DamageDbar, 38 md.results.DamageEvolutionSolution.DamageF] -
issm/trunk-jpl/test/NightlyRun/test280.py
r21408 r23793 10 10 from ContourToMesh import * 11 11 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)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 17 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 ] 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 + [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 10 10 from ContourToMesh import * 11 11 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)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) 18 18 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 ] 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 + [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 10 10 from ContourToMesh import * 11 11 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')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') 20 20 21 21 #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 ] 22 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 23 field_tolerances = [5e-5, 5e-5, 8e-4, 5e-4, 2e-7] 24 field_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 10 10 from ContourToMesh import * 11 11 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')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') 20 20 21 21 #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 ] 22 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 23 field_tolerances = [5e-5, 5e-5, 8e-5, 5e-5, 1e-7] 24 field_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 12 12 from linearbasalforcings import linearbasalforcings 13 13 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 =022 md =solve(md,'Transient')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') 23 23 24 24 # Fields and tolerances to track changes 25 25 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 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] -
issm/trunk-jpl/test/NightlyRun/test293.py
r22268 r23793 10 10 from mismipbasalforcings import * 11 11 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)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 17 md.constants.yts = 365.2422 * 24. * 3600. 18 18 md.basalforcings = mismipbasalforcings() … … 20 20 md.transient.isgroundingline = 1 21 21 md.geometry.bed = min(md.geometry.base) * np.ones(md.mesh.numberofvertices,) 22 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']22 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate'] 23 23 24 md = solve(md, 'Transient')24 md = solve(md, 'Transient') 25 25 26 26 #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']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'] 30 30 field_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] 34 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[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 10 10 11 11 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 =True19 md.toolkits.DefaultAnalysis =issmgslsolver()20 md =solve(md,'Stressbalance')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') 21 21 22 22 #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 ] 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 = [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 10 10 11 11 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 =True19 md.toolkits.DefaultAnalysis =issmgslsolver()20 md =solve(md,'Stressbalance')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') 21 21 22 22 #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 ] 23 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 24 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 25 field_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 10 10 11 11 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 =True20 md.toolkits.DefaultAnalysis =issmgslsolver()21 md =solve(md,'Stressbalance')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') 22 22 23 23 #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 ] 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 = [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 10 10 11 11 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 =True19 md.toolkits.DefaultAnalysis =issmgslsolver()20 md =solve(md,'Stressbalance')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') 21 21 22 22 #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 ] 23 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 24 field_tolerances = [1e-08, 1e-08, 3e-07, 1e-08, 1e-08] 25 field_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 10 10 11 11 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 =True18 md.toolkits.DefaultAnalysis =issmgslsolver()19 md =solve(md,'Masstransport')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') 20 20 21 21 #Fields and tolerances to track changes 22 field_names =['Thickness'] 23 field_tolerances=[1e-13] 24 field_values=[\ 25 md.results.MasstransportSolution.Thickness,\ 26 ] 22 field_names = ['Thickness'] 23 field_tolerances = [1e-13] 24 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3006.py
r23746 r23793 11 11 12 12 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 =320 md.masstransport.spcthickness =md.geometry.thickness21 md.autodiff.isautodiff =True22 md.toolkits.DefaultAnalysis =issmgslsolver()23 md =solve(md,'Masstransport')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') 24 24 25 25 #Fields and tolerances to track changes 26 field_names =['Thickness'] 27 field_tolerances=[1e-13] 28 field_values=[\ 29 md.results.MasstransportSolution.Thickness,\ 30 ] 26 field_names = ['Thickness'] 27 field_tolerances = [1e-13] 28 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3007.py
r23746 r23793 10 10 11 11 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 =True19 md.toolkits.DefaultAnalysis =issmgslsolver()20 md =solve(md,'Masstransport')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') 21 21 22 22 #Fields and tolerances to track changes 23 field_names =['Thickness'] 24 field_tolerances=[1e-13] 25 field_values=[\ 26 md.results.MasstransportSolution.Thickness,\ 27 ] 23 field_names = ['Thickness'] 24 field_tolerances = [1e-13] 25 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3008.py
r23746 r23793 10 10 11 11 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 =018 md.cluster =generic('name',gethostname(),'np',1)19 md.autodiff.isautodiff =True20 md.toolkits.DefaultAnalysis =issmgslsolver()21 md =solve(md,'Thermal')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') 22 22 23 23 #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 ] 24 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 25 field_tolerances = [1e-13, 1e-5] 26 field_values = [md.results.ThermalSolution.Temperature, 27 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test3009.py
r23746 r23793 10 10 11 11 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 =False19 md.transient.ismasstransport =False20 md.transient.issmb =True21 md.transient.isthermal =True22 md.transient.isgroundingline =False23 md.autodiff.isautodiff =True24 md.toolkits.DefaultAnalysis =issmgslsolver()25 md =solve(md,'Transient')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') 26 26 27 27 #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 ] 28 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 29 field_tolerances = [1e-13, 1e-13] 30 field_values = [md.results.TransientSolution[0].Temperature, 31 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test301.py
r21965 r23793 9 9 10 10 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')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') 17 17 18 18 #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 23 24 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] -
issm/trunk-jpl/test/NightlyRun/test3010.py
r23746 r23793 10 10 11 11 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']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'] 18 18 19 md.autodiff.isautodiff =True20 md.toolkits.DefaultAnalysis =issmgslsolver()21 md =solve(md,'Transient')19 md.autodiff.isautodiff = True 20 md.toolkits.DefaultAnalysis = issmgslsolver() 21 md = solve(md, 'Transient') 22 22 23 23 #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 ] 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 = [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 1 1 #Test Name: SquareShelfConstrainedMasstransp2dAdolcForwardDifference 2 import numpy as np3 2 import copy 4 3 from model import * … … 14 13 15 14 16 #This test runs test3005 with autodiff on, and checks that 15 #This test runs test3005 with autodiff on, and checks that 17 16 #the value of the scalar forward difference match a step-wise differential 18 17 19 18 #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)19 md = triangle(model(), '../Exp/Square.exp', 50000.) 20 md = setmask(md, 'all', '') 21 md = parameterize(md, '../Par/SquareShelfConstrained.py') 22 md = setflowequation(md, 'SSA', 'all') 23 md.cluster = generic('name', gethostname(), 'np', 1) 24 md.masstransport.requested_outputs = ['IceVolume'] 25 md.verbose = verbose('autodiff', True) 27 26 28 27 #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' 28 index = 1 #this is the scalar component we are checking against 29 md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices, 'fos_forward_index', index)] 30 md.autodiff.dependents = [dependent('name', 'IceVolume', 'type', 'scalar')] 31 md.autodiff.driver = 'fos_forward' 38 32 39 33 #PYTHON: indices start at 0, make sure to offset index 40 index =index-134 index = index - 1 41 35 42 36 #parameters for the step-wise derivative 43 delta =0.00144 h1 =md.geometry.thickness[index]45 h0 =h1*(1.-delta)46 h2 =h1*(1.+delta)47 deltaH =(h2-h0)37 delta = 0.001 38 h1 = md.geometry.thickness[index] 39 h0 = h1 * (1. - delta) 40 h2 = h1 * (1. + delta) 41 deltaH = (h2 - h0) 48 42 49 43 #save model 50 md2 =copy.deepcopy(md)44 md2 = copy.deepcopy(md) 51 45 52 #evaluate derivative by forward and backward stepping 46 #evaluate derivative by forward and backward stepping 53 47 #forward 54 md =copy.deepcopy(md2)55 md.autodiff.isautodiff =False56 md.geometry.thickness[index] =h057 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness58 md.geometry.surface =md.geometry.base+md.geometry.thickness59 md =SetIceShelfBC(md)48 md = copy.deepcopy(md2) 49 md.autodiff.isautodiff = False 50 md.geometry.thickness[index] = h0 51 md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness 52 md.geometry.surface = md.geometry.base + md.geometry.thickness 53 md = SetIceShelfBC(md) 60 54 61 md =solve(md,'Masstransport')62 V0 =md.results.MasstransportSolution.IceVolume55 md = solve(md, 'Masstransport') 56 V0 = md.results.MasstransportSolution.IceVolume 63 57 64 58 #backward 65 md =copy.deepcopy(md2)66 md.autodiff.isautodiff =False67 md.geometry.thickness[index] =h268 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness69 md.geometry.surface =md.geometry.base+md.geometry.thickness70 md =SetIceShelfBC(md)59 md = copy.deepcopy(md2) 60 md.autodiff.isautodiff = False 61 md.geometry.thickness[index] = h2 62 md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness 63 md.geometry.surface = md.geometry.base + md.geometry.thickness 64 md = SetIceShelfBC(md) 71 65 72 md =solve(md,'Masstransport')73 V2 =md.results.MasstransportSolution.IceVolume66 md = solve(md, 'Masstransport') 67 V2 = md.results.MasstransportSolution.IceVolume 74 68 75 69 #compute resulting derivative 76 dVdh_an =(V2-V0)/deltaH70 dVdh_an = (V2 - V0) / deltaH 77 71 78 #evaluate derivative using ADOLC 79 md =md280 md.autodiff.isautodiff =True81 md.geometry.thickness[index] =h182 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness83 md.geometry.surface =md.geometry.base+md.geometry.thickness84 md =SetIceShelfBC(md)72 #evaluate derivative using ADOLC 73 md = md2 74 md.autodiff.isautodiff = True 75 md.geometry.thickness[index] = h1 76 md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness 77 md.geometry.surface = md.geometry.base + md.geometry.thickness 78 md = SetIceShelfBC(md) 85 79 86 md =solve(md,'Masstransport')80 md = solve(md, 'Masstransport') 87 81 #retrieve directly 88 dVdh_ad =md.results.MasstransportSolution.AutodiffJacobian82 dVdh_ad = md.results.MasstransportSolution.AutodiffJacobian 89 83 90 print("dV/dh: analytical: %16.16g\n using adolc: %16.16g\n" % (dVdh_an, dVdh_ad))84 print("dV/dh: analytical: %16.16g\n using adolc: %16.16g\n" % (dVdh_an, dVdh_ad)) 91 85 92 86 #Fields and tolerances to track changes 93 field_names =['dV/dh']94 field_tolerances =[1e-8]95 field_values =[dVdh_ad]87 field_names = ['dV/dh'] 88 field_tolerances = [1e-8] 89 field_values = [dVdh_ad] -
issm/trunk-jpl/test/NightlyRun/test3019.py
r23751 r23793 13 13 14 14 #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()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() 21 21 22 md.autodiff.isautodiff =True23 md.verbose.autodiff =True22 md.autodiff.isautodiff = True 23 md.verbose.autodiff = True 24 24 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: 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' 29 29 30 md =solve(md,'Transient')30 md = solve(md, 'Transient') 31 31 32 #recover jacobian: 33 jac_reverse =md.results.TransientSolution[0].AutodiffJacobian32 #recover jacobian: 33 jac_reverse = md.results.TransientSolution[0].AutodiffJacobian 34 34 35 35 #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'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' 39 39 40 md =solve(md,'Transient')40 md = solve(md, 'Transient') 41 41 42 #recover jacobian: 43 jac_forward =md.results.TransientSolution[0].AutodiffJacobian42 #recover jacobian: 43 jac_forward = md.results.TransientSolution[0].AutodiffJacobian 44 44 45 45 #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]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] -
issm/trunk-jpl/test/NightlyRun/test302.py
r21408 r23793 9 9 10 10 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')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') 17 17 18 18 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test3020.py
r23707 r23793 1 1 #Test Name: SquareShelfConstrainedTranAdolcReverseVsForward 2 import numpy as np3 2 import copy 4 3 from model import * … … 14 13 15 14 16 #This test runs test3020 with autodiff on, and checks that 15 #This test runs test3020 with autodiff on, and checks that 17 16 #the value of the scalar forward difference match a step-wise differential 18 17 19 18 #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.00000119 md = triangle(model(), '../Exp/Square.exp', 150000.) 20 md = setmask(md, 'all', '') 21 md = parameterize(md, '../Par/SquareShelfConstrained.py') 22 md = setflowequation(md, 'SSA', 'all') 23 md.cluster = generic('name', gethostname(), 'np', 1) 24 md.transient.requested_outputs = ['IceVolume', 'MaxVel'] 25 md.verbose = verbose('autodiff', True) 26 md.stressbalance.restol = 0.000001 28 27 29 28 #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' 29 index = 1 #this is the scalar component we are checking against 30 md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices, 'fos_forward_index', index)] 31 md.autodiff.dependents = [dependent('name', 'IceVolume', 'type', 'scalar'), 32 dependent('name', 'MaxVel', 'type', 'scalar')] 33 md.autodiff.driver = 'fos_forward' 40 34 41 35 #PYTHON: indices start at 0, make sure to offset index 42 index =index-136 index = index - 1 43 37 44 38 #parameters for the step-wise derivative 45 delta =0.0000146 h1 =md.geometry.thickness[index]47 h0 =h1*(1.-delta)48 h2 =h1*(1.+delta)49 deltaH =(h2-h0)39 delta = 0.00001 40 h1 = md.geometry.thickness[index] 41 h0 = h1 * (1. - delta) 42 h2 = h1 * (1. + delta) 43 deltaH = (h2 - h0) 50 44 51 45 #save model: 52 md2 =copy.deepcopy(md)46 md2 = copy.deepcopy(md) 53 47 54 #evaluate derivative by forward and backward stepping 48 #evaluate derivative by forward and backward stepping 55 49 #forward 56 md =copy.deepcopy(md2)57 md.autodiff.isautodiff =False58 md.geometry.thickness[index] =h059 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness60 md.geometry.surface =md.geometry.base+md.geometry.thickness61 md =SetIceShelfBC(md)50 md = copy.deepcopy(md2) 51 md.autodiff.isautodiff = False 52 md.geometry.thickness[index] = h0 53 md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness 54 md.geometry.surface = md.geometry.base + md.geometry.thickness 55 md = SetIceShelfBC(md) 62 56 63 md =solve(md,'Transient')64 V0 =md.results.TransientSolution[-1].IceVolume65 MaxV0 =md.results.TransientSolution[-1].MaxVel57 md = solve(md, 'Transient') 58 V0 = md.results.TransientSolution[-1].IceVolume 59 MaxV0 = md.results.TransientSolution[-1].MaxVel 66 60 67 61 #backward 68 md =copy.deepcopy(md2)69 md.autodiff.isautodiff =False70 md.geometry.thickness[index] =h271 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness72 md.geometry.surface =md.geometry.base+md.geometry.thickness73 md =SetIceShelfBC(md)62 md = copy.deepcopy(md2) 63 md.autodiff.isautodiff = False 64 md.geometry.thickness[index] = h2 65 md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness 66 md.geometry.surface = md.geometry.base + md.geometry.thickness 67 md = SetIceShelfBC(md) 74 68 75 md =solve(md,'Transient')76 V2 =md.results.TransientSolution[-1].IceVolume77 MaxV2 =md.results.TransientSolution[-1].MaxVel69 md = solve(md, 'Transient') 70 V2 = md.results.TransientSolution[-1].IceVolume 71 MaxV2 = md.results.TransientSolution[-1].MaxVel 78 72 79 73 #compute resulting derivative 80 dVdh_an =(V2-V0)/deltaH81 dMaxVdh_an =(MaxV2-MaxV0)/deltaH74 dVdh_an = (V2 - V0) / deltaH 75 dMaxVdh_an = (MaxV2 - MaxV0) / deltaH 82 76 83 #evaluate derivative using ADOLC 84 md =copy.deepcopy(md2)85 md.autodiff.isautodiff =True86 md.geometry.thickness[index] =h187 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness88 md.geometry.surface =md.geometry.base+md.geometry.thickness89 md =SetIceShelfBC(md)77 #evaluate derivative using ADOLC 78 md = copy.deepcopy(md2) 79 md.autodiff.isautodiff = True 80 md.geometry.thickness[index] = h1 81 md.geometry.base = -md.materials.rho_ice / md.materials.rho_water * md.geometry.thickness 82 md.geometry.surface = md.geometry.base + md.geometry.thickness 83 md = SetIceShelfBC(md) 90 84 91 md =solve(md,'Transient')85 md = solve(md, 'Transient') 92 86 #retrieve directly 93 dVdh_ad =md.results.TransientSolution[0].AutodiffJacobian[0]94 dMaxVdh_ad =md.results.TransientSolution[0].AutodiffJacobian[1]87 dVdh_ad = md.results.TransientSolution[0].AutodiffJacobian[0] 88 dMaxVdh_ad = md.results.TransientSolution[0].AutodiffJacobian[1] 95 89 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))90 print("dV/dh: analytical: %16.16g\n using adolc: %16.16g\n" % (dVdh_an, dVdh_ad)) 91 print("dMaxV/dh: analytical: %16.16g\n using adolc: %16.16g\n" % (dMaxVdh_an, dMaxVdh_ad)) 98 92 99 93 #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]94 field_names = ['dV/dh-dV/dh0', 'dMaxV/dh-dMaxV/dh0'] 95 field_tolerances = [1e-13, 1e-13] 96 field_values = [dVdh_ad - dVdh_an, dMaxVdh_an - dMaxVdh_ad] -
issm/trunk-jpl/test/NightlyRun/test303.py
r21408 r23793 9 9 10 10 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')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') 17 17 18 18 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test304.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test305.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test306.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test307.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [1e-09, 1e-09, 2e-10, 2e-10, 1e-10] 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] -
issm/trunk-jpl/test/NightlyRun/test308.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09] 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] -
issm/trunk-jpl/test/NightlyRun/test309.py
r21408 r23793 9 9 10 10 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')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') 17 17 18 18 #Fields and tolerances to track changes 19 field_names =['Thickness'] 20 field_tolerances=[1e-13] 21 field_values=[\ 22 md.results.MasstransportSolution.Thickness,\ 23 ] 19 field_names = ['Thickness'] 20 field_tolerances = [1e-13] 21 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test310.py
r21408 r23793 10 10 11 11 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 =318 md.masstransport.spcthickness =md.geometry.thickness19 md.cluster =generic('name',gethostname(),'np',3)20 md =solve(md,'Masstransport')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') 21 21 22 22 #Fields and tolerances to track changes 23 field_names =['Thickness'] 24 field_tolerances=[1e-13] 25 field_values=[\ 26 md.results.MasstransportSolution.Thickness,\ 27 ] 23 field_names = ['Thickness'] 24 field_tolerances = [1e-13] 25 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3101.py
r23746 r23793 10 10 11 11 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']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'] 18 18 19 md.autodiff.isautodiff =True20 md.toolkits.DefaultAnalysis =issmmumpssolver()21 md =solve(md,'Stressbalance')19 md.autodiff.isautodiff = True 20 md.toolkits.DefaultAnalysis = issmmumpssolver() 21 md = solve(md, 'Stressbalance') 22 22 23 23 #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 ] 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 = [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 9 9 from issmmumpssolver import issmmumpssolver 10 10 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 =True18 md.toolkits.DefaultAnalysis =issmmumpssolver()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() 19 19 20 md =solve(md,'Stressbalance')20 md = solve(md, 'Stressbalance') 21 21 22 22 #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 ] 23 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 24 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 25 field_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 10 10 11 11 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']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'] 19 19 20 md.autodiff.isautodiff =True21 md.toolkits.DefaultAnalysis =issmmumpssolver()22 md =solve(md,'Stressbalance')20 md.autodiff.isautodiff = True 21 md.toolkits.DefaultAnalysis = issmmumpssolver() 22 md = solve(md, 'Stressbalance') 23 23 24 24 #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 ] 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 = [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 10 10 11 11 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)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) 18 18 19 md.autodiff.isautodiff =True20 md.toolkits.DefaultAnalysis =issmmumpssolver()21 md =solve(md,'Stressbalance')19 md.autodiff.isautodiff = True 20 md.toolkits.DefaultAnalysis = issmmumpssolver() 21 md = solve(md, 'Stressbalance') 22 22 23 23 #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 ] 24 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 25 field_tolerances = [1e-08, 1e-08, 2e-07, 1e-08, 1e-08] 26 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/test3105.py
r23746 r23793 10 10 11 11 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)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) 17 17 18 md.autodiff.isautodiff =True19 md.toolkits.DefaultAnalysis =issmmumpssolver()20 md =solve(md,'Masstransport')18 md.autodiff.isautodiff = True 19 md.toolkits.DefaultAnalysis = issmmumpssolver() 20 md = solve(md, 'Masstransport') 21 21 22 22 #Fields and tolerances to track changes 23 field_names =['Thickness'] 24 field_tolerances=[1e-13] 25 field_values=[\ 26 md.results.MasstransportSolution.Thickness,\ 27 ] 23 field_names = ['Thickness'] 24 field_tolerances = [1e-13] 25 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3106.py
r23746 r23793 11 11 12 12 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 =320 md.masstransport.spcthickness =md.geometry.thickness13 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 21 21 22 md.autodiff.isautodiff =True23 md.toolkits.DefaultAnalysis =issmmumpssolver()24 md =solve(md,'Masstransport')22 md.autodiff.isautodiff = True 23 md.toolkits.DefaultAnalysis = issmmumpssolver() 24 md = solve(md, 'Masstransport') 25 25 26 26 #Fields and tolerances to track changes 27 field_names =['Thickness'] 28 field_tolerances=[1e-13] 29 field_values=[\ 30 md.results.MasstransportSolution.Thickness,\ 31 ] 27 field_names = ['Thickness'] 28 field_tolerances = [1e-13] 29 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3107.py
r23746 r23793 10 10 11 11 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)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) 18 18 19 md.autodiff.isautodiff =True20 md.toolkits.DefaultAnalysis =issmmumpssolver()21 md =solve(md,'Masstransport')19 md.autodiff.isautodiff = True 20 md.toolkits.DefaultAnalysis = issmmumpssolver() 21 md = solve(md, 'Masstransport') 22 22 23 23 #Fields and tolerances to track changes 24 field_names =['Thickness'] 25 field_tolerances=[1e-13] 26 field_values=[\ 27 md.results.MasstransportSolution.Thickness,\ 28 ] 24 field_names = ['Thickness'] 25 field_tolerances = [1e-13] 26 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3108.py
r23746 r23793 10 10 11 11 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 =018 md.cluster =generic('name',gethostname(),'np',3)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) 19 19 20 md.autodiff.isautodiff =True21 md.toolkits.DefaultAnalysis =issmmumpssolver()22 md =solve(md,'Thermal')20 md.autodiff.isautodiff = True 21 md.toolkits.DefaultAnalysis = issmmumpssolver() 22 md = solve(md, 'Thermal') 23 23 24 24 #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 ] 25 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 26 field_tolerances = [1e-13, 1e-5] 27 field_values = [md.results.ThermalSolution.Temperature, 28 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test3109.py
r23746 r23793 10 10 11 11 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 =False19 md.transient.ismasstransport =False20 md.transient.issmb =True21 md.transient.isthermal =True22 md.transient.isgroundingline =False12 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 23 23 24 md.autodiff.isautodiff =True25 md.toolkits.DefaultAnalysis =issmmumpssolver()26 md =solve(md,'Transient')24 md.autodiff.isautodiff = True 25 md.toolkits.DefaultAnalysis = issmmumpssolver() 26 md = solve(md, 'Transient') 27 27 28 28 #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 ] 29 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 30 field_tolerances = [1e-13, 1e-13] 31 field_values = [md.results.TransientSolution[0].Temperature, 32 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test311.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #Fields and tolerances to track changes 20 field_names =['Thickness'] 21 field_tolerances=[1e-13] 22 field_values=[\ 23 md.results.MasstransportSolution.Thickness,\ 24 ] 20 field_names = ['Thickness'] 21 field_tolerances = [1e-13] 22 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test3110.py
r21408 r23793 9 9 10 10 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)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 16 17 md.transient.requested_outputs =['IceVolume']17 md.transient.requested_outputs = ['IceVolume'] 18 18 19 md.autodiff.isautodiff =True20 md =solve(md,'Transient')19 md.autodiff.isautodiff = True 20 md = solve(md, 'Transient') 21 21 22 22 #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 ] 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 = [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 np2 1 from model import * 3 2 from socket import gethostname … … 13 12 14 13 #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)14 md = triangle(model(), '../Exp/Square.exp', 100000.) 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) 20 19 21 md.autodiff.isautodiff =True22 md.toolkits.DefaultAnalysis =issmgslsolver()20 md.autodiff.isautodiff = True 21 md.toolkits.DefaultAnalysis = issmgslsolver() 23 22 24 23 #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'24 md.autodiff.independents = [independent('name', 'md.geometry.thickness', 'type', 'vertex', 'nods', md.mesh.numberofvertices)] 25 md.autodiff.dependents = [dependent('name', 'MaxVel', 'type', 'scalar', 'fos_reverse_index', 1)] 26 md.autodiff.driver = 'fos_reverse' 28 27 29 md =solve(md,'Transient')28 md = solve(md, 'Transient') 30 29 31 30 #recover jacobian: 32 jac_reverse =md.results.TransientSolution[0].AutodiffJacobian31 jac_reverse = md.results.TransientSolution[0].AutodiffJacobian 33 32 34 33 #Fields and tolerances to track changes 35 field_names =['Jac Reverse']36 field_tolerances =[1e-13]37 field_values =[jac_reverse]34 field_names = ['Jac Reverse'] 35 field_tolerances = [1e-13] 36 field_values = [jac_reverse] -
issm/trunk-jpl/test/NightlyRun/test312.py
r21408 r23793 9 9 10 10 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')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') 19 19 20 20 #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 ] 21 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 22 field_tolerances = [1e-13, 1e-8] 23 field_values = [md.results.ThermalSolution.Temperature, 24 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test313.py
r21408 r23793 9 9 10 10 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 =False19 md.transient.ismasstransport =False20 md.transient.issmb =True21 md.transient.isthermal =True22 md.transient.isgroundingline =False23 md =solve(md,'Transient')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') 24 24 25 25 #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 ] 26 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 27 field_tolerances = [1e-13, 1e-13] 28 field_values = [md.results.TransientSolution[0].Temperature, 29 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test314.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 #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 ] 20 field_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'] 23 field_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] 26 field_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 9 9 10 10 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')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') 18 18 19 19 #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 ] 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 = [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 9 9 10 10 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')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') 17 17 18 18 #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 ] 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 = [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 9 9 10 10 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')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') 20 20 21 21 #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 ] 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 = [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 9 9 10 10 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 =018 md =solve(md,'Steadystate')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') 19 19 20 20 #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 ] 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 = [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 10 10 11 11 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')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') 16 16 17 17 #control parameters 18 md.inversion.iscontrol=119 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=223 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**-726 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.vx30 md.inversion.vy_obs=md.initialization.vy31 18 32 md.cluster=generic('name',gethostname(),'np',3) 33 md=solve(md,'Stressbalance') 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 32 33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 34 35 35 36 #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 ] 37 field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy'] 38 field_tolerances = [1e-12, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 39 field_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 10 10 11 11 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')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') 17 17 18 18 #control parameters 19 md.inversion.iscontrol =120 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 =224 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**-727 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.vx31 md.inversion.vy_obs =md.initialization.vy19 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 32 32 33 md.cluster =generic('name',gethostname(),'np',3)34 md =solve(md,'Stressbalance')33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 35 35 36 36 #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 ] 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 = [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 10 10 11 11 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')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 17 18 18 #control parameters 19 md.inversion.iscontrol =120 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 =224 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**-727 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.vx31 md.inversion.vy_obs =md.initialization.vy19 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 32 32 33 md.cluster =generic('name',gethostname(),'np',3)34 md =solve(md,'Stressbalance')33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 35 35 36 36 #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 ] 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 = [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 10 10 11 11 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')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') 17 17 18 18 #control parameters 19 md.inversion.iscontrol =120 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 =224 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**-727 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.vx31 md.inversion.vy_obs =md.initialization.vy19 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 32 32 33 md.cluster =generic('name',gethostname(),'np',3)34 md =solve(md,'Stressbalance')33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 35 35 36 36 #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 ] 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 = [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 1 1 #Test Name: SquareSheetConstrainedTranCflSSA2d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 11 10 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')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.timestepping = timesteppingadaptive(md.timestepping) 17 md.timestepping.time_step_max = 10000. 18 md.timestepping.final_time = 1120. 19 md = solve(md, 'Transient') 21 20 22 21 #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 ] 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-12, 1e-12] 24 field_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 1 1 #Test Name: SquareSheetConstrainedTranCflSIA3d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 11 10 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')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.timestepping = timesteppingadaptive(md.timestepping) 18 md.timestepping.time_step_max = 10000. 19 md.timestepping.final_time = 16000. 20 md = solve(md, 'Transient') 22 21 23 22 #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 ] 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 = [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] 29 field_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 10 10 11 11 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))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)) 20 20 md.thermal.isenthalpy = 1 21 21 md.thermal.isdynamicbasalspc = 1 22 22 23 md.cluster =generic('name',gethostname(),'np',3)24 md =solve(md,'Thermal')23 md.cluster = generic('name', gethostname(), 'np', 3) 24 md = solve(md, 'Thermal') 25 25 26 26 #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 ] 27 field_names = ['Enthalpy', 'Waterfraction', 'Temperature'] 28 field_tolerances = [1e-13, 5e-13, 1e-13] 29 field_values = [md.results.ThermalSolution.Enthalpy, 30 md.results.ThermalSolution.Waterfraction, 31 md.results.ThermalSolution.Temperature] -
issm/trunk-jpl/test/NightlyRun/test326.py
r21408 r23793 10 10 11 11 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 =False21 md.transient.ismasstransport =False22 md.transient.issmb =True23 md.transient.isthermal =True24 md.transient.isgroundingline =False25 md.thermal.isenthalpy =126 md.thermal.isdynamicbasalspc =127 md =solve(md,'Transient')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') 28 28 29 29 #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 ] 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 = [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 10 10 11 11 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 =123 md.thermal.isdynamicbasalspc =124 md.basalforcings.geothermalflux[:] =5.25 md =solve(md,'Transient')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') 26 26 27 27 #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 ] 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 = [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 9 9 from solve import * 10 10 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')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 15 md.smb = SMBgradients() 16 md.smb.b_pos =-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y17 md.smb.b_neg =250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y18 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.y21 md.cluster =generic('name',gethostname(),'np',3)22 md =solve(md,'Transient')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') 23 23 24 24 #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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 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] -
issm/trunk-jpl/test/NightlyRun/test329.py
r21408 r23793 9 9 from solve import * 10 10 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')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') 16 16 md.smb = SMBgradients() 17 md.smb.b_pos =-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y18 md.smb.b_neg =250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y19 md.smb.href =copy.deepcopy(md.geometry.surface)20 md.smb.smbref = 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y21 md.transient.requested_outputs =['default','TotalSmb']22 md.cluster =generic('name',gethostname(),'np',3)23 md =solve(md,'Transient')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') 24 24 25 25 #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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 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] -
issm/trunk-jpl/test/NightlyRun/test330.py
r22900 r23793 1 1 #Test Name:UnConfinedHydroDC 2 2 import numpy as np 3 import inspect4 3 from model import * 5 4 from setmask import * … … 12 11 from generic import generic 13 12 14 md =triangle(model(),'../Exp/Strip.exp',10000.)15 md =setmask(md,'','')13 md = triangle(model(), '../Exp/Strip.exp', 10000.) 14 md = setmask(md, '', '') 16 15 #reduced slab (20m long) 17 md.mesh.x =md.mesh.x/5.0e318 md.mesh.y =md.mesh.y/5.0e319 md =parameterize(md,'../Par/IceCube.py')20 md.transient =transient.setallnullparameters(md.transient)21 md.transient.ishydrology =True22 md =setflowequation(md,'SSA','all')23 md.cluster =generic('name',gethostname(),'np',1)24 md.hydrology =hydrologydc()25 md.hydrology =md.hydrology.initialize(md)16 md.mesh.x = md.mesh.x / 5.0e3 17 md.mesh.y = md.mesh.y / 5.0e3 18 md = parameterize(md, '../Par/IceCube.py') 19 md.transient = transient.setallnullparameters(md.transient) 20 md.transient.ishydrology = 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) 26 25 27 26 #Hydro Model Parameters 28 md.hydrology.isefficientlayer =029 md.hydrology.sedimentlimit_flag =030 md.hydrology.mask_thawed_node =np.ones((md.mesh.numberofvertices))31 md.hydrology.rel_tol =1.0e-632 md.hydrology.penalty_lock =033 md.hydrology.max_iter =20034 md.hydrology.transfer_flag =035 md.hydrology.unconfined_flag =136 md.hydrology.sediment_porosity =0.127 md.hydrology.isefficientlayer = 0 28 md.hydrology.sedimentlimit_flag = 0 29 md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices)) 30 md.hydrology.rel_tol = 1.0e-6 31 md.hydrology.penalty_lock = 0 32 md.hydrology.max_iter = 200 33 md.hydrology.transfer_flag = 0 34 md.hydrology.unconfined_flag = 1 35 md.hydrology.sediment_porosity = 0.1 37 36 #Sediment 38 md.hydrology.sediment_thickness =10.039 md.hydrology.sediment_transmitivity =(1.0e-3*md.hydrology.sediment_thickness)*np.ones((md.mesh.numberofvertices))37 md.hydrology.sediment_thickness = 10.0 38 md.hydrology.sediment_transmitivity = (1.0e-3 * md.hydrology.sediment_thickness) * np.ones((md.mesh.numberofvertices)) 40 39 #init 41 md.initialization.sediment_head =-5.0*np.ones((md.mesh.numberofvertices))40 md.initialization.sediment_head = -5.0 * np.ones((md.mesh.numberofvertices)) 42 41 #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.542 md.hydrology.spcsediment_head = np.nan * np.ones((md.mesh.numberofvertices)) 43 md.hydrology.spcsediment_head[np.where(md.mesh.x == 0)] = 0.5 45 44 46 md.timestepping.time_step =5/md.constants.yts#5s steppin47 md.settings.output_frequency =248 md.timestepping.final_time =300/md.constants.yts#500s run45 md.timestepping.time_step = 5 / md.constants.yts #5s steppin 46 md.settings.output_frequency = 2 47 md.timestepping.final_time = 300 / md.constants.yts #500s run 49 48 50 md =solve(md,'Transient')49 md = solve(md, 'Transient') 51 50 52 51 #fields to track, results can also be found in 53 52 #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] 53 field_names = ['SedimentWaterHead1', 'SedimentWaterHead2'] 54 field_tolerances = [1e-13, 1e-13] 55 field_values = [md.results.TransientSolution[10].SedimentHeadHydrostep, md.results.TransientSolution[30].SedimentHeadHydrostep] -
issm/trunk-jpl/test/NightlyRun/test3300.py
r22900 r23793 12 12 from generic import generic 13 13 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 =True19 md.transient.issmb =True20 md =setflowequation(md,'SSA','all')21 md.cluster =generic('name',gethostname(),'np',1)22 md.hydrology =hydrologydc()23 md.hydrology =md.hydrology.initialize(md)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) 24 24 25 md.hydrology.isefficientlayer =126 md.hydrology.sedimentlimit_flag =127 md.hydrology.sedimentlimit =400.028 md.hydrology.mask_thawed_node =np.ones((md.mesh.numberofvertices))29 md.hydrology.sediment_thickness =20.030 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))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)) 34 34 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))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)) 39 39 40 md.hydrology.epl_conductivity =1.5e-241 md.hydrology.epl_initial_thickness =1.042 md.hydrology.epl_colapse_thickness =1.0e-643 md.hydrology.epl_thick_comp =144 md.hydrology.epl_max_thickness =5.040 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 45 45 46 md.hydrology.transfer_flag =1.047 md.hydrology.leakage_factor =3.9e-1346 md.hydrology.transfer_flag = 1.0 47 md.hydrology.leakage_factor = 3.9e-13 48 48 49 times =np.arange(0,8.001,0.002)50 md.basalforcings.groundedice_melting_rate =np.zeros((md.mesh.numberofvertices+1,len(times)))49 times = np.arange(0, 8.001, 0.002) 50 md.basalforcings.groundedice_melting_rate = np.zeros((md.mesh.numberofvertices + 1, len(times))) 51 51 52 md.basalforcings.groundedice_melting_rate[:, np.where(times<=6.0)]=-0.253 md.basalforcings.groundedice_melting_rate[:, np.where(times<=1.0)]=1.054 md.basalforcings.groundedice_melting_rate[-1, :]=times52 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 55 55 56 md.timestepping.time_step =0.00257 md.timestepping.final_time =8.056 md.timestepping.time_step = 0.002 57 md.timestepping.final_time = 8.0 58 58 59 md =solve(md,'Transient')59 md = solve(md, 'Transient') 60 60 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*store67 # for i in range(0, 4000):68 # 69 # 70 # totvol[i+1]=totvol[i]+md.basalforcings.groundedice_melting_rate[0,i]*0.00261 # 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 71 71 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 76 77 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] -
issm/trunk-jpl/test/NightlyRun/test332.py
r22900 r23793 13 13 from generic import generic 14 14 15 md =triangle(model(),'../Exp/Square.exp',100000.)16 md =setmask(md,'','')17 md =parameterize(md,'../Par/IceCube.py')15 md = triangle(model(), '../Exp/Square.exp', 100000.) 16 md = setmask(md, '', '') 17 md = parameterize(md, '../Par/IceCube.py') 18 18 19 md.transient =transient.setallnullparameters(md.transient)20 md.transient.ishydrology =True19 md.transient = transient.setallnullparameters(md.transient) 20 md.transient.ishydrology = True 21 21 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)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) 26 26 27 md.hydrology.isefficientlayer =028 md.hydrology.mask_thawed_node =np.ones((md.mesh.numberofvertices))29 md.hydrology.sedimentlimit_flag =130 md.hydrology.sedimentlimit =8000.031 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.035 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 =039 md.timestepping.final_time =1.040 md =solve(md,'Hydrology')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') 41 41 42 42 #Fields and tolerances to track changes … … 44 44 #only if no limits are applied 45 45 #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]46 field_names = ['SedimentWaterHead', 'SedimentHeadResidual'] 47 field_tolerances = [1e-13, 3e-10] 48 field_values = [md.results.HydrologySolution.SedimentHeadHydrostep, md.results.HydrologySolution.SedimentHeadResidual] -
issm/trunk-jpl/test/NightlyRun/test333.py
r23707 r23793 11 11 from generic import generic 12 12 13 md =triangle(model(),'../Exp/Square.exp',100000.)14 md =setmask(md,'','')15 md =parameterize(md,'../Par/IceCube.py')13 md = triangle(model(), '../Exp/Square.exp', 100000.) 14 md = setmask(md, '', '') 15 md = parameterize(md, '../Par/IceCube.py') 16 16 17 md.transient =transient.setallnullparameters(md.transient)18 md.transient.ishydrology =True19 #md.transient.issmb =True20 md =setflowequation(md,'SSA','all')21 md.cluster =generic('name',gethostname(),'np',1)22 md.hydrology =hydrologydc()23 md.hydrology =md.hydrology.initialize(md)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) 24 24 25 md.hydrology.isefficientlayer =126 md.hydrology.sedimentlimit_flag =127 md.hydrology.sedimentlimit =800.028 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))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)) 31 31 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))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)) 35 35 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 =3041 md.hydrology.epl_initial_thickness =142 md.hydrology.epl_colapse_thickness =1.0e-343 md.hydrology.epl_thick_comp =144 md.hydrology.epl_max_thickness =145 md.hydrology.steps_per_step =1046 md.timestepping.time_step =2.047 md.timestepping.final_time =2.036 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 48 48 49 #md.debug.valgrind =True50 md =solve(md,'Transient')49 #md.debug.valgrind = True 50 md = solve(md, 'Transient') 51 51 52 52 #re-run with no substeps 53 mdfine =copy.deepcopy(md)54 mdfine.result =[]55 mdfine.hydrology.steps_per_step =156 mdfine.timestepping.time_step =0.257 mdfine =solve(mdfine,'Transient')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') 58 58 59 59 60 sedmean =mdfine.results.TransientSolution[0].SedimentHeadHydrostep61 eplmean =mdfine.results.TransientSolution[0].EplHeadHydrostep62 for i in range(1, 10):63 sedmean=sedmean+(mdfine.results.TransientSolution[i].SedimentHeadHydrostep)64 eplmean=eplmean+(mdfine.results.TransientSolution[i].EplHeadHydrostep)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) 65 65 66 field_names =['SedimentWaterHead1','EplWaterHead1','SedimentHeadResidual1',67 'SedimentWaterHead4','EplWaterHead4','SedimentHeadResidual4',68 'SedimentWaterHead5','EplWaterHead5','SedimentHeadResidual5',69 'SedimentWaterHead9','EplWaterHead9','SedimentHeadResidual9',70 71 field_tolerances =[1e-13, 1e-13, 1e-13,72 73 74 75 76 field_values =[mdfine.results.TransientSolution[0].SedimentHeadHydrostep,77 78 79 80 81 82 83 84 85 86 87 88 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] -
issm/trunk-jpl/test/NightlyRun/test334.py
r22900 r23793 13 13 from generic import generic 14 14 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 =True20 md =setflowequation(md,'SSA','all')21 md.cluster =generic('name',gethostname(),'np',1)22 md.hydrology =hydrologydc()23 md.hydrology =md.hydrology.initialize(md)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) 24 24 25 md.hydrology.isefficientlayer =026 md.hydrology.sedimentlimit_flag =127 md.hydrology.sedimentlimit =8000.028 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.025 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 32 32 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))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)) 36 36 37 md.timestepping.time_step =038 md.timestepping.final_time =1.039 md.extrude(3, 1.)40 md =solve(md,'Hydrology')37 md.timestepping.time_step = 0 38 md.timestepping.final_time = 1.0 39 md.extrude(3, 1.) 40 md = solve(md, 'Hydrology') 41 41 42 42 #Fields and tolerances to track changes … … 44 44 #only if no limits are applied 45 45 #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] 46 field_names = ['SedimentWaterHead', 'SedimentHeadResidual'] 47 field_tolerances = [1e-13, 3e-10] 48 field_values = [md.results.HydrologySolution.SedimentHeadHydrostep, md.results.HydrologySolution.SedimentHeadResidual] -
issm/trunk-jpl/test/NightlyRun/test335.py
r22900 r23793 13 13 from generic import generic 14 14 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 =True20 md.transient.issmb =True21 md =setflowequation(md,'SSA','all')22 md.cluster =generic('name',gethostname(),'np',1)23 md.hydrology =hydrologydc()24 md.hydrology =md.hydrology.initialize(md)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) 25 25 26 md.hydrology.isefficientlayer =127 md.hydrology.sedimentlimit_flag =128 md.hydrology.sedimentlimit =800.029 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))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)) 33 33 md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices)) 34 md.hydrology.sediment_transmitivity =3*np.ones((md.mesh.numberofvertices))34 md.hydrology.sediment_transmitivity = 3 * np.ones((md.mesh.numberofvertices)) 35 35 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 =3041 md.hydrology.epl_initial_thickness =142 md.hydrology.epl_colapse_thickness =1.0e-343 md.hydrology.epl_thick_comp =144 md.hydrology.epl_max_thickness =145 md.timestepping.time_step =0.246 md.timestepping.final_time =2.036 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 47 47 48 md.extrude(3, 1.)49 md =solve(md,'Transient')48 md.extrude(3, 1.) 49 md = solve(md, 'Transient') 50 50 51 51 #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 58 59 60 field_values =[md.results.TransientSolution[0].SedimentHeadHydrostep,61 62 63 64 65 66 67 68 69 70 71 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] -
issm/trunk-jpl/test/NightlyRun/test336.py
r21408 r23793 10 10 11 11 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)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 17 18 md.timestepping.time_step =1.19 md.settings.output_frequency =120 md.timestepping.final_time =4.18 md.timestepping.time_step = 1. 19 md.settings.output_frequency = 1 20 md.timestepping.final_time = 4. 21 21 22 22 #Set up transient 23 smb =np.ones((md.mesh.numberofvertices))*3.624 smb =np.vstack((smb,smb*-1.)).T23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * -1.)).T 25 25 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 =False26 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 31 31 32 md =solve(md,'Transient')32 md = solve(md, 'Transient') 33 33 34 34 #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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 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] -
issm/trunk-jpl/test/NightlyRun/test337.py
r21408 r23793 10 10 11 11 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)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) 18 18 19 md.timestepping.time_step =1.20 md.settings.output_frequency =121 md.timestepping.final_time =4.19 md.timestepping.time_step = 1. 20 md.settings.output_frequency = 1 21 md.timestepping.final_time = 4. 22 22 23 23 #Set up transient 24 smb =np.ones((md.mesh.numberofvertices))*3.625 smb =np.vstack((smb,smb*-1.)).T24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * -1.)).T 26 26 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 =False27 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 32 32 33 md =solve(md,'Transient')33 md = solve(md, 'Transient') 34 34 35 35 #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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 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] -
issm/trunk-jpl/test/NightlyRun/test338.py
r21408 r23793 10 10 11 11 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)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 17 18 md.timestepping.time_step =1.19 md.settings.output_frequency =120 md.timestepping.final_time =400.18 md.timestepping.time_step = 1. 19 md.settings.output_frequency = 1 20 md.timestepping.final_time = 400. 21 21 22 22 #Set up transient 23 smb =np.ones((md.mesh.numberofvertices))*3.624 smb =np.vstack((smb,smb*-1.)).T23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * -1.)).T 25 25 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 =False26 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 32 32 33 md =solve(md,'Transient')33 md = solve(md, 'Transient') 34 34 35 35 #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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 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] -
issm/trunk-jpl/test/NightlyRun/test339.py
r22572 r23793 10 10 11 11 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)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) 18 18 19 md.timestepping.time_step =1.20 md.settings.output_frequency =121 md.timestepping.final_time =4.19 md.timestepping.time_step = 1. 20 md.settings.output_frequency = 1 21 md.timestepping.final_time = 4. 22 22 23 23 #Set up transient 24 smb =np.ones((md.mesh.numberofvertices))*3.625 smb =np.vstack((smb,smb*-1.)).T24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * - 1.)).T 26 26 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 =False27 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 33 33 34 md =solve(md,'Transient')34 md = solve(md, 'Transient') 35 35 36 36 #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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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] -
issm/trunk-jpl/test/NightlyRun/test340.py
r23785 r23793 10 10 from taoinversion import * 11 11 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')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 17 18 18 #control parameters … … 20 20 md.inversion.iscontrol = 1 21 21 md.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)))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))) 24 24 md.inversion.maxsteps = 2 25 25 md.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-726 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 29 29 md.inversion.vx_obs = md.initialization.vx 30 30 md.inversion.vy_obs = md.initialization.vy 31 31 32 md.cluster = generic('name', gethostname(),'np',3)33 md = solve(md, 'Stressbalance')32 md.cluster = generic('name', gethostname(), 'np', 3) 33 md = solve(md, 'Stressbalance') 34 34 35 35 #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 ] 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 = [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 11 11 12 12 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')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') 18 18 19 19 #control parameters 20 md.inversion =m1qn3inversion(md.inversion)21 md.inversion.iscontrol =122 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 =226 md.inversion.maxiter =627 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**-730 md.inversion.vx_obs =md.initialization.vx31 md.inversion.vy_obs =md.initialization.vy20 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 32 32 33 md.cluster =generic('name',gethostname(),'np',3)34 md =solve(md,'Stressbalance')33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Stressbalance') 35 35 36 36 #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 ] 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 = [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 10 10 from plumebasalforcings import * 11 11 12 md = triangle(model(), '../Exp/Square.exp',180000.)13 md = setmask(md, '','')14 md = parameterize(md, '../Par/SquareSheetConstrained.py')12 md = triangle(model(), '../Exp/Square.exp', 180000.) 13 md = setmask(md, '', '') 14 md = parameterize(md, '../Par/SquareSheetConstrained.py') 15 15 md.basalforcings = plumebasalforcings() 16 16 md.basalforcings = md.basalforcings.setdefaultparameters() … … 19 19 md.basalforcings.plumex = 500000 20 20 md.basalforcings.plumey = 500000 21 md.extrude(3, 1.)22 md = setflowequation(md, 'SSA','all')21 md.extrude(3, 1.) 22 md = setflowequation(md, 'SSA', 'all') 23 23 md.timestepping.time_step = 0. 24 md.thermal.requested_outputs = ['default', 'BasalforcingsGeothermalflux']25 md.cluster = generic('name', gethostname(),'np',3)26 md = solve(md, 'Thermal')24 md.thermal.requested_outputs = ['default', 'BasalforcingsGeothermalflux'] 25 md.cluster = generic('name', gethostname(), 'np', 3) 26 md = solve(md, 'Thermal') 27 27 28 28 #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 ] 29 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate', 'BasalforcingsGeothermalflux'] 30 field_tolerances = [1e-13, 1e-8, 1e-13] 31 field_values = [md.results.ThermalSolution.Temperature, 32 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate, 33 md.results.ThermalSolution.BasalforcingsGeothermalflux] -
issm/trunk-jpl/test/NightlyRun/test343.py
r22267 r23793 10 10 from SMBgradientsela import * 11 11 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')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 16 md.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,))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,)) 22 22 23 23 #Change geometry … … 26 26 27 27 #Transient options 28 md.transient.requested_outputs = ['default', 'TotalSmb']29 md.cluster = generic('name', gethostname(),'np',3)30 md = solve(md, 'Transient')28 md.transient.requested_outputs = ['default', 'TotalSmb'] 29 md.cluster = generic('name', gethostname(), 'np', 3) 30 md = solve(md, 'Transient') 31 31 32 32 #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 ] 33 field_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'] 36 field_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] 39 field_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 10 10 from SMBgradientsela import * 11 11 12 md = triangle(model(), '../Exp/Square.exp',150000.)13 md = setmask(md, '','')14 md = parameterize(md, '../Par/SquareSheetConstrained.py')12 md = triangle(model(), '../Exp/Square.exp', 150000.) 13 md = setmask(md, '', '') 14 md = parameterize(md, '../Par/SquareSheetConstrained.py') 15 15 16 16 #Change geometry … … 18 18 md.geometry.surface = md.geometry.base + md.geometry.thickness 19 19 20 md = md.extrude(3, 1.)21 md = setflowequation(md, 'HO','all')20 md = md.extrude(3, 1.) 21 md = setflowequation(md, 'HO', 'all') 22 22 md.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,))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,)) 28 28 29 29 30 30 #Transient options 31 md.transient.requested_outputs = ['default', 'TotalSmb']32 md.cluster = generic('name', gethostname(),'np',3)33 md = solve(md, 'Transient')31 md.transient.requested_outputs = ['default', 'TotalSmb'] 32 md.cluster = generic('name', gethostname(), 'np', 3) 33 md = solve(md, 'Transient') 34 34 35 35 #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 ] 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 = [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 13 13 from transient import * 14 14 15 md = triangle(model(), '../Exp/Square.exp',50000.)15 md = triangle(model(), '../Exp/Square.exp', 50000.) 16 16 md.mesh.x = md.mesh.x / 1000 17 17 md.mesh.y = md.mesh.y / 1000 18 md = setmask(md, '','')19 md = parameterize(md, '../Par/SquareSheetConstrained.py')18 md = setmask(md, '', '') 19 md = parameterize(md, '../Par/SquareSheetConstrained.py') 20 20 md.transient = transient().deactivateall() 21 21 md.transient.ishydrology = 1 22 md = setflowequation(md, 'SSA','all')23 md.cluster = generic('name', gethostname(),'np',2)22 md = setflowequation(md, 'SSA', 'all') 23 md.cluster = generic('name', gethostname(), 'np', 2) 24 24 25 25 #Use hydroogy coupled friciton law … … 41 41 md.hydrology.bump_height = 0.05 * np.ones((md.mesh.numberofelements,)) 42 42 md.hydrology.englacial_input = 0.5 * np.ones((md.mesh.numberofvertices,)) 43 md.hydrology.reynolds = 1000. * np.ones((md.mesh.numberofelements,))43 md.hydrology.reynolds = 1000. * np.ones((md.mesh.numberofelements,)) 44 44 md.hydrology.spchead = float('NaN') * np.ones((md.mesh.numberofvertices,)) 45 45 pos = np.intersect1d(np.array(np.where(md.mesh.vertexonboundary)), np.array(np.where(md.mesh.x == 1000))) … … 57 57 a = np.sqrt((md.mesh.x - 500.)**2 + (md.mesh.y - 500.)**2) 58 58 pos = 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, :] = time62 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, :] = time65 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))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)) 70 70 71 md = solve(md, 'Transient')71 md = solve(md, 'Transient') 72 72 73 73 #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 74 field_names = ['HydrologyHead1', 'HydrologyGapHeight1', 75 'HydrologyHead2', 'HydrologyGapHeight2', 76 'HydrologyHead3', 'HydrologyGapHeight3', 77 'HydrologyHead4', 'HydrologyGapHeight4'] 78 field_tolerances = [1e-13, 1e-13, 79 1e-13, 1e-13, 80 1e-13, 1e-13, 81 1e-13, 1e-12] 82 field_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 1 1 #Test Name: SquareSheetShelfStressSSA2d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')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) 16 md = solve(md, 'Stressbalance') 18 17 19 18 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test402.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfStressSSA3d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 150000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(4, 1.) 15 md = setflowequation(md, 'SSA', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Stressbalance') 19 18 20 19 #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 ] 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] -
issm/trunk-jpl/test/NightlyRun/test403.py
r23181 r23793 1 1 #Test Name: SquareSheetShelfStressHO 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'HO', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Stressbalance') 19 18 20 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [3e-09, 3e-09, 3e-09, 3e-09, 3e-09] 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] -
issm/trunk-jpl/test/NightlyRun/test404.py
r22835 r23793 1 1 #Test Name: SquareSheetShelfStressFS 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.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') 19 18 20 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [2e-06, 2e-06, 2e-06, 1e-06, 6e-07] 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] -
issm/trunk-jpl/test/NightlyRun/test405.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfStressMHOPenalties 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'SSA', '../Exp/SquareHalfRight.exp', 'fill', 'HO', 'coupling', 'penalties') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Stressbalance') 19 18 20 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [5e-05, 5e-05, 5e-05, 5e-05, 1e-05] 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] -
issm/trunk-jpl/test/NightlyRun/test406.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfTherStea 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname 5 6 4 from triangle import * 7 5 from setmask import * … … 10 8 from solve import * 11 9 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')10 md = triangle(model(), '../Exp/Square.exp', 150000.) 11 md = setmask(md, '../Exp/SquareShelf.exp', '') 12 md = parameterize(md, '../Par/SquareSheetShelf.py') 13 md.extrude(4, 1.) 14 md = setflowequation(md, 'HO', 'all') 15 md.cluster = generic('name', gethostname(), 'np', 3) 16 md.timestepping.time_step = 0. 17 md = solve(md, 'Thermal') 20 18 21 19 #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 ] 20 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 21 field_tolerances = [1e-13, 1e-5] 22 field_values = [md.results.ThermalSolution.Temperature, 23 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test407.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfTherTran 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname 5 6 4 from triangle import * 7 5 from setmask import * … … 10 8 from solve import * 11 9 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 =False19 md.transient.ismasstransport =False20 md.transient.issmb =True21 md.transient.isthermal =True22 md.transient.isgroundingline =False23 md =solve(md,'Transient')10 md = triangle(model(), '../Exp/Square.exp', 150000.) 11 md = setmask(md, '../Exp/SquareShelf.exp', '') 12 md = parameterize(md, '../Par/SquareSheetShelf.py') 13 md.extrude(4, 1.) 14 md = setflowequation(md, 'HO', 'all') 15 md.cluster = generic('name', gethostname(), 'np', 3) 16 md.transient.isstressbalance = False 17 md.transient.ismasstransport = False 18 md.transient.issmb = True 19 md.transient.isthermal = True 20 md.transient.isgroundingline = False 21 md = solve(md, 'Transient') 24 22 25 23 #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 ] 24 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 25 field_tolerances = [1e-13, 1e-13] 26 field_values = [md.results.TransientSolution[0].Temperature, 27 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test408.py
r21827 r23793 11 11 from frictioncoulomb import frictioncoulomb 12 12 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]-1019 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 =False25 md.transient.isgroundingline =True26 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')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') 31 31 32 32 #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 ] 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 = [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 1 1 #Test Name: SquareSheetShelfTranMHOPenalties 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(3, 1.) 15 md = setflowequation(md, 'SSA', '../Exp/SquareHalfRight.exp', 'fill', 'HO', 'coupling', 'penalties') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md.transient.requested_outputs = ['default', 'GroundedArea'] 18 md.groundingline.melt_interpolation = 'SubelementMelt1' 19 md = solve(md, 'Transient') 21 20 22 21 #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 ] 22 field_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'] 25 field_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] 28 field_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 1 1 #Test Name: SquareSheetShelfSteaSSA3d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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 =019 md =solve(md,'Steadystate')11 md = triangle(model(), '../Exp/Square.exp', 150000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(3, 2.) 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') 20 19 21 20 #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 ] 21 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate'] 22 field_tolerances = [1e-09, 1e-09, 1e-08, 1e-09, 1e-13, 5e-10, 1e-06] 23 field_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 1 1 #Test Name: SquareSheetShelfSteaHO 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 150000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(3, 2.) 15 md = setflowequation(md, 'HO', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md.timestepping.time_step = 0. 18 md = solve(md, 'Steadystate') 20 19 21 20 #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 ] 21 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure', 'Temperature', 'BasalforcingsGroundediceMeltingRate'] 22 field_tolerances = [2e-09, 1e-09, 1e-08, 1e-09, 1e-09, 1e-08, 1e-05] 23 field_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 1 1 #Test Name: SquareSheetShelfDiadSSA3dDakota 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from partitioner import * 11 10 from importancefactors import * 12 13 11 from normal_uncertain import * 14 12 from response_function import * 15 13 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)14 md = triangle(model(), '../Exp/Square.exp', 300000.) 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) 21 19 22 20 #partitioning 23 21 md.qmu.numberofpartitions = md.mesh.numberofvertices 24 md = partitioner(md, 'package','linear','npart',md.qmu.numberofpartitions)25 md.qmu.partition = md.qmu.partition -122 md = partitioner(md, 'package', 'linear', 'npart', md.qmu.numberofpartitions) 23 md.qmu.partition = md.qmu.partition - 1 26 24 md.qmu.isdakota = 1 27 25 … … 33 31 34 32 #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)33 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01) 34 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01) 37 35 38 36 #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])37 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]) 40 38 41 39 #method … … 47 45 48 46 if version >= 6: 49 50 51 47 md.qmu.params.analysis_driver = 'matlab' 48 md.qmu.params.evaluation_scheduling = 'master' 49 md.qmu.params.processors_per_evaluation = 2 52 50 else: 53 54 51 md.qmu.params.analysis_driver = 'stressbalance' 52 md.qmu.params.evaluation_concurrency = 1 55 53 56 #imperative! 57 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses54 #imperative! 55 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 58 56 59 57 #solve 60 md.verbose = verbose('000000000') 61 md = solve(md, 'Stressbalance','overwrite','y')58 md.verbose = verbose('000000000') # this line is recommended 59 md = solve(md, 'Stressbalance', 'overwrite', 'y') 62 60 63 61 #Fields and tolerances to track changes 64 62 md.qmu.results = md.results.dakota 65 md.results.dakota.importancefactors = importancefactors(md, 'scaled_FrictionCoefficient','MaxVel').T63 md.results.dakota.importancefactors = importancefactors(md, 'scaled_FrictionCoefficient', 'MaxVel').T 66 64 field_names = ['importancefactors'] 67 65 field_tolerances = [1e-10] -
issm/trunk-jpl/test/NightlyRun/test413.py
r23231 r23793 1 1 #Test Name: SquareSheetShelfDiadSSA3dDakotaPart 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 11 10 from importancefactors import * 12 11 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)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) 18 17 19 18 #Dakota options … … 25 24 #partitioning 26 25 md.qmu.numberofpartitions = 20 27 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')28 md.qmu.partition = md.qmu.partition -126 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 27 md.qmu.partition = md.qmu.partition - 1 29 28 30 29 #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)30 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01) 31 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01) 33 32 34 33 #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])34 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]) 36 35 37 36 #method … … 43 42 44 43 if version >= 6: 45 46 47 44 md.qmu.params.analysis_driver = 'matlab' 45 md.qmu.params.evaluation_scheduling = 'master' 46 md.qmu.params.processors_per_evaluation = 2 48 47 else: 49 50 48 md.qmu.params.analysis_driver = 'stressbalance' 49 md.qmu.params.evaluation_concurrency = 1 51 50 52 51 53 52 #imperative! 54 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses53 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 55 54 md.qmu.isdakota = 1 56 55 57 56 #solve 58 md.verbose = verbose('000000000') 59 md = solve(md, 'Stressbalance','overwrite','y')57 md.verbose = verbose('000000000') # this line is recommended 58 md = solve(md, 'Stressbalance', 'overwrite', 'y') 60 59 61 60 #Fields and tolerances to track changes 62 61 md.qmu.results = md.results.dakota 63 md.results.dakota.importancefactors = importancefactors(md, 'scaled_FrictionCoefficient','MaxVel').T62 md.results.dakota.importancefactors = importancefactors(md, 'scaled_FrictionCoefficient', 'MaxVel').T 64 63 field_names = ['importancefactors'] 65 64 field_tolerances = [1e-10] -
issm/trunk-jpl/test/NightlyRun/test414.py
r23231 r23793 11 11 from partitioner import * 12 12 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 easy19 md.geometry.thickness[:] = 1 #make it easy20 md.geometry.surface = md.geometry.base +md.geometry.thickness13 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 21 21 22 22 #constrain all velocities to 1 m/yr, in the y-direction … … 33 33 #partitioning 34 34 md.qmu.numberofpartitions = 20 35 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')36 md.qmu.partition = md.qmu.partition -135 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 36 md.qmu.partition = md.qmu.partition - 1 37 37 38 38 #variables 39 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1,0.01)39 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01) 40 40 41 41 #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])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]) 50 50 51 51 #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']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'] 53 53 md.qmu.mass_flux_profile_directory = getcwd() 54 54 … … 60 60 md.qmu.params.interval_type = 'forward' 61 61 md.qmu.isdakota = 1 62 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses62 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 63 63 64 64 if version >= 6: 65 66 67 65 md.qmu.params.analysis_driver = 'matlab' 66 md.qmu.params.evaluation_scheduling = 'master' 67 md.qmu.params.processors_per_evaluation = 2 68 68 else: 69 70 69 md.qmu.params.analysis_driver = 'stressbalance' 70 md.qmu.params.evaluation_concurrency = 1 71 71 72 72 #solve 73 md.verbose = verbose('000000000') 74 md = solve(md, 'Stressbalance','overwrite','y')73 md.verbose = verbose('000000000') # this line is recommended 74 md = solve(md, 'Stressbalance', 'overwrite', 'y') 75 75 md.qmu.results = md.results.dakota 76 76 … … 78 78 #ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr 79 79 #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. 81 81 #we put all that data in the moments, which we will use to test for success. 82 82 #also, check that the stddev are 0. 83 83 md.results.dakota.moments = [] 84 84 for i in range(8): 85 85 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].mean) 86 86 87 87 for i in range(8): 88 88 md.results.dakota.moments.append(md.results.dakota.dresp_out[i].stddev) 89 89 90 field_names 90 field_names = ['moments'] 91 91 field_tolerances = [1e-11] 92 92 field_values = [md.results.dakota.moments] -
issm/trunk-jpl/test/NightlyRun/test415.py
r23785 r23793 10 10 from solve import * 11 11 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')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') 17 17 18 18 #control parameters 19 md.inversion.iscontrol =120 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 =224 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**-727 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.vx32 md.inversion.vy_obs =md.initialization.vy19 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 33 33 34 md.cluster =generic('name',gethostname(),'np',3)35 md =solve(md,'Steadystate')34 md.cluster = generic('name', gethostname(), 'np', 3) 35 md = solve(md, 'Steadystate') 36 36 37 37 #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 ] 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 = [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 10 10 from solve import * 11 11 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')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') 17 17 18 18 #control parameters 19 md.inversion.iscontrol =120 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 =224 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**-727 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.vx32 md.inversion.vy_obs =md.initialization.vy19 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 33 33 34 md.cluster=generic('name',gethostname(),'np',3) 35 md=solve(md,'Steadystate') 34 35 md.cluster = generic('name', gethostname(), 'np', 3) 36 md = solve(md, 'Steadystate') 36 37 37 38 #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 ] 39 field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy', 'Vz', 'Temperature', 'BasalforcingsGroundediceMeltingRate'] 40 field_tolerances = [1e-08, 1e-07, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-07, 1e-08, 1e-05] 41 field_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 1 1 #Test Name: SquareSheetShelfDiadSSA3dDakotaSamp 2 import numpy as np3 2 from os import getcwd 4 3 from model import * … … 12 11 from dmeth_params_set import * 13 12 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 easy20 md.geometry.thickness[:] = 1 #make it easy21 md.geometry.surface = md.geometry.base +md.geometry.thickness13 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 22 21 23 22 #constrain all velocities to 1 m/yr, in the y-direction … … 34 33 #partitioning 35 34 md.qmu.numberofpartitions = 20 36 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')37 md.qmu.partition = md.qmu.partition -135 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 36 md.qmu.partition = md.qmu.partition - 1 38 37 39 38 #variables 40 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1,0.01)39 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_FrictionCoefficient', 1, 0.01) 41 40 42 41 #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])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]) 51 50 52 51 #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']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'] 54 53 md.qmu.mass_flux_profile_directory = getcwd() 55 54 56 55 #method 57 56 md.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')57 md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'lhs') 59 58 60 59 #parameters 61 60 md.qmu.params.direct = True 62 61 md.qmu.params.analysis_components = '' 63 md.qmu.params.tabular_graphics_data = True ;62 md.qmu.params.tabular_graphics_data = True 64 63 65 64 if version >= 6: 66 67 68 65 md.qmu.params.analysis_driver = 'matlab' 66 md.qmu.params.evaluation_scheduling = 'master' 67 md.qmu.params.processors_per_evaluation = 2 69 68 else: 70 71 69 md.qmu.params.analysis_driver = 'stressbalance' 70 md.qmu.params.evaluation_concurrency = 1 72 71 73 72 #partitioning 74 73 md.qmu.numberofpartitions = 20 75 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')76 md.qmu.partition = md.qmu.partition -174 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 75 md.qmu.partition = md.qmu.partition - 1 77 76 md.qmu.isdakota = 1 78 77 79 md.stressbalance.reltol = 10**-5 78 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 80 79 81 80 #solve 82 md.verbose = verbose('000000000') 81 md.verbose = verbose('000000000') # this line is recommended 83 82 84 83 # There may be a pair of numpy warnings in the function true_divide, 85 # 86 # 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 86 md = solve(md, 'Stressbalance', 'overwrite', 'y') 88 87 89 88 #Fields and tolerances to track changes … … 92 91 #ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr 93 92 #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. 95 94 #we put all that data in the montecarlo field, which we will use to test for success. 96 95 #also, check that the stddev are 0. 97 96 md.results.dakota.montecarlo = [] 98 97 for i in range(8): 99 98 md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean) 100 99 101 100 for i in range(8): 102 101 md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev) 103 102 104 field_names 103 field_names = ['moments'] 105 104 field_tolerances = [1e-11] 106 field_values 105 field_values = [md.results.dakota.montecarlo] -
issm/trunk-jpl/test/NightlyRun/test418.py
r23464 r23793 16 16 #test partitioning, and partition averaging 17 17 # python cannot handle resolutions greater than 30010 18 md = triangle(model(), '../Exp/Square.exp',30000.)18 md = triangle(model(), '../Exp/Square.exp', 30000.) 19 19 #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)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) 24 24 25 25 #partitioning … … 28 28 #corrupted size vs. prev_size 29 29 #Aborted (core dumped) 30 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions)30 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions) 31 31 32 md.qmu.partition = md.qmu.partition - 1 32 33 33 md.qmu.partition=md.qmu.partition-1 34 35 vector = np.arange(1,1+md.mesh.numberofvertices,1).reshape(-1,1) 34 vector = np.arange(1, 1 + md.mesh.numberofvertices, 1).reshape(-1, 1) 36 35 # double check this before committing: 37 36 #print 'before AreaAverageOntoPartition' 38 vector_on_partition = AreaAverageOntoPartition(md, vector)37 vector_on_partition = AreaAverageOntoPartition(md, vector) 39 38 vector_on_nodes = vector_on_partition[md.qmu.partition] 40 39 41 field_names 40 field_names = ['vector_on_nodes'] 42 41 field_tolerances = [1e-11] 43 field_values 42 field_values = [vector_on_nodes] -
issm/trunk-jpl/test/NightlyRun/test419.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfStressSSAHOTiling 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'SSA', '../Exp/SquareHalfRight.exp', 'fill', 'HO') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Stressbalance') 19 18 20 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [2e-09, 1e-09, 1e-09, 1e-09, 1e-09] 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] -
issm/trunk-jpl/test/NightlyRun/test420.py
r23257 r23793 1 1 #Test Name: SquareSheetShelfDakotaScaledResponse 2 3 2 import numpy as np 4 3 from model import * … … 11 10 from partitioner import * 12 11 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)12 md = triangle(model(), '../Exp/Square.exp', 200000.) 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) 18 17 19 18 #partitioning 20 19 md.qmu.numberofpartitions = 10 21 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions)22 md.qmu.partition = md.qmu.partition -120 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions) 21 md.qmu.partition = md.qmu.partition - 1 23 22 md.qmu.isdakota = 1 24 23 … … 30 29 31 30 #variables 32 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice,0.01)31 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01) 33 32 34 33 #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])34 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]) 36 35 37 36 #method … … 43 42 44 43 if version >= 6: 45 46 47 44 md.qmu.params.analysis_driver = 'matlab' 45 md.qmu.params.evaluation_scheduling = 'master' 46 md.qmu.params.processors_per_evaluation = 2 48 47 else: 49 50 48 md.qmu.params.analysis_driver = 'stressbalance' 49 md.qmu.params.evaluation_concurrency = 1 51 50 52 #imperative! 53 md.stressbalance.reltol = 10**-5 #tighten for qmu analysese51 #imperative! 52 md.stressbalance.reltol = 10**-5 #tighten for qmu analysese 54 53 55 54 #solve 56 md.verbose = verbose('000000000') 57 md = solve(md, 'Stressbalance','overwrite','y')55 md.verbose = verbose('000000000') # this line is recommended 56 md = solve(md, 'Stressbalance', 'overwrite', 'y') 58 57 md.qmu.results = md.results.dakota 59 58 … … 61 60 h = np.zeros((md.qmu.numberofpartitions,)) 62 61 for i in range(md.qmu.numberofpartitions): 63 62 h[i] = md.qmu.results.dresp_out[i].mean 64 63 65 64 #project onto grid … … 67 66 68 67 #Fields and tolerances to track changes 69 field_names 68 field_names = ['Thickness'] 70 69 field_tolerances = [1e-10] 71 field_values 70 field_values = [thickness] -
issm/trunk-jpl/test/NightlyRun/test421.py
r23470 r23793 1 1 #Test Name: SquareSheetShelfStressHOFS3dTiling 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'HO') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Stressbalance') 19 18 20 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [2e-06, 2e-06, 2e-05, 2e-06, 2e-06] 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] -
issm/trunk-jpl/test/NightlyRun/test422.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfStressSSAFS3dTiling 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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.419 md =solve(md,'Stressbalance')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'FS', '../Exp/SquareHalfRight.exp', 'fill', 'SSA') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md.stressbalance.reltol = 0.4 18 md = solve(md, 'Stressbalance') 20 19 21 20 #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 ] 21 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 22 field_tolerances = [4e-07, 4e-07, 2e-06, 4e-07, 5e-07] 23 field_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 10 10 11 11 12 radius =1.e613 shelfextent =2.e512 radius = 1.e6 13 shelfextent = 2.e5 14 14 15 md =roundmesh(model(),radius,50000.)16 #fix center node to 0, 017 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 center21 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] =127 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)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) 31 31 32 md.transient.isthermal =False33 md.transient.ismasstransport =False34 md.transient.issmb =True35 md.transient.isstressbalance =True36 md.transient.isgroundingline =True32 md.transient.isthermal = False 33 md.transient.ismasstransport = False 34 md.transient.issmb = True 35 md.transient.isstressbalance = True 36 md.transient.isgroundingline = True 37 37 38 38 #test different grounding line dynamics. 39 md.groundingline.migration ='AggressiveMigration'40 md =solve(md,'Transient')41 element_on_iceshelf_agressive =md.results.TransientSolution[0].MaskGroundediceLevelset42 vel_agressive =md.results.TransientSolution[0].Vel39 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 43 43 44 md.groundingline.migration ='SoftMigration'45 md =solve(md,'Transient')46 element_on_iceshelf_soft =md.results.TransientSolution[0].MaskGroundediceLevelset47 vel_soft =md.results.TransientSolution[0].Vel44 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 48 48 49 md.mask.groundedice_levelset =md.geometry.thickness + md.materials.rho_water/md.materials.rho_ice*md.geometry.bed50 md.groundingline.migration ='SubelementMigration'51 md.groundingline.friction_interpolation ='SubelementFriction1'52 md =solve(md,'Transient')53 element_on_iceshelf_subelement =md.results.TransientSolution[0].MaskGroundediceLevelset54 vel_subelement =md.results.TransientSolution[0].Vel49 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 55 55 56 md.groundingline.friction_interpolation ='SubelementFriction2'57 md =solve(md,'Transient')58 element_on_iceshelf_subelement2 =md.results.TransientSolution[0].MaskGroundediceLevelset59 vel_subelement2 =md.results.TransientSolution[0].Vel56 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 60 60 61 61 #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]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] -
issm/trunk-jpl/test/NightlyRun/test424.py
r22337 r23793 8 8 from solve import * 9 9 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.thickness20 md.smb.mass_balance[:] =100.21 md.transient.isstressbalance =False22 md.transient.isgroundingline =True23 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))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)) 26 26 27 md.cluster =generic('name',gethostname(),'np',3)28 md =solve(md,'Transient')27 md.cluster = generic('name', gethostname(), 'np', 3) 28 md = solve(md, 'Transient') 29 29 30 30 #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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 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] -
issm/trunk-jpl/test/NightlyRun/test425.py
r21408 r23793 8 8 from solve import * 9 9 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.thickness20 md.smb.mass_balance[:] =-150.21 md.transient.isstressbalance =False22 md.transient.isgroundingline =True23 md.groundingline.migration ='SoftMigration'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' 24 24 25 md.cluster =generic('name',gethostname(),'np',3)26 md =solve(md,'Transient')25 md.cluster = generic('name', gethostname(), 'np', 3) 26 md = solve(md, 'Transient') 27 27 28 28 #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 37 38 39 40 41 42 43 44 45 46 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] -
issm/trunk-jpl/test/NightlyRun/test426.py
r23757 r23793 8 8 from solve import * 9 9 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.thickness19 md.smb.mass_balance[:] =100.20 md =setflowequation(md,'SSA','all')21 md.transient.isstressbalance =False22 md.transient.isgroundingline =True23 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)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) 29 29 30 md =solve(md,'Transient')30 md = solve(md, 'Transient') 31 31 32 32 #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']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'] 36 36 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]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] 40 40 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 48 49 50 51 52 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 60 61 62 63 64 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 72 73 74 75 76 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] -
issm/trunk-jpl/test/NightlyRun/test427.py
r23011 r23793 8 8 from solve import * 9 9 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[:] =130018 md.geometry.surface =md.geometry.base+md.geometry.thickness19 md =setflowequation(md,'SSA','all')20 md.extrude(3, 1.)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.) 21 21 22 md.smb.mass_balance[:] =-15023 md.transient.isstressbalance =False24 md.transient.isgroundingline =True25 md.groundingline.migration ='SoftMigration'26 md.groundingline.melt_interpolation ='SubelementMelt1'27 md.cluster =generic('name',gethostname(),'np',3)28 md =solve(md,'Transient')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') 29 29 30 30 #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 39 40 41 42 43 44 45 46 47 48 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] -
issm/trunk-jpl/test/NightlyRun/test428.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfStressSSA2dNewton 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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 =117 md.stressbalance.restol =0.000118 md.cluster =generic('name',gethostname(),'np',3)19 md =solve(md,'Stressbalance')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.stressbalance.isnewton = 1 16 md.stressbalance.restol = 0.0001 17 md.cluster = generic('name', gethostname(), 'np', 3) 18 md = solve(md, 'Stressbalance') 20 19 21 20 #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 ] 21 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 22 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 23 field_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 1 1 #Test Name: SquareSheetShelfStressHONewton 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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 =118 md.stressbalance.restol =0.000119 md.cluster =generic('name',gethostname(),'np',3)20 md =solve(md,'Stressbalance')11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'HO', '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') 21 20 22 21 #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 ] 22 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 23 field_tolerances = [2e-06, 2e-06, 1e-06, 2e-06, 1e-06] 24 field_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 9 9 from solve import * 10 10 11 md = triangle(model(), '../Exp/Square.exp',100000.)12 md = setmask(md, '../Exp/SquareShelf.exp','')13 md = parameterize(md, '../Par/SquareSheetShelf.py')11 md = triangle(model(), '../Exp/Square.exp', 100000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 14 md.initialization.vx[:] = 1. 15 15 md.initialization.vy[:] = 1. … … 21 21 md.geometry.base[pos] = md.geometry.bed[pos] 22 22 md.geometry.surface = md.geometry.base + md.geometry.thickness 23 md = setflowequation(md, 'SSA','all')23 md = setflowequation(md, 'SSA', 'all') 24 24 25 25 #Boundary conditions: … … 29 29 md.stressbalance.spcvy[:] = float('NaN') 30 30 md.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)))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))) 34 34 md.stressbalance.spcvy[pos] = 0. 35 35 pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1))) … … 49 49 md.transient.ismasstransport = 1 50 50 md.transient.issmb = 1 51 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']51 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate'] 52 52 md.groundingline.migration = 'SubelementMigration' 53 md.groundingline.melt_interpolation = 'SubelementMelt1'53 md.groundingline.melt_interpolation = 'SubelementMelt1' 54 54 md.timestepping.final_time = 30 55 55 md.timestepping.time_step = 10 56 56 57 md.cluster = generic('name', gethostname(),'np',3)58 md = solve(md, 'Transient')57 md.cluster = generic('name', gethostname(), 'np', 3) 58 md = solve(md, 'Transient') 59 59 #print md.results.TransientSolution[0].BasalforcingsFloatingiceMeltingRate 60 60 #print md.results.TransientSolution[1].BasalforcingsFloatingiceMeltingRate … … 62 62 63 63 #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 ] 64 field_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'] 67 field_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] 70 field_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 10 10 from solve import * 11 11 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 =120 md.thermal.isdynamicbasalspc =121 md.initialization.waterfraction =np.zeros((md.mesh.numberofvertices))22 md.initialization.watercolumn =np.zeros((md.mesh.numberofvertices))23 md =solve(md,'Steadystate')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') 24 24 25 25 #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 ] 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 = [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 10 10 from solve import * 11 11 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 =120 md.initialization.waterfraction =np.zeros((md.mesh.numberofvertices))21 md.initialization.watercolumn =np.zeros((md.mesh.numberofvertices))22 md =solve(md,'Steadystate')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') 23 23 24 24 #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 ] 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 = [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 10 10 11 11 12 radius =1.e613 shelfextent =2.e512 radius = 1.e6 13 shelfextent = 2.e5 14 14 15 md =roundmesh(model(),radius,50000.)16 #fix center node to 0, 017 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 center21 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] =127 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)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) 32 32 33 md.transient.isthermal =False34 md.transient.ismasstransport =False35 md.transient.issmb =True36 md.transient.isstressbalance =False37 md.transient.isgroundingline =True33 md.transient.isthermal = False 34 md.transient.ismasstransport = False 35 md.transient.issmb = True 36 md.transient.isstressbalance = False 37 md.transient.isgroundingline = True 38 38 39 39 #test different grounding line dynamics. 40 md.groundingline.migration ='AggressiveMigration'41 md =solve(md,'Transient')42 element_on_iceshelf_agressive =md.results.TransientSolution[0].MaskGroundediceLevelset40 md.groundingline.migration = 'AggressiveMigration' 41 md = solve(md, 'Transient') 42 element_on_iceshelf_agressive = md.results.TransientSolution[0].MaskGroundediceLevelset 43 43 44 md.groundingline.migration ='SoftMigration'45 md =solve(md,'Transient')46 element_on_iceshelf_soft =md.results.TransientSolution[0].MaskGroundediceLevelset44 md.groundingline.migration = 'SoftMigration' 45 md = solve(md, 'Transient') 46 element_on_iceshelf_soft = md.results.TransientSolution[0].MaskGroundediceLevelset 47 47 48 md.groundingline.migration ='SubelementMigration'49 md =solve(md,'Transient')50 element_on_iceshelf_subelement =md.results.TransientSolution[0].MaskGroundediceLevelset48 md.groundingline.migration = 'SubelementMigration' 49 md = solve(md, 'Transient') 50 element_on_iceshelf_subelement = md.results.TransientSolution[0].MaskGroundediceLevelset 51 51 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].MaskGroundediceLevelset52 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 56 56 57 57 #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]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] -
issm/trunk-jpl/test/NightlyRun/test434.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfL1L2 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/Square.exp', 150000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(4, 1.) 15 md = setflowequation(md, 'L1L2', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Stressbalance') 19 18 20 19 #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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [1e-06, 1e-06, 1e-06, 1e-06, 1e-07] 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] -
issm/trunk-jpl/test/NightlyRun/test435.py
r23016 r23793 9 9 from solve import * 10 10 11 md = triangle(model(), '../Exp/Square.exp',100000.)12 md = setmask(md, '../Exp/SquareShelf.exp','')13 md = parameterize(md, '../Par/SquareSheetShelf.py')11 md = triangle(model(), '../Exp/Square.exp', 100000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 14 md.initialization.vx[:] = 1. 15 15 md.initialization.vy[:] = 1. … … 21 21 md.geometry.base[pos] = md.geometry.bed[pos] 22 22 md.geometry.surface = md.geometry.base + md.geometry.thickness 23 md = md.extrude(4, 1.)24 md = setflowequation(md, 'HO','all')23 md = md.extrude(4, 1.) 24 md = setflowequation(md, 'HO', 'all') 25 25 26 26 #Boundary conditions: … … 30 30 md.stressbalance.spcvy[:] = float('Nan') 31 31 md.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)))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))) 35 35 md.stressbalance.spcvy[pos] = 0. 36 36 pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1))) … … 38 38 md.stressbalance.spcvy[pos2] = 0. 39 39 40 md.materials.rheology_B = 1. / ((10**-25)**(1. /3.)) * np.ones((md.mesh.numberofvertices,))40 md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices,)) 41 41 md.materials.rheology_law = 'None' 42 42 md.friction.coefficient[:] = np.sqrt(1e7) * np.ones((md.mesh.numberofvertices,)) … … 50 50 md.transient.ismasstransport = 1 51 51 md.transient.issmb = 1 52 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']52 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate'] 53 53 md.groundingline.migration = 'SubelementMigration' 54 md.groundingline.melt_interpolation = 'SubelementMelt1'54 md.groundingline.melt_interpolation = 'SubelementMelt1' 55 55 md.timestepping.final_time = 30 56 56 md.timestepping.time_step = 10 57 57 58 md.cluster = generic('name', gethostname(),'np',3)59 md = solve(md, 'Transient')58 md.cluster = generic('name', gethostname(), 'np', 3) 59 md = solve(md, 'Transient') 60 60 61 61 #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 ] 62 field_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'] 65 field_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] 68 field_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 9 9 from solve import * 10 10 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)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) 17 17 md.timestepping.time_step = 0. 18 18 md.thermal.isenthalpy = 1 … … 25 25 field_values = [] 26 26 for i in ['LliboutryDuval', 'CuffeyTemperate']: 27 28 print('====== Testing rheology law: ' + i + ' =====')27 print(' ') 28 print('====== Testing rheology law: ' + i + ' =') 29 29 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 9 9 from solve import * 10 10 11 md = triangle(model(), '../Exp/Square.exp',300000.)12 md = setmask(md, '','')13 md = parameterize(md, '../Par/SquareThermal.py')11 md = triangle(model(), '../Exp/Square.exp', 300000.) 12 md = setmask(md, '', '') 13 md = parameterize(md, '../Par/SquareThermal.py') 14 14 15 15 h = 100. … … 18 18 md.geometry.surface = md.geometry.base + md.geometry.thickness 19 19 20 md.extrude(41, 2.)21 md = setflowequation(md, 'HO','all')20 md.extrude(41, 2.) 21 md = setflowequation(md, 'HO', 'all') 22 22 md.thermal.isenthalpy = True 23 23 md.thermal.isdynamicbasalspc = True 24 24 25 25 #Basal forcing 26 Ts = 273.15 -3.27 Tb = 273.15 -1.26 Ts = 273.15 - 3. 27 Tb = 273.15 - 1. 28 28 Tsw = Tb 29 qgeo = md.materials.thermalconductivity / max(md.geometry.thickness) * (Tb - Ts) #qgeo=kappa*(Tb-Ts)/H29 qgeo = md.materials.thermalconductivity / max(md.geometry.thickness) * (Tb - Ts) #qgeo = kappa*(Tb-Ts)/H 30 30 md.basalforcings.geothermalflux[np.where(md.mesh.vertexonbase)] = qgeo 31 31 md.initialization.temperature = qgeo / md.materials.thermalconductivity * (md.geometry.surface - md.mesh.z) + Ts … … 43 43 t2 = 100. 44 44 md.timestepping.final_time = 400. 45 md.thermal.spctemperature = np.array([SPC_cold, SPC_cold,SPC_warm,SPC_warm,SPC_cold]).T46 md.thermal.spctemperature = np.vstack((md.thermal.spctemperature, [t0, t1-1, t1, t2-1, t2]))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])) 47 47 #print np.shape(md.thermal.spctemperature) 48 48 #print md.thermal.spctemperature … … 57 57 #Go solve 58 58 md.verbose = verbose(0) 59 md.cluster = generic('name', gethostname(),'np',3)60 md = solve(md, 'Transient')59 md.cluster = generic('name', gethostname(), 'np', 3) 60 md = solve(md, 'Transient') 61 61 62 62 #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]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] 71 71 i1 = 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 ] 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 = [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 10 10 from frictionwaterlayer import * 11 11 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')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 16 md.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.]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.] 20 20 md.friction.f = 0.8 21 md.cluster = generic('name', gethostname(),'np',3)22 md = solve(md, 'Transient')21 md.cluster = generic('name', gethostname(), 'np', 3) 22 md = solve(md, 'Transient') 23 23 24 24 #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 ] 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 = [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 10 10 from frictionwaterlayer import * 11 11 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')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') 17 17 md.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.]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.] 21 21 md.friction.f = 0.8 22 md.groundingline.melt_interpolation ='SubelementMelt2'23 md.cluster = generic('name', gethostname(),'np',3)24 md = solve(md, 'Transient')22 md.groundingline.melt_interpolation = 'SubelementMelt2' 23 md.cluster = generic('name', gethostname(), 'np', 3) 24 md = solve(md, 'Transient') 25 25 26 26 #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 ] 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 = [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 2 2 import numpy as np 3 3 from model import * 4 from socket import gethostname5 6 4 from triangle import * 7 5 from setmask import * … … 9 7 from setflowequation import * 10 8 from solve import * 11 12 9 from partitioner import * 13 10 from normal_uncertain import * 14 11 from response_function import * 15 12 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)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', oshostname(), 'np', 3) 21 18 22 19 #partitioning 23 20 md.qmu.numberofpartitions = md.mesh.numberofvertices 24 md = partitioner(md, 'package','linear')25 md.qmu.partition = md.qmu.partition -121 md = partitioner(md, 'package', 'linear') 22 md.qmu.partition = md.qmu.partition - 1 26 23 md.qmu.isdakota = 1 27 24 … … 33 30 34 31 #variables 35 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice,0.01)32 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('MaterialsRhoIce', md.materials.rho_ice, 0.01) 36 33 37 34 #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])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]) 39 36 40 37 #method … … 45 42 md.qmu.params.interval_type = 'forward' 46 43 47 if version >=6:48 49 50 44 if version >= 6: 45 md.qmu.params.analysis_driver = 'matlab' 46 md.qmu.params.evaluation_scheduling = 'master' 47 md.qmu.params.processors_per_evaluation = 2 51 48 else: 52 md.qmu.params.analysis_driver='stressbalance'53 49 md.qmu.params.analysis_driver = 'stressbalance' 50 md.qmu.params.evaluation_concurrency = 1 54 51 55 #imperative! 56 md.stressbalance.reltol = 10**-5 #tighten for qmu analysese52 #imperative! 53 md.stressbalance.reltol = 10**-5 #tighten for qmu analysese 57 54 58 55 #solve 59 md.verbose = verbose('000000000') 60 md = solve(md, 'Stressbalance','overwrite','y')56 md.verbose = verbose('000000000') # this line is recommended 57 md = solve(md, 'Stressbalance', 'overwrite', 'y') 61 58 md.qmu.results = md.results.dakota 62 59 … … 64 61 h = np.zeros(md.qmu.numberofpartitions) 65 62 for i in range(md.qmu.numberofpartitions): 66 63 h[i] = md.qmu.results.dresp_out[i].mean 67 64 68 65 #project onto grid 69 thickness 66 thickness = h[md.qmu.partition] 70 67 71 68 #Fields and tolerances to track changes 72 field_names 73 field_tolerances = [1e-10]69 field_names = ['Thickness'] 70 field_tolerances = [1e-10] 74 71 field_values = [thickness] -
issm/trunk-jpl/test/NightlyRun/test441.py
r23016 r23793 9 9 from solve import * 10 10 11 md = triangle(model(), '../Exp/Square.exp',100000.)12 md = setmask(md, '../Exp/SquareShelf.exp','')13 md = parameterize(md, '../Par/SquareSheetShelf.py')11 md = triangle(model(), '../Exp/Square.exp', 100000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 14 md.initialization.vx[:] = 1. 15 15 md.initialization.vy[:] = 1. … … 21 21 md.geometry.base[pos] = md.geometry.bed[pos] 22 22 md.geometry.surface = md.geometry.base + md.geometry.thickness 23 md = setflowequation(md, 'SSA','all')23 md = setflowequation(md, 'SSA', 'all') 24 24 25 25 #Boundary conditions: … … 29 29 md.stressbalance.spcvy[:] = float('Nan') 30 30 md.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)))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))) 34 34 md.stressbalance.spcvy[pos] = 0. 35 35 pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1))) … … 37 37 md.stressbalance.spcvy[pos2] = 0. 38 38 39 md.materials.rheology_B = 1. / ((10**-25)**(1. /3.)) * np.ones((md.mesh.numberofvertices,))39 md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices,)) 40 40 md.materials.rheology_law = 'None' 41 41 md.friction.coefficient[:] = np.sqrt(1e7) * np.ones((md.mesh.numberofvertices,)) … … 49 49 md.transient.ismasstransport = 1 50 50 md.transient.issmb = 1 51 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']51 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate'] 52 52 md.groundingline.migration = 'SubelementMigration' 53 md.groundingline.melt_interpolation = 'SubelementMelt2'54 md.groundingline.friction_interpolation = 'SubelementFriction2'53 md.groundingline.melt_interpolation = 'SubelementMelt2' 54 md.groundingline.friction_interpolation = 'SubelementFriction2' 55 55 md.timestepping.final_time = 30. 56 56 md.timestepping.time_step = 10. 57 57 58 md.cluster = generic('name', gethostname(),'np',3)59 md = solve(md, 'Transient')58 md.cluster = generic('name', gethostname(), 'np', 3) 59 md = solve(md, 'Transient') 60 60 61 61 #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 ] 62 field_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'] 65 field_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] 68 field_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 9 9 from solve import * 10 10 11 md = triangle(model(), '../Exp/Square.exp',100000.)12 md = setmask(md, '../Exp/SquareShelf.exp','')13 md = parameterize(md, '../Par/SquareSheetShelf.py')11 md = triangle(model(), '../Exp/Square.exp', 100000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 14 md.initialization.vx[:] = 1. 15 15 md.initialization.vy[:] = 1. … … 21 21 md.geometry.base[pos] = md.geometry.bed[pos] 22 22 md.geometry.surface = md.geometry.base + md.geometry.thickness 23 md = md.extrude(4, 1.)24 md = setflowequation(md, 'HO','all')23 md = md.extrude(4, 1.) 24 md = setflowequation(md, 'HO', 'all') 25 25 26 26 #Boundary conditions: … … 30 30 md.stressbalance.spcvy[:] = float('Nan') 31 31 md.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)))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))) 35 35 md.stressbalance.spcvy[pos] = 0. 36 36 pos2 = np.intersect1d(np.array(np.where(md.mesh.x < 0.1)), np.array(np.where(md.mesh.x > -0.1))) … … 38 38 md.stressbalance.spcvy[pos2] = 0. 39 39 40 md.materials.rheology_B = 1. / ((10**-25)**(1. /3.)) * np.ones((md.mesh.numberofvertices,))40 md.materials.rheology_B = 1. / ((10**-25)**(1. / 3.)) * np.ones((md.mesh.numberofvertices,)) 41 41 md.materials.rheology_law = 'None' 42 42 md.friction.coefficient[:] = np.sqrt(1e7) * np.ones((md.mesh.numberofvertices,)) … … 50 50 md.transient.ismasstransport = 1 51 51 md.transient.issmb = 1 52 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate']52 md.transient.requested_outputs = ['default', 'BasalforcingsFloatingiceMeltingRate'] 53 53 md.groundingline.migration = 'SubelementMigration' 54 md.groundingline.friction_interpolation = 'SubelementFriction2'55 md.groundingline.melt_interpolation = 'SubelementMelt2'54 md.groundingline.friction_interpolation = 'SubelementFriction2' 55 md.groundingline.melt_interpolation = 'SubelementMelt2' 56 56 md.timestepping.final_time = 30 57 57 md.timestepping.time_step = 10 58 58 59 md.cluster = generic('name', gethostname(),'np',3)60 md = solve(md, 'Transient')59 md.cluster = generic('name', gethostname(), 'np', 3) 60 md = solve(md, 'Transient') 61 61 62 62 #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 ] 63 field_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'] 66 field_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] 69 field_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 13 13 from regionaloutput import regionaloutput 14 14 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]-1021 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 =False27 md.transient.isgroundingline =True28 md.groundingline.migration ='AggressiveMigration';29 md.mesh.scale_factor =1.1*np.ones((md.mesh.numberofvertices))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)) 30 30 31 md.settings.output_frequency =232 md =setflowequation(md,'SSA','all')33 md.cluster =generic('name',gethostname(),'np',3)31 md.settings.output_frequency = 2 32 md = setflowequation(md, 'SSA', 'all') 33 md.cluster = generic('name', gethostname(), 'np', 3) 34 34 35 regionalmask =np.zeros((md.mesh.numberofvertices))36 inflag =ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,'../Exp/SquareHalfRight.exp','node',1)35 regionalmask = np.zeros((md.mesh.numberofvertices)) 36 inflag = ContourToMesh(md.mesh.elements, md.mesh.x, md.mesh.y, '../Exp/SquareHalfRight.exp', 'node', 1) 37 37 regionalmask[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']38 md.transient.requested_outputs = ['default', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1', 'TotalSmb1', 'IceMass1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceVolumeAboveFloatation2', 'IceVolumeAboveFloatation', 'IceMassScaled1', 'IceVolumeScaled1', 'IceVolumeAboveFloatationScaled1', 'IceVolumeAboveFloatationScaled2'] 39 39 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)]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)] 53 53 54 md.extrude(3, 1.)55 md2 =copy.deepcopy(md)54 md.extrude(3, 1.) 55 md2 = copy.deepcopy(md) 56 56 md2.collapse() 57 md =solve(md,'Transient')57 md = solve(md, 'Transient') 58 58 59 59 #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 ] 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 = [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 1 1 #Test Name: SquareShelfTranForceNeg2dDakotaLocal 2 2 import numpy as np 3 from os import getcwd4 3 from model import * 5 from socket import gethostname6 4 from triangle import * 7 5 from setmask import * … … 15 13 from regionaloutput import * 16 14 17 #model not consistent: equality thickness =surface-base violated15 #model not consistent: equality thickness = surface-base violated 18 16 19 md = triangle(model(), '../Exp/Square.exp',150000.)20 md = setmask(md, '../Exp/SquareShelf.exp','')21 md = parameterize(md, '../Par/SquareSheetShelf.py')17 md = triangle(model(), '../Exp/Square.exp', 150000.) 18 md = setmask(md, '../Exp/SquareShelf.exp', '') 19 md = parameterize(md, '../Par/SquareSheetShelf.py') 22 20 md.geometry.bed = md.geometry.base.copy() 23 21 pos = np.where(md.mask.groundedice_levelset < 0) 24 md.geometry.bed[pos] = md.geometry.base[pos] -1022 md.geometry.bed[pos] = md.geometry.base[pos] - 10 25 23 md.friction.coefficient = 20. * np.ones((md.mesh.numberofvertices,)) 26 24 md.friction.p = np.ones((md.mesh.numberofelements,)) … … 31 29 32 30 md.settings.output_frequency = 3 33 md = setflowequation(md, 'SSA','all')34 md.cluster = generic('name', oshostname(),'np',3)31 md = setflowequation(md, 'SSA', 'all') 32 md.cluster = generic('name', oshostname(), 'np', 3) 35 33 36 34 regionalmask = np.zeros((md.mesh.numberofvertices,)) 37 c_in = ContourToMesh(md.mesh.elements, md.mesh.x,md.mesh.y,'../Exp/SquareHalfRight.exp','node',1)35 c_in = ContourToMesh(md.mesh.elements, md.mesh.x, md.mesh.y, '../Exp/SquareHalfRight.exp', 'node', 1) 38 36 regionalmask[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'))37 md.transient.requested_outputs = ['default', 'GroundedArea', 'FloatingArea', 'IceVolumeAboveFloatation', 'GroundedArea1', 'FloatingArea1', 'TotalFloatingBmb1', 'TotalGroundedBmb1', 'TotalSmb1', 38 'IceMass1', 'IceVolume1', 'IceVolumeAboveFloatation1', 'IceVolumeAboveFloatation'] 39 md.outputdefinition.definitions.append(regionaloutput('name', 'GroundedArea1', 'outputnamestring', 'GroundedArea', 'mask', regionalmask, 40 'definitionstring', 'Outputdefinition1')) 41 md.outputdefinition.definitions.append(regionaloutput('name', 'FloatingArea1', 'outputnamestring', 'FloatingArea', 'mask', regionalmask, 42 'definitionstring', 'Outputdefinition2')) 43 md.outputdefinition.definitions.append(regionaloutput('name', 'TotalFloatingBmb1', 'outputnamestring', 'TotalFloatingBmb', 'mask', regionalmask, 44 'definitionstring', 'Outputdefinition3')) 45 md.outputdefinition.definitions.append(regionaloutput('name', 'TotalGroundedBmb1', 'outputnamestring', 'TotalGroundedBmb', 'mask', regionalmask, 46 'definitionstring', 'Outputdefinition4')) 47 md.outputdefinition.definitions.append(regionaloutput('name', 'IceMass1', 'outputnamestring', 'IceMass', 'mask', regionalmask, 48 'definitionstring', 'Outputdefinition5')) 49 md.outputdefinition.definitions.append(regionaloutput('name', 'IceVolume1', 'outputnamestring', 'IceVolume', 'mask', regionalmask, 50 'definitionstring', 'Outputdefinition6')) 51 md.outputdefinition.definitions.append(regionaloutput('name', 'IceVolumeAboveFloatation1', 'outputnamestring', 'IceVolumeAboveFloatation', 'mask', regionalmask, 52 'definitionstring', 'Outputdefinition7')) 53 md.outputdefinition.definitions.append(regionaloutput('name', 'TotalSmb1', 'outputnamestring', 'TotalSmb', 'mask', regionalmask, 54 'definitionstring', 'Outputdefinition8')) 55 md.outputdefinition.definitions.append(regionaloutput('name', 'TotalSmb2', 'outputnamestring', 'TotalSmb', 'mask', regionalmask, 56 'definitionstring', 'Outputdefinition9')) 59 57 60 md.extrude(3, 1.)58 md.extrude(3, 1.) 61 59 md.collapse() 62 60 … … 68 66 69 67 #variables 70 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_BasalforcingsFloatingiceMeltingRate', 1,0.1)68 md.qmu.variables.drag_coefficient = normal_uncertain.normal_uncertain('scaled_BasalforcingsFloatingiceMeltingRate', 1, 0.1) 71 69 72 70 #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])71 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]) 72 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]) 73 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]) 74 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]) 75 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]) 76 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]) 77 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]) 78 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]) 79 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]) 80 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]) 81 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]) 84 82 85 83 #method 86 84 md.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')85 md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'random') 88 86 89 87 #parameters … … 93 91 94 92 if version >= 6: 95 96 97 93 md.qmu.params.analysis_driver = 'matlab' 94 md.qmu.params.evaluation_scheduling = 'master' 95 md.qmu.params.processors_per_evaluation = 2 98 96 else: 99 100 97 md.qmu.params.analysis_driver = 'stressbalance' 98 md.qmu.params.evaluation_concurrency = 1 101 99 102 100 #partitioning 103 101 md.qmu.numberofpartitions = 10 104 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')105 md.qmu.partition = md.qmu.partition -1102 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 103 md.qmu.partition = md.qmu.partition - 1 106 104 md.qmu.isdakota = 1 107 105 108 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses106 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 109 107 110 108 #solve 111 md.verbose = verbose('000000000') 112 md = solve(md, 'Transient','overwrite','y')109 md.verbose = verbose('000000000') # this line is recommended 110 md = solve(md, 'Transient', 'overwrite', 'y') 113 111 114 112 #Fields and tolerances to track changes … … 118 116 md.results.dakota.montecarlo = [] 119 117 for i in range(11): 120 118 md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean) 121 119 122 120 for i in range(11): 123 121 md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev) 124 122 125 field_names 123 field_names = ['montecarlo'] 126 124 field_tolerances = [1e-11] 127 125 field_values = [md.results.dakota.montecarlo] -
issm/trunk-jpl/test/NightlyRun/test445.py
r23445 r23793 13 13 from ContourToMesh import * 14 14 15 #model not consistent: equality thickness =surface-base violated15 #model not consistent: equality thickness = surface-base violated 16 16 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 =125 md.thermal.isdynamicbasalspc =126 md.initialization.waterfraction =np.zeros((md.mesh.numberofvertices))27 md.initialization.watercolumn =np.zeros((md.mesh.numberofvertices))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)) 28 28 29 md.friction.coupling =330 md.friction.effective_pressure =md.materials.rho_ice*md.constants.g*md.geometry.thickness+md.materials.rho_water*md.constants.g*md.geometry.base29 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 31 31 32 32 #dakota version … … 35 35 36 36 #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)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) 39 39 40 40 #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])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]) 49 49 50 50 #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']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'] 52 52 md.qmu.mass_flux_profile_directory = getcwd() 53 53 54 54 #method 55 55 md.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')56 md.qmu.method = dmeth_params_set(md.qmu.method, 'seed', 1234, 'samples', 20, 'sample_type', 'random') 57 57 58 58 #parameters 59 59 md.qmu.params.direct = True 60 60 md.qmu.params.analysis_components = '' 61 md.qmu.params.tabular_graphics_data = True ;61 md.qmu.params.tabular_graphics_data = True 62 62 63 63 if version >= 6: 64 65 66 64 md.qmu.params.analysis_driver = 'matlab' 65 md.qmu.params.evaluation_scheduling = 'master' 66 md.qmu.params.processors_per_evaluation = 2 67 67 else: 68 69 68 md.qmu.params.analysis_driver = 'steadystate' 69 md.qmu.params.evaluation_concurrency = 1 70 70 71 71 #partitioning 72 72 md.qmu.numberofpartitions = 10 73 md = partitioner(md, 'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on')74 md.qmu.partition = md.qmu.partition -173 md = partitioner(md, 'package', 'chaco', 'npart', md.qmu.numberofpartitions, 'weighting', 'on') 74 md.qmu.partition = md.qmu.partition - 1 75 75 md.qmu.isdakota = 1 76 76 77 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses77 md.stressbalance.reltol = 10**-5 #tighten for qmu analyses 78 78 79 79 80 80 #solve 81 md.verbose = verbose('000000000') 82 md = solve(md, 'Steadystate','overwrite','y')81 md.verbose = verbose('000000000') # this line is recommended 82 md = solve(md, 'Steadystate', 'overwrite', 'y') 83 83 84 84 #Fields and tolerances to track changes … … 88 88 md.results.dakota.montecarlo = [] 89 89 for i in range(8): 90 90 md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].mean) 91 91 92 92 for i in range(8): 93 93 md.results.dakota.montecarlo.append(md.results.dakota.dresp_out[i].stddev) 94 94 95 field_names 95 field_names = ['montecarlo'] 96 96 field_tolerances = [2e-10] 97 97 field_values = [md.results.dakota.montecarlo] -
issm/trunk-jpl/test/NightlyRun/test450.py
r21408 r23793 1 1 #Test Name: SquareSheetShelfStressSSAHigherOrder 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname 5 6 4 from triangle import * 7 5 from setmask import * … … 10 8 from solve import * 11 9 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)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.cluster = generic('name', gethostname(), 'np', 3) 17 15 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 ] 16 field_names = [] 17 field_tolerances = [] 18 field_values = [] 19 for 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 1 1 #Test Name: SquareSheetShelfStressHOHigherOrder 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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)11 md = triangle(model(), '../Exp/Square.exp', 180000.) 12 md = setmask(md, '../Exp/SquareShelf.exp', '') 13 md = parameterize(md, '../Par/SquareSheetShelf.py') 14 md.extrude(5, 1.) 15 md = setflowequation(md, 'HO', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 18 17 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 ] 18 field_names = [] 19 field_tolerances = [] 20 field_values = [] 21 for 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 10 10 from matestar import * 11 11 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.)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.) 16 16 md.materials = matestar() 17 17 md.materials.rheology_B = 3.15e8 * np.ones((md.mesh.numberofvertices,)) 18 18 md.materials.rheology_Ec = np.ones((md.mesh.numberofvertices,)) 19 19 md.materials.rheology_Es = 3 * np.ones((md.mesh.numberofvertices,)) 20 md.cluster = generic('name', gethostname(),'np',3)20 md.cluster = generic('name', gethostname(), 'np', 3) 21 21 22 22 #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 ] 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 + [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 10 10 from matestar import * 11 11 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.)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.) 16 16 md.materials = matestar() 17 17 md.materials.rheology_B = 3.15e8 * np.ones((md.mesh.numberofvertices,)) … … 19 19 md.materials.rheology_Es = 3. * np.ones((md.mesh.numberofvertices,)) 20 20 21 md = setflowequation(md, 'FS','all')21 md = setflowequation(md, 'FS', 'all') 22 22 md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices,)) 23 23 md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices,)) … … 29 29 md.thermal.isenthalpy = 1 30 30 md.thermal.isdynamicbasalspc = 1 31 md.cluster = generic('name', gethostname(),'np',3)32 md = solve(md, 'Transient')31 md.cluster = generic('name', gethostname(), 'np', 3) 32 md = solve(md, 'Transient') 33 33 34 34 #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 ] 35 field_names = ['Enthalpy1', 'Waterfraction1', 'Temperature1', 36 'Enthalpy2', 'Waterfraction2', 'Temperature2', 37 'Enthalpy3', 'Waterfraction3', 'Temperature3'] 38 field_tolerances = [1e-12, 1e-11, 1e-12, 39 1e-12, 1e-10, 1e-12, 40 1e-12, 1e-9, 1e-12] 41 field_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 1 1 #Test Name: SquareSheetShelfAmrBamgField 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 9 8 from solve import * 10 9 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)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.cluster = generic('name', gethostname(), 'np', 3) 16 15 md.transient.isstressbalance = 1 17 16 md.transient.ismasstransport = 1 … … 37 36 md.timestepping.final_time = 3 38 37 md.timestepping.time_step = 1 39 md = solve(md, 'Transient')38 md = solve(md, 'Transient') 40 39 41 40 #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 ] 41 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 42 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 43 field_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 1 1 #Test Name: SquareSheetShelfAmrBamgGroundingline 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 9 8 from solve import * 10 9 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)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.cluster = generic('name', gethostname(), 'np', 3) 16 15 md.transient.isstressbalance = 1 17 16 md.transient.ismasstransport = 1 … … 37 36 md.timestepping.final_time = 3 38 37 md.timestepping.time_step = 1 39 md = solve(md, 'Transient')38 md = solve(md, 'Transient') 40 39 41 40 #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 ] 41 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 42 field_tolerances = [1e-8, 1e-8, 1e-8, 1e-8] 43 field_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 1 1 #Test Name: SquareSheetShelfAmrBamgIceFront 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 9 8 from solve import * 10 9 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)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.cluster = generic('name', gethostname(), 'np', 3) 16 15 md.transient.isstressbalance = 1 17 16 md.transient.ismasstransport = 1 … … 37 36 md.timestepping.final_time = 3 38 37 md.timestepping.time_step = 1 39 md = solve(md, 'Transient')38 md = solve(md, 'Transient') 40 39 41 40 #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 ] 41 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 42 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 43 field_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 1 1 #Test Name: SquareSheetShelfAmrBamgAll 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 9 8 from solve import * 10 9 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)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.cluster = generic('name', gethostname(), 'np', 3) 16 15 md.transient.isstressbalance = 1 17 16 md.transient.ismasstransport = 1 … … 37 36 md.timestepping.final_time = 3 38 37 md.timestepping.time_step = 1 39 md = solve(md, 'Transient')38 md = solve(md, 'Transient') 40 39 41 40 #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 ] 41 field_names = ['Vx', 'Vy', 'Vel', 'Pressure'] 42 field_tolerances = [1e-8, 1e-8, 1e-8, 1e-8] 43 field_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 9 9 10 10 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')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') 17 17 18 18 # 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 23 24 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] -
issm/trunk-jpl/test/NightlyRun/test502.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 # 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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [1e-08, 1e-08, 1e-08, 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] -
issm/trunk-jpl/test/NightlyRun/test503.py
r21408 r23793 9 9 10 10 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')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') 18 18 19 19 # 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 ] 20 field_names = ['Vx', 'Vy', 'Vz', 'Vel', 'Pressure'] 21 field_tolerances = [1e-09, 1e-09, 1e-09, 1e-09, 1e-09] 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] -
issm/trunk-jpl/test/NightlyRun/test504.py
r22343 r23793 9 9 10 10 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')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') 19 19 20 20 # 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 ] 21 field_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'] 35 field_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] 49 field_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 9 9 10 10 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')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') 18 18 19 19 # 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 ] 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 = [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 9 9 10 10 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')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') 20 20 21 21 # 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 ] 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 = [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 9 9 10 10 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')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') 19 19 20 20 # 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 ] 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 = [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 9 9 10 10 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')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') 19 19 20 20 # 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 ] 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 = [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 9 9 10 10 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 =719 md =solve(md,'Steadystate')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') 20 20 21 21 # 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 ] 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 = [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 9 9 10 10 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')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') 19 19 20 20 # 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 ] 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 = [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 9 9 from solve import * 10 10 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')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') 14 14 15 15 #impose hydrostatic equilibrium (required by Stokes) 16 md.geometry.base =-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness17 md.geometry.surface =md.geometry.base+md.geometry.thickness18 md.extrude(3, 1.)19 md =setflowequation(md,'FS','all')20 md =md.extract(md.mask.groundedice_levelset<0.)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.) 21 21 22 22 #control parameters 23 md.inversion.iscontrol =124 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 =228 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.vx34 md.inversion.vy_obs =md.initialization.vy23 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 35 35 36 md.cluster =generic('name',gethostname(),'np',1)37 md =solve(md,'Stressbalance')36 md.cluster = generic('name', gethostname(), 'np', 1) 37 md = solve(md, 'Stressbalance') 38 38 39 39 #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 ] 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 = [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 10 10 11 11 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')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') 17 17 18 18 # control parameters 19 md.inversion.iscontrol=120 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=224 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**-727 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.vx31 md.inversion.vy_obs=md.initialization.vy32 19 33 md.cluster=generic('name',gethostname(),'np',3) 34 md=solve(md,'Stressbalance') 20 md.inversion.iscontrol = 1 21 md.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))) 24 md.inversion.nsteps = 2 25 md.inversion.cost_functions = [103, 501] 26 md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, 2)) 27 md.inversion.cost_functions_coefficients[:, 1] = 2. * 10**-7 28 md.inversion.gradient_scaling = 3. * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters))) 29 md.inversion.maxiter_per_step = 2. * np.ones((md.inversion.nsteps)) 30 md.inversion.step_threshold = 2.99 * np.ones((md.inversion.nsteps)) 31 md.inversion.vx_obs = md.initialization.vx 32 md.inversion.vy_obs = md.initialization.vy 33 34 md.cluster = generic('name', gethostname(), 'np', 3) 35 md = solve(md, 'Stressbalance') 35 36 36 37 # 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 ] 38 field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy'] 39 field_tolerances = [1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11] 40 field_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 9 9 10 10 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')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 16 17 17 # 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') 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 md.thermal.penalty_lock = 5 33 md.cluster = generic('name', gethostname(), 'np', 3) 34 md = solve(md, 'Steadystate') 36 35 37 36 # 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 ] 37 field_names = ['Gradient', 'Misfits', 'FrictionCoefficient', 'Pressure', 'Vel', 'Vx', 'Vy', 'Vz', 'Temperature', 'BasalforcingsGroundediceMeltingRate'] 38 field_tolerances = [5e-08, 4e-10, 1e-10, 1e-10, 3e-6, 4e-6, 3.4e-6, 3e-6, 2e-6, 2e-06] 39 field_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 3 3 import copy 4 4 from model import * 5 from socket import gethostname6 5 from bamg import * 7 6 from setmask import * … … 12 11 13 12 #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.x18 y1 =md.mesh.y13 hVertices = 10000. * np.ones((27)) 14 hVertices[0:5] = 1000. 15 md = bamg(model(), 'domain', '../Exp/Pig.exp', 'hmax', 20000., 'hVertices', hVertices, 'gradation', 3.) 16 x1 = md.mesh.x 17 y1 = md.mesh.y 19 18 20 19 #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.x25 y2 =md.mesh.y20 md = bamg(model(), 'domain', '../Exp/Pig.exp', 'hmax', 10000.) 21 md = setmask(md, '../Exp/PigShelves.exp', '../Exp/PigIslands.exp') 22 md = parameterize(md, '../Par/Pig.py') 23 x2 = md.mesh.x 24 y2 = md.mesh.y 26 25 27 26 #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 =metric31 md2 =bamg(copy.deepcopy(md),'metric',md.miscellaneous.dummy,'hmin',1000.,'hmax',20000.,'gradation',3.)32 x3 =md2.mesh.x33 y3 =md2.mesh.y27 hessian = ComputeHessian(md.mesh.elements, md.mesh.x, md.mesh.y, md.inversion.vy_obs, 'node') 28 metric = ComputeMetric(hessian, 2. / 9., 1., 1000., 25. * 10.**3, []) 29 md.miscellaneous.dummy = metric 30 md2 = bamg(copy.deepcopy(md), 'metric', md.miscellaneous.dummy, 'hmin', 1000., 'hmax', 20000., 'gradation', 3.) 31 x3 = md2.mesh.x 32 y3 = md2.mesh.y 34 33 35 34 #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.x38 y4 =md2.mesh.y35 md2 = bamg(copy.deepcopy(md), 'metric', md.miscellaneous.dummy, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'anisomax', 1.) 36 x4 = md2.mesh.x 37 y4 = md2.mesh.y 39 38 40 39 #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.x45 y5 =md2.mesh.y40 hVertices = np.nan * np.ones((md.mesh.numberofvertices)) 41 hVertices[np.nonzero(md.mesh.vertexonboundary)] = 500. 42 md2 = bamg(copy.deepcopy(md), 'metric', md.miscellaneous.dummy, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'anisomax', 1., 'hVertices', hVertices) 43 x5 = md2.mesh.x 44 y5 = md2.mesh.y 46 45 47 46 #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.x50 y6 =md2.mesh.y47 md2 = bamg(copy.deepcopy(md), 'field', md.inversion.vy_obs, 'hmin', 1000., 'hmax', 20000., 'gradation', 3., 'Hessiantype', 0, 'err', np.array([1.])) 48 x6 = md2.mesh.x 49 y6 = md2.mesh.y 51 50 52 51 #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.x55 y7 =md2.mesh.y52 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.]])) 53 x7 = md2.mesh.x 54 y7 = md2.mesh.y 56 55 57 56 #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]57 field_names = ['x1', 'y1', 'x2', 'y2', 'x3', 'y3', 'x4', 'y4', 'x5', 'y5', 'x6', 'y6', 'x7', 'y7'] 58 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] 59 field_values = [x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7] -
issm/trunk-jpl/test/NightlyRun/test515.py
r22864 r23793 9 9 10 10 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 =217 md.cluster =generic('name',gethostname(),'np',3)18 md.transient.isstressbalance =False19 md.transient.ismasstransport =False20 md.transient.issmb =True21 md.transient.isthermal =True22 md.transient.isgroundingline =False23 md =solve(md,'Transient')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') 24 24 25 25 # 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 31 32 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] -
issm/trunk-jpl/test/NightlyRun/test516.py
r21408 r23793 1 1 #Test Name: PigTherSteaSUPG 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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 =218 md.cluster =generic('name',gethostname(),'np',3)19 md.timestepping.time_step =020 md.thermal.penalty_threshold =4021 md =solve(md,'Thermal')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.timestepping.time_step = 0 19 md.thermal.penalty_threshold = 40 20 md = solve(md, 'Thermal') 22 21 23 22 #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 ] 23 field_names = ['Temperature', 'BasalforcingsGroundediceMeltingRate'] 24 field_tolerances = [1e-11, 1e-11] 25 field_values = [md.results.ThermalSolution.Temperature, 26 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test530.py
r21408 r23793 9 9 10 10 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')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') 17 17 18 18 # 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 ] 19 field_names = ['DrivingStressX', 'DrivingStressY', 'Vel'] 20 field_tolerances = [1e-13, 1e-13, 1e-13] 21 field_values = [md.results.BalancevelocitySolution.DrivingStressX, 22 md.results.BalancevelocitySolution.DrivingStressY, 23 md.results.BalancevelocitySolution.Vel] -
issm/trunk-jpl/test/NightlyRun/test531.py
r21408 r23793 9 9 10 10 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')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') 19 19 20 20 # 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 ] 21 field_names = ['DrivingStressX', 'DrivingStressY', 'Vel'] 22 field_tolerances = [1e-13, 1e-13, 1e-13] 23 field_values = [md.results.BalancevelocitySolution.DrivingStressX, 24 md.results.BalancevelocitySolution.DrivingStressY, 25 md.results.BalancevelocitySolution.Vel] -
issm/trunk-jpl/test/NightlyRun/test540.py
r23653 r23793 9 9 from calvingvonmises import * 10 10 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')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') 15 15 md.timestepping.time_step = 2 16 16 md.timestepping.final_time = 50 … … 26 26 27 27 #Force MUMPS sequential analysis 28 md.toolkits.DefaultAnalysis.mat_mumps_icntl_28 =129 md.cluster = generic('name', gethostname(),'np',2)30 md = solve(md, 'Transient')28 md.toolkits.DefaultAnalysis.mat_mumps_icntl_28 = 1 29 md.cluster = generic('name', gethostname(), 'np', 2) 30 md = solve(md, 'Transient') 31 31 32 32 #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 ] 33 field_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'] 36 field_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] 39 field_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 9 9 from calvingvonmises import * 10 10 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')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') 16 16 md.timestepping.time_step = 2 17 17 md.timestepping.final_time = 50 … … 27 27 28 28 #Force MUMPS sequential analysis 29 md.toolkits.DefaultAnalysis.mat_mumps_icntl_28 =130 md.cluster = generic('name', gethostname(),'np',2)31 md = solve(md, 'Transient')29 md.toolkits.DefaultAnalysis.mat_mumps_icntl_28 = 1 30 md.cluster = generic('name', gethostname(), 'np', 2) 31 md = solve(md, 'Transient') 32 32 33 33 #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 ] 34 field_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'] 37 field_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] 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].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 9 9 from solve import * 10 10 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')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') 17 17 18 18 #Fields and tolerances to track changes 19 field_names =['Thickness']20 field_tolerances =[1e-13]21 field_values =[md.results.MasstransportSolution.Thickness]19 field_names = ['Thickness'] 20 field_tolerances = [1e-13] 21 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test602.py
r21408 r23793 1 1 #Test Name: 79NorthMasstransp2dDG 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 11 10 from solve import * 12 11 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 =319 md.masstransport.spcthickness =md.geometry.thickness20 md.cluster =generic('name',gethostname(),'np',3)21 md =solve(md,'Masstransport')12 md = triangle(model(), '../Exp/79North.exp', 10000.) 13 md = meshconvert(md) 14 md = setmask(md, '../Exp/79NorthShelf.exp', '') 15 md = parameterize(md, '../Par/79North.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') 22 21 23 22 #Fields and tolerances to track changes 24 field_names =['Thickness'] 25 field_tolerances=[1e-13] 26 field_values=[\ 27 md.results.MasstransportSolution.Thickness,\ 28 ] 23 field_names = ['Thickness'] 24 field_tolerances = [1e-13] 25 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test603.py
r21408 r23793 1 1 #Test Name: 79NorthMasstransp3d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/79North.exp', 10000.) 12 md = setmask(md, '../Exp/79NorthShelf.exp', '') 13 md = parameterize(md, '../Par/79North.py') 14 md.extrude(6, 1.) 15 md = setflowequation(md, 'SSA', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'Masstransport') 19 18 20 19 #Fields and tolerances to track changes 21 field_names =['Thickness'] 22 field_tolerances=[1e-13] 23 field_values=[\ 24 md.results.MasstransportSolution.Thickness,\ 25 ] 20 field_names = ['Thickness'] 21 field_tolerances = [1e-13] 22 field_values = [md.results.MasstransportSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test604.py
r21408 r23793 1 1 #Test Name: 79NorthSurfSlop2d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')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, 'SurfaceSlope') 18 17 19 18 #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 ] 19 field_names = ['SurfaceSlopeX', 'SurfaceSlopeY'] 20 field_tolerances = [1e-13, 1e-13] 21 field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX, 22 md.results.SurfaceSlopeSolution.SurfaceSlopeY] -
issm/trunk-jpl/test/NightlyRun/test605.py
r21408 r23793 1 1 #Test Name: 79NorthSurfSlop3d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')11 md = triangle(model(), '../Exp/79North.exp', 10000.) 12 md = setmask(md, '../Exp/79NorthShelf.exp', '') 13 md = parameterize(md, '../Par/79North.py') 14 md.extrude(5, 1.5) 15 md = setflowequation(md, 'HO', 'all') 16 md.cluster = generic('name', gethostname(), 'np', 3) 17 md = solve(md, 'SurfaceSlope') 19 18 20 19 #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 ] 20 field_names = ['SurfaceSlopeX', 'SurfaceSlopeY'] 21 field_tolerances = [1e-13, 1e-13] 22 field_values = [md.results.SurfaceSlopeSolution.SurfaceSlopeX, 23 md.results.SurfaceSlopeSolution.SurfaceSlopeY] -
issm/trunk-jpl/test/NightlyRun/test606.py
r21408 r23793 1 1 #Test Name: 79NorthBedSlop2d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')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, 'BedSlope') 18 17 19 18 #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 ] 19 field_names = ['BedSlopeX', 'BedSlopeY'] 20 field_tolerances = [1e-13, 1e-13] 21 field_values = [md.results.BedSlopeSolution.BedSlopeX, 22 md.results.BedSlopeSolution.BedSlopeY] -
issm/trunk-jpl/test/NightlyRun/test607.py
r21408 r23793 1 1 #Test Name: 79NorthBedSlop3d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname 5 6 4 from triangle import * 7 5 from setmask import * … … 10 8 from solve import * 11 9 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')10 md = triangle(model(), '../Exp/79North.exp', 10000.) 11 md = setmask(md, '../Exp/79NorthShelf.exp', '') 12 md = parameterize(md, '../Par/79North.py') 13 md.extrude(2, 1.) 14 md = setflowequation(md, 'SSA', 'all') 15 md.cluster = generic('name', gethostname(), 'np', 3) 16 md = solve(md, 'BedSlope') 19 17 20 18 #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 ] 19 field_names = ['BedSlopeX', 'BedSlopeY'] 20 field_tolerances = [1e-13, 1e-13] 21 field_values = [md.results.BedSlopeSolution.BedSlopeX, 22 md.results.BedSlopeSolution.BedSlopeY] -
issm/trunk-jpl/test/NightlyRun/test608.py
r21408 r23793 1 1 #Test Name: 79NorthBalThic2d 2 import numpy as np3 2 from model import * 4 3 from socket import gethostname … … 10 9 from solve import * 11 10 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')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, 'Balancethickness') 18 17 19 18 #Fields and tolerances to track changes 20 field_names =['Thickness'] 21 field_tolerances=[1e-12] 22 field_values=[\ 23 md.results.BalancethicknessSolution.Thickness,\ 24 ] 19 field_names = ['Thickness'] 20 field_tolerances = [1e-12] 21 field_values = [md.results.BalancethicknessSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test611.py
r23784 r23793 3 3 from model import * 4 4 from socket import gethostname 5 6 5 from triangle import * 7 6 from setmask import * … … 10 9 from solve import * 11 10 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')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') 16 15 17 16 #control parameters 18 md.inversion.nsteps =219 md.masstransport.stabilization =120 md.inversion.iscontrol =121 md.inversion.control_parameters =['BalancethicknessThickeningRate']22 md.inversion.thickness_obs =md.geometry.thickness23 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))17 md.inversion.nsteps = 2 18 md.masstransport.stabilization = 1 19 md.inversion.iscontrol = 1 20 md.inversion.control_parameters = ['BalancethicknessThickeningRate'] 21 md.inversion.thickness_obs = md.geometry.thickness 22 md.inversion.min_parameters = -50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 23 md.inversion.max_parameters = 50. * np.ones((md.mesh.numberofvertices, len(md.inversion.control_parameters))) 24 md.inversion.cost_functions = [201] 25 md.inversion.cost_functions_coefficients = np.ones((md.mesh.numberofvertices, len(md.inversion.cost_functions))) 26 md.inversion.gradient_scaling = 10. / md.constants.yts * np.ones((md.inversion.nsteps, len(md.inversion.control_parameters))) 27 md.inversion.maxiter_per_step = 4 * np.ones((md.inversion.nsteps)) 28 md.inversion.step_threshold = 0.99 * np.ones((md.inversion.nsteps)) 30 29 31 md.cluster =generic('name',gethostname(),'np',3)32 md =solve(md,'Balancethickness')30 md.cluster = generic('name', gethostname(), 'np', 3) 31 md = solve(md, 'Balancethickness') 33 32 34 33 #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 39 40 34 field_names = ['Gradient', 'Misfits', 'BalancethicknessThickeningRate', 'Thickness'] 35 field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12] 36 field_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 12 12 13 13 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')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') 19 19 20 20 #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]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] 24 24 25 25 #control parameters 26 md.inversion.thickness_obs =copy.deepcopy(md.geometry.thickness)27 md.inversion.iscontrol =128 md.inversion.nsteps =229 md.inversion.control_parameters =['Vx','Vy']30 md.balancethickness.stabilization =131 md.inversion.gradient_scaling =np.vstack((10./md.constants.yts*np.ones((md.inversion.nsteps)),10./md.constants.yts*np.ones((md.inversion.nsteps)))).T32 md.inversion.min_parameters =np.vstack((-2000.*np.ones((md.mesh.numberofvertices)),-2000.*np.ones((md.mesh.numberofvertices)))).T33 md.inversion.max_parameters =np.vstack((+2000.*np.ones((md.mesh.numberofvertices)),+2000.*np.ones((md.mesh.numberofvertices)))).T34 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))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)) 38 38 39 md.verbose.control =140 md.cluster =generic('name',gethostname(),'np',3)41 md =solve(md,'Balancethickness')39 md.verbose.control = 1 40 md.cluster = generic('name', gethostname(), 'np', 3) 41 md = solve(md, 'Balancethickness') 42 42 43 43 #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 48 49 50 51 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] -
issm/trunk-jpl/test/NightlyRun/test701.py
r23707 r23793 7 7 from paterson import * 8 8 9 x = np.arange(1, 3001,100).T10 h = np.linspace(1000, 300,np.size(x)).T11 b = -917. /1023.*h9 x = np.arange(1, 3001, 100).T 10 h = np.linspace(1000, 300, np.size(x)).T 11 b = -917. / 1023. * h 12 12 13 md = bamgflowband(model(), x,b+h,b,'hmax',80.)13 md = bamgflowband(model(), x, b + h, b, 'hmax', 80.) 14 14 15 #Geometry 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.base15 #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 19 19 20 20 #mask … … 24 24 25 25 #materials 26 md.initialization.temperature = (273. -20.)*np.ones((md.mesh.numberofvertices,))26 md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices,)) 27 27 md.materials.rheology_B = paterson(md.initialization.temperature) 28 md.materials.rheology_n = 3. *np.ones((md.mesh.numberofelements,))28 md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements,)) 29 29 30 30 #friction … … 35 35 36 36 #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))37 md.stressbalance.referential = np.nan * np.ones((md.mesh.numberofvertices, 6)) 38 md.stressbalance.loadingforce = 0. * np.ones((md.mesh.numberofvertices, 3)) 39 39 md.stressbalance.spcvx = np.nan * np.ones((md.mesh.numberofvertices,)) 40 40 md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices,)) … … 42 42 md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 0. 43 43 md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0. 44 md.basalforcings.floatingice_melting_rate =np.zeros((md.mesh.numberofvertices,))44 md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices,)) 45 45 46 46 #Misc 47 md = setflowequation(md, 'FS','all')47 md = setflowequation(md, 'FS', 'all') 48 48 md.stressbalance.abstol = np.nan 49 49 #md.stressbalance.reltol = 10**-16 … … 51 51 md.stressbalance.maxiter = 20 52 52 md.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'53 md.miscellaneous.name = 'test701' 54 md.verbose = verbose('convergence', True) 55 md.cluster = generic('np', 2) 56 md.groundingline.migration = 'None' 57 57 58 58 #Go solve … … 61 61 field_values = [] 62 62 #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 65 print('======Testing ' +i+ ' Full-Stokes Finite element=====')66 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 71 72 73 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] -
issm/trunk-jpl/test/NightlyRun/test702.py
r23707 r23793 2 2 import numpy as np 3 3 #from scipy.interpolate import interp1d 4 from model import *5 from setflowequation import *6 from solve import 4 from model import * 5 from setflowequation import * 6 from solve import * 7 7 from NowickiProfile import * 8 8 from bamgflowband import * … … 10 10 11 11 #mesh parameters 12 x = np.arange(-5, 5.5,.5).T13 [b, h,sea] = NowickiProfile(x)12 x = np.arange(-5, 5.5, .5).T 13 [b, h, sea] = NowickiProfile(x) 14 14 x = x * 10**3 15 15 h = h * 10**3 16 b = (b -sea) * 10**316 b = (b - sea) * 10**3 17 17 18 18 #mesh domain 19 md = bamgflowband(model(), x,b+h,b,'hmax',150.)19 md = bamgflowband(model(), x, b + h, b, 'hmax', 150.) 20 20 21 21 #parameterize 22 md.geometry.surface = np.interp(md.mesh.x, x,b+h)23 md.geometry.base = np.interp(md.mesh.x, x,b)22 md.geometry.surface = np.interp(md.mesh.x, x, b + h) 23 md.geometry.base = np.interp(md.mesh.x, x, b) 24 24 md.geometry.thickness = md.geometry.surface - md.geometry.base 25 25 … … 27 27 md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices,)) 28 28 md.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.529 md.mask.groundedice_levelset = -0.5 * np.ones((md.mesh.numberofvertices)) 30 md.mask.groundedice_levelset[np.where(md.mesh.x < 0)] = 0.5 31 31 32 32 #materials … … 49 49 md.stressbalance.spcvy = float('NaN') * np.ones((md.mesh.numberofvertices,)) 50 50 md.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))51 md.stressbalance.referential = float('NaN') * np.ones((md.mesh.numberofvertices, 6)) 52 md.stressbalance.loadingforce = np.zeros((md.mesh.numberofvertices, 3)) 53 53 md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 800. 54 54 md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0. 55 md.basalforcings.floatingice_melting_rate =np.zeros((md.mesh.numberofvertices,))55 md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices,)) 56 56 57 57 #misc 58 md = setflowequation(md, 'FS','all')58 md = setflowequation(md, 'FS', 'all') 59 59 md.stressbalance.abstol = float('NaN') 60 60 md.stressbalance.FSreconditioning = 1 … … 65 65 md.miscellaneous.name = 'test702' 66 66 md.groundingline.migration = 'None' 67 md.cluster = generic('np', 2)67 md.cluster = generic('np', 2) 68 68 69 69 #Fields and tolerances to track changes … … 71 71 field_tolerances = [] 72 72 field_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 ]) 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([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 1 1 #Test Name: FlowbandFSsheetshelfTrans 2 2 import numpy as np 3 from model import 4 from setflowequation import 5 from solve import 3 from model import * 4 from setflowequation import * 5 from solve import * 6 6 from NowickiProfile import * 7 7 from bamgflowband import * … … 9 9 10 10 #mesh parameters 11 x = np.arange(-5, 5.5,.5).T12 [b, h,sea] = NowickiProfile(x)11 x = np.arange(-5, 5.5, .5).T 12 [b, h, sea] = NowickiProfile(x) 13 13 x = x * 10**3 14 14 h = h * 10**3 15 b = (b -sea) * 10**315 b = (b - sea) * 10**3 16 16 17 17 #for i in x: 18 18 #print i 19 19 20 20 #for i in b: 21 21 #print '%.12f' % i 22 22 #for i in h: 23 23 #print '%.11f' % i 24 24 #print '%.12f' % sea 25 25 … … 30 30 31 31 #mesh domain 32 md = bamgflowband(model(), x,b+h,b,'hmax',150.)32 md = bamgflowband(model(), x, b + h, b, 'hmax', 150.) 33 33 34 34 #geometry 35 md.geometry.surface = np.interp(md.mesh.x, x,b+h)36 md.geometry.base = np.interp(md.mesh.x, x,b)35 md.geometry.surface = np.interp(md.mesh.x, x, b + h) 36 md.geometry.base = np.interp(md.mesh.x, x, b) 37 37 md.geometry.thickness = md.geometry.surface - md.geometry.base 38 38 … … 40 40 md.mask.ice_levelset = -np.ones((md.mesh.numberofvertices)) 41 41 md.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.542 md.mask.groundedice_levelset = -0.5 * np.ones((md.mesh.numberofvertices)) 43 md.mask.groundedice_levelset[np.where(md.mesh.x < 0)] = 0.5 44 44 45 45 #materials … … 58 58 md.stressbalance.spcvy = np.nan * np.ones((md.mesh.numberofvertices)) 59 59 md.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))60 md.stressbalance.referential = np.nan * np.ones((md.mesh.numberofvertices, 6)) 61 md.stressbalance.loadingforce = np.zeros((md.mesh.numberofvertices, 3)) 62 62 md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 800. 63 63 md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0. 64 64 65 65 #Misc 66 md = setflowequation(md, 'FS','all')66 md = setflowequation(md, 'FS', 'all') 67 67 md.flowequation.fe_FS = 'TaylorHood' 68 68 md.stressbalance.abstol = np.nan … … 77 77 md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices)) 78 78 md.basalforcings.geothermalflux = np.zeros((md.mesh.numberofvertices)) 79 posb = np.where(np.logical_and(md.mesh.x > 0., md.mesh.vertexonbase))[0]79 posb = np.where(np.logical_and(md.mesh.x > 0., md.mesh.vertexonbase))[0] 80 80 md.basalforcings.groundedice_melting_rate[posb] = 18. 81 81 md.basalforcings.floatingice_melting_rate[posb] = 18. … … 87 87 md.transient.isthermal = 0 88 88 md.masstransport.isfreesurface = 1 89 md.groundingline.migration ='None'89 md.groundingline.migration = 'None' 90 90 91 91 #Go solve 92 md.cluster = generic('np', 3)92 md.cluster = generic('np', 3) 93 93 md.stressbalance.shelf_dampening = 1 94 md1 =copy.deepcopy(md)95 md1 = solve(md1, 'Transient')94 md1 = copy.deepcopy(md) 95 md1 = solve(md1, 'Transient') 96 96 97 97 md.stressbalance.shelf_dampening = 0 98 md = solve(md, 'Transient')98 md = solve(md, 'Transient') 99 99 100 100 #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]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] 113 113 field_values = [md.results.TransientSolution[0].Vx, 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 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 8 8 from solve import * 9 9 10 md =triangle(model(),'../Exp/Square.exp',50000)11 md =setmask(md,'','')12 md =parameterize(md,'../Par/ValleyGlacierShelf.py')13 md.levelset.stabilization =214 md =setflowequation(md,'SSA','all')15 md.cluster =generic('name',gethostname(),'np',3)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) 16 16 17 17 #Transient 18 md.transient.isstressbalance =True19 md.transient.ismovingfront =True20 md.transient.ismasstransport =True21 md.transient.issmb =True22 md.transient.isthermal =False23 md.transient.isgroundingline =True24 md.transient.isgia =False18 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 25 25 26 md =solve(md,'Transient')26 md = solve(md, 'Transient') 27 27 28 28 #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]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] -
issm/trunk-jpl/test/NightlyRun/test802.py
r23010 r23793 9 9 10 10 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)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) 17 17 18 18 #Thermal model 19 pos_surf =np.nonzero(md.mesh.vertexonsurface)[0]20 md.thermal.spctemperature[pos_surf] =md.initialization.temperature[pos_surf]19 pos_surf = np.nonzero(md.mesh.vertexonsurface)[0] 20 md.thermal.spctemperature[pos_surf] = md.initialization.temperature[pos_surf] 21 21 22 22 #Transient 23 md.transient.isstressbalance =True24 md.transient.ismovingfront =True25 md.transient.ismasstransport =True26 md.transient.issmb =True27 md.transient.isthermal =True28 md.transient.isgroundingline =True29 md.transient.isgia =False30 md.groundingline.melt_interpolation ='SubelementMelt1'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' 31 31 32 md =solve(md,'Transient')32 md = solve(md, 'Transient') 33 33 34 34 #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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 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] -
issm/trunk-jpl/test/NightlyRun/test803.py
r23010 r23793 9 9 10 10 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)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) 17 17 18 18 #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 =True22 md.thermal.isdynamicbasalspc =True19 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 23 23 24 24 #Transient 25 md.transient.isstressbalance =True26 md.transient.ismovingfront =True27 md.transient.ismasstransport =True28 md.transient.issmb =True29 md.transient.isthermal =True30 md.transient.isgroundingline =True31 md.transient.isgia =False32 md.groundingline.melt_interpolation ='SubelementMelt1'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' 33 33 34 md =solve(md,'Transient')34 md = solve(md, 'Transient') 35 35 36 36 #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]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] -
issm/trunk-jpl/test/NightlyRun/test804.py
r23653 r23793 9 9 10 10 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)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) 16 16 17 17 #Transient 18 md.transient.isstressbalance =True19 md.transient.ismasstransport =True20 md.transient.issmb =True21 md.transient.isthermal =False22 md.transient.isgroundingline =True23 md.transient.isgia =False24 md.transient.ismovingfront =True18 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 25 25 26 md.calving.calvingrate =1000.*np.ones((md.mesh.numberofvertices))27 md.frontalforcings.meltingrate =np.zeros((md.mesh.numberofvertices))26 md.calving.calvingrate = 1000. * np.ones((md.mesh.numberofvertices)) 27 md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices)) 28 28 29 md =solve(md,'Transient')29 md = solve(md, 'Transient') 30 30 31 31 #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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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] -
issm/trunk-jpl/test/NightlyRun/test805.py
r23653 r23793 9 9 10 10 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)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) 17 17 18 18 #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 =True22 md.thermal.isdynamicbasalspc =True19 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 23 23 24 24 #Transient 25 md.transient.isstressbalance =True26 md.transient.ismasstransport =True27 md.transient.issmb =True28 md.transient.isthermal =True29 md.transient.isgroundingline =True30 md.transient.isgia =False31 md.transient.ismovingfront =True25 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 32 32 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 =233 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 37 37 38 md =solve(md,'Transient')38 md = solve(md, 'Transient') 39 39 40 40 #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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 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] -
issm/trunk-jpl/test/NightlyRun/test806.py
r23653 r23793 10 10 import numpy as np 11 11 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)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) 17 17 18 18 x = md.mesh.x 19 19 xmin = min(x) 20 20 xmax = 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)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) 24 24 25 md.timestepping.time_step =1026 md.timestepping.final_time =3025 md.timestepping.time_step = 10 26 md.timestepping.final_time = 30 27 27 28 28 #Transient 29 md.transient.isstressbalance =True30 md.transient.ismasstransport =True31 md.transient.issmb =True32 md.transient.isthermal =False33 md.transient.isgroundingline =False34 md.transient.isgia =False35 md.transient.ismovingfront =True29 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 36 36 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))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)) 41 41 42 md.transient.requested_outputs =['default','StrainRateparallel','StrainRateperpendicular','Calvingratex','Calvingratey','CalvingCalvingrate']42 md.transient.requested_outputs = ['default', 'StrainRateparallel', 'StrainRateperpendicular', 'Calvingratex', 'Calvingratey', 'CalvingCalvingrate'] 43 43 44 md =solve(md,'Transient')44 md = solve(md, 'Transient') 45 45 46 46 #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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 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] -
issm/trunk-jpl/test/NightlyRun/test807.py
r23659 r23793 10 10 import numpy as np 11 11 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)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) 17 17 18 18 x = md.mesh.x 19 19 xmin = min(x) 20 20 xmax = 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)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) 24 24 25 md.timestepping.time_step =1026 md.timestepping.final_time =3025 md.timestepping.time_step = 10 26 md.timestepping.final_time = 30 27 27 28 28 #Transient 29 md.transient.isstressbalance =True30 md.transient.ismasstransport =True31 md.transient.issmb =True32 md.transient.isthermal =False33 md.transient.isgroundingline =False34 md.transient.isgia =False35 md.transient.ismovingfront =True29 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 36 36 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))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)) 40 40 41 md =solve(md,'Transient')41 md = solve(md, 'Transient') 42 42 43 43 #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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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] -
issm/trunk-jpl/test/NightlyRun/test808.py
r23653 r23793 10 10 from calvingminthickness import * 11 11 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)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) 17 17 18 18 x = md.mesh.x … … 38 38 md.calving.min_thickness = 400 39 39 md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices,)) 40 md.levelset.spclevelset = float('NaN') * np.ones((md.mesh.numberofvertices,))40 md.levelset.spclevelset = float('NaN') * np.ones((md.mesh.numberofvertices,)) 41 41 md.levelset.reinit_frequency = 1 42 42 43 md = solve(md, 'Transient')43 md = solve(md, 'Transient') 44 44 45 45 #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]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] 52 52 field_values = [md.results.TransientSolution[0].Vx, 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 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.