Exemplo n.º 1
0
 def test(self):
     cmd = stat0A(earth_model_stat=join(self.share_dir, 'earth.model'),
                  stat0_out=self.out_file,
                  l_min=1,
                  l_max=10,
                  fault_bottom_depth=60.,
                  fault_top_depth=3.,
                  obs_dep=0.,
                  if_skip_on_existing_output=True,
                  stdout=None,
                  stderr=None,
                  cwd=join(self.outs_dir, 'cwd'),
                  if_keep_cwd=True)
     cmd()
Exemplo n.º 2
0
 def test(self):
     cmd = stat0A(
         earth_model_stat = join(self.share_dir,'earth.model'),
         stat0_out = self.out_file,
         l_min = 1,
         l_max = 10,
         fault_bottom_depth = 60.,
         fault_top_depth = 3.,
         obs_dep = 0.,
         if_skip_on_existing_output = True,
         stdout = None,
         stderr = None,
         cwd = join(self.outs_dir,'cwd'),
         if_keep_cwd = True)
     cmd()
Exemplo n.º 3
0
def add_model(model_str, l_max, model_num):
    cmd1['%d' % model_num] = stat0A(earth_model_stat=join(
        model_str, 'earth.model_' + model_str),
                                    stat0_out=join(model_str, 'stat0.out'),
                                    l_min=1,
                                    l_max=15000,
                                    fault_bottom_depth=fault_bottom_depth,
                                    fault_top_depth=fault_top_depth,
                                    obs_dep=0.,
                                    if_skip_on_existing_output=True,
                                    stdout=FNULL)

    cmd2['%d' % model_num] = vj.pollitz.ComputeEarthModelVISCO1DNonGravity(
        earth_file=join(model_str, 'earth.model_' + model_str),
        l_max=lmax,
        outputs_dir=model_str,
        if_skip_on_existing_output=True,
        stdout=FNULL,
        stderr=FNULL,
    )
Exemplo n.º 4
0
def add_model(model_str, l_max, model_num):
    cmd1['%d'%model_num]= stat0A(
        earth_model_stat = join(model_str, 'earth.model_'+model_str),
        stat0_out = join(model_str, 'stat0.out'),
        l_min = 1,
        l_max = 15000,
        fault_bottom_depth = fault_bottom_depth,
        fault_top_depth = fault_top_depth,
        obs_dep = 0.,
        if_skip_on_existing_output = True,
        stdout = FNULL
        )

    cmd2['%d'%model_num] = vj.pollitz.ComputeEarthModelVISCO1DNonGravity(
        earth_file = join(model_str, 'earth.model_'+model_str),
        l_max = lmax,
        outputs_dir = model_str,
        if_skip_on_existing_output = True,
        stdout = FNULL,
        stderr = FNULL,
        )
Exemplo n.º 5
0
FNULL = open(os.devnull, 'w')

fid = FaultFileIO('../fault_model/fault_He50km.h5')
fault_bottom_depth = fid.depth_bottom
fault_top_depth = fid.depth_top

lmax = 810

######################
earth_file_dir = 'He50km_Vis1.0E19/'

cmd1_He50km_Vis1E19 = stat0A(earth_model_stat=join(
    earth_file_dir, 'earth.model_He50km_Vis1.0E19'),
                             stat0_out=join(earth_file_dir, 'stat0.out'),
                             l_min=1,
                             l_max=15000,
                             fault_bottom_depth=fault_bottom_depth,
                             fault_top_depth=fault_top_depth,
                             obs_dep=0.,
                             if_skip_on_existing_output=True,
                             stdout=FNULL)

cmd2_He50km_Vis1E19 = ComputeEarthModelVISCO1D(
    earth_file=join(earth_file_dir, 'earth.model_He50km_Vis1.0E19'),
    l_max=lmax,
    outputs_dir=earth_file_dir,
    if_skip_on_existing_output=True,
    stdout=FNULL,
    stderr=FNULL,
)
Exemplo n.º 6
0
import os
from os.path import join
import argparse

from viscojapan.pollitz.pollitz_wrapper import stat0A
from viscojapan.fault_model import FaultFileReader
import viscojapan as vj

FNULL = open(os.devnull, 'w')

fid = FaultFileReader('../fault_model/fault_bott60km.h5')
fault_bottom_depth = fid.depth_bottom
fault_top_depth = fid.depth_top

model_str = 'He63km_VisM1.0E19'

cmd = stat0A(
    earth_model_stat = join(model_str, 'earth.model_'+model_str),
    stat0_out = join(model_str, 'stat0.out'),
    l_min = 1,
    l_max = 15000,
    fault_bottom_depth = fault_bottom_depth,
    fault_top_depth = fault_top_depth,
    obs_dep = 0.,
    if_skip_on_existing_output = True,
    stdout = FNULL
    )

cmd.run()
Exemplo n.º 7
0
fid = FaultFileIO('../fault_model/fault_He50km.h5')
fault_bottom_depth = fid.depth_bottom
fault_top_depth = fid.depth_top

lmax = 810

######################
earth_file_dir = 'He50km_Vis1.0E19/'

cmd1_He50km_Vis1E19 = stat0A(
    earth_model_stat = join(earth_file_dir, 'earth.model_He50km_Vis1.0E19'),
    stat0_out = join(earth_file_dir, 'stat0.out'),
    l_min = 1,
    l_max = 15000,
    fault_bottom_depth = fault_bottom_depth,
    fault_top_depth = fault_top_depth,
    obs_dep = 0.,
    if_skip_on_existing_output = True,
    stdout = FNULL
    )

cmd2_He50km_Vis1E19 = ComputeEarthModelVISCO1D(
    earth_file = join(earth_file_dir, 'earth.model_He50km_Vis1.0E19'),
    l_max = lmax,
    outputs_dir = earth_file_dir,
    if_skip_on_existing_output = True,
    stdout = FNULL,
    stderr = FNULL,
    )