コード例 #1
0
ファイル: grid_coop.py プロジェクト: akrherz/MSDOT
# Grid daily COOP data please
# high
# low
# precip

import sys
import netCDF3
import numpy
import mx.DateTime
from pyIEM import iemdb, mesonet
import Ngl
i = iemdb.iemdb()
mesosite = i['mesosite']
coop = i['coop']
locs = {}

badtimes = []
BASE = mx.DateTime.DateTime(1970,1,1)
STOP = mx.DateTime.DateTime(2010,1,1)
sts = mx.DateTime.DateTime(1970,1,1)
ets = mx.DateTime.DateTime(2010,1,1)

WEST  = -92.0
SOUTH = 30.0
EAST  = -88.0
NORTH =  35.25
NX = 16
NY = 23
DELTAX = (EAST - WEST) / float(NX) 
DELTAY = (NORTH - SOUTH) / float(NY)
XAXIS = WEST + DELTAX * numpy.arange(0, NX)
コード例 #2
0
# Grid hourly ASOS data please
# Temperature (K),
# Wind speed (mps),
# % Sun shine, 
# Precipitation, 
# Relative humidity.

import sys
import netCDF3
import numpy
import mx.DateTime
from pyIEM import iemdb, mesonet
import Ngl
i = iemdb.iemdb()
mesosite = i['mesosite']
asos = i['asos']
locs = {}

badtimes = [mx.DateTime.DateTime(1973, 12, 31, 19, 00),
  mx.DateTime.DateTime(1973, 12, 31, 20, 0),
  mx.DateTime.DateTime(1972, 12, 17, 4,  0),
  mx.DateTime.DateTime(1972, 12, 17, 5,  0),
  mx.DateTime.DateTime(1973, 12, 31, 23, 0),
  mx.DateTime.DateTime(1974, 12, 31, 20, 0),
  mx.DateTime.DateTime(1974, 12, 31, 21, 0),
  mx.DateTime.DateTime(1974, 12, 31, 22, 0),
  mx.DateTime.DateTime(1978, 12 ,31, 20, 0),
  mx.DateTime.DateTime(1978, 12 ,31, 21, 0),
  mx.DateTime.DateTime(1978,12,31, 19,0),
 ]
BASE = mx.DateTime.DateTime(1970,1,1)