Ejemplo n.º 1
0
def wrap_front_t_saone(year,mon,day,hour, miss=-9999.0):
  #--
  ny,nx      = 180,360
  thorog     = ctrack_para.ret_thorog()
  thgradorog = ctrack_para.ret_thgradorog()
  thgrids    = front_para.ret_thgrids()
  thfmask1t, thfmask2t, thfmask1q, thfmask2q   = front_para.ret_thfmasktq()
  #
  orogname   = "/media/disk2/data/JRA25/sa.one.125/const/topo/topo.sa.one"
  gradname   = "/media/disk2/data/JRA25/sa.one.125/const/topo/maxgrad.0200km.sa.one"
  a2orog     = fromfile(orogname, float32).reshape(ny,nx)
  a2gradorog = fromfile(gradname, float32).reshape(ny,nx)
  
  iname1t = "/media/disk2/out/JRA25/sa.one.anl_p/6hr/front.t/%04d%02d/front.t.M1.%04d.%02d.%02d.%02d.sa.one"%(year,mon,year,mon,day,hour)
  iname2t = "/media/disk2/out/JRA25/sa.one.anl_p/6hr/front.t/%04d%02d/front.t.M2.%04d.%02d.%02d.%02d.sa.one"%(year,mon,year,mon,day,hour)
  a2pott1 = fromfile(iname1t,float32).reshape(ny,nx)
  a2pott2 = fromfile(iname2t,float32).reshape(ny,nx)
  a2loct  = complete_front_t_saone(a2pott1, a2pott2, thfmask1t, thfmask2t, a2orog, a2gradorog, thorog, thgradorog, thgrids, miss )
  return a2loct
Ejemplo n.º 2
0
def wrap_front_q_saone(year,mon,day,hour, miss=-9999.0):
  #-- para ---
  ny,nx      = 180,360
  thorog     = ctrack_para.ret_thorog()
  thgradorog = ctrack_para.ret_thgradorog()
  thgrids    = front_para.ret_thgrids()
  thfmask1t, thfmask2t, thfmask1q, thfmask2q   = front_para.ret_thfmasktq()
  #-- names ---
  orogname   = "/media/disk2/data/JRA25/sa.one.125/const/topo/topo.sa.one"
  gradname   = "/media/disk2/data/JRA25/sa.one.125/const/topo/maxgrad.0200km.sa.one"
  iname1q    = "/media/disk2/out/JRA25/sa.one.anl_p/6hr/front.q/%04d%02d/front.q.M1.%04d.%02d.%02d.%02d.sa.one"%(year,mon,year,mon,day,hour)
  iname2q    = "/media/disk2/out/JRA25/sa.one.anl_p/6hr/front.q/%04d%02d/front.q.M2.%04d.%02d.%02d.%02d.sa.one"%(year,mon,year,mon,day,hour)

  #-- load ----
  a2orog     = fromfile(orogname, float32).reshape(ny,nx)
  a2gradorog = fromfile(gradname, float32).reshape(ny,nx)
  a2potq1    = fromfile(iname1q,float32).reshape(ny,nx)
  a2potq2    = fromfile(iname2q,float32).reshape(ny,nx)
  a2loct     = wrap_front_t_saone(year,mon,day,hour, miss=-9999.0)
  #-- make locq --
  a2locq     = complete_front_q_saone(a2loct, a2potq1, a2potq2, thfmask1q, thfmask2q, a2orog, a2gradorog, thorog, thgradorog, thgrids, miss)
  #
  return a2locq
Ejemplo n.º 3
0
    pgradmin = dpgradrange[2][0]  # Pa/1000km

    # --- TC --------
    thsst = tc_para.ret_thsst()
    thwind = tc_para.ret_thwind()
    thrvort = tc_para.ret_thrvort(model)
    thwcore = tc_para.ret_thwcore(model)

    # --- Front -----
    thfmask1t, thfmask2t, thfmask1q, thfmask2q = front_para.ret_thfmasktq(model)
    print 1
    plev = 850 * 100.0  # (Pa)
    print 2
    thorog = ctrack_para.ret_thorog()
    thgradorog = ctrack_para.ret_thgradorog()
    thgrids = front_para.ret_thgrids()

    # -----------------------------------------
    a1dtime, a1tnum = cmip_func.ret_times(iyear, eyear, lmon, sunit, scalendar, stepday, model=model)
    for year in lyear:
        for mon in lmon:
            # --- init ------------------
            a2count = zeros([ny, nx], float32)

            # ---------------------------
            for dtime, tnum in map(None, a1dtime, a1tnum):
                yeart, mont, dayt, hourt = dtime.year, dtime.month, dtime.day, dtime.hour
                # --- check year and month ---
                if not (yeart == year) & (mont == mon):
                    continue
                # ----------------------------