largv = sys.argv
if len(largv)>1:
  prj, model, run, res, noleap, dbbaseDir, wsbaseDir = largv[1:1+7]
  if noleap=="True": noleap=True
  elif noleap=="False": noleap=False
  else: print "check noleap",noleap; sys.exit()

  iYear,iMon, eYear, eMon = map(int,largv[1+7:1+7+4])
  iYear_data, iMon_data   = map(int,largv[1+7+4:1+7+4+2])
#-------------------------
#cfg          = config.cfg
#cfg['prj']   = prj    # for ConstCyclone
#cfg['model'] = model  # for ConstCyclone
#cfg['outbaseDir'] = cfg['baseDir'] + '/%s'%(run)
#iom    = IO_Master.IO_Master(cfg, prj, model, run, res)
iom    = IO_Master.IO_Master(prj, model, run, res, dbbaseDir)

const  = ConstCyclone.Const(prj=prj, model=model)
const['Lat'] = iom.Lat
const['Lon'] = iom.Lon

wsDir = wsbaseDir + '/%s'%(run)
cy     = Cyclone.Cyclone(baseDir=wsDir, const=const)
lYM = util.ret_lYM([iYear,iMon],[eYear,eMon])

#**********************************************
def ret_a1initState(var, year,mon,dinitState_pre):
  #----------
  dinitState              = {}
  dinitState[-9999,-9999] = -9999.0
  #----------
Example #2
0
    eDTime = datetime(eYear, eMon, eDay, 18)
#-------------------------

dDTime = timedelta(hours=6)

ret_lDTime = {False: util.ret_lDTime, True: util.ret_lDTime_noleap}[noleap]

lDTime = ret_lDTime(iDTime, eDTime, dDTime)

tstp = "6hr"

cfg = config.cfg
cfg['prj'] = prj  # for ConstCyclone
cfg['model'] = model  # for ConstCyclone
cfg['outbaseDir'] = cfg['baseDir'] + '/%s' % (run)
iom = IO_Master.IO_Master(cfg, prj, model, run, res)

const = ConstCyclone.Const(cfg)
const['Lat'] = iom.Lat
const['Lon'] = iom.Lon
cy = Cyclone.Cyclone(cfg, const)

a1lat = iom.Lat
a1lon = iom.Lon
ny = iom.ny
nx = iom.nx
miss = -9999.0


#####################################################
def var_psl(model):