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.4.tar.gz (95.5 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.4-py3-none-any.whl (104.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tfv_get_tools-0.2.4.tar.gz
  • Upload date:
  • Size: 95.5 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.4.tar.gz
Algorithm Hash digest
SHA256 b15b6bf606fec6692f0da5851e9ab3c8adec294883f45d58796ba0543ffe26e9
MD5 66533c59fcb5ba8db50aa60b76ac3c05
BLAKE2b-256 bc49b2dc3acef71e24427914fff870d3e59b6f69b3860c93ef680c740ecacfb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tfv_get_tools-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 104.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ec3ae5cd706746750b040f2faa489bcb4075bf8b10dc300497714622fdd7ea80
MD5 f34eda472127ead0f36bfe5e8748085f
BLAKE2b-256 fcb47e68d062eda8042afbf9d663dfbc5d5aee2bb4ce83aa1a1037107f0472a0

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