Esempio n. 1
0
 def __init__(self,pid,base='/tigress/changgoo/',pdir=None):
     if pdir is None: pdir=pid+'/'
     self.vtkfiles= glob.glob(base+pdir+"id0/"+pid+".????.vtk")
     self.vtkfiles.sort() 
     self.parfname='%s%s/%s.par' % (base,pdir,pid)
     self.par=parse_par(self.parfname)
     self.hstfname='%s%s/hst/%s.hst' % (base,pdir,pid)
     self.hst=pa.hst_reader(self.hstfname)
Esempio n. 2
0
def recal_history(base, problem_dir, problem_id):
    parfile = '{}{}/{}.par'.format(base, problem_dir, problem_id)
    params = pa.get_params(parfile)

    hstfile = '{}{}/hst/{}.hst'.format(base, problem_dir, problem_id)
    hst = pa.hst_reader(hstfile)

    hstrecalfile = '{}_cal.p'.format(hstfile)
    h = processing_history_dump(hst, params, hstrecalfile)

    snfile = '{}{}/hst/{}.sn'.format(base, problem_dir, problem_id)
    sn = pa.hst_reader(snfile)
    rates = recal_rates(h, sn, base, problem_dir, problem_id)

    hstzpfile = '{}_zp.p'.format(hstfile)
    zprof_ds = merge_xarray(base, problem_dir, problem_id)
    #print("zprof dataset is loaded")
    h_zp = processing_zprof_dump(h, rates, params, zprof_ds, hstzpfile)