当前位置: 首页>>代码示例>>Python>>正文


Python Dataset.instituion方法代码示例

本文整理汇总了Python中netCDF4.Dataset.instituion方法的典型用法代码示例。如果您正苦于以下问题:Python Dataset.instituion方法的具体用法?Python Dataset.instituion怎么用?Python Dataset.instituion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在netCDF4.Dataset的用法示例。


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

示例1: netcdfSIT

# 需要导入模块: from netCDF4 import Dataset [as 别名]
# 或者: from netCDF4.Dataset import instituion [as 别名]
def netcdfSIT(lats,lons,var):
    directory = '/home/zlabe/Surtsey/seaice_obs/Thk/March/'
    name = 'icesatG_regrid_March_20032008.nc'
    filename = directory + name
    ncfile = Dataset(filename,'w',format='NETCDF4')
    ncfile.description = 'Sea ice thickness processed by NASA-G and now' \
                         'regridded on an EASE2.0 100 km grid for the' \
                         'period of March 2003-2008'
    
    ### Dimensions
    ncfile.createDimension('years',var.shape[0])
    ncfile.createDimension('lat',var.shape[1])
    ncfile.createDimension('lon',var.shape[2])
    
    ### Variables
    years = ncfile.createVariable('years','f4',('years'))
    latitude = ncfile.createVariable('lat','f4',('lat','lat'))
    longitude = ncfile.createVariable('lon','f4',('lon','lon'))
    varns = ncfile.createVariable('sit','f4',('years','lat','lon'))
    
    ### Units
    varns.units = 'meters'
    ncfile.title = 'ICESat-G'
    ncfile.instituion = 'Dept. ESS at University of California, Irvine'
    ncfile.source = 'NASA-G'
    ncfile.references = 'Donghui Yi, H. Zwally'
    
    ### Data
    years[:] = list(xrange(var.shape[0]))
    latitude[:] = lats
    longitude[:] = lons
    varns[:] = var
    
    ncfile.close()
    print 'Completed: Created netCDF4 File!'
开发者ID:zmlabe,项目名称:SeaIceThickness,代码行数:37,代码来源:calc_IcesatG.py

示例2: netcdfPiomas

# 需要导入模块: from netCDF4 import Dataset [as 别名]
# 或者: from netCDF4.Dataset import instituion [as 别名]
def netcdfPiomas(lats,lons,var,directory):
    name = 'piomas_regrid_March_19792015.nc'
    filename = directory + name
    ncfile = Dataset(filename,'w',format='NETCDF4')
    ncfile.description = 'PIOMAS Sea ice thickness reanalysis from 1979-2015 ' \
                        'interpolated on a 180x180 grid (latxlon)' \
                        'of NSIDC EASE100' 
    
    ### Dimensions
    ncfile.createDimension('years',var.shape[0])
    ncfile.createDimension('lat',var.shape[1])
    ncfile.createDimension('lon',var.shape[2])
    
    ### Variables
    years = ncfile.createVariable('years','f4',('years'))
    latitude = ncfile.createVariable('lat','f4',('lat','lat'))
    longitude = ncfile.createVariable('lon','f4',('lon','lon'))
    varns = ncfile.createVariable('thick','f4',('years','lat','lon'))
    
    ### Metrics
    varns.units = 'meters'
    ncfile.title = 'PIOMAS March SIT'
    ncfile.instituion = 'Dept. ESS at University of California, Irvine'
    ncfile.source = 'University of Washington'
    ncfile.references = '[Zhang and Rothrock, 2003]'
    
    ### Data
    years[:] = list(xrange(var.shape[0]))
    latitude[:] = lats
    longitude[:] = lons
    varns[:] = var
    
    ncfile.close()
    print 'Completed: Created netCDF4 File!'
开发者ID:zmlabe,项目名称:SeaIceThickness,代码行数:36,代码来源:calc_MarchSIT_timeseries.py

示例3: netcdfSIT

# 需要导入模块: from netCDF4 import Dataset [as 别名]
# 或者: from netCDF4.Dataset import instituion [as 别名]
def netcdfSIT(lats,lons,var,varmean):
    directory = '/home/zlabe/Surtsey/seaice_obs/Thk/March/'
    name = 'sub_regrid_March_19861994.nc'
    filename = directory + name
    ncfile = Dataset(filename,'w',format='NETCDF4')
    ncfile.description = 'Sea ice thickness processed by submarine' \
                         'data although record is spotty throughout' \
                         '1986-1994 reference period. Mean thickness' \
                         'over the period is also included.'
    
    ### Dimensions
    ncfile.createDimension('years',var.shape[0])
    ncfile.createDimension('lat',var.shape[1])
    ncfile.createDimension('lon',var.shape[2])
    
    ### Variables
    years = ncfile.createVariable('years','f4',('years'))
    latitude = ncfile.createVariable('lat','f4',('lat','lat'))
    longitude = ncfile.createVariable('lon','f4',('lon','lon'))
    varns = ncfile.createVariable('sit','f4',('years','lat','lon'))
    varnsmean = ncfile.createVariable('meansit','f4',('lat','lon'))
    
    ### Units
    varns.units = 'meters'
    varnsmean.units = 'meters'
    ncfile.title = 'Submarine Data'
    ncfile.instituion = 'Dept. ESS at University of California, Irvine'
    ncfile.source = 'NSIDC, J. Maslanik & A.P. Barrett'
    ncfile.created_by = 'Zachary Labe ([email protected])'
