“cara membuka dataset di netcdf4” Kode Jawaban

cara membuka dataset di netcdf4

import netCDF4

ds = netCDF4.Dataset(/path_to_file/file_name.nc)
TheRubberDucky

string dalam file netcdf python

import netCDF4
import numpy as np

str_out = netCDF4.stringtochar(np.array(['test'], 'S4'))

nc = netCDF4.Dataset('./test.nc', 'w', format='NETCDF4_CLASSIC')
nc.createDimension('lat', 1)
nc.createDimension('lon', 1)
nc.createDimension('nchar', 4)

lat = nc.createVariable('lat', 'f4', ('lat',))
lon = nc.createVariable('lon', 'f4', ('lon',))
place = nc.createVariable('place', 'S1', ('nchar'))

lat[:] = 17.002
lon[:] = -81.501
place[:] = str_out

nc.close()
Tremendous Enceladus

Dataset Python CreateMension Unlimited

# Create the unlimited time dimension:
dim_t = f.createDimension('time', None)
Perro Fiel

Variabel grup Python NC

nc_f0 = Dataset('path_to_nc','r')
var = nc_f0.groups['group_name'].variables['var_name']
Perro Fiel

Jawaban yang mirip dengan “cara membuka dataset di netcdf4”

Pertanyaan yang mirip dengan “cara membuka dataset di netcdf4”

Lebih banyak jawaban terkait untuk “cara membuka dataset di netcdf4” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya