コード例 #1
0
ファイル: front_func.py プロジェクト: nbykutsumi/dtanl
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
コード例 #2
0
ファイル: front_func.py プロジェクト: nbykutsumi/dtanl
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
コード例 #3
0
 
 stime         = "%04d%02d%02d%02d"%(year, mon, day, hour)
 sodir         = "/home/utsumi/temp/tenkizu"
 cbardir       = sodir
 
 ctrack_func.mk_dir(sodir)
 
 dlat    = 1.0
 dlon    = 1.0
 a1lat   = arange(-89.5, 89.5  + dlat*0.1, dlat)
 a1lon   = arange(0.5,   359.5 + dlon*0.1, dlon)
 
 meridians = 10.0
 parallels = 10.0
 
 thorog  = ctrack_para.ret_thorog()
 thgradorog=ctrack_para.ret_thgradorog()
 #************************
 # for mapping
 nnx        = int( (urlon - lllon)/dlon)
 nny        = int( (urlat - lllat)/dlat)
 a1lon_loc  = linspace(lllon, urlon, nnx)
 a1lat_loc  = linspace(lllat, urlat, nny)
 LONS, LATS = meshgrid( a1lon_loc, a1lat_loc)
 
 xdom_saone_first = int((lllon - 0.5 + 0.5)/1.0)
 xdom_saone_last  = int((urlon - 0.5 + 0.5)/1.0)
 ydom_saone_first = int((lllat -(-89.5) + 0.5)/1.0)
 ydom_saone_last  = int((urlat -(-89.5) + 0.5)/1.0)
 
 #************************