| [13980] | 1 | Index: ../trunk-jpl/test/NightlyRun/test202.py
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- ../trunk-jpl/test/NightlyRun/test202.py (revision 0)
|
|---|
| 4 | +++ ../trunk-jpl/test/NightlyRun/test202.py (revision 13491)
|
|---|
| 5 | @@ -0,0 +1,42 @@
|
|---|
| 6 | +"""
|
|---|
| 7 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 8 | +Auto generated python script for ISSM: test202.m
|
|---|
| 9 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 10 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 11 | +
|
|---|
| 12 | +Matlab script conversion into python
|
|---|
| 13 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 14 | +translateToPy.py Date: 09/24/12
|
|---|
| 15 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 16 | +"""
|
|---|
| 17 | +
|
|---|
| 18 | +from MatlabFuncs import *
|
|---|
| 19 | +from model import *
|
|---|
| 20 | +from EnumDefinitions import *
|
|---|
| 21 | +from numpy import *
|
|---|
| 22 | +from triangle import *
|
|---|
| 23 | +from setmask import *
|
|---|
| 24 | +from parameterize import *
|
|---|
| 25 | +from setflowequation import *
|
|---|
| 26 | +from solve import *
|
|---|
| 27 | +
|
|---|
| 28 | +md=triangle(model(),'../Exp/Square.exp',180000)
|
|---|
| 29 | +md=setmask(md,'all','')
|
|---|
| 30 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 31 | +md.extrude(3,2)
|
|---|
| 32 | +md=setflowequation(md,'macayeal','all')
|
|---|
| 33 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 34 | +md=solve(md,DiagnosticSolutionEnum())
|
|---|
| 35 | +
|
|---|
| 36 | +
|
|---|
| 37 | +# Fields and tolerances to track changes
|
|---|
| 38 | +
|
|---|
| 39 | +field_names =['Vx','Vy','Vz','Vel','Pressure']
|
|---|
| 40 | +field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
|
|---|
| 41 | +field_values=[\
|
|---|
| 42 | + md.results['DiagnosticSolution'][1]['Vx'],\
|
|---|
| 43 | + md.results['DiagnosticSolution'][1]['Vy'],\
|
|---|
| 44 | + md.results['DiagnosticSolution'][1]['Vz'],\
|
|---|
| 45 | + md.results['DiagnosticSolution'][1]['Vel'],\
|
|---|
| 46 | + md.results['DiagnosticSolution'][1]['Pressure'],\
|
|---|
| 47 | + ]
|
|---|
| 48 | Index: ../trunk-jpl/test/NightlyRun/test211.py
|
|---|
| 49 | ===================================================================
|
|---|
| 50 | --- ../trunk-jpl/test/NightlyRun/test211.py (revision 0)
|
|---|
| 51 | +++ ../trunk-jpl/test/NightlyRun/test211.py (revision 13491)
|
|---|
| 52 | @@ -0,0 +1,74 @@
|
|---|
| 53 | +"""
|
|---|
| 54 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 55 | +Auto generated python script for ISSM: test211.m
|
|---|
| 56 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 57 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 58 | +
|
|---|
| 59 | +Matlab script conversion into python
|
|---|
| 60 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 61 | +translateToPy.py Date: 09/24/12
|
|---|
| 62 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 63 | +"""
|
|---|
| 64 | +
|
|---|
| 65 | +from MatlabFuncs import *
|
|---|
| 66 | +from model import *
|
|---|
| 67 | +from EnumDefinitions import *
|
|---|
| 68 | +from numpy import *
|
|---|
| 69 | +from triangle import *
|
|---|
| 70 | +from setmask import *
|
|---|
| 71 | +from parameterize import *
|
|---|
| 72 | +from setflowequation import *
|
|---|
| 73 | +from solve import *
|
|---|
| 74 | +
|
|---|
| 75 | +md=triangle(model(),'../Exp/Square.exp',200000)
|
|---|
| 76 | +md=setmask(md,'all','')
|
|---|
| 77 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 78 | +md.extrude(3,1)
|
|---|
| 79 | +md=setflowequation(md,'stokes','all')
|
|---|
| 80 | +md.diagnostic.reltol=NaN
|
|---|
| 81 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 82 | +md=solve(md,TransientSolutionEnum())
|
|---|
| 83 | +
|
|---|
| 84 | +
|
|---|
| 85 | +# Fields and tolerances to track changes
|
|---|
| 86 | +
|
|---|
| 87 | +field_names=[\
|
|---|
| 88 | + 'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', \
|
|---|
| 89 | + 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', \
|
|---|
| 90 | + 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3']
|
|---|
| 91 | +field_tolerances=[\
|
|---|
| 92 | + 1e-08,1e-08,1e-06,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,\
|
|---|
| 93 | + 1e-08,1e-08,1e-06,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06,\
|
|---|
| 94 | + 1e-07,1e-07,1e-06,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06]
|
|---|
| 95 | +field_values=[\
|
|---|
| 96 | + md.results['TransientSolution'][1]['Vx'],\
|
|---|
| 97 | + md.results['TransientSolution'][1]['Vy'],\
|
|---|
| 98 | + md.results['TransientSolution'][1]['Vz'],\
|
|---|
| 99 | + md.results['TransientSolution'][1]['Vel'],\
|
|---|
| 100 | + md.results['TransientSolution'][1]['Pressure'],\
|
|---|
| 101 | + md.results['TransientSolution'][1]['Bed'],\
|
|---|
| 102 | + md.results['TransientSolution'][1]['Surface'],\
|
|---|
| 103 | + md.results['TransientSolution'][1]['Thickness'],\
|
|---|
| 104 | + md.results['TransientSolution'][1]['Temperature'],\
|
|---|
| 105 | + md.results['TransientSolution'][1]['BasalforcingsMeltingRate'],\
|
|---|
| 106 | + md.results['TransientSolution'][2]['Vx'],\
|
|---|
| 107 | + md.results['TransientSolution'][2]['Vy'],\
|
|---|
| 108 | + md.results['TransientSolution'][2]['Vz'],\
|
|---|
| 109 | + md.results['TransientSolution'][2]['Vel'],\
|
|---|
| 110 | + md.results['TransientSolution'][2]['Pressure'],\
|
|---|
| 111 | + md.results['TransientSolution'][2]['Bed'],\
|
|---|
| 112 | + md.results['TransientSolution'][2]['Surface'],\
|
|---|
| 113 | + md.results['TransientSolution'][2]['Thickness'],\
|
|---|
| 114 | + md.results['TransientSolution'][2]['Temperature'],\
|
|---|
| 115 | + md.results['TransientSolution'][2]['BasalforcingsMeltingRate'],\
|
|---|
| 116 | + md.results['TransientSolution'][3]['Vx'],\
|
|---|
| 117 | + md.results['TransientSolution'][3]['Vy'],\
|
|---|
| 118 | + md.results['TransientSolution'][3]['Vz'],\
|
|---|
| 119 | + md.results['TransientSolution'][3]['Vel'],\
|
|---|
| 120 | + md.results['TransientSolution'][3]['Pressure'],\
|
|---|
| 121 | + md.results['TransientSolution'][3]['Bed'],\
|
|---|
| 122 | + md.results['TransientSolution'][3]['Surface'],\
|
|---|
| 123 | + md.results['TransientSolution'][3]['Thickness'],\
|
|---|
| 124 | + md.results['TransientSolution'][3]['Temperature'],\
|
|---|
| 125 | + md.results['TransientSolution'][3]['BasalforcingsMeltingRate'],\
|
|---|
| 126 | + ]
|
|---|
| 127 | Index: ../trunk-jpl/test/NightlyRun/test208.py
|
|---|
| 128 | ===================================================================
|
|---|
| 129 | --- ../trunk-jpl/test/NightlyRun/test208.py (revision 0)
|
|---|
| 130 | +++ ../trunk-jpl/test/NightlyRun/test208.py (revision 13491)
|
|---|
| 131 | @@ -0,0 +1,57 @@
|
|---|
| 132 | +"""
|
|---|
| 133 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 134 | +Auto generated python script for ISSM: test208.m
|
|---|
| 135 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 136 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 137 | +
|
|---|
| 138 | +Matlab script conversion into python
|
|---|
| 139 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 140 | +translateToPy.py Date: 09/24/12
|
|---|
| 141 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 142 | +"""
|
|---|
| 143 | +
|
|---|
| 144 | +from MatlabFuncs import *
|
|---|
| 145 | +from model import *
|
|---|
| 146 | +from EnumDefinitions import *
|
|---|
| 147 | +from numpy import *
|
|---|
| 148 | +from triangle import *
|
|---|
| 149 | +from setmask import *
|
|---|
| 150 | +from parameterize import *
|
|---|
| 151 | +from setflowequation import *
|
|---|
| 152 | +from solve import *
|
|---|
| 153 | +
|
|---|
| 154 | +md=triangle(model(),'../Exp/Square.exp',150000)
|
|---|
| 155 | +md=setmask(md,'all','')
|
|---|
| 156 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 157 | +md=setflowequation(md,'macayeal','all')
|
|---|
| 158 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 159 | +md=solve(md,TransientSolutionEnum())
|
|---|
| 160 | +
|
|---|
| 161 | +
|
|---|
| 162 | +# Fields and tolerances to track changes
|
|---|
| 163 | +
|
|---|
| 164 | +field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3']
|
|---|
| 165 | +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]
|
|---|
| 166 | +field_values=[\
|
|---|
| 167 | + md.results['TransientSolution'][1]['Vx'],\
|
|---|
| 168 | + md.results['TransientSolution'][1]['Vy'],\
|
|---|
| 169 | + md.results['TransientSolution'][1]['Vel'],\
|
|---|
| 170 | + md.results['TransientSolution'][1]['Pressure'],\
|
|---|
| 171 | + md.results['TransientSolution'][1]['Bed'],\
|
|---|
| 172 | + md.results['TransientSolution'][1]['Surface'],\
|
|---|
| 173 | + md.results['TransientSolution'][1]['Thickness'],\
|
|---|
| 174 | + md.results['TransientSolution'][2]['Vx'],\
|
|---|
| 175 | + md.results['TransientSolution'][2]['Vy'],\
|
|---|
| 176 | + md.results['TransientSolution'][2]['Vel'],\
|
|---|
| 177 | + md.results['TransientSolution'][2]['Pressure'],\
|
|---|
| 178 | + md.results['TransientSolution'][2]['Bed'],\
|
|---|
| 179 | + md.results['TransientSolution'][2]['Surface'],\
|
|---|
| 180 | + md.results['TransientSolution'][2]['Thickness'],\
|
|---|
| 181 | + md.results['TransientSolution'][3]['Vx'],\
|
|---|
| 182 | + md.results['TransientSolution'][3]['Vy'],\
|
|---|
| 183 | + md.results['TransientSolution'][3]['Vel'],\
|
|---|
| 184 | + md.results['TransientSolution'][3]['Pressure'],\
|
|---|
| 185 | + md.results['TransientSolution'][3]['Bed'],\
|
|---|
| 186 | + md.results['TransientSolution'][3]['Surface'],\
|
|---|
| 187 | + md.results['TransientSolution'][3]['Thickness'],\
|
|---|
| 188 | + ]
|
|---|
| 189 | Index: ../trunk-jpl/test/NightlyRun/test203.py
|
|---|
| 190 | ===================================================================
|
|---|
| 191 | --- ../trunk-jpl/test/NightlyRun/test203.py (revision 0)
|
|---|
| 192 | +++ ../trunk-jpl/test/NightlyRun/test203.py (revision 13491)
|
|---|
| 193 | @@ -0,0 +1,42 @@
|
|---|
| 194 | +"""
|
|---|
| 195 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 196 | +Auto generated python script for ISSM: test203.m
|
|---|
| 197 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 198 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 199 | +
|
|---|
| 200 | +Matlab script conversion into python
|
|---|
| 201 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 202 | +translateToPy.py Date: 09/24/12
|
|---|
| 203 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 204 | +"""
|
|---|
| 205 | +
|
|---|
| 206 | +from MatlabFuncs import *
|
|---|
| 207 | +from model import *
|
|---|
| 208 | +from EnumDefinitions import *
|
|---|
| 209 | +from numpy import *
|
|---|
| 210 | +from triangle import *
|
|---|
| 211 | +from setmask import *
|
|---|
| 212 | +from parameterize import *
|
|---|
| 213 | +from setflowequation import *
|
|---|
| 214 | +from solve import *
|
|---|
| 215 | +
|
|---|
| 216 | +md=triangle(model(),'../Exp/Square.exp',180000)
|
|---|
| 217 | +md=setmask(md,'all','')
|
|---|
| 218 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 219 | +md.extrude(3,2)
|
|---|
| 220 | +md=setflowequation(md,'pattyn','all')
|
|---|
| 221 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 222 | +md=solve(md,DiagnosticSolutionEnum())
|
|---|
| 223 | +
|
|---|
| 224 | +
|
|---|
| 225 | +# Fields and tolerances to track changes
|
|---|
| 226 | +
|
|---|
| 227 | +field_names =['Vx','Vy','Vz','Vel','Pressure']
|
|---|
| 228 | +field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09]
|
|---|
| 229 | +field_values=[\
|
|---|
| 230 | + md.results['DiagnosticSolution'][1]['Vx'],\
|
|---|
| 231 | + md.results['DiagnosticSolution'][1]['Vy'],\
|
|---|
| 232 | + md.results['DiagnosticSolution'][1]['Vz'],\
|
|---|
| 233 | + md.results['DiagnosticSolution'][1]['Vel'],\
|
|---|
| 234 | + md.results['DiagnosticSolution'][1]['Pressure'],\
|
|---|
| 235 | + ]
|
|---|
| 236 | Index: ../trunk-jpl/test/NightlyRun/test206.py
|
|---|
| 237 | ===================================================================
|
|---|
| 238 | --- ../trunk-jpl/test/NightlyRun/test206.py (revision 0)
|
|---|
| 239 | +++ ../trunk-jpl/test/NightlyRun/test206.py (revision 13491)
|
|---|
| 240 | @@ -0,0 +1,40 @@
|
|---|
| 241 | +"""
|
|---|
| 242 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 243 | +Auto generated python script for ISSM: test206.m
|
|---|
| 244 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 245 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 246 | +
|
|---|
| 247 | +Matlab script conversion into python
|
|---|
| 248 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 249 | +translateToPy.py Date: 09/24/12
|
|---|
| 250 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 251 | +"""
|
|---|
| 252 | +
|
|---|
| 253 | +from MatlabFuncs import *
|
|---|
| 254 | +from model import *
|
|---|
| 255 | +from EnumDefinitions import *
|
|---|
| 256 | +from numpy import *
|
|---|
| 257 | +from triangle import *
|
|---|
| 258 | +from setmask import *
|
|---|
| 259 | +from parameterize import *
|
|---|
| 260 | +from setflowequation import *
|
|---|
| 261 | +from solve import *
|
|---|
| 262 | +
|
|---|
| 263 | +md=triangle(model(),'../Exp/Square.exp',180000)
|
|---|
| 264 | +md=setmask(md,'all','')
|
|---|
| 265 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 266 | +md.extrude(3,1)
|
|---|
| 267 | +md=setflowequation(md,'macayeal','all')
|
|---|
| 268 | +md.timestepping.time_step=0
|
|---|
| 269 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 270 | +md=solve(md,ThermalSolutionEnum())
|
|---|
| 271 | +
|
|---|
| 272 | +
|
|---|
| 273 | +# Fields and tolerances to track changes
|
|---|
| 274 | +
|
|---|
| 275 | +field_names =['Temperature','BasalforcingsMeltingRate']
|
|---|
| 276 | +field_tolerances=[1e-13,1e-13]
|
|---|
| 277 | +field_values=[\
|
|---|
| 278 | + md.results['ThermalSolution'][1]['Temperature'],\
|
|---|
| 279 | + md.results['ThermalSolution'][1]['BasalforcingsMeltingRate'],\
|
|---|
| 280 | + ]
|
|---|
| 281 | Index: ../trunk-jpl/test/NightlyRun/test209.py
|
|---|
| 282 | ===================================================================
|
|---|
| 283 | --- ../trunk-jpl/test/NightlyRun/test209.py (revision 0)
|
|---|
| 284 | +++ ../trunk-jpl/test/NightlyRun/test209.py (revision 13491)
|
|---|
| 285 | @@ -0,0 +1,72 @@
|
|---|
| 286 | +"""
|
|---|
| 287 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 288 | +Auto generated python script for ISSM: test209.m
|
|---|
| 289 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 290 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 291 | +
|
|---|
| 292 | +Matlab script conversion into python
|
|---|
| 293 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 294 | +translateToPy.py Date: 09/24/12
|
|---|
| 295 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 296 | +"""
|
|---|
| 297 | +
|
|---|
| 298 | +from MatlabFuncs import *
|
|---|
| 299 | +from model import *
|
|---|
| 300 | +from EnumDefinitions import *
|
|---|
| 301 | +from numpy import *
|
|---|
| 302 | +from triangle import *
|
|---|
| 303 | +from setmask import *
|
|---|
| 304 | +from parameterize import *
|
|---|
| 305 | +from setflowequation import *
|
|---|
| 306 | +from solve import *
|
|---|
| 307 | +
|
|---|
| 308 | +md=triangle(model(),'../Exp/Square.exp',180000)
|
|---|
| 309 | +md=setmask(md,'all','')
|
|---|
| 310 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 311 | +md.extrude(3,1)
|
|---|
| 312 | +md=setflowequation(md,'macayeal','all')
|
|---|
| 313 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 314 | +md=solve(md,TransientSolutionEnum())
|
|---|
| 315 | +
|
|---|
| 316 | +
|
|---|
| 317 | +# Fields and tolerances to track changes
|
|---|
| 318 | +
|
|---|
| 319 | +field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', \
|
|---|
| 320 | + 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', \
|
|---|
| 321 | + 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3']
|
|---|
| 322 | +field_tolerances=[\
|
|---|
| 323 | + 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,\
|
|---|
| 324 | + 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,\
|
|---|
| 325 | + 1e-13,1e-13,1e-08,1e-13,1e-13,1e-10,1e-10,1e-10,1e-13,1e-8]
|
|---|
| 326 | +field_values=[\
|
|---|
| 327 | + md.results['TransientSolution'][1]['Vx'],\
|
|---|
| 328 | + md.results['TransientSolution'][1]['Vy'],\
|
|---|
| 329 | + md.results['TransientSolution'][1]['Vz'],\
|
|---|
| 330 | + md.results['TransientSolution'][1]['Vel'],\
|
|---|
| 331 | + md.results['TransientSolution'][1]['Pressure'],\
|
|---|
| 332 | + md.results['TransientSolution'][1]['Bed'],\
|
|---|
| 333 | + md.results['TransientSolution'][1]['Surface'],\
|
|---|
| 334 | + md.results['TransientSolution'][1]['Thickness'],\
|
|---|
| 335 | + md.results['TransientSolution'][1]['Temperature'],\
|
|---|
| 336 | + md.results['TransientSolution'][1]['BasalforcingsMeltingRate'],\
|
|---|
| 337 | + md.results['TransientSolution'][2]['Vx'],\
|
|---|
| 338 | + md.results['TransientSolution'][2]['Vy'],\
|
|---|
| 339 | + md.results['TransientSolution'][2]['Vz'],\
|
|---|
| 340 | + md.results['TransientSolution'][2]['Vel'],\
|
|---|
| 341 | + md.results['TransientSolution'][2]['Pressure'],\
|
|---|
| 342 | + md.results['TransientSolution'][2]['Bed'],\
|
|---|
| 343 | + md.results['TransientSolution'][2]['Surface'],\
|
|---|
| 344 | + md.results['TransientSolution'][2]['Thickness'],\
|
|---|
| 345 | + md.results['TransientSolution'][2]['Temperature'],\
|
|---|
| 346 | + md.results['TransientSolution'][2]['BasalforcingsMeltingRate'],\
|
|---|
| 347 | + md.results['TransientSolution'][3]['Vx'],\
|
|---|
| 348 | + md.results['TransientSolution'][3]['Vy'],\
|
|---|
| 349 | + md.results['TransientSolution'][3]['Vz'],\
|
|---|
| 350 | + md.results['TransientSolution'][3]['Vel'],\
|
|---|
| 351 | + md.results['TransientSolution'][3]['Pressure'],\
|
|---|
| 352 | + md.results['TransientSolution'][3]['Bed'],\
|
|---|
| 353 | + md.results['TransientSolution'][3]['Surface'],\
|
|---|
| 354 | + md.results['TransientSolution'][3]['Thickness'],\
|
|---|
| 355 | + md.results['TransientSolution'][3]['Temperature'],\
|
|---|
| 356 | + md.results['TransientSolution'][3]['BasalforcingsMeltingRate'],\
|
|---|
| 357 | + ]
|
|---|
| 358 | Index: ../trunk-jpl/test/NightlyRun/test210.py
|
|---|
| 359 | ===================================================================
|
|---|
| 360 | --- ../trunk-jpl/test/NightlyRun/test210.py (revision 0)
|
|---|
| 361 | +++ ../trunk-jpl/test/NightlyRun/test210.py (revision 13491)
|
|---|
| 362 | @@ -0,0 +1,72 @@
|
|---|
| 363 | +"""
|
|---|
| 364 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 365 | +Auto generated python script for ISSM: test210.m
|
|---|
| 366 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 367 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 368 | +
|
|---|
| 369 | +Matlab script conversion into python
|
|---|
| 370 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 371 | +translateToPy.py Date: 09/24/12
|
|---|
| 372 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 373 | +"""
|
|---|
| 374 | +
|
|---|
| 375 | +from MatlabFuncs import *
|
|---|
| 376 | +from model import *
|
|---|
| 377 | +from EnumDefinitions import *
|
|---|
| 378 | +from numpy import *
|
|---|
| 379 | +from triangle import *
|
|---|
| 380 | +from setmask import *
|
|---|
| 381 | +from parameterize import *
|
|---|
| 382 | +from setflowequation import *
|
|---|
| 383 | +from solve import *
|
|---|
| 384 | +
|
|---|
| 385 | +md=triangle(model(),'../Exp/Square.exp',200000)
|
|---|
| 386 | +md=setmask(md,'all','')
|
|---|
| 387 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 388 | +md.extrude(3,1)
|
|---|
| 389 | +md=setflowequation(md,'pattyn','all')
|
|---|
| 390 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 391 | +md=solve(md,TransientSolutionEnum())
|
|---|
| 392 | +
|
|---|
| 393 | +
|
|---|
| 394 | +# Fields and tolerances to track changes
|
|---|
| 395 | +
|
|---|
| 396 | +field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', \
|
|---|
| 397 | + 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', \
|
|---|
| 398 | + 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3']
|
|---|
| 399 | +field_tolerances=[\
|
|---|
| 400 | + 1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,\
|
|---|
| 401 | + 1e-09,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06,\
|
|---|
| 402 | + 1e-09,1e-09,1e-08,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05]
|
|---|
| 403 | +field_values=[\
|
|---|
| 404 | + md.results['TransientSolution'][1]['Vx'],\
|
|---|
| 405 | + md.results['TransientSolution'][1]['Vy'],\
|
|---|
| 406 | + md.results['TransientSolution'][1]['Vz'],\
|
|---|
| 407 | + md.results['TransientSolution'][1]['Vel'],\
|
|---|
| 408 | + md.results['TransientSolution'][1]['Pressure'],\
|
|---|
| 409 | + md.results['TransientSolution'][1]['Bed'],\
|
|---|
| 410 | + md.results['TransientSolution'][1]['Surface'],\
|
|---|
| 411 | + md.results['TransientSolution'][1]['Thickness'],\
|
|---|
| 412 | + md.results['TransientSolution'][1]['Temperature'],\
|
|---|
| 413 | + md.results['TransientSolution'][1]['BasalforcingsMeltingRate'],\
|
|---|
| 414 | + md.results['TransientSolution'][2]['Vx'],\
|
|---|
| 415 | + md.results['TransientSolution'][2]['Vy'],\
|
|---|
| 416 | + md.results['TransientSolution'][2]['Vz'],\
|
|---|
| 417 | + md.results['TransientSolution'][2]['Vel'],\
|
|---|
| 418 | + md.results['TransientSolution'][2]['Pressure'],\
|
|---|
| 419 | + md.results['TransientSolution'][2]['Bed'],\
|
|---|
| 420 | + md.results['TransientSolution'][2]['Surface'],\
|
|---|
| 421 | + md.results['TransientSolution'][2]['Thickness'],\
|
|---|
| 422 | + md.results['TransientSolution'][2]['Temperature'],\
|
|---|
| 423 | + md.results['TransientSolution'][2]['BasalforcingsMeltingRate'],\
|
|---|
| 424 | + md.results['TransientSolution'][3]['Vx'],\
|
|---|
| 425 | + md.results['TransientSolution'][3]['Vy'],\
|
|---|
| 426 | + md.results['TransientSolution'][3]['Vz'],\
|
|---|
| 427 | + md.results['TransientSolution'][3]['Vel'],\
|
|---|
| 428 | + md.results['TransientSolution'][3]['Pressure'],\
|
|---|
| 429 | + md.results['TransientSolution'][3]['Bed'],\
|
|---|
| 430 | + md.results['TransientSolution'][3]['Surface'],\
|
|---|
| 431 | + md.results['TransientSolution'][3]['Thickness'],\
|
|---|
| 432 | + md.results['TransientSolution'][3]['Temperature'],\
|
|---|
| 433 | + md.results['TransientSolution'][3]['BasalforcingsMeltingRate'],\
|
|---|
| 434 | + ]
|
|---|
| 435 | Index: ../trunk-jpl/test/NightlyRun/test204.py
|
|---|
| 436 | ===================================================================
|
|---|
| 437 | --- ../trunk-jpl/test/NightlyRun/test204.py (revision 0)
|
|---|
| 438 | +++ ../trunk-jpl/test/NightlyRun/test204.py (revision 13491)
|
|---|
| 439 | @@ -0,0 +1,42 @@
|
|---|
| 440 | +"""
|
|---|
| 441 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 442 | +Auto generated python script for ISSM: test204.m
|
|---|
| 443 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 444 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 445 | +
|
|---|
| 446 | +Matlab script conversion into python
|
|---|
| 447 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 448 | +translateToPy.py Date: 09/24/12
|
|---|
| 449 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 450 | +"""
|
|---|
| 451 | +
|
|---|
| 452 | +from MatlabFuncs import *
|
|---|
| 453 | +from model import *
|
|---|
| 454 | +from EnumDefinitions import *
|
|---|
| 455 | +from numpy import *
|
|---|
| 456 | +from triangle import *
|
|---|
| 457 | +from setmask import *
|
|---|
| 458 | +from parameterize import *
|
|---|
| 459 | +from setflowequation import *
|
|---|
| 460 | +from solve import *
|
|---|
| 461 | +
|
|---|
| 462 | +md=triangle(model(),'../Exp/Square.exp',180000)
|
|---|
| 463 | +md=setmask(md,'all','')
|
|---|
| 464 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 465 | +md.extrude(3,2)
|
|---|
| 466 | +md=setflowequation(md,'stokes','all')
|
|---|
| 467 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 468 | +md=solve(md,DiagnosticSolutionEnum())
|
|---|
| 469 | +
|
|---|
| 470 | +
|
|---|
| 471 | +# Fields and tolerances to track changes
|
|---|
| 472 | +
|
|---|
| 473 | +field_names =['Vx','Vy','Vz','Vel','Pressure']
|
|---|
| 474 | +field_tolerances=[1e-08,1e-08,1e-07,1e-08,1e-08]
|
|---|
| 475 | +field_values=[\
|
|---|
| 476 | + md.results['DiagnosticSolution'][1]['Vx'],\
|
|---|
| 477 | + md.results['DiagnosticSolution'][1]['Vy'],\
|
|---|
| 478 | + md.results['DiagnosticSolution'][1]['Vz'],\
|
|---|
| 479 | + md.results['DiagnosticSolution'][1]['Vel'],\
|
|---|
| 480 | + md.results['DiagnosticSolution'][1]['Pressure'],\
|
|---|
| 481 | + ]
|
|---|
| 482 | Index: ../trunk-jpl/test/NightlyRun/test207.py
|
|---|
| 483 | ===================================================================
|
|---|
| 484 | --- ../trunk-jpl/test/NightlyRun/test207.py (revision 0)
|
|---|
| 485 | +++ ../trunk-jpl/test/NightlyRun/test207.py (revision 13491)
|
|---|
| 486 | @@ -0,0 +1,47 @@
|
|---|
| 487 | +"""
|
|---|
| 488 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 489 | +Auto generated python script for ISSM: test207.m
|
|---|
| 490 | +Created on 2012-09-27 via translateToPy.py Ver 1.0 by mikep
|
|---|
| 491 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 492 | +
|
|---|
| 493 | +Matlab script conversion into python
|
|---|
| 494 | +translateToPy.py Author: Michael Pellegrin
|
|---|
| 495 | +translateToPy.py Date: 09/24/12
|
|---|
| 496 | +== == == == == == == == == == == == == == == == == == ==
|
|---|
| 497 | +"""
|
|---|
| 498 | +
|
|---|
| 499 | +from MatlabFuncs import *
|
|---|
| 500 | +from model import *
|
|---|
| 501 | +from EnumDefinitions import *
|
|---|
| 502 | +from numpy import *
|
|---|
| 503 | +from triangle import *
|
|---|
| 504 | +from setmask import *
|
|---|
| 505 | +from parameterize import *
|
|---|
| 506 | +from setflowequation import *
|
|---|
| 507 | +from solve import *
|
|---|
| 508 | +
|
|---|
| 509 | +md=triangle(model(),'../Exp/Square.exp',180000)
|
|---|
| 510 | +md=setmask(md,'all','')
|
|---|
| 511 | +md=parameterize(md,'../Par/SquareShelf.py')
|
|---|
| 512 | +md.extrude(3,1)
|
|---|
| 513 | +md=setflowequation(md,'macayeal','all')
|
|---|
| 514 | +md.cluster=generic('name',oshostname(),'np',3)
|
|---|
| 515 | +md.transient.isdiagnostic=0
|
|---|
| 516 | +md.transient.isprognostic=0
|
|---|
| 517 | +md.transient.isthermal=1
|
|---|
| 518 | +md.transient.isgroundingline=0
|
|---|
| 519 | +md=solve(md,TransientSolutionEnum())
|
|---|
| 520 | +
|
|---|
| 521 | +
|
|---|
| 522 | +# Fields and tolerances to track changes
|
|---|
| 523 | +
|
|---|
| 524 | +field_names =['Temperature1','BasalforcingsMeltingRate1','Temperature2','BasalforcingsMeltingRate2','Temperature3','BasalforcingsMeltingRate3']
|
|---|
| 525 | +field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
|
|---|
| 526 | +field_values=[\
|
|---|
| 527 | + md.results['TransientSolution'][1]['Temperature'],\
|
|---|
| 528 | + md.results['TransientSolution'][1]['BasalforcingsMeltingRate'],\
|
|---|
| 529 | + md.results['TransientSolution'][2]['Temperature'],\
|
|---|
| 530 | + md.results['TransientSolution'][2]['BasalforcingsMeltingRate'],\
|
|---|
| 531 | + md.results['TransientSolution'][3]['Temperature'],\
|
|---|
| 532 | + md.results['TransientSolution'][3]['BasalforcingsMeltingRate'],\
|
|---|
| 533 | + ]
|
|---|
| 534 | Index: ../trunk-jpl/scripts/translateToPy.py
|
|---|
| 535 | ===================================================================
|
|---|
| 536 | --- ../trunk-jpl/scripts/translateToPy.py (revision 13490)
|
|---|
| 537 | +++ ../trunk-jpl/scripts/translateToPy.py (revision 13491)
|
|---|
| 538 | @@ -66,12 +66,31 @@
|
|---|
| 539 | res = res.replace('thickness(pos)','thickness[pos]')
|
|---|
| 540 | res = res.replace('find(md.','numpy.nonzero(md.')
|
|---|
| 541 |
|
|---|
| 542 | + res = res.replace('\n','')
|
|---|
| 543 | +
|
|---|
| 544 | + # handle inline comments
|
|---|
| 545 | + res = res.replace('%','#')
|
|---|
| 546 | +
|
|---|
| 547 | res = res.replace('...','\\')
|
|---|
| 548 | +
|
|---|
| 549 | + # determine if the m file has mult. line cmd (real quick solution)
|
|---|
| 550 | + multCmds = res.split(';')
|
|---|
| 551 | + numLines = len( multCmds ) - 2
|
|---|
| 552 | + allParts = ''
|
|---|
| 553 | + for part in multCmds:
|
|---|
| 554 | + allParts += part
|
|---|
| 555 | + #allParts += re.sub('^\s+','',part)
|
|---|
| 556 | + #allParts += part.strip()
|
|---|
| 557 | + if numLines > 0:
|
|---|
| 558 | + allParts += '\n'
|
|---|
| 559 | + numLines -= 1
|
|---|
| 560 | + res = allParts
|
|---|
| 561 | +
|
|---|
| 562 | res = res.replace(';','')
|
|---|
| 563 | - res = res.replace('\n','')
|
|---|
| 564 |
|
|---|
| 565 | +
|
|---|
| 566 | res = convertFieldValues( res )
|
|---|
| 567 | -
|
|---|
| 568 | + #print 'resulting line:' + str(res) + '\n'
|
|---|
| 569 | output(res)
|
|---|
| 570 |
|
|---|
| 571 | def convertFieldValues ( currentLine ):
|
|---|
| 572 | @@ -103,6 +122,19 @@
|
|---|
| 573 | res = res.replace('Solution.StressTensorxz)','Solution\'][1][\'StressTensorxz\']')
|
|---|
| 574 | res = res.replace('Solution.StressTensoryz)','Solution\'][1][\'StressTensoryz\']')
|
|---|
| 575 |
|
|---|
| 576 | + res = res.replace('Solution.FrictionCoefficient)','Solution\'][1][\'FrictionCoefficient\']')
|
|---|
| 577 | + res = res.replace('Solution.SurfaceforcingsMasBalance)','Solution\'][1][\'SurfaceforcingsMasBalance\']')
|
|---|
| 578 | + res = res.replace('Solution.MaskElementonfloatingice)','Solution\'][1][\'MaskElementonfloatingice\']')
|
|---|
| 579 | + res = res.replace('Solution.J)','Solution\'][1][\'J\']')
|
|---|
| 580 | + res = res.replace('Solution.BalancethicknessThickeningRate)','Solution\'][1][\'BalancethicknessThickeningRate\']')
|
|---|
| 581 | +
|
|---|
| 582 | + res = res.replace('Solution.Gradient1)','Solution\'][1][\'Gradient1\']')
|
|---|
| 583 | + res = res.replace('Solution.Gradient2)','Solution\'][1][\'Gradient2\']')
|
|---|
| 584 | +
|
|---|
| 585 | + res = res.replace('Solution.MaterialsRheologyZbar)','Solution\'][1][\'MaterialsRheologyZbar\']')
|
|---|
| 586 | + res = res.replace('Solution.MaterialsRheologyBbar)','Solution\'][1][\'MaterialsRheologyBbar\']')
|
|---|
| 587 | + res = res.replace('Solution.MaterialsRheologyB)','Solution\'][1][\'MaterialsRheologyB\']')
|
|---|
| 588 | +
|
|---|
| 589 | res = res.replace('Solution.Thickness)','Solution\'][1][\'Thickness\']')
|
|---|
| 590 |
|
|---|
| 591 | res = res.replace('Solution.Temperature)','Solution\'][1][\'Temperature\']')
|
|---|
| 592 | @@ -120,6 +152,10 @@
|
|---|
| 593 | res = res.replace('Solution.Enthalpy)','Solution\'][1][\'Enthalpy\']')
|
|---|
| 594 | res = res.replace('Solution.Waterfraction)','Solution\'][1][\'Waterfraction\']')
|
|---|
| 595 | res = res.replace('Solution.Temperature)','Solution\'][1][\'Temperature\']')
|
|---|
| 596 | +
|
|---|
| 597 | + # special case
|
|---|
| 598 | + res = res.replace('.DiagnosticSolution.J','[\'DiagnosticSolution\'][1][\'J\']')
|
|---|
| 599 | +
|
|---|
| 600 | return res
|
|---|
| 601 |
|
|---|
| 602 | def output ( line ):
|
|---|