Skip to main content

Tool for downloading and processing data for TUFLOW FV modelling

Project description

TFV Get Tools

⚠️ Beta Package - This is a beta release. Features may change and improvements are ongoing. Please report any issues to support@tuflow.com.

Tools to assist with downloading and processing meteorological and ocean data to use with TUFLOW FV

License: MIT Project Status: Active

Overview

TFV Get Tools is a Python package that simplifies the process of downloading and processing meteorological and ocean data for use with TUFLOW FV models. The tool supports extraction of tidal data, atmospheric conditions, ocean physics, and wave data from various authoritative sources.

Supported Data Sources

Atmospheric Data:

Ocean Data:

Wave Data:

Tidal Data:

  • FES2014 (AVISO+ Finite Element Solution 2014)
  • FES2022 (Tide Default AVISO+ Finite Element Solution 2022)

Installation

Conda/Mamba (Recommended)

# Create a new environment, if required. 
conda create -n tfv python=3.9
conda activate tfv

# Install the package
conda install -c conda-forge tfv-get-tools

Pip

pip install tfv-get-tools

Quick Start

Command Line Interface

The package provides command-line tools for downloading and processing data:

Ocean Data Example:

# Download HYCOM data for January 2011 in southeast Queensland
GetOcean A 2011-01-01 2011-02-01 153 156 -29 -24

# Download with custom options (top 20m, 3-hourly data, custom prefix)
GetOcean A -p raw_data -pf SEQ_HYCOM -ts 3 -z 0 20 2011-01-01 2011-02-01 153 156 -29 -24

# Merge downloaded files
GetOcean B -i raw_data -o output -rp 28350 -tz 8 -ltz AWST -n merged_hycom.nc

Atmospheric Data Example:

# Download ERA5 atmospheric data
GetAtmos A 2011-01-01 2011-02-01 152 154 -28 -26

# Merge with reprojection and timezone conversion
GetAtmos B -i raw_data -o output -rp 7856 -tz 10 -ltz AEST

Tidal Data Example:

# Extract tidal data using a boundary nodestring shapefile
GetTide output/tide_data.nc 2011-01-01 2012-01-01 boundaries/nodestring.shp path/to/fes2022/

Python API

Ocean Data:

from tfv_get_tools import DownloadOcean, MergeOcean

# Download HYCOM data
result = DownloadOcean(
    start_date='2011-01-01',
    end_date='2011-02-01',
    xlims=(153, 156),
    ylims=(-29, -24),
    out_path='./raw_data',
    source='HYCOM',
    time_interval=24
)

# Merge downloaded files
MergeOcean(
    in_path='./raw_data',
    out_path='./output',
    source='HYCOM',
    reproject=28350,
    local_tz=(8, 'AWST')
)

Atmospheric Data:

from tfv_get_tools import DownloadAtmos, MergeAtmos

# Download BARRA2 data
result = DownloadAtmos(
    start_date='2020-01-01',
    end_date='2020-02-01',
    xlims=(152.72, 153.78),
    ylims=(-27.49, -25.39),
    out_path='./raw_data',
    source='BARRA2',
    model='C2'
)

# Merge with reprojection to GDA2020 MGA56
MergeAtmos(
    in_path='./raw_data',
    out_path='./output',
    source='BARRA2',
    model='C2',
    reproject=7856,
    local_tz=(10.0, 'AEST')
)

Tidal Data:

from pathlib import Path
from tfv_get_tools.tide import ExtractTide

# Basic tidal extraction
ExtractTide(
    start_date='2011-01-01',
    end_date='2012-01-01',
    filename='tide_data.nc',
    out_path='./output',
    freq='15min',
    shapefile='boundaries/nodestring.shv'
)

# Advanced usage with constituent caching
from tfv_get_tools.tide import load_nodestring_shapefile, process_nodestring_gdf, get_constituents

# Load and process boundary shapefile
gdf = load_nodestring_shapefile('boundaries/nodestring.shp', process_ids=[1])
coordinates = process_nodestring_gdf(gdf, spacing=5000)

# Extract constituents once (slow first time, fast afterwards)
constituents = get_constituents(
    coordinates,
    source='FES2022',
    save_cons='boundary_constituents.pkl'
)

# Use cached constituents for faster extraction
ExtractTide(
    start_date='2011-01-01',
    end_date='2012-01-01',
    filename='tide_data.nc',
    out_path='./output',
    freq='15min',
    constituents='boundary_constituents.pkl'
)

Requirements

Data Credits and Acknowledgements

This package utilises data from multiple authoritative sources. Please ensure appropriate attribution when using this data:

Atmospheric Data

Ocean Data

Wave Data

Tidal Data

  • FES Tidal Models: Tidal data provided by AVISO+ and the FES development team. FES2014 and FES2022 are products of Noveltis, Legos, and CLS, with support from CNES.
  • PyTMD: This package utilises the PyTMD Python package for tidal analysis and prediction, developed by Tyler Sutterley.

Support

For questions, bug reports, or feature requests:

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch from main
  3. Make your changes with appropriate tests
  4. Submit a pull request
  5. Email support@tuflow.com to notify the development team

Please ensure your code follows the project's coding standards and includes appropriate documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

Developed by TUFLOW, 2025

Project Status

Active - This project is actively maintained and in use. For update requests or feature suggestions, please email support@tuflow.com.


Last updated: July 2025

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

tfv_get_tools-0.2.2.tar.gz (95.3 kB view details)

Uploaded Source

Built Distribution

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

tfv_get_tools-0.2.2-py3-none-any.whl (104.3 kB view details)

Uploaded Python 3

File details

Details for the file tfv_get_tools-0.2.2.tar.gz.

File metadata

  • Download URL: tfv_get_tools-0.2.2.tar.gz
  • Upload date:
  • Size: 95.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for tfv_get_tools-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ed229fd560b5c1c0b40d903c2b6de7645b085c08f4eaeb688d59a489d7a20368
MD5 f8ff40234a01ad001a9d621ac2e70aff
BLAKE2b-256 4c17d0aaa94d208eff4f4122c0e9a2990c4935ddf34a84cb17124bb336149d3a

See more details on using hashes here.

File details

Details for the file tfv_get_tools-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: tfv_get_tools-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 104.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for tfv_get_tools-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02ac35028dc514568bc23016c96ad04500918be34ee0f4b88ab77972e2554aba
MD5 1294eaf05ac467d0e56784fbeee0a73c
BLAKE2b-256 3a08c58e08dc5091919562be790532208dae1e9b2a59849ca073f511e5e4a1bd

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