예제 #1
0

# fetch some data :

import wget
resource = []

for year in range(2000, 2010):
  url = 'http://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.dailyavgs/surface/slp.%s.nc' % year
  resource.append(wget.download(url))
  
from ocgis import RequestDataset, OcgOperations

rd =  RequestDataset(resource[0])
rd.inspect()

rd =  RequestDataset(resource)
rd.inspect()
예제 #2
0
from ocgis import RequestDataset
from ocgis.test.base import create_gridxy_global, create_exact_field
from ocgis.variable.crs import Spherical

# Create synthetic data for this example.
grid = create_gridxy_global(resolution=5.0)
field = create_exact_field(grid, 'exact', ntime=31, crs=Spherical())
field.write('ocgis_example_inspect_request_dataset.nc')

# Create the request dataset object.
rd = RequestDataset('ocgis_example_inspect_request_dataset.nc')

# Provides a metadata dump for the request dataset.
rd.inspect()

# These are the auto-discovered data variable names.
assert rd.variable == 'exact'

# The dimension map provides information on how OCGIS will interpret the dataset.
rd.dimension_map.pprint()
예제 #3
0
import wget
resource = []
for year in range(2008, 2010):
    url = 'http://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.dailyavgs/surface/slp.%s.nc' % year
    resource.append(wget.download(url))

from ocgis import RequestDataset, OcgOperations
rd = RequestDataset(resource[0])
print rd.inspect()  # works fine

from netCDF4 import MFDataset
mdf = MFDataset(resource)

print '**********************'
print mdf.variables.keys()

var = mdf.variables['slp']

print '**********************'
rd = RequestDataset(resource)
print rd.inspect()
예제 #4
0
import wget
resource = []
for year in range(2008, 2010):
  url = 'http://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.dailyavgs/surface/slp.%s.nc' % year
  resource.append(wget.download(url))

from ocgis import RequestDataset, OcgOperations
rd = RequestDataset(resource[0])
print rd.inspect() # works fine

from netCDF4 import MFDataset
mdf = MFDataset(resource)

print '**********************'
print mdf.variables.keys()

var = mdf.variables['slp']


print '**********************'
rd = RequestDataset(resource)
print rd.inspect()