Skip to main content

GEOframe I/O timeseries

Project description

GEOframeFiles

GEOframeFiles is a Python package that provides utilities for reading and writing timeseries file formats used by the GEOframe hydrological modelling system.

Supported formats

Format Read Write
OMS CSV (.csv)
NetCDF (.nc)

Installation

pip install geoframefiles

Quick start

OMS CSV

from geoframefiles.pandas_to_oms import pandas_read_OMS_timeseries, write_OMS_timeseries

# Read
df = pandas_read_OMS_timeseries("precipitation.csv")

# Write (DataFrame with DatetimeIndex)
write_OMS_timeseries(df, 
                     "output.csv")

# Write (plain integer index – add start date and frequency)
write_OMS_timeseries(df, 
                     "output.csv",
                     has_datetime=False,
                     start_date="2020-01-01 12:00",
                     frequency="D")

NetCDF

from geoframefiles.pandas_to_oms import pandas_read_NC_timeseries, write_NC_timeseries

# Read
df = pandas_read_NC_timeseries("precipitation.nc")

# Write  – DataFrame with DatetimeIndex
write_NC_timeseries(df, 
                    "precipitation.nc")

# Write – plain integer index
write_NC_timeseries(df, 
                    "temperature.nc",
                    start_date="2020-01-01 12:00",
                    frequency="D")

DataFrame conventions

  • Rows – timesteps
  • Columns – one per station; column names are used as station IDs
  • IndexDatetimeIndex or plain integer index (see start_date / frequency kwargs)
  • Variablies - (time, lat, lon, x, y, station_id, station_names, var)

Missing values are represented as NaN in memory and as -9999 on disk.

Dependencies

  • pandas >= 1.3
  • numpy >= 1.21
  • netCDF4 >= 1.5

License

GNU General Public License v3 or later – see LICENSE.

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

geoframefiles-0.0.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

geoframefiles-0.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file geoframefiles-0.0.1.tar.gz.

File metadata

  • Download URL: geoframefiles-0.0.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for geoframefiles-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bbb1811c92ec24361b2ac42801d4091366d6f016b92b13ee454412bf18cfe4cd
MD5 2abd1928b6c5392f816645138a78e68a
BLAKE2b-256 3176de5edadadcc279d94107c67c0b1106f8c78a8ae0d0548377e7b9a12b4f89

See more details on using hashes here.

File details

Details for the file geoframefiles-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: geoframefiles-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for geoframefiles-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d993ecb12e4fee578512895eeeb8df74c2912bb042915772262e1f0f9d324a0c
MD5 99860c3e1ef40f6152e8a6ca4a993e4d
BLAKE2b-256 e97af78fe35b9ca2d2185ea93afa6035d450b8eab2f222330c2d0c0350543cc4

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