Skip to main content

ncBuilder

Project description

ncBuilder

netCDF4 tool to help creating new files from scratch

example

from ncBuilder import ncBuilder
import datetime as dt
import numpy as np
import pandas as pd

dtNow = dt.datetime.now()
nc_file = ncBuilder.initiNC(dtNow, '/path/to/file', '_suffix.nc')

times = pd.date_range('2021-01-01', periods=10)
lat = np.arange(-30., 10. + 0.05, 0.05)
lon = np.arange(-60., -30 + 0.05, 0.05)
temp = np.random.rand(times.size, lat.size, lon.size)

ncBuilder.createNC(nc_file, dtNow, lat, lon, time=times)
ncBuilder.create_NC_variable(nc_file,
                             'temp',
                             comp_lvl=6,
                             dims=('time',
                                   'latitude',
                                   'longitude'),
                             dtype=np.float64,
                             units='C',
                             standard_name='temperature in °C')
ncBuilder.update_NC(nc_file, 'temp', temp)
nc_file.close()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncBuilder-0.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncBuilder-0.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file ncBuilder-0.0.2.tar.gz.

File metadata

  • Download URL: ncBuilder-0.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3

File hashes

Hashes for ncBuilder-0.0.2.tar.gz
Algorithm Hash digest
SHA256 09e03abc76ae66db32129b6aaacee5a1e88f6f1754ba75387188297296195920
MD5 576b24bcdc46461ce2efda6a5f4e6fe2
BLAKE2b-256 b71dbf3b4159bcd44def37a965761ab183e7db4aa0551d51a968a9da28d3abb9

See more details on using hashes here.

File details

Details for the file ncBuilder-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ncBuilder-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3

File hashes

Hashes for ncBuilder-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c061539613ca04bb74a782cf325e3ca62b8ebbaedfce64d4597b88f879605f1e
MD5 9d21b47d402c053d3a03f8835b0bb59f
BLAKE2b-256 9c590bc5ac014ca5093222edc7bcbfc80c5e678ac0e1baa8fb845be5a87ed60c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page