• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python util.ret_lYM函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中myfunc.util.ret_lYM函数的典型用法代码示例。如果您正苦于以下问题:Python ret_lYM函数的具体用法?Python ret_lYM怎么用?Python ret_lYM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ret_lYM函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: aveCLnum

def aveCLnum(iYM, eYM, icl):
  clName = dclShortName[icl]
  sDir   = "/tank/utsumi/CLOUDTYPE/WNPAC/num"
  lYM    = util.ret_lYM(iYM, eYM)
  a2out  = zeros([ny,nx], int32) 
  for YM in lYM:
    Year, Mon = YM
    sPath = sDir + "/num.%04d%02d.%s.%dx%d"%(Year,Mon,clName,ny,nx)
    a2out = a2out + fromfile(sPath, int32).reshape(ny,nx)
  a2out  = a2out / len(lYM)

  return ma.masked_where(a2dommask==-9999., a2out)
开发者ID:nbykutsumi,项目名称:PMM,代码行数:12,代码来源:old.mk.plot.vsRA.py


示例2: accDat

def accDat(dattype,iYM, eYM, binPr, sumnum="num"):
  dfunc = {"sum":loadSum
          ,"num":loadNum
          }
  ddtype= {"sum":"float32"
          ,"num":"int32"
          }

  accDat = zeros([ncltype, ny, nx], ddtype[sumnum])

  lYM = util.ret_lYM(iYM,eYM)
  for (Year,Mon) in lYM:
    accDat = accDat + dfunc[sumnum](dattype,Year,Mon,binPr)
  return accDat
开发者ID:nbykutsumi,项目名称:PMM,代码行数:14,代码来源:mk.bar.acc.bias.perProd.py


示例3: ret_gNameLatLon

def ret_gNameLatLon(domain):
    iYM = [2005,4]
    eYM = [2014,9]
    
    lYM = util.ret_lYM(iYM, eYM)
    lYM = [YM for YM in lYM if YM[1] not in [1,2,3,11,12]]
    lYM = lYM[::-1]
    #-- load gauge data
    daPrcp  = {}
    dLat    = {}
    dLon    = {}
    lgName  = []
    for YM in lYM:
        Year,Mon = YM
        try:
            lgNameTmp  = dgName[domain, Year, Mon]
        except KeyError:
            continue
        for gName in lgNameTmp:
            if gName not in lgName:
                lgName.append(gName)
                dLat[gName], dLon[gName] = gv.dlatlon[domain,gName]

    return lgName, dLat, dLon
开发者ID:nbykutsumi,项目名称:PMM,代码行数:24,代码来源:old.mk-matching-PR-onlySate.py


示例4:

from numpy import *
from datetime import datetime, timedelta
from collections import deque
from gv_fsub import *
import GPMGV
import numpy as np
import myfunc.util as util
import matplotlib.pyplot as plt
import sys, os

calc = True
#calc = False
iYM = [2005,4]
#iYM = [2014,10]
eYM = [2014,10]
lYM = util.ret_lYM(iYM, eYM)
lYM = [YM for YM in lYM if YM[1] not in [1,2,3,11,12]]
print lYM

#thdist = 2.5 # km
thdist = 5 # km
minNum = 3
prdName = 'L2A25'
nh = 40
gv = GPMGV.GPMGV()
gv.load_sitelist_reclassified()

dgName = gv.ret_ddomYM2gName()

ldomain = gv.domains
#ldomain = ['FLORIDA-STJ','FLORIDA-SFL-N','N.Carolina-IPHEx_Duke','N.Carolina-IPHEx_NASA','KWAJALEIN-KWA']
开发者ID:nbykutsumi,项目名称:PMM,代码行数:31,代码来源:plot-profile-rh-PR.py


示例5: ret_num

def ret_num(iYM,eYM,rtype):
    lYM  = util.ret_lYM(iYM,eYM)
    a3dat= zeros([nz,ny,nx],int32)
    for Year,Mon in lYM:
       a3dat = a3dat + ret_num_single(Year,Mon,rtype)
    return a3dat
开发者ID:nbykutsumi,项目名称:PMM,代码行数:6,代码来源:draw.ts.hist.py


示例6: ret_sumnum

def ret_sumnum(sumnum,iYM,eYM,rtype):
    lYM  = util.ret_lYM(iYM,eYM)
    a2dat= zeros([ny,nx],int32)
    for Year,Mon in lYM:
       a2dat = a2dat + ret_sumnum_single(sumnum,Year,Mon,rtype)
    return a2dat
开发者ID:nbykutsumi,项目名称:PMM,代码行数:6,代码来源:draw.map.stormH.py


示例7: float

    region  = line[0]
    nwName  = line[1]
    nwCode  = line[2]
    domain  = line[3]
    gCode   = line[4]
    lat     = float(line[5])
    lon     = float(line[6])

    sYear   = int(line[7])
    sMon    = int(line[8])
    eYear   = int(line[9])
    eMon    = int(line[10])

    key = domain

    lYM     = util.ret_lYM([sYear,sMon],[eYear,eMon])
    if len(line)>11:
        lnoYM   = map(YYYYMM2YM, line[12:])
        ltmp    = [YM for YM in lYM if YM not in lnoYM ]
        lYM     = ltmp

    # initialize
    if key not in lkey:
        lkey.append(key)
        dYM[key] = lYM
        dnwCode[key] = nwCode
        dlat[key]= [lat]
        dlon[key]= [lon]


    else:
开发者ID:nbykutsumi,项目名称:PMM,代码行数:31,代码来源:mk-sitelist-3-summary-2A56.py


示例8: arange

from numpy import *
import myfunc.util as util
import os, sys, socket
import matplotlib.pyplot as plt
import matplotlib
from   scipy import stats

matplotlib.use('Agg')


iYM = [1997,12]
eYM = [2013,11]
#eYM = [2006,11]
dMon= 1
lYM = util.ret_lYM(iYM, eYM)[::dMon]

hostname = socket.gethostname()
if  hostname =="mizu":
    rootDir   = "/home/utsumi/mnt/wellshare"
elif hostname=="well":
    rootDir   = "/media/disk2/share"

rootDir = os.path.join(rootDir, "HCELL/SUMNUM/Type")

#lrtype = ["strat","conv","other","all"]
lrtype = ["all"]
ny  = 148
nx  = 180
miss= -9999.
Lat = arange(-37+0.25,37-0.25+0.01,0.5)
Lon = arange(0+1.0,360-1.0+0.01,2.0)
开发者ID:nbykutsumi,项目名称:PMM,代码行数:31,代码来源:draw.ts.sumnum.py



注:本文中的myfunc.util.ret_lYM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mygengo.MyGengo类代码示例发布时间:2022-05-27
下一篇:
Python util.mk_dir函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap