[12679] | 1 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model.py
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model.py (revision 12442)
|
---|
| 4 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model.py (revision 12443)
|
---|
| 5 | @@ -1,114 +0,0 @@
|
---|
| 6 | -#module imports {{{
|
---|
| 7 | -from mesh import mesh
|
---|
| 8 | -from mask import mask
|
---|
| 9 | -from geometry import geometry
|
---|
| 10 | -from constants import constants
|
---|
| 11 | -from surfaceforcings import surfaceforcings
|
---|
| 12 | -from basalforcings import basalforcings
|
---|
| 13 | -from materials import materials
|
---|
| 14 | -from friction import friction
|
---|
| 15 | -from flowequation import flowequation
|
---|
| 16 | -from timestepping import timestepping
|
---|
| 17 | -from initialization import initialization
|
---|
| 18 | -from rifts import rifts
|
---|
| 19 | -from debug import debug
|
---|
| 20 | -from verbose import verbose
|
---|
| 21 | -from settings import settings
|
---|
| 22 | -from solver import solver
|
---|
| 23 | -from none import none
|
---|
| 24 | -from balancethickness import balancethickness
|
---|
| 25 | -from diagnostic import diagnostic
|
---|
| 26 | -from groundingline import groundingline
|
---|
| 27 | -from hydrology import hydrology
|
---|
| 28 | -from prognostic import prognostic
|
---|
| 29 | -from thermal import thermal
|
---|
| 30 | -from steadystate import steadystate
|
---|
| 31 | -from transient import transient
|
---|
| 32 | -from autodiff import autodiff
|
---|
| 33 | -from flaim import flaim
|
---|
| 34 | -from inversion import inversion
|
---|
| 35 | -from qmu import qmu
|
---|
| 36 | -from radaroverlay import radaroverlay
|
---|
| 37 | -from miscellaneous import miscellaneous
|
---|
| 38 | -from private import private
|
---|
| 39 | -#}}}
|
---|
| 40 | -class model:
|
---|
| 41 | - #properties
|
---|
| 42 | - def __init__(self):
|
---|
| 43 | - # {{{ Properties
|
---|
| 44 | - self.mesh = mesh()
|
---|
| 45 | - self.mask = mask()
|
---|
| 46 | - self.geometry = geometry()
|
---|
| 47 | - self.constants = constants()
|
---|
| 48 | - self.surfaceforcings = surfaceforcings()
|
---|
| 49 | - self.basalforcings = basalforcings()
|
---|
| 50 | - self.materials = materials()
|
---|
| 51 | - self.friction = friction()
|
---|
| 52 | - self.flowequation = flowequation()
|
---|
| 53 | - self.timestepping = timestepping()
|
---|
| 54 | - self.initialization = initialization()
|
---|
| 55 | - self.rifts = rifts()
|
---|
| 56 | -
|
---|
| 57 | - self.debug = debug()
|
---|
| 58 | - self.verbose = verbose()
|
---|
| 59 | - self.settings = settings()
|
---|
| 60 | - self.solver = solver()
|
---|
| 61 | - self.cluster = none()
|
---|
| 62 | -
|
---|
| 63 | - self.balancethickness = balancethickness()
|
---|
| 64 | - self.diagnostic = diagnostic()
|
---|
| 65 | - self.groundingline = groundingline()
|
---|
| 66 | - self.hydrology = hydrology()
|
---|
| 67 | - self.prognostic = prognostic()
|
---|
| 68 | - self.thermal = thermal()
|
---|
| 69 | - self.steadystate = steadystate()
|
---|
| 70 | - self.transient = transient()
|
---|
| 71 | -
|
---|
| 72 | - self.autodiff = autodiff()
|
---|
| 73 | - self.flaim = flaim()
|
---|
| 74 | - self.inversion = inversion()
|
---|
| 75 | - self.qmu = qmu()
|
---|
| 76 | -
|
---|
| 77 | - self.results = [];
|
---|
| 78 | - self.radaroverlay = radaroverlay()
|
---|
| 79 | - self.miscellaneous = miscellaneous()
|
---|
| 80 | - self.private = private()
|
---|
| 81 | - #}}}
|
---|
| 82 | - def __repr__(obj):
|
---|
| 83 | - # {{{ Display
|
---|
| 84 | -
|
---|
| 85 | - #print "Here %s the number: %d" % ("is", 37)
|
---|
| 86 | - string="%19s: %-22s -- %s" % ("mesh","[%s,%s]" % ("1x1",obj.mesh.__class__.__name__),"mesh properties")
|
---|
| 87 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("mask","[%s,%s]" % ("1x1",obj.mask.__class__.__name__),"defines grounded and floating elements"))
|
---|
| 88 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("geometry","[%s,%s]" % ("1x1",obj.geometry.__class__.__name__),"surface elevation, bedrock topography, ice thickness,..."))
|
---|
| 89 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("constants","[%s,%s]" % ("1x1",obj.constants.__class__.__name__),"physical constants"))
|
---|
| 90 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("surfaceforcings","[%s,%s]" % ("1x1",obj.surfaceforcings.__class__.__name__),"surface forcings"))
|
---|
| 91 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("basalforcings","[%s,%s]" % ("1x1",obj.basalforcings.__class__.__name__),"bed forcings"))
|
---|
| 92 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("materials","[%s,%s]" % ("1x1",obj.materials.__class__.__name__),"material properties"))
|
---|
| 93 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("friction","[%s,%s]" % ("1x1",obj.friction.__class__.__name__),"basal friction/drag properties"))
|
---|
| 94 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flowequation","[%s,%s]" % ("1x1",obj.flowequation.__class__.__name__),"flow equations"))
|
---|
| 95 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("timestepping","[%s,%s]" % ("1x1",obj.timestepping.__class__.__name__),"time stepping for transient models"))
|
---|
| 96 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("initialization","[%s,%s]" % ("1x1",obj.initialization.__class__.__name__),"initial guess/state"))
|
---|
| 97 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("rifts","[%s,%s]" % ("1x1",obj.rifts.__class__.__name__),"rifts properties'"))
|
---|
| 98 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("debug","[%s,%s]" % ("1x1",obj.debug.__class__.__name__),"debugging tools (valgrind, gprof"))
|
---|
| 99 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("verbose","[%s,%s]" % ("1x1",obj.verbose.__class__.__name__),"verbosity level in solve"))
|
---|
| 100 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("settings","[%s,%s]" % ("1x1",obj.settings.__class__.__name__),"settings properties"))
|
---|
| 101 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("solver","[%s,%s]" % ("1x1",obj.solver.__class__.__name__),"PETSc options for each solution'"))
|
---|
| 102 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("cluster","[%s,%s]" % ("1x1",obj.cluster.__class__.__name__),"cluster parameters (number of cpus...)"))
|
---|
| 103 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("balancethickness","[%s,%s]" % ("1x1",obj.balancethickness.__class__.__name__),"parameters for balancethickness solution"))
|
---|
| 104 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("diagnostic","[%s,%s]" % ("1x1",obj.diagnostic.__class__.__name__),"parameters for diagnostic solution"))
|
---|
| 105 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("groundingline","[%s,%s]" % ("1x1",obj.groundingline.__class__.__name__),"parameters for groundingline solution"))
|
---|
| 106 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("hydrology","[%s,%s]" % ("1x1",obj.hydrology.__class__.__name__),"parameters for hydrology solution"))
|
---|
| 107 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("prognostic","[%s,%s]" % ("1x1",obj.prognostic.__class__.__name__),"parameters for prognostic solution"))
|
---|
| 108 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("thermal","[%s,%s]" % ("1x1",obj.thermal.__class__.__name__),"parameters for thermal solution"))
|
---|
| 109 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("steadystate","[%s,%s]" % ("1x1",obj.steadystate.__class__.__name__),"parameters for steadystate solution"))
|
---|
| 110 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("transient","[%s,%s]" % ("1x1",obj.transient.__class__.__name__),"parameters for transient solution"))
|
---|
| 111 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("autodiff","[%s,%s]" % ("1x1",obj.autodiff.__class__.__name__),"automatic differentiation parameters"))
|
---|
| 112 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flaim","[%s,%s]" % ("1x1",obj.flaim.__class__.__name__),"flaim parameters"))
|
---|
| 113 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
|
---|
| 114 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
|
---|
| 115 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results'"))
|
---|
| 116 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("radaroverlay","[%s,%s]" % ("1x1",obj.radaroverlay.__class__.__name__),"radar image for plot overlay"))
|
---|
| 117 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
|
---|
| 118 | - return string;
|
---|
| 119 | - #}}}
|
---|
| 120 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py
|
---|
| 121 | ===================================================================
|
---|
| 122 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py (revision 0)
|
---|
| 123 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py (revision 12443)
|
---|
| 124 | @@ -0,0 +1,114 @@
|
---|
| 125 | +#module imports {{{
|
---|
| 126 | +from mesh import mesh
|
---|
| 127 | +from mask import mask
|
---|
| 128 | +from geometry import geometry
|
---|
| 129 | +from constants import constants
|
---|
| 130 | +from surfaceforcings import surfaceforcings
|
---|
| 131 | +from basalforcings import basalforcings
|
---|
| 132 | +from materials import materials
|
---|
| 133 | +from friction import friction
|
---|
| 134 | +from flowequation import flowequation
|
---|
| 135 | +from timestepping import timestepping
|
---|
| 136 | +from initialization import initialization
|
---|
| 137 | +from rifts import rifts
|
---|
| 138 | +from debug import debug
|
---|
| 139 | +from verbose import verbose
|
---|
| 140 | +from settings import settings
|
---|
| 141 | +from solver import solver
|
---|
| 142 | +from none import none
|
---|
| 143 | +from balancethickness import balancethickness
|
---|
| 144 | +from diagnostic import diagnostic
|
---|
| 145 | +from groundingline import groundingline
|
---|
| 146 | +from hydrology import hydrology
|
---|
| 147 | +from prognostic import prognostic
|
---|
| 148 | +from thermal import thermal
|
---|
| 149 | +from steadystate import steadystate
|
---|
| 150 | +from transient import transient
|
---|
| 151 | +from autodiff import autodiff
|
---|
| 152 | +from flaim import flaim
|
---|
| 153 | +from inversion import inversion
|
---|
| 154 | +from qmu import qmu
|
---|
| 155 | +from radaroverlay import radaroverlay
|
---|
| 156 | +from miscellaneous import miscellaneous
|
---|
| 157 | +from private import private
|
---|
| 158 | +#}}}
|
---|
| 159 | +class model:
|
---|
| 160 | + #properties
|
---|
| 161 | + def __init__(self):
|
---|
| 162 | + # {{{ Properties
|
---|
| 163 | + self.mesh = mesh()
|
---|
| 164 | + self.mask = mask()
|
---|
| 165 | + self.geometry = geometry()
|
---|
| 166 | + self.constants = constants()
|
---|
| 167 | + self.surfaceforcings = surfaceforcings()
|
---|
| 168 | + self.basalforcings = basalforcings()
|
---|
| 169 | + self.materials = materials()
|
---|
| 170 | + self.friction = friction()
|
---|
| 171 | + self.flowequation = flowequation()
|
---|
| 172 | + self.timestepping = timestepping()
|
---|
| 173 | + self.initialization = initialization()
|
---|
| 174 | + self.rifts = rifts()
|
---|
| 175 | +
|
---|
| 176 | + self.debug = debug()
|
---|
| 177 | + self.verbose = verbose()
|
---|
| 178 | + self.settings = settings()
|
---|
| 179 | + self.solver = solver()
|
---|
| 180 | + self.cluster = none()
|
---|
| 181 | +
|
---|
| 182 | + self.balancethickness = balancethickness()
|
---|
| 183 | + self.diagnostic = diagnostic()
|
---|
| 184 | + self.groundingline = groundingline()
|
---|
| 185 | + self.hydrology = hydrology()
|
---|
| 186 | + self.prognostic = prognostic()
|
---|
| 187 | + self.thermal = thermal()
|
---|
| 188 | + self.steadystate = steadystate()
|
---|
| 189 | + self.transient = transient()
|
---|
| 190 | +
|
---|
| 191 | + self.autodiff = autodiff()
|
---|
| 192 | + self.flaim = flaim()
|
---|
| 193 | + self.inversion = inversion()
|
---|
| 194 | + self.qmu = qmu()
|
---|
| 195 | +
|
---|
| 196 | + self.results = [];
|
---|
| 197 | + self.radaroverlay = radaroverlay()
|
---|
| 198 | + self.miscellaneous = miscellaneous()
|
---|
| 199 | + self.private = private()
|
---|
| 200 | + #}}}
|
---|
| 201 | + def __repr__(obj):
|
---|
| 202 | + # {{{ Display
|
---|
| 203 | +
|
---|
| 204 | + #print "Here %s the number: %d" % ("is", 37)
|
---|
| 205 | + string="%19s: %-22s -- %s" % ("mesh","[%s,%s]" % ("1x1",obj.mesh.__class__.__name__),"mesh properties")
|
---|
| 206 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("mask","[%s,%s]" % ("1x1",obj.mask.__class__.__name__),"defines grounded and floating elements"))
|
---|
| 207 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("geometry","[%s,%s]" % ("1x1",obj.geometry.__class__.__name__),"surface elevation, bedrock topography, ice thickness,..."))
|
---|
| 208 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("constants","[%s,%s]" % ("1x1",obj.constants.__class__.__name__),"physical constants"))
|
---|
| 209 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("surfaceforcings","[%s,%s]" % ("1x1",obj.surfaceforcings.__class__.__name__),"surface forcings"))
|
---|
| 210 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("basalforcings","[%s,%s]" % ("1x1",obj.basalforcings.__class__.__name__),"bed forcings"))
|
---|
| 211 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("materials","[%s,%s]" % ("1x1",obj.materials.__class__.__name__),"material properties"))
|
---|
| 212 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("friction","[%s,%s]" % ("1x1",obj.friction.__class__.__name__),"basal friction/drag properties"))
|
---|
| 213 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flowequation","[%s,%s]" % ("1x1",obj.flowequation.__class__.__name__),"flow equations"))
|
---|
| 214 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("timestepping","[%s,%s]" % ("1x1",obj.timestepping.__class__.__name__),"time stepping for transient models"))
|
---|
| 215 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("initialization","[%s,%s]" % ("1x1",obj.initialization.__class__.__name__),"initial guess/state"))
|
---|
| 216 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("rifts","[%s,%s]" % ("1x1",obj.rifts.__class__.__name__),"rifts properties'"))
|
---|
| 217 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("debug","[%s,%s]" % ("1x1",obj.debug.__class__.__name__),"debugging tools (valgrind, gprof"))
|
---|
| 218 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("verbose","[%s,%s]" % ("1x1",obj.verbose.__class__.__name__),"verbosity level in solve"))
|
---|
| 219 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("settings","[%s,%s]" % ("1x1",obj.settings.__class__.__name__),"settings properties"))
|
---|
| 220 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("solver","[%s,%s]" % ("1x1",obj.solver.__class__.__name__),"PETSc options for each solution'"))
|
---|
| 221 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("cluster","[%s,%s]" % ("1x1",obj.cluster.__class__.__name__),"cluster parameters (number of cpus...)"))
|
---|
| 222 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("balancethickness","[%s,%s]" % ("1x1",obj.balancethickness.__class__.__name__),"parameters for balancethickness solution"))
|
---|
| 223 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("diagnostic","[%s,%s]" % ("1x1",obj.diagnostic.__class__.__name__),"parameters for diagnostic solution"))
|
---|
| 224 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("groundingline","[%s,%s]" % ("1x1",obj.groundingline.__class__.__name__),"parameters for groundingline solution"))
|
---|
| 225 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("hydrology","[%s,%s]" % ("1x1",obj.hydrology.__class__.__name__),"parameters for hydrology solution"))
|
---|
| 226 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("prognostic","[%s,%s]" % ("1x1",obj.prognostic.__class__.__name__),"parameters for prognostic solution"))
|
---|
| 227 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("thermal","[%s,%s]" % ("1x1",obj.thermal.__class__.__name__),"parameters for thermal solution"))
|
---|
| 228 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("steadystate","[%s,%s]" % ("1x1",obj.steadystate.__class__.__name__),"parameters for steadystate solution"))
|
---|
| 229 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("transient","[%s,%s]" % ("1x1",obj.transient.__class__.__name__),"parameters for transient solution"))
|
---|
| 230 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("autodiff","[%s,%s]" % ("1x1",obj.autodiff.__class__.__name__),"automatic differentiation parameters"))
|
---|
| 231 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flaim","[%s,%s]" % ("1x1",obj.flaim.__class__.__name__),"flaim parameters"))
|
---|
| 232 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
|
---|
| 233 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
|
---|
| 234 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results'"))
|
---|
| 235 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("radaroverlay","[%s,%s]" % ("1x1",obj.radaroverlay.__class__.__name__),"radar image for plot overlay"))
|
---|
| 236 | + string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
|
---|
| 237 | + return string;
|
---|
| 238 | + #}}}
|
---|