def download(dbname, dts, bbox=None): res = 0.10 for dt in [ dts[0] + timedelta(tt) for tt in range((dts[-1] - dts[0]).days + 1) ]: data, lat, lon, t = fetch(dbname, dt, bbox) datasets.ingest(dbname, table, data, lat, lon, res, t)
def download(dbname, dts, bbox=None): res = 0.25 data, lat, lon, dts = fetch(dbname, dts, bbox) data *= 24.0 # convert from mm/hr to mm for t, dt in enumerate( [dts[0] + timedelta(tt) for tt in range((dts[-1] - dts[0]).days + 1)]): datasets.ingest(dbname, table, data[t, :, :], lat, lon, res, dt)
def download(dbname, dts, bbox=None): res = 1.0 sdata, _, _, _ = fetchScalingGrid(dbname, dts[0], bbox) for dt in [dts[0] + timedelta(tt) for tt in range((dts[-1] - dts[0]).days + 1)]: try: data, lat, lon, t = fetch(dbname, dt, bbox) data *= sdata datasets.ingest(dbname, table, data, lat, lon, res, t, False) except: pass
def download(dbname, dts, bbox=None): """Downloads NCEP Reanalysis data from IRI data library.""" res = 1.875 tmax, lat, lon, _ = fetch_tmax(dbname, dts, bbox) tmin, _, _, _ = fetch_tmin(dbname, dts, bbox) uwnd, _, _, _ = fetch_uwnd(dbname, dts, bbox) vwnd, _, _, dts = fetch_vwnd(dbname, dts, bbox) wnd = np.sqrt(uwnd**2 + vwnd**2) tmax -= 273.15 tmin -= 273.15 for t, dt in enumerate([dts[0] + timedelta(tt) for tt in range((dts[-1] - dts[0]).days + 1)]): datasets.ingest(dbname, "tmax.ncep", tmax[t, :, :], lat, lon, res, dt) datasets.ingest(dbname, "tmin.ncep", tmin[t, :, :], lat, lon, res, dt) datasets.ingest(dbname, "wind.ncep", wnd[t, :, :], lat, lon, res, dt)
def download(dbname, dts, bbox=None): """Downloads NCEP Reanalysis data from IRI data library.""" res = 1.875 tmax, lat, lon, _ = fetch_tmax(dbname, dts, bbox) tmin, _, _, _ = fetch_tmin(dbname, dts, bbox) uwnd, _, _, _ = fetch_uwnd(dbname, dts, bbox) vwnd, _, _, dts = fetch_vwnd(dbname, dts, bbox) wnd = np.sqrt(uwnd**2 + vwnd**2) tmax -= 273.15 tmin -= 273.15 for t, dt in enumerate( [dts[0] + timedelta(tt) for tt in range((dts[-1] - dts[0]).days + 1)]): datasets.ingest(dbname, "tmax.ncep", tmax[t, :, :], lat, lon, res, dt) datasets.ingest(dbname, "tmin.ncep", tmin[t, :, :], lat, lon, res, dt) datasets.ingest(dbname, "wind.ncep", wnd[t, :, :], lat, lon, res, dt)
def download(dbname, dt, bbox=None): res = 0.25 data, lat, lon, t = fetch(dbname, dt, bbox) datasets.ingest(dbname, table, data, lat, lon, res, t)
def download(dbname, dt, bbox=None): res = 1.0 data, lat, lon, t = fetch(dbname, dt, bbox) sdata, _, _, _ = fetchScalingGrid(dbname, dt, bbox) data *= sdata datasets.ingest(dbname, table, data, lat, lon, res, t)
def download(dbname, dts, bbox=None): res = 0.25 data, lat, lon, dts = fetch(dbname, dts, bbox) for t, dt in enumerate([dts[0] + timedelta(tt) for tt in range((dts[-1] - dts[0]).days + 1)]): datasets.ingest(dbname, table, data[t, :, :], lat, lon, res, dt)
def download(dbname, dts, bbox=None): res = 0.05 for dt in [dts[0] + timedelta(tt) for tt in range((dts[1] - dts[0]).days + 1)]: data, lat, lon, t = fetch(dbname, dt, bbox) datasets.ingest(dbname, table, data, lat, lon, res, t)