#    ncfile.references = ''
    
    ### Data
    years[:] = list(xrange(var.shape[0]))
    latitude[:] = lats
    longitude[:] = lons
    varns[:] = var
    varnsmean[:] = varmean
    
    ncfile.close()
    print 'Completed: Created netCDF4 File!'
开发者ID:zmlabe,项目名称:SeaIceThickness,代码行数:42,代码来源:calc_Submarine.py

示例4: netcdfSIT

# 需要导入模块: from netCDF4 import Dataset [as 别名]
# 或者: from netCDF4.Dataset import instituion [as 别名]
def netcdfSIT(lats,lons,var,varmean):
    directory = '/home/zlabe/Surtsey/seaice_obs/Thk/March/'
    name = 'icebridge_regrid_March_20092014.nc'
    filename = directory + name
    ncfile = Dataset(filename,'w',format='NETCDF4')
    ncfile.description = 'Sea ice thickness processed by iceBridge onto' \
                         'EASE2.0 100km grids for spring 2009-2014.' \
                         'Mean thickness also included for period over' \
                         '2009-2014.'
    
    ### Dimensions
    ncfile.createDimension('years',var.shape[0])
    ncfile.createDimension('lat',var.shape[1])
    ncfile.createDimension('lon',var.shape[2])
    
    ### Variables
    years = ncfile.createVariable('years','f4',('years'))
    latitude = ncfile.createVariable('lat','f4',('lat','lat'))
    longitude = ncfile.createVariable('lon','f4',('lon','lon'))
    varns = ncfile.createVariable('sit','f4',('years','lat','lon'))
    varnsmean = ncfile.createVariable('meansit','f4',('lat','lon'))
    
    ### Units
    varns.units = 'meters'
    varnsmean.units = 'meters'
    ncfile.title = 'IceBridge'
    ncfile.instituion = 'Dept. ESS at University of California, Irvine'
    ncfile.source = 'NSIDC, Andrew P. Barrett'
#    ncfile.references = ''
    
    ### Data
    years[:] = list(xrange(var.shape[0]))
    latitude[:] = lats
    longitude[:] = lons
    varns[:] = var
    varnsmean[:] = varmean
    
    ncfile.close()
    print 'Completed: Created netCDF4 File!'
开发者ID:zmlabe,项目名称:SeaIceThickness,代码行数:41,代码来源:calc_Icebridge.py

示例5: netcdfSatelliteG

# 需要导入模块: from netCDF4 import Dataset [as 别名]
# 或者: from netCDF4.Dataset import instituion [as 别名]
def netcdfSatelliteG(lats,lons,var,directory):
    name = 'satelliteG_regrid_March_20032015.nc'
    filename = directory + name
    ncfile = Dataset(filename,'w',format='NETCDF4')
    ncfile.description = 'Satellite data for ICESat-G (2003-2008) and' \
                         'CryoSat-2 (2011-2015) that have been regridded' \
                         'on 180x180 EASE2.0 100km grids. Years 2009-2010 are' \
                         'available in the data but have been filled with' \
                         'nan values to be inclusive. Shape is therefore' \
                         '[13,180,180]'
    
    ### Dimensions
    ncfile.createDimension('years',var.shape[0])
    ncfile.createDimension('lat',var.shape[1])
    ncfile.createDimension('lon',var.shape[2])
    
    ### Variables
    years = ncfile.createVariable('years','f4',('years'))
    latitude = ncfile.createVariable('lat','f4',('lat','lat'))
    longitude = ncfile.createVariable('lon','f4',('lon','lon'))
    varns = ncfile.createVariable('thick','f4',('years','lat','lon'))
    
    ### Metrics
    varns.units = 'meters'
    ncfile.title = 'ICESat_G/CryoSat March SIT'
    ncfile.instituion = 'Dept. ESS at University of California, Irvine'
    ncfile.source = 'NASA-G/ESA Products'
    ncfile.references = 'Donghui Yi, H. Zwally, S. Laxon'
    
    ### Data
    years[:] = list(xrange(var.shape[0]))
    latitude[:] = lats
    longitude[:] = lons
    varns[:] = var
    
    ncfile.close()
    print 'Completed: Created netCDF4 File!'
开发者ID:zmlabe,项目名称:SeaIceThickness,代码行数:39,代码来源:calc_MarchSIT_timeseries.py


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