Beispiel #1
0
src_directory = '../../../'
sys.path.append(src_directory)

import src.model              as model
import src.solvers            as solvers
import src.physical_constants as pc
from data.data_factory   import DataFactory
from meshes.mesh_factory import MeshFactory
from src.helper          import default_nonlin_solver_params
from src.utilities       import DataInput
from dolfin              import *

set_log_active(True)

var_measures = DataFactory.get_ant_measures()
var_bedmap1  = DataFactory.get_lebrocq()
var_bedmap2  = DataFactory.get_bedmap2()

mesh         = MeshFactory.get_antarctica_coarse()
flat_mesh    = MeshFactory.get_antarctica_coarse()

dm  = DataInput(None, var_measures, mesh=mesh,flip=True)
db1 = DataInput(None, var_bedmap1,  mesh=mesh)
db2 = DataInput(None, var_bedmap2,  mesh=mesh, flip=True)

thklim = 50.0

db2.set_data_min("H", thklim, thklim)
db2.set_data_min("h", 0.0,0.0)

db2.set_data_max("H",30000.,thklim)
Beispiel #2
0
import sys
import os
src_directory = '../../../'
sys.path.append(src_directory)

from pylab                  import *
from dolfin                 import *
from src.utilities          import DataInput, DataOutput
from src.physics            import VelocityBalance_2
from plot.plothelp.plotting import plotIce
from data.data_factory      import DataFactory
from meshes.mesh_factory    import MeshFactory

set_log_level(PROGRESS)

bm1 = DataFactory.get_lebrocq()
bm2 = DataFactory.get_bedmap2()

direc = os.path.dirname(os.path.realpath(__file__)) 

mesh   = Mesh("../meshes/mesh.xml")

# Import data :
d1     = DataInput(None, bm1, mesh=mesh)
d3     = DataInput(None, bm2, mesh=mesh, flip=True)

# set minimum values for data :
d3.set_data_val("H",    32767, 10.0)
d3.set_data_val("h",    32767,  0.0)
d3.set_data_val("mask", 127,    1.0